import YM.Next.MAXWELL.Steps /-! # Only two interpolation constants before cross-seed -/ set_option autoImplicit false noncomputable section namespace YM.Maxwell.Free open Set Function Filter Tensor Analysis MeasureTheory Wick open scoped ContDiff Topology BigOperators InnerProductSpace ComplexOrder variable {G : Gauge} def permFrame (s : Equiv.Perm Axis) : Signed := ⟨s,fun _ => false⟩ def menu (i a b z : Axis) := parity z i * parity z a * parity z b def Rays (x : Flavor 1) (f : Axis → ℝ) := ∀ z, actFlavor (Signed.reflect z) 1 x = f z • x lemma rays_shift (i a b) : Rays (shift i a b) (menu i a b) := by intro z; simpa [tilt,Signed.mirror,parity,Signed.reflect, menu] using tilt_step (Signed.mirror z) i a b lemma meal_price (i a b z : Axis) : menu i a b z=1 ∨ menu i a b z= -1 := by unfold menu parity; split_ifs <;> simp def coop (a : Axis) (w : ℝ) : Module.End ℝ (Flavor 1) := (1/2:ℝ) • (LinearMap.id + w • actFlavor (Signed.reflect a) 1) def coOp (f : Axis → ℝ) := (coop 3 (f 3)).comp ((coop 2 (f 2)).comp ((coop 1 (f 1)).comp (coop 0 (f 0)))) lemma coop_at (z : Axis) (u : Flavor 1) {g : Axis → ℝ} (h : Rays u g) (hg : g z=1 ∨ g z = -1) (w : ℝ) (hw : w=1 ∨ w = -1) : coop z w u = (open scoped Classical in if w=g z then u else 0) := by classical simp only [coop,LinearMap.add_apply,LinearMap.smul_apply,h z, LinearMap.id_apply] rcases hw with H | H <;> rcases hg with he | he <;> rw [H,he] <;> simp only [if_pos,one_smul,neg_smul,add_neg_cancel,smul_zero,← two_smul ℝ u,smul_smul] <;> norm_num rw [← add_smul]; norm_num lemma parity_plate (f g : Axis → ℝ) (u : Flavor 1) (h : Rays u g) (hp : ∀ z, f z=1 ∨ f z = -1) (hq : ∀ z,g z=1 ∨ g z = -1) : coOp f u = (open scoped Classical in if f=g then u else 0) := by classical by_cases hh : f=g · subst g; simp [coOp,coop_at _ _ h (hq _) _ (hp _)] rw [if_neg hh]; unfold coOp; simp only [LinearMap.comp_apply] have ht (z) := coop_at z _ h (hq z) (f z) (hp z) rw [ht] -- use classical locally matching open scoped split_ifs with hw₀; swap; simp rw [ht]; split_ifs with hw₁; swap; simp rw [ht]; split_ifs with hw₂; swap; simp rw [ht]; split_ifs with hw₃ exact (hh (funext fun i => by fin_cases i <;> assumption)).elim rfl lemma trays (f : Axis → ℝ) (u : Flavor 1) (h : Rays u f) (hf : ∀ z, f z=1 ∨ f z = -1) : u∈Submodule.span ℝ {p : Flavor 1|∃ i a b : Axis,a fin_cases a <;> fin_cases b <;> simp [Axis] at ht ⊢ <;> simp [menu,parity,Axis] at H <;> norm_num at H set_option maxHeartbeats 500000 in lemma track_far (i a b : Axis) (ht : a < b) (h : menu 0 1 2=menu i a b) : (i=0 ∧ a=1 ∧ b=2) ∨ (i=1 ∧ a=0 ∧ b=2) ∨ (i=2 ∧ a=0 ∧ b=1) := by have H := And.intro (congr_fun h 0) (And.intro (congr_fun h 1) (congr_fun h 2)) clear h fin_cases i <;> fin_cases a <;> fin_cases b <;> simp [Axis] at ht ⊢ <;> simp [menu,parity,Axis] at H <;> norm_num at H section classification variable (f : Axis → Flavor 0 →ₗ[ℝ] Flavor 1) (h : Conveyor f) include h lemma near_cell : ∃ a : ℝ, f 0 (cell 0 1)=a • shift 0 0 1 := by let P := menu 0 0 1 let p := f 0 (cell 0 1) let s := Equiv.swap (2:Axis) 3 let J := actFlavor (permFrame s).ortho 1 let T := (1/2:ℝ) • (LinearMap.id (M:=Flavor 1) (R:=ℝ) + J) have hs : T p=p := by have ht : J p=p := by rw [show J p=_ from Conveyor.runs h s 0 0 1]; simp [s,Equiv.swap_apply_def,Axis,p] simp only [T, LinearMap.smul_apply, LinearMap.add_apply, LinearMap.id_apply,ht,← two_smul ℝ p,smul_smul] norm_num let V := Submodule.span ℝ ({shift 0 0 1} : Set (Flavor 1)) have hv : shift 0 0 1∈ V := Submodule.subset_span rfl have he : shift 2 1 2 + shift 3 1 3 = shift 0 0 1 := by have hh := free_shift 1 rw [Fin.sum_univ_four,show shift 1 1 1=0 by rw [shift,cell_center,map_zero],shift_skew 2,shift_skew 3,add_zero,add_assoc,← neg_add] at hh exact ((add_neg_eq_zero ..).mp hh).symm have hp : Submodule.span ℝ {q : Flavor 1|∃ i a b : Axis,a fin_cases l <;> simp [Axis] at hi <;> assumption refine ⟨a,fun i => LinearMap.ext fun p => ?_⟩ let q := Equiv.swap 0 i let k := permFrame q let s := k.ortho let v := actFlavor s⁻¹ 0 p have hm : actFlavor s 0 v=p := act_inv_f s p have hh : k.perm 0=i := Equiv.swap_apply_left _ _ have he := h 0 k v change actFlavor s 1 _ = _ at he rw [hm,hh,show tilt k 0=1 from rfl,one_smul,ht,LinearMap.smul_apply,map_smul,step_go,heads,hh,show tilt k 0=1 from rfl,one_smul,hm] at he exact he.symm end classification end YM.Maxwell.Free