math / data /lean /OAI /Analysis /FreeWords /CyclicMatrix.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.96 kB
import Mathlib
namespace OAI
noncomputable section
namespace KKLocalPatching
noncomputable section
variable {G : Type*} [Fintype G] [DecidableEq G] [AddCommGroup G]
def shiftMatrix (g : G) : Matrix G G β„‚ := (Equiv.addRight g).permMatrix β„‚
omit [Fintype G] in
@[simp] theorem shift_zero : shiftMatrix (0:G)=1 := by
have h : Equiv.addRight (0:G)=1 := by ext; simp [Equiv.addRight]
simp [shiftMatrix,h]
@[simp] theorem shift_add (g h : G) : shiftMatrix (g+h)=shiftMatrix g*shiftMatrix h := by
have he : Equiv.addRight (g+h)=(Equiv.addRight h)*(Equiv.addRight g) := by
ext x
simp [Equiv.addRight,add_assoc]
rw [shiftMatrix,he,Matrix.permMatrix_mul]
rfl
omit [Fintype G] in
@[simp] theorem shift_star (g : G) : star (shiftMatrix g)=shiftMatrix (-g) := by
change ((Equiv.addRight g).permMatrix β„‚).conjTranspose=_
rw [Matrix.conjTranspose_permMatrix]
congr 1
ext x
simp [Equiv.addRight]
def shiftUnitary (g : G) : unitary (Matrix G G β„‚) :=
⟨shiftMatrix g, by
constructor
Β· rw [shift_star,← shift_add,neg_add_cancel,shift_zero]
Β· rw [shift_star,← shift_add,add_neg_cancel,shift_zero]⟩
@[simp] theorem shiftUnitary_val (g:G) : (shiftUnitary g).val=shiftMatrix g := rfl
def shiftHom : Multiplicative G β†’* unitary (Matrix G G β„‚) where
toFun g := shiftUnitary g.toAdd
map_one' := Subtype.ext shift_zero
map_mul' g h := Subtype.ext (shift_add g.toAdd h.toAdd)
@[simp] theorem shift_zsmul (k : β„€) (g : G) : shiftUnitary (k β€’ g)=(shiftUnitary g)^k :=
(shiftHom : Multiplicative G β†’* unitary (Matrix G G β„‚)).map_zpow _ _
theorem shift_trace (g : G) (hg : g β‰  0) : Matrix.trace (shiftMatrix g)=0 := by
rw [shiftMatrix,Matrix.trace_permutation]
have hf : Function.fixedPoints (Equiv.addRight g)=βˆ… := by
ext x
change (x+g=x) ↔ False
simp only [add_eq_left]
exact iff_false_intro hg
rw [hf,Set.ncard_empty,Nat.cast_zero]
end
end KKLocalPatching
end
end OAI