import YM.RG08.Spin.Flash /-! # Simultaneous inversion in the E1 unmodified kernel supplies (extension of RuneTurn, direct proof on T too). This does not assert even external characters; phase inversion arguments belong to other stages. -/ set_option autoImplicit false set_option linter.unusedVariables false noncomputable section namespace YM.RG08.Invert open Function Filter Set Lattice Wilson Exterior Precision Laurent Next.Free Next.Free.Flight RG RG.Supply Bloch Input Finset Matrix open Planned.PrimaryIntegral295 Carrier open scoped BigOperators Topology Real Classical Matrix variable {G:Gauge}{i j k t r:ℕ}{L:Side} def sigma : YM.Signed:= ⟨Equiv.refl _,fun _=> true⟩ lemma sig_act {V:Type} [AddCommGroup V] (x:Four V): sigma.act x= -x:=rfl def penny (p:Momentum)(i:Axis):= aspect sigma p i -- -(mode p (step i)); positive phase, orientation shader after field transformation lemma penny_at (p: Momentum)(i:Axis): penny p i= -mode p (step i):= by change -twirl _ _= _; congr 1; rw [factor]; simp [twirl] private lemma chip_sp (p: Momentum)(i:Axis): penny p i * chip (-p i)=chip (p i):= by rw [penny_at, factor,chip,chip,mul_neg,Complex.exp_neg]; field_simp [Complex.exp_ne_zero]; ring def shineF (p:Momentum)(r:ℕ): Frequency r r:= mask r (penny p) lemma gleam (p:Momentum)(r:ℕ): shineF p r * shineF (-p) r=1:=by unfold shineF; rw [mask_mul,show (fun i=> penny p i * penny (-p) i)=_ from funext fun i=>aspect_cancel sigma p i, mask_one] -- Covariance notation in positive phase. private def Gears (p q:Momentum)(A B:Frequency i j): Prop:= shineF p i * B=A*shineF q j namespace Gears variable {p q t : Momentum}{A B X Y:Frequency i j} private lemma nil (p:Momentum)(r:ℕ) : Gears p p (1:Frequency r r) 1:= by simp [Gears] private lemma zero (p q:Momentum)(r s:ℕ):Gears p q (0:Frequency r s) 0:=by simp [Gears] private lemma mat (h:Gears p q A B)(hv:Gears p q X Y) : Gears p q (A+X) (B+Y):=by unfold Gears at *; rw [Matrix.mul_add,h,hv,Matrix.add_mul] private lemma less (h:Gears p q A B)(hv:Gears p q X Y) : Gears p q (A-X) (B-Y):=by unfold Gears at *; rw [Matrix.mul_sub,h,hv,Matrix.sub_mul] private lemma scale (h:Gears p q A B)(c:ℂ): Gears p q (c • A) (c • B):= by unfold Gears at *; rw [Matrix.mul_smul,h,Matrix.smul_mul] private lemma prod {U V : Frequency j k} (h:Gears p q A B)(hv:Gears q t U V): Gears p t (A*U) (B*V):= by unfold Gears at *; rw [← Matrix.mul_assoc,h,Matrix.mul_assoc,hv, Matrix.mul_assoc] private lemma diag (p:Momentum)(r:ℕ)(t:Axis→ℂ): Gears p p (mask r t) (mask r t):=by unfold Gears shineF; rw [mask_mul,mask_mul,show (fun i=> penny p i*t i)=fun i=> t i*penny p i from funext fun i=>mul_comm ..] private lemma source (L:Side)(p: Momentum)(r:ℕ): Gears p p (signal L r p) (signal L r (-p)):=by unfold Gears shineF signal; rw [mask_insert]; congr! 2 with i; unfold tripQ; funext i; rw [mul_left_comm,show penny p i*chip ((-p) i)=_ from chip_sp p i] private lemma retainH {p q:Momentum}(h:Gears p q A B): Gears q p Bᵀ Aᵀ:= by -- shader trans symmetric means orientation of B/A flips unfold Gears at *; apply Matrix.transpose_injective; simpa only [Matrix.transpose_mul,shineF, mask_trans,Matrix.transpose_transpose] using h.symm private lemma breaths (L:Side)(p: Momentum)(r:ℕ): Gears p p (mirage L r p) (mirage L r (-p)) := by have h:=source L p r; unfold mirage; simp_rw [neg_neg]; exact retainH h private lemma field (P : Train j)(u:ℝ)(hu:0 massFilter P.patch q • mask r f) (funext fun i=> rail_opp P p l i) private lemma wire_d (P : Flight j i)(k:ℝ)(h:0