O (some i)) (fun i => h (some i)) + (Sum.inl (slopeTestIndex d)) (Sum.inl 0) rfl (by simp [O,Q]) + (B.gridInput (by omega) O h U) (B.gridPiece (by omega) O h U W cell) ?_ q cell hb hu + (fun i => hW (some i) cell) (fun i => he (some i) cell) + (B.gridPiece_supported (by omega) O h U W hU hW cell) ?_ + · intro i + fin_cases i <;> simp [gridInput,U,R,primitiveTests,primitiveFamilyTests, + initialTest_slope,initialTest_coordinate,spatialTranslate_zero] + · intro i + rw [← he i cell] + exact B.gridPiece_control (by omega) O h U W cell i + +end InitialCoverSystem.PatchAtlas +end SlopeCoordinateFormalLaw + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthAnchorLaw.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthAnchorLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a400b6456dd2f6cf1cd32929d288a184002b3af --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthAnchorLaw.lean @@ -0,0 +1,52 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AxisCutCommutation +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AxisAnchorFamily + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section GrowthAnchorLaw +namespace InitialCoverSystem +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem growth_anchor_law (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (s w z : CutRing) (hs : 0 < ordinary s) (hsr : ordinary s < ordinary r/2) + (hwz : w*z=1) + (hshort : (1+|ordinary (cutTau^a)|)*(|ordinary w|+|ordinary (cutTau*w)|) < ordinary s/4) + {C : ℝ} (hC : 1000 ≤ C) (hSlope : 8*C < ordinary (cutTau^a)) + (hconj : |conjugate (cutTau^a)| < 1/1000) : + ∃ (N : ℕ) (_hN : 1005 ≤ N), ∀ (M : ℕ) (B : InitialCoverSystem a r m hm M) + (_h : B.TangentChartLaws (symmetricWindowLength s) (symmetricWindowStart s) w), + ∀ n : ℕ, ∀ hn : N ≤ n, ∀ g : B.CoordinateWindowLaw n, + ∀ (d : Fin 2) (p : ℤ), + CentralOn (coverMap M (alternatingGenerator a r m hm)) + (⨆ i : Fin (growthAnchorLength n), ⨆ j : Fin ((growthAnchorFamily n (by omega) p).count i+1), + (((growthAnchorFamily n (by omega) p).cuts i).prefixCopy B (by omega) g d j.val).range) := by + obtain ⟨N,hN,hcomm⟩ := axis_cut_sequence_commutations + (a := a) (hm := hm) hlarge hr s w z hs hsr hwz hshort hC hSlope hconj + refine ⟨N,hN,?_⟩ + intro M B h n hn g d p + let A := growthAnchorFamily n (by omega) p + have hlens := growth_lengths (show 1005 ≤ n by omega) + apply A.prefixes_central B (by omega) g d hlens.2.2.2.1 hlens.2.2.2.2.1 _ hlarge + intro i j k hjk x y + have hh := hcomm M B h n hn g d (A.count i) (A.cuts i) ?_ (growthAnchorFamily.label_difference n (by omega) p i) + · exact hh.2 j k hjk x y + · apply (growthAnchorFamily.width n (by omega) p i).trans + apply div_le_div_of_nonneg_right (by linarith) (by positivity) + +end InitialCoverSystem +end GrowthAnchorLaw + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthAxisUniform.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthAxisUniform.lean new file mode 100644 index 0000000000000000000000000000000000000000..b618ae9b911f0716fdb817f41f8a467d3039e885 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthAxisUniform.lean @@ -0,0 +1,282 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PairLawAssembly +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GrowthAnchorLaw +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GrowthGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section GrowthAxisUniform +namespace InitialCoverSystem +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem growth_axis_law (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (s w z : CutRing) (hs : 0 < ordinary s) (hsr : ordinary s < ordinary r/2) + (hwz : w*z=1) + (hshort : (1+|ordinary (cutTau^a)|)*(|ordinary w|+|ordinary (cutTau*w)|) < ordinary s/4) + {C : ℝ} (hC : 1000 ≤ C) (hSlope : 8*C < ordinary (cutTau^a)) + (hconj : |conjugate (cutTau^a)| < 1/1000) : + ∃ N : ℕ, 1005 ≤ N ∧ ∀ (M : ℕ) (B : InitialCoverSystem a r m hm M) + (_h : B.TangentChartLaws (symmetricWindowLength s) (symmetricWindowStart s) w), + ∀ n : ℕ, N ≤ n → B.CoordinateWindowLaw n → + ∀ (d : Fin 2) (p : ℤ) (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I), + B.PrimitiveFamilyLaw I b hb (axisWindowPrimitives d (growthNewLength n) p) := by + obtain ⟨N,hN,h⟩ := growth_anchor_law (a := a) (hm := hm) hlarge hr s w z hs hsr hwz hshort hC hSlope hconj + refine ⟨N,hN,?_⟩ + intro M B hB n hn g d p I b hb + exact B.growth_axis_law_of_anchor (by omega) n (by omega) g d p + (h M B hB n hn g d p) I b hb + +end InitialCoverSystem +end GrowthAxisUniform + +section SplitAssignment +variable {E S G ι κ : Type*} [Group E] [Group S] [Group G] + +theorem iSup_ranges_commute (f : ι → E →* G) (g : κ → S →* G) + (h : ∀ i j s t, Commute (f i s) (g j t)) : + ∀ x ∈ ⨆ i, (f i).range, ∀ y ∈ ⨆ j, (g j).range, Commute x y := by + intro x hx + let C := Subgroup.centralizer ((⨆ j, (g j).range : Subgroup G) : Set G) + have hf : (⨆ i, (f i).range : Subgroup G) ≤ C := by + apply iSup_le + intro i z hz + obtain ⟨s,rfl⟩ := hz + have hg : (⨆ j, (g j).range : Subgroup G) ≤ Subgroup.centralizer ({f i s} : Set G) := by + apply iSup_le + rintro j y ⟨t,rfl⟩ z hz + obtain rfl := Set.mem_singleton_iff.mp hz + exact (h i j s t).eq + intro y hy + exact (hg hy _ (Set.mem_singleton _)).symm + intro y hy + exact (show Commute y x from hf hx y hy).symm + +def splitFactorProduct (A B : Subgroup G) + (h : ∀ x ∈ A, ∀ y ∈ B, Commute x y) : A × B →* G where + toFun x := x.1.1*x.2.1 + map_one' := one_mul _ + map_mul' x y := by + change (x.1.1*y.1.1)*(x.2.1*y.2.1) = (x.1.1*x.2.1)*(y.1.1*y.2.1) + calc + _ = x.1.1*(y.1.1*x.2.1)*y.2.1 := by group + _ = x.1.1*(x.2.1*y.1.1)*y.2.1 := by rw [(h _ y.1.2 _ x.2.2).eq] + _ = _ := by group + +theorem commutingFactors_of_generate (F L R : ι → E →* G) + (hgen : (⨆ i, (F i).range : Subgroup G) = ⊤) + (hsplit : ∀ i s, F i s = L i s*R i s) + (hcomm : ∀ i j s t, Commute (L i s) (R j t)) : + CommutingFactors (⨆ i, (L i).range) (⨆ i, (R i).range) := by + have hLR := iSup_ranges_commute L R hcomm + let p := splitFactorProduct (⨆ i, (L i).range) (⨆ i, (R i).range) hLR + have hp : p.range = ⊤ := by + apply top_unique + rw [← hgen] + apply iSup_le + rintro i x ⟨s,rfl⟩ + exact ⟨(⟨L i s,le_iSup (fun i => (L i).range) i ⟨s,rfl⟩⟩, + ⟨R i s,le_iSup (fun i => (R i).range) i ⟨s,rfl⟩⟩),(hsplit i s).symm⟩ + refine ⟨hLR,?_⟩ + intro x + obtain ⟨⟨u,v⟩,huv⟩ := MonoidHom.range_eq_top.mp hp x + exact ⟨u,u.property,v,v.property,huv.symm⟩ + +theorem star_split_assignment [Fintype ι] [Group.IsPerfect G] + (π : E →* S) (_hπ : Function.Surjective π) (c : S →* G) + (F : Option ι → E →* G) (hc : F none = c.comp π) + (hgen : (⨆ i, (F i).range : Subgroup G) = ⊤) + (L R : ι → Option ι → E →* G) + (hsplit : ∀ i j s, F j s = L i j s*R i j s) + (hcomm : ∀ i j k s t, Commute (L i j s) (R i k t)) + (hleft : ∀ i, L i none = F (some i)) : + ∃ φ : ((ι → Bool) → S) →* (G ⧸ Subgroup.center G), + Function.Surjective φ ∧ + φ.comp (sectorMask Set.univ) = (QuotientGroup.mk' _).comp c ∧ + ∀ i, (φ.comp (sectorMask {σ | σ i = true})).comp π = + (QuotientGroup.mk' _).comp (F (some i)) := by + let q : G →* G ⧸ Subgroup.center G := QuotientGroup.mk' _ + let F' := fun i => q.comp (F i) + let L' := fun i j => q.comp (L i j) + let R' := fun i j => q.comp (R i j) + have hgen' : (⨆ i, (F' i).range : Subgroup (G ⧸ Subgroup.center G)) = ⊤ := by + simp only [F',MonoidHom.range_comp] + rw [← Subgroup.map_iSup,hgen,← MonoidHom.range_eq_map,MonoidHom.range_eq_top.mpr (QuotientGroup.mk'_surjective _)] + have hs' i j s : F' j s = L' i j s*R' i j s := by + dsimp [F',L',R']; rw [hsplit,map_mul] + have hm' i j k s t : Commute (L' i j s) (R' i k t) := (hcomm i j k s t).map q + let A := fun i => ⨆ j, (L' i j).range + let B := fun i => ⨆ j, (R' i j).range + have hAB i : CommutingFactors (A i) (B i) := + commutingFactors_of_generate F' (L' i) (R' i) hgen' (hs' i) (hm' i) + have hz : Subgroup.center (G ⧸ Subgroup.center G) = ⊥ := perfect_center_quotient + let g := fun i => ((hAB i).projectLeft hz).comp (q.comp c) + have hg i : (g i).comp π = F' (some i) := by + ext s + change (hAB i).projectLeft hz (q (c (π s))) = q (F (some i) s) + rw [← show F none s = c (π s) from DFunLike.congr_fun hc s] + change (hAB i).projectLeft hz (F' none s) = F' (some i) s + rw [hs' i none s,(hAB i).projectLeft_factors hz + (le_iSup (fun j => (L' i j).range) none ⟨s,rfl⟩) + (le_iSup (fun j => (R' i j).range) none ⟨s,rfl⟩)] + exact congrArg (fun f : E →* G => q (f s)) (hleft i) + have hggen : (q.comp c).range ⊔ ⨆ i, (g i).range = ⊤ := by + apply top_unique + rw [← hgen'] + apply iSup_le + intro i + cases i with + | none => + have h : F' none = (q.comp c).comp π := by dsimp [F']; rw [hc,MonoidHom.comp_assoc] + rw [h] + exact (range_comp_subset _ _).trans le_sup_left + | some i => + rw [← hg i] + exact (range_comp_subset _ _).trans ((le_iSup (fun i => (g i).range) i).trans le_sup_right) + obtain ⟨φ,hφ,hφc,hφg⟩ := simultaneous_assignment_surjection A B hAB hz (q.comp c) g (fun _ => rfl) hggen + exact ⟨φ,hφ,hφc,fun i => by rw [hφg]; exact hg i⟩ + +end SplitAssignment + +section PairSectors +noncomputable def primitivePair {ι : Type*} + (P : ι → Fin 5 × (CutRing × CutRing)) (i j : ι) : Bool → Fin 5 × (CutRing × CutRing) := + fun b => if b then P j else P i + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Finite κ] + +omit [Finite ι] [Finite κ] in + +theorem smallPrimitive_range_reindex (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) (v : κ → ι) : + (smallFamilyEval (B.smallPrimitiveInputs hlarge (P ∘ v))).range ≤ + (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + rw [smallFamilyEval_range,smallFamilyEval_range] + apply iSup_le + intro I + apply iSup_le + intro j + have he : B.smallPrimitiveInputs hlarge (P ∘ v) I j = + B.smallPrimitiveInputs hlarge P I (j.map v) := by cases j <;> rfl + rw [he] + exact (le_iSup (fun j => (B.smallPrimitiveInputs hlarge P I j).range) (j.map v)).trans + (le_iSup (fun I => ⨆ j, (B.smallPrimitiveInputs hlarge P I j).range) I) + +variable [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ i j I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (primitivePair P i j)) + +noncomputable def pairStar : Option ι → TrackStar (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) + | none => B.c.comp (universalProjection (alternatingGroup (Fin (m+1)))) + | some i => B.fullGeometricSector hlarge (primitivePair P i i) (h i i) + (primitiveTests (a := a) (r := r) P i) + +noncomputable def pairSplit (i : ι) (j : Option ι) (positive : Bool) : + TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm) := + B.fullGeometricSector hlarge (primitivePair P i (j.getD i)) (h i (j.getD i)) + (primitiveFamilyTests (a := a) (r := r) P j ⊓ + (if positive then primitiveTests (a := a) (r := r) P i + else (primitiveTests (a := a) (r := r) P i)ᶜ)) + +omit [Finite ι] [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem primitivePair_left_resolved (i j : ι) : + ResolvedBy (fun b => (primitiveTests (a := a) (r := r) (primitivePair P i j) b).val) + (primitiveTests (a := a) (r := r) P i).val := + resolved_test _ false + +omit [Finite ι] [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem primitivePair_right_resolved (i : ι) (j : Option ι) : + ResolvedBy (fun b => (primitiveTests (a := a) (r := r) (primitivePair P i (j.getD i)) b).val) + (primitiveFamilyTests (a := a) (r := r) P j).val := by + cases j with + | none => exact fun _ _ _ => Iff.rfl + | some j => exact resolved_test _ true + +omit [Finite ι] in +theorem pairSplit_supported (i : ι) (j : Option ι) (positive : Bool) : + B.AlignedSmallSupported (B.pairSplit hlarge P h i j positive) := by + apply B.fullGeometricSector_supported + intro x y he + apply and_congr (primitivePair_right_resolved P i j x y he) + cases positive with + | false => exact not_congr (primitivePair_left_resolved P i (j.getD i) x y he) + | true => exact primitivePair_left_resolved P i (j.getD i) x y he + +omit [Finite ι] in +theorem pair_selected_star (i : ι) (j : Option ι) : + B.fullGeometricSector hlarge (primitivePair P i (j.getD i)) (h i (j.getD i)) + (primitiveFamilyTests (a := a) (r := r) P j) = B.pairStar hlarge P h j := by + cases j with + | none => exact B.fullGeometricSector_whole hlarge _ _ + | some j => + apply B.fullGeometricSector_shared_primitive hlarge (primitivePair P i j) (primitivePair P j j) + true false rfl _ _ _ + exact resolved_test _ () + +omit [Finite ι] in +theorem pairStar_split (i : ι) (j : Option ι) (s : TrackStar (Fin (m+1))) : + B.pairStar hlarge P h j s = + B.pairSplit hlarge P h i j true s * B.pairSplit hlarge P h i j false s := by + rw [← B.pair_selected_star hlarge P h i j] + unfold pairSplit + simp only [Bool.false_eq_true,↓reduceIte] + rw [← B.fullGeometricSector_union hlarge _ _ + (primitiveFamilyTests (a := a) (r := r) P j ⊓ primitiveTests (a := a) (r := r) P i) + (primitiveFamilyTests (a := a) (r := r) P j ⊓ (primitiveTests (a := a) (r := r) P i)ᶜ) + (fun x y he => and_congr (primitivePair_right_resolved P i j x y he) + (primitivePair_left_resolved P i (j.getD i) x y he)) + (Set.disjoint_left.mpr (by intro x hx hy; exact hy.2 hx.2))] + congr 2 + ext x + change (x ∈ (primitiveFamilyTests (a := a) (r := r) P j).val) ↔ + (x ∈ (primitiveFamilyTests (a := a) (r := r) P j).val ∧ x ∈ (primitiveTests (a := a) (r := r) P i).val) ∨ + (x ∈ (primitiveFamilyTests (a := a) (r := r) P j).val ∧ x ∉ (primitiveTests (a := a) (r := r) P i).val) + tauto + +omit [Finite ι] in +theorem pairSplit_whole_left (i : ι) : + B.pairSplit hlarge P h i none true = B.pairStar hlarge P h (some i) := by + unfold pairSplit pairStar + congr 1 + ext x + change (x ∈ Set.univ ∧ x ∈ (primitiveTests (a := a) (r := r) P i).val) ↔ _ + simp + +omit [Finite ι] in +theorem pairSplit_mem (i : ι) (j : Option ι) (positive : Bool) (s : TrackStar (Fin (m+1))) : + B.pairSplit hlarge P h i j positive s ∈ + (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + have hi := B.smallPrimitive_range_reindex hlarge P (fun b : Bool => if b then j.getD i else i) + have he : P ∘ (fun b : Bool => if b then j.getD i else i) = primitivePair P i (j.getD i) := by + funext b; cases b <;> rfl + rw [he] at hi + apply hi + exact B.fullGeometricSector_mem hlarge _ _ _ s + +omit [Finite ι] in +theorem pairStar_mem (j : Option ι) (s : TrackStar (Fin (m+1))) : + B.pairStar hlarge P h j s ∈ (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + cases j with + | none => exact B.constant_range_full hlarge P ⟨_,rfl⟩ + | some i => + rw [← B.pairSplit_whole_left hlarge P h i] + exact B.pairSplit_mem hlarge P h i none true s + +end InitialCoverSystem +end PairSectors + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthGeneration.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..fd41aeea94a20162eb0961fe62d8b9782172eb7c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/GrowthGeneration.lean @@ -0,0 +1,196 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PairLawAssembly +import OAI.GroupTheory.SimpleAmenable.CentralCovers.SectorDifferenceRange +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AnchorConstants +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AxisAnchorFamily +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ClippedIntervals + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section GrowthGeneration +attribute [local instance] cutOrdinaryOrder + +namespace growthAnchorFamily +variable (n : ℕ) (hn : 1005 ≤ n) (p : ℤ) +local notation "A" => growthAnchorFamily n hn p + +theorem clipped_mem_range (i : Fin (growthAnchorLength n)) (q : ℤ) + (hq : p ≤ q ∧ q < p+growthNewLength n) : + clippedLabel ((A).cuts i |>.cut 0) (((A).cuts i).cut (Fin.last ((A).count i))) q ∈ + Set.range ((A).cuts i).cut := by + rw [range,← (A).lower,← (A).upper] + exact clippedLabel_mem _ _ _ _ _ (((A).cuts i).ordered (Fin.last ((A).count i))).1 + ((A).intervalLength (growth_lengths hn).2.2.2.1 i) + (labels n hn p i (Fin.last ((A).count i))) hq + +end growthAnchorFamily + +theorem growth_edge_window {n : ℕ} (hn : 1005 ≤ n) (p : ℤ) (j : Fin (growthNewLength n-1)) : + ∃ q : ℤ, + (q ≤ p+(j.val:ℤ) ∧ p+(j.val:ℤ)+1 < q+growthOldLength n) ∧ + ∀ i : Fin (growthAnchorLength n+1), + q ≤ endpointLabel (windowCut (growthAnchorLength n) (growthAnchorStart n p) i) ∧ + endpointLabel (windowCut (growthAnchorLength n) (growthAnchorStart n p) i) < q+growthOldLength n := by + have hlens := growth_lengths hn + by_cases h : p+(j.val:ℤ)+1 < p+growthOldLength n + · refine ⟨p,⟨by omega,h⟩,?_⟩ + intro i + have hi := growth_anchor_label hn p i + constructor <;> omega + · refine ⟨growthAnchorStart n p,?_,?_⟩ + · dsimp [growthAnchorStart] + have hj := j.isLt + have hover : growthNewLength n+201 ≤ 2*growthOldLength n := by + simp only [growthNewLength,growthOldLength]; omega + constructor <;> omega + · intro i + have hi := growth_anchor_label hn p i + dsimp [growthAnchorStart] at hi ⊢ + constructor <;> omega + +theorem axisWindowPrimitive_interval {a : ℕ} {r : CutRing} (d : Fin 2) (k : ℕ) (p : ℤ) + (j : Fin (k-1)) : + InitialCoverSystem.primitiveTests (a := a) (r := r) (axisWindowPrimitives d k p) j = + coordinateInterval a d (((p+(j.val:ℤ)):CutRing)*cutTau) + (((p+(j.val:ℤ)+1):CutRing)*cutTau) := by + apply Subtype.ext + change (spatialTranslate (coordinateShift d (((p+(j.val:ℤ)):CutRing)*cutTau)) + (initialTest a r (coordinateTestIndex d))).val = coordinateBetween a d _ _ + rw [initialTest_coordinate] + unfold coordinateBetween + have he : (((p+(j.val:ℤ)+1):CutRing)*cutTau)-(((p+(j.val:ℤ)):CutRing)*cutTau) = cutTau := by ring + rw [he,coordinateArc_tau] + rfl + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +omit [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in + +theorem primitiveFamily_range_full_all {ι : Type*} (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) : + (copyFamilyEval (B.primitiveFamily I b hb P)).range ≤ + (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + classical + let J : Finset (Fin (m+1)) := Finset.univ.erase b + have hIJ : I ⊆ J := by intro x hx; exact Finset.mem_erase.mpr ⟨by intro he; subst x; exact hb hx,Finset.mem_univ _⟩ + have hJ : 5 ≤ J.card := by simp [J]; omega + have hbJ : b ∉ J := Finset.notMem_erase _ _ + exact (B.primitiveFamily_range_inclusion hIJ b b hb hbJ P).trans + (B.primitiveFamily_range_full hlarge P J hJ b hbJ) + +theorem primitiveCopy_range_fullSector {ι : Type*} [Finite ι] (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (I : Finset (Fin (m+1))) (hI : 5 ≤ I.card) (b : Fin (m+1)) (hb : b ∉ I) + (g : B.PrimitiveFamilyLaw I b hb P) (j : ι) : + (B.primitiveCopy I b hb (P j)).range ≤ + (B.fullGeometricSector hlarge P h (primitiveTests (a := a) (r := r) P j)).range := by + let := alphabetPerfect I hI + rintro x ⟨s,rfl⟩ + obtain ⟨t,ht⟩ := universalProjection_surjective (alternatingGroup I) s + refine ⟨universalMap (subtypeAlternatingHom I) t,?_⟩ + have hh := B.fullGeometricSector_inclusion hlarge P h I hI b hb g + (primitiveTests (a := a) (r := r) P j) (resolved_test _ j) + rw [B.geometricSector_input I b hb P g j] at hh + exact (DFunLike.congr_fun hh t).trans (by simp only [MonoidHom.comp_apply,ht]) + +end InitialCoverSystem +end GrowthGeneration + +section GrowthAxisLaw +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem growth_axis_range_prefixGroup (hlarge : 15 < m+1) (n : ℕ) (hn : 1005 ≤ n) + (g : B.CoordinateWindowLaw n) (d : Fin 2) (p : ℤ) : + (smallFamilyEval (B.smallPrimitiveInputs hlarge (axisWindowPrimitives d (growthNewLength n) p))).range ≤ + (growthAnchorFamily n hn p).prefixGroup B hlarge g d := by + classical + let A := growthAnchorFamily n hn p + have hlens := growth_lengths hn + rw [smallFamilyEval_range] + apply iSup_le + intro I + apply iSup_le + intro j + cases j with + | none => + change (B.initialAlphabet I.val 0).range ≤ _ + rw [B.initialAlphabet_zero] + exact (range_comp_subset B.c _).trans + (A.constant_range_prefixGroup B hlarge g d hlens.2.2.2.1 hlens.2.2.2.2.1) + | some j => + let b := smallAlphabetBalance hlarge I.val (by rw [I.property.2]; omega) + have hb : b ∉ I.val := smallAlphabetBalance_notMem hlarge I.val _ + change (B.primitiveCopy I.val b hb (axisWindowPrimitives d (growthNewLength n) p j)).range ≤ _ + obtain ⟨q,hq,ha⟩ := growth_edge_window hn p j + let i : Fin (growthOldLength n-1) := ⟨(p+(j.val:ℤ)-q).toNat,by + have he : ((p+(j.val:ℤ)-q).toNat:ℤ) = p+(j.val:ℤ)-q := Int.toNat_of_nonneg (by omega) + omega⟩ + have hi : q+(i.val:ℤ) = p+(j.val:ℤ) := by + have he : ((p+(j.val:ℤ)-q).toNat:ℤ) = p+(j.val:ℤ)-q := Int.toNat_of_nonneg (by omega) + dsimp [i]; omega + have he : axisWindowPrimitives d (growthOldLength n) q i = + axisWindowPrimitives d (growthNewLength n) p j := by + unfold axisWindowPrimitives + congr 2 + exact congrArg (fun z : ℤ => (z:CutRing)*cutTau) hi + rw [← he] + have hh := B.primitiveCopy_range_fullSector hlarge (axisWindowPrimitives d (growthOldLength n) q) + (fun I _ b hb => B.axisFamilyLaw n g d _ hlens.1 q I b hb) I.val (by rw [I.property.2]) b hb + (B.axisFamilyLaw n g d _ hlens.1 q I.val b hb) i + apply hh.trans + rw [axisWindowPrimitive_interval] + change (B.axisSector hlarge n g d (growthOldLength n) hlens.1 q + (coordinateInterval a d (((q+(i.val:ℤ)):CutRing)*cutTau) + (((q+(i.val:ℤ)+1):CutRing)*cutTau))).range ≤ _ + have he0 : (((q+(i.val:ℤ)):CutRing)*cutTau) = (((p+(j.val:ℤ)):CutRing)*cutTau) := by exact_mod_cast congrArg (fun z : ℤ => (z:CutRing)*cutTau) hi + have he1 : (((q+(i.val:ℤ)+1):CutRing)*cutTau) = (((p+(j.val:ℤ)+1):CutRing)*cutTau) := by + congr 1; exact_mod_cast (show q+(i.val:ℤ)+1 = p+(j.val:ℤ)+1 by omega) + rw [he0,he1] + have hl0 : endpointLabel (((p+(j.val:ℤ)):CutRing)*cutTau) = p+(j.val:ℤ) := by + simpa only [Int.cast_add] using endpointLabel_int_mul_tau (p+(j.val:ℤ)) + have hl1 : endpointLabel (((p+(j.val:ℤ)+1):CutRing)*cutTau) = p+(j.val:ℤ)+1 := by + simpa only [Int.cast_add,Int.cast_one] using endpointLabel_int_mul_tau (p+(j.val:ℤ)+1) + apply A.old_interval_range B hlarge g d hlens.2.2.2.1 (growthOldLength n) hlens.1 q _ _ + · simp only [hl0] + omega + · simp only [hl1] + omega + · exact ha + · intro i z hz + apply growthAnchorFamily.clipped_mem_range n hn p i + simp only [Finset.mem_insert,Finset.mem_singleton] at hz + rcases hz with rfl|rfl <;> simp only [hl0,hl1] + all_goals have hj := j.isLt; omega + +theorem growth_axis_law_of_anchor (hlarge : 15 < m+1) (n : ℕ) (hn : 1005 ≤ n) + (g : B.CoordinateWindowLaw n) (d : Fin 2) (p : ℤ) + (h : CentralOn (coverMap M (alternatingGenerator a r m hm)) + ((growthAnchorFamily n hn p).prefixGroup B hlarge g d)) + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) : + B.PrimitiveFamilyLaw I b hb (axisWindowPrimitives d (growthNewLength n) p) := by + apply CentralOn.mono h + exact (B.primitiveFamily_range_full_all hlarge _ I b hb).trans + (B.growth_axis_range_prefixGroup hlarge n hn g d p) + +end InitialCoverSystem +end GrowthAxisLaw + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/IndividualGridSplits.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/IndividualGridSplits.lean new file mode 100644 index 0000000000000000000000000000000000000000..579871a722ecefb1609c7f6a7170200ef35a04d2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/IndividualGridSplits.lean @@ -0,0 +1,208 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FiniteSectorPartition +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SectorOffsetCoherence +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TangentChartTemplates +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ControlledPatching + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section IndividualGridSplits +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + {ι D : Type*} {κ : ι → Type*} [∀ i, Finite (κ i)] + (hlarge : 15 < m+1) + (Q : (i : ι) → κ i → Fin 5 × (CutRing × CutRing)) + (h : ∀ i I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (Q i)) + (U : ι → polygonAlgebra a) (W : D → polygonAlgebra a) + +noncomputable def gridInput (i : ι) : TrackStar (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) := + B.fullGeometricSector hlarge (Q i) (h i) (U i) + +noncomputable def gridPiece (d : D) (i : ι) : TrackStar (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) := + B.fullGeometricSector hlarge (Q i) (h i) (U i ⊓ W d) + +theorem gridPiece_supported + (hU : ∀ i, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (U i).val) + (hW : ∀ i d, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (W d).val) + (d : D) (i : ι) : B.AlignedSmallSupported (B.gridPiece hlarge Q h U W d i) := by + apply B.fullGeometricSector_supported + intro x y he + exact and_congr (hU i x y he) (hW i d x y he) + +theorem gridPiece_control (d : D) (i : ι) : + SmallControlled B.c (B.gridPiece hlarge Q h U W d i) + (B.fullGeometricSector hlarge (Q i) (h i) (W d)) := + B.fullGeometricSector_small_control hlarge _ _ _ _ inf_le_right + +theorem gridInput_split + (hU : ∀ i, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (U i).val) + (hW : ∀ i d, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (W d).val) + (d : D) (i : ι) (s : TrackStar (Fin (m+1))) : + B.gridInput hlarge Q h U i s = B.gridPiece hlarge Q h U W d i s * + B.gridPiece hlarge Q h U (fun d => (W d)ᶜ) d i s := by + unfold gridInput gridPiece + rw [← B.fullGeometricSector_union hlarge _ _ (U i ⊓ W d) (U i ⊓ (W d)ᶜ) + (fun x y he => and_congr (hU i x y he) (hW i d x y he)) + (Set.disjoint_left.mpr (by intro x hx hy; exact hy.2 hx.2))] + congr 2 + exact (inf_sup_left _ _ _).symm.trans (by rw [sup_compl_eq_top,inf_top_eq]) |>.symm + +theorem grid_complement_coherent (i₀ i : ι) (d : D) + (hW : ∀ i d, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (W d).val) + (he : B.fullGeometricSector hlarge (Q i) (h i) (W d) = + B.fullGeometricSector hlarge (Q i₀) (h i₀) (W d)) : + B.fullGeometricSector hlarge (Q i) (h i) (W d)ᶜ = + B.fullGeometricSector hlarge (Q i₀) (h i₀) (W d)ᶜ := by + ext s + have hi := B.fullGeometricSector_union hlarge (Q i) (h i) (W d) (W d)ᶜ (hW i d) + (disjoint_compl_right) s + have h₀ := B.fullGeometricSector_union hlarge (Q i₀) (h i₀) (W d) (W d)ᶜ (hW i₀ d) + (disjoint_compl_right) s + rw [sup_compl_eq_top] at hi + change B.fullGeometricSector hlarge (Q i) (h i) (wholePolygon a) s = _ at hi + rw [B.fullGeometricSector_whole,he] at hi + rw [sup_compl_eq_top] at h₀ + change B.fullGeometricSector hlarge (Q i₀) (h i₀) (wholePolygon a) s = _ at h₀ + rw [B.fullGeometricSector_whole] at h₀ + exact mul_left_cancel (hi.symm.trans h₀) + +theorem gridInputs_normalize (h20 : 20 ≤ m+1) (i₀ : ι) + (hU : ∀ i, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (U i).val) + (hW : ∀ i d, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (W d).val) + (he : ∀ i d, B.fullGeometricSector hlarge (Q i) (h i) (W d) = + B.fullGeometricSector hlarge (Q i₀) (h i₀) (W d)) : + ∀ d i s, B.gridInput hlarge Q h U i s ∈ + Subgroup.normalizer ((⨆ j, (B.gridPiece hlarge Q h U W d j).range : + Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm))) : Set _) := by + intro d + apply controlled_cell_normalizes _ B.c B.constant_aligned B.disjoint_aligned + (by simpa using h20) (B.gridInput hlarge Q h U) + (B.gridPiece hlarge Q h U W d) (B.gridPiece hlarge Q h U (fun d => (W d)ᶜ) d) + (B.fullGeometricSector hlarge (Q i₀) (h i₀) (W d)) + (B.fullGeometricSector hlarge (Q i₀) (h i₀) (W d)ᶜ) + · exact B.gridPiece_supported hlarge Q h U W hU hW d + · exact B.gridPiece_supported hlarge Q h U (fun d => (W d)ᶜ) hU + (fun i d x y hh => not_congr (hW i d x y hh)) d + · exact B.fullGeometricSector_supported hlarge _ _ _ (hW i₀ d) + · intro i + rw [← he i d] + exact B.gridPiece_control hlarge Q h U W d i + · intro i + rw [← B.grid_complement_coherent hlarge Q h W i₀ i d hW (he i d)] + exact B.gridPiece_control hlarge Q h U (fun d => (W d)ᶜ) d i + · exact B.fullGeometricSector_commute hlarge _ _ _ _ (hW i₀ d) disjoint_compl_right + · exact B.gridInput_split hlarge Q h U W hU hW d + +theorem gridPieces_generate [Fintype D] + (hU : ∀ i, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (U i).val) + (hW : ∀ i d, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (Q i) j).val) (W d).val) + (hdisjoint : Pairwise fun d e => Disjoint (W d).val (W e).val) + (hcover : ∀ x, ∃ d, x ∈ (W d).val) : + (⨆ i, (B.gridInput hlarge Q h U i).range) ≤ + ⨆ d, ⨆ i, (B.gridPiece hlarge Q h U W d i).range := by + apply iSup_le + intro i + have hle := B.fullGeometricSector_partition_range hlarge (Q i) (h i) (U i) + (fun d => U i ⊓ W d) + (fun d x y he => and_congr (hU i x y he) (hW i d x y he)) + (fun d e hde => (hdisjoint hde).mono (fun _ hx => hx.2) (fun _ hx => hx.2)) + (fun x => by + constructor + · intro hx + obtain ⟨d,hd⟩ := hcover x + exact ⟨d,hx,hd⟩ + · rintro ⟨d,hd⟩; exact hd.1) + exact hle.trans (iSup_mono fun d => le_iSup (fun i => (B.gridPiece hlarge Q h U W d i).range) i) + +end InitialCoverSystem +end IndividualGridSplits + +section SharedPrimitivePredicates + +theorem spatialTranslate_integral {a : ℕ} (k : Fin 2 → ℤ) (V : polygonAlgebra a) : + spatialTranslate ((k 0:CutRing),(k 1:CutRing)) V=V := by + rw [spatialTranslate_reduce] + have hz : (((k 0:CutRing).im:CutRing)*cutTau,((k 1:CutRing).im:CutRing)*cutTau) = + (0:CutRing × CutRing) := by simp + rw [hz] + apply Subtype.ext + ext p + simp [spatialTranslate,translate_zero] + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem fullGeometricSector_shared_test (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) (Q : κ → Fin 5 × (CutRing × CutRing)) + (i : ι) (j : κ) (he : (P i).1=(Q j).1) + (hp : spatialTranslate (P i).2 (initialTest a r (P i).1)= + spatialTranslate (Q j).2 (initialTest a r (Q j).1)) + (h : ∀ I, I.card≤15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (g : ∀ I, I.card≤15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb Q) + (V : polygonAlgebra a) + (hV : ResolvedBy (fun _ : Unit => (primitiveTests (a := a) (r := r) P i).val) V.val) : + B.fullGeometricSector hlarge P h V=B.fullGeometricSector hlarge Q g V := by + let S : Unit → Fin 5 × (CutRing × CutRing) := fun _ => P i + let T : Unit → Fin 5 × (CutRing × CutRing) := fun _ => Q j + have hS := fun I hI b hb => PrimitiveFamilyLaw.reindex B I b hb P (h I hI b hb) (fun _ : Unit => i) + have hT := fun I hI b hb => PrimitiveFamilyLaw.reindex B I b hb Q (g I hI b hb) (fun _ : Unit => j) + have hV' : ResolvedBy (fun _ : Unit => (primitiveTests (a := a) (r := r) Q j).val) V.val := by + intro x y hxy + apply hV x y + intro z + change x ∈ (spatialTranslate (P i).2 (initialTest a r (P i).1)).val ↔ + y ∈ (spatialTranslate (P i).2 (initialTest a r (P i).1)).val + rw [hp] + exact hxy () + rw [← B.fullGeometricSector_subfamily hlarge P S (fun _ => i) rfl h hS V hV, + ← B.fullGeometricSector_subfamily hlarge Q T (fun _ => j) rfl g hT V hV'] + exact B.fullGeometricSector_congr_offsets hlarge S T (fun _ => he) (fun _ => hp) hS hT V hV + +theorem tangentSign_integral (hlarge : 15 < m+1) + (n : ℕ) (q : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws n q u) + (d : Fin 2) (k : Fin 2 → ℤ) (positive : Bool) : + B.tangentSign hlarge n q u h d ((k 0:CutRing),(k 1:CutRing)) positive= + B.tangentSign hlarge n q u h d 0 positive := by + unfold tangentSign + have hp (V : polygonAlgebra a) : spatialTranslate ((k 0:CutRing),(k 1:CutRing)) V= + spatialTranslate 0 V := by + rw [spatialTranslate_integral] + apply Subtype.ext + ext p + simp [spatialTranslate,translate_zero] + rw [hp] + apply B.fullGeometricSector_shared_test hlarge _ _ (Sum.inl (0:Fin 2)) (Sum.inl (0:Fin 2)) + · rfl + · simp only [translatedTemplate,tangentChartTemplate,ite_true,add_zero] + exact hp _ + · intro x y he + have hh := he () + change x ∈ (spatialTranslate (((k 0:CutRing),(k 1:CutRing))+0) + (initialTest a r (slopeTestIndex d))).val ↔ + y ∈ (spatialTranslate (((k 0:CutRing),(k 1:CutRing))+0) + (initialTest a r (slopeTestIndex d))).val at hh + simp only [add_zero,initialTest_slope,hp] at hh + cases positive with + | false => exact not_congr hh + | true => exact hh + +end InitialCoverSystem +end SharedPrimitivePredicates + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/InitialCoverSystem.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/InitialCoverSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a53b2b14d722a09c87c1b04905ffee6021e62a4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/InitialCoverSystem.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.RandomFields.AlignedCovariance + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InitialCoverSystem + +private theorem alternating_hom_ext_small {I H : Type*} [Fintype I] [DecidableEq I] + [Group H] (f g : alternatingGroup I →* H) + (h : ∀ s : alternatingGroup I, s.val.support.card ≤ 5 → f s = g s) : f = g := by + apply MonoidHom.eq_of_eqOn_dense alternatingGroup.closure_isThreeCycles_eq_top + intro s hs + exact h s (by rw [hs.card_support]; omega) + +structure InitialCoverSystem (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) (M : ℕ) where + t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) + c : alternatingGroup (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) + t_base : ∀ i, t (Multiplicative.ofAdd (FreeAbelianGroup.of i)) = + PresentedGroup.of (Sum.inr i) + t_projection : (coverMap M (alternatingGenerator a r m hm)).comp t = + sourceLatticeMap a r m hm + t_stabilizers : ∀ s k, Commute (sourceLatticeMap a r m hm k) + (alternatingGenerator a r m hm s) → Commute (t k) (PresentedGroup.of s) + c_projection : (coverMap M (alternatingGenerator a r m hm)).comp c = + conditionalAlternatingHom (wholePolygon a) + c_base : ∀ b : {σ : Equiv.Perm (Fin (m+1)) // σ ∈ alternatingGroup (Fin (m+1)) ∧ + σ.support.card ≤ 5}, c ⟨b.val,b.property.1⟩ = + PresentedGroup.of (sourceConditionalLabel m (0,b)) + constant_aligned : ∀ (s : alternatingGroup (Fin (m+1))) (I : Finset (Fin (m+1))), + ∀ y ∈ sourceAlignedGroup a r m hm M t I, + c s*y*(c s)⁻¹ ∈ sourceAlignedGroup a r m hm M t (I.map s.val.toEmbedding) + disjoint_aligned : ∀ (I J : Finset (Fin (m+1))), Disjoint I J → + ∀ x ∈ sourceAlignedGroup a r m hm M t I, + ∀ y ∈ sourceAlignedGroup a r m hm M t J, Commute x y + initialTable : (Set.range (polygonAssignment (initialTest a r)) → + alternatingGroup (Fin (m+1))) →* + BoundedRelationCover M (alternatingGenerator a r m hm) + initialTable_projection : (coverMap M (alternatingGenerator a r m hm)).comp initialTable = + actualPolygonTableHom (initialTest a r) + initialTable_injective : Function.Injective initialTable + initialTable_input : ∀ b, initialTable (polygonTableInput (initialTest a r) b.1 + (⟨b.2.val,b.2.property.1⟩ : alternatingGroup (Fin (m+1)))) = + PresentedGroup.of (sourceConditionalLabel m b) + perfect : Group.IsPerfect (BoundedRelationCover M (alternatingGenerator a r m hm)) + +theorem initialCoverSystem_eventually (a : ℕ) (r : CutRing) (m : ℕ) + (hm : 2 ≤ m) (hr : 0 < ordinary r ∧ ordinary r < 1/2) (hm' : 15 ≤ m+1) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → Nonempty (InitialCoverSystem a r m hm M) := by + obtain ⟨L₁,hL₁⟩ := source_centralizing_translation_lifts_eventually a r m hm + obtain ⟨L₂,hL₂⟩ := source_aligned_disjoint_eventually a r m hm (by omega) + obtain ⟨L₃,hL₃⟩ := source_constant_covariance_eventually a r m hm hr hm' + obtain ⟨L₄,hL₄⟩ := source_initial_table_lifts_eventually a r m hr hm' hm + obtain ⟨L₅,hL₅⟩ := sourceCover_eventually_perfect a r m hr hm' hm + refine ⟨L₁+L₂+L₃+L₄+L₅,fun M hM => ?_⟩ + obtain ⟨t,ht,htp,hts⟩ := hL₁ M (by omega) + obtain ⟨t',ht',_,hd⟩ := hL₂ M (by omega) + have he : t' = t := freeAbelianHom_ext t' t (fun i => (ht' i).trans (ht i).symm) + subst t' + obtain ⟨c,hcp,hcb,R,hc⟩ := hL₃ M (by omega) + obtain ⟨hct,hcx⟩ := hc t ht + obtain ⟨ρ,hρ,hinj,hinput⟩ := hL₄ M (by omega) + refine ⟨{ + t := t + c := c + t_base := ht + t_projection := htp + t_stabilizers := hts + c_projection := hcp + c_base := hcb + constant_aligned := ?_ + disjoint_aligned := hd + initialTable := ρ + initialTable_projection := hρ + initialTable_injective := hinj + initialTable_input := hinput + perfect := hL₅ M (by omega) }⟩ + intro s I y hy + exact source_aligned_constant_conjugation a r m hm M t c R hct hcx s I hy + +namespace InitialCoverSystem + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +theorem initialTable_constant : + B.initialTable.comp (polygonTableInput (initialTest a r) 0) = B.c := by + apply alternating_hom_ext_small + intro s hs + change B.initialTable (polygonTableInput (initialTest a r) 0 s) = B.c s + exact (B.initialTable_input (0,⟨s.val,s.property,hs⟩)).trans + (B.c_base ⟨s.val,s.property,hs⟩).symm + +end InitialCoverSystem +end InitialCoverSystem + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/InitialGridActions.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/InitialGridActions.lean new file mode 100644 index 0000000000000000000000000000000000000000..418d2575a437c3427880a5828d06dbb1a4d5e7cc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/InitialGridActions.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CoordinateTemplateControl +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FinePatchAtlas + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InitialGridActions +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem initial_grid_constant_action (hlarge : 20 ≤ m+1) + (p : Fin 5 × (CutRing × CutRing)) (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (translatedTemplate (coordinateWindowPrimitives A.geometry.mesh (symmetricWindowStart r)) p.2) i).val) V.val) + (b : Bool) (he : spatialTranslate p.2 (initialTest a r p.1) ⊓ V=if b then V else ⊥) + (n : ℕ) (q : Fin 2 → ℤ) (W : polygonAlgebra a) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) W.val) + (hinc : W ≤ V) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (x : BoundedRelationCover M (alternatingGenerator a r m hm)) (hx : x ∈ f.range) : + A.primitiveStar (by omega) p (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.primitiveStar (by omega) p (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + (if b then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)*x* + (if b then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)⁻¹ := by + let P := translatedTemplate (initialPatchPrimitives r A.geometry.mesh) p.2 + let h := fun J (_ : J.card ≤ 15) c hc => A.initial p.2 J c hc + have hVp : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val := + fun x y he => hV x y (fun i => he (Sum.inr i)) + have hU : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) + (spatialTranslate p.2 (initialTest a r p.1)).val := by + intro x y he + simpa only [P,primitiveTests,primitiveFamilyTests,translatedTemplate,initialPatchPrimitives, + Sum.elim_inl,add_zero] using he (Sum.inl p.1) + have hctrl : SmallControlled B.c f (B.fullGeometricSector (by omega) P h V) := by + exact B.coordinate_control_to_template hlarge A.rectangles.rectangles P h Prod.fst + (fun i => p.2+(coordinateWindowPrimitives A.geometry.mesh (symmetricWindowStart r) i).2) + Sum.inr rfl V hV n q W hW hinc f hf hc + exact B.cell_constant_action hlarge P h _ V hU hVp b he f hf hctrl I s x hx + +theorem primitiveStar_slope (hlarge : 15 < m+1) (d : Fin 2) (v : CutRing × CutRing) : + A.primitiveStar hlarge (slopeTestIndex d,v)=A.rectangles.slope hlarge d v := by + symm + unfold primitiveStar + rw [initialTest_slope] + apply A.rectangles.slope_chart_eq hlarge _ _ (Sum.inl (slopeTestIndex d)) d v + simp [translatedTemplate,initialPatchPrimitives] + +end InitialCoverSystem.PatchAtlas +end InitialGridActions + +section LiftedFarGridActions +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem far_grid_action (hlarge : 20 ≤ m+1) + (hr : 0(primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) W.val) + (hinc : W ≤ spatialTranslate v (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell)) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (x : BoundedRelationCover M (alternatingGenerator a r m hm)) (hx : x ∈ f.range) : + A.rectangles.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.rectangles.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + (if 0 ≤ cutForm a (slopeDirection d) z+cutForm a (slopeDirection d) ((k 0:ℝ),(k 1:ℝ)) + then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)*x* + (if 0 ≤ cutForm a (slopeDirection d) z+cutForm a (slopeDirection d) ((k 0:ℝ),(k 1:ℝ)) + then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)⁻¹ := by + classical + let b : Bool := decide (0 ≤ cutForm a (slopeDirection d) z+ + cutForm a (slopeDirection d) ((k 0:ℝ),(k 1:ℝ))) + have hres := translatedTemplate_resolved (a := a) (r := r) + (coordinateWindowPrimitives A.geometry.mesh (symmetricWindowStart r)) + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell) + (windowRectangle_resolved A.geometry.mesh (by have := A.geometry.mesh_large; omega) _ cell) v + have he : spatialTranslate v (initialTest a r (slopeTestIndex d)) ⊓ + spatialTranslate v (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell)= + if b then spatialTranslate v (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell) else ⊥ := by + rw [initialTest_slope,← spatialTranslate_inter, + windowRectangle_far_clipped r (slopeDirection d) hr A.geometry.mesh + (by have := A.geometry.mesh_large; omega) _ cell k hk z hz hfar] + simp only [b,decide_eq_true_eq] + split_ifs <;> rfl + have hh := A.initial_grid_constant_action hlarge (slopeTestIndex d,v) _ hres b he + n q W hW hinc f hf hc I s x hx + rw [A.primitiveStar_slope] at hh + simpa only [b,decide_eq_true_eq] using hh + +theorem exterior_grid_action (hlarge : 20 ≤ m+1) + (hr : 0 -r) (fun _ => r))) + (n : ℕ) (q : Fin 2 → ℤ) (W : polygonAlgebra a) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) W.val) + (hinc : W ≤ spatialTranslate v (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell)) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (x : BoundedRelationCover M (alternatingGenerator a r m hm)) (hx : x ∈ f.range) : + Commute (A.rectangles.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s)) x := by + have hres := translatedTemplate_resolved (a := a) (r := r) + (coordinateWindowPrimitives A.geometry.mesh (symmetricWindowStart r)) + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell) + (windowRectangle_resolved A.geometry.mesh (by have := A.geometry.mesh_large; omega) _ cell) v + have hd : Disjoint (clippedSlopePrimitive a r (slopeDirection d)) + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell) := + hout.symm.mono_left (clippedSlope_le_box r (slopeDirection d) hr) + have he : spatialTranslate v (initialTest a r (slopeTestIndex d)) ⊓ + spatialTranslate v (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell)= + if false then spatialTranslate v (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell) else ⊥ := by + rw [initialTest_slope,← spatialTranslate_inter,disjoint_iff.mp hd] + rfl + have hh := A.initial_grid_constant_action hlarge (slopeTestIndex d,v) _ hres false he + n q W hW hinc f hf hc I s x hx + rw [A.primitiveStar_slope] at hh + simp only [Bool.false_eq_true,↓reduceIte,inv_one,one_mul,mul_one] at hh + change _ * x = x * _ + have hh' := congrArg (fun y => y*A.rectangles.slope (by omega) d v + (universalMap (subtypeAlternatingHom I.val) s)) hh + simpa only [mul_assoc,inv_mul_cancel,mul_one] using hh' + +end InitialCoverSystem.PatchAtlas +end LiftedFarGridActions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LatticeTranslationTransport.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LatticeTranslationTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a6b24da54433df29d6ba4117c2ca108fa7976ab --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LatticeTranslationTransport.lean @@ -0,0 +1,119 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TranslationRoutingHelpers +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TranslationTransport + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LatticeTranslationTransport + +noncomputable def sourceGeneratorOffsets (m : ℕ) (j : Fin m × Fin 2) : + Fin (m+1) → CutRing × CutRing := + Pi.single j.1.castSucc (if j.2=0 then (cutTau,0) else (0,cutTau)) - + Pi.single (Fin.last m) (if j.2=0 then (cutTau,0) else (0,cutTau)) + +noncomputable def sourceLatticeOffsets (m : ℕ) : + FreeAbelianGroup (Fin m × Fin 2) →+ (Fin (m+1) → CutRing × CutRing) := + FreeAbelianGroup.lift (sourceGeneratorOffsets m) + +@[simp] theorem sourceLatticeOffsets_of (m : ℕ) (j : Fin m × Fin 2) : + sourceLatticeOffsets m (FreeAbelianGroup.of j)=sourceGeneratorOffsets m j := + FreeAbelianGroup.lift_apply_of _ _ + +theorem sourceGeneratorOffsets_support (m : ℕ) (j : Fin m × Fin 2) + (t : Fin (m+1)) (ht : t ∉ ({j.1.castSucc,Fin.last m} : Finset (Fin (m+1)))) : + sourceGeneratorOffsets m j t=0 := by + classical + have hi : t≠j.1.castSucc := fun he => ht (he ▸ Finset.mem_insert_self _ _) + have hl : t≠Fin.last m := fun he => ht (he ▸ Finset.mem_insert_of_mem + (Finset.mem_singleton_self _)) + simp [sourceGeneratorOffsets,Pi.sub_apply,hi,hl] + +theorem sourceLatticeFullMap_offsets (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (k : FreeAbelianGroup (Fin m × Fin 2)) : + sourceLatticeFullMap a r m hm (Multiplicative.ofAdd k)= + trackTranslation (sourceLatticeOffsets m k) := by + induction k using FreeAbelianGroup.induction_on with + | zero => simp only [map_zero,ofAdd_zero,map_one,trackTranslation_zero] + | of j => + rw [sourceLatticeOffsets_of] + exact sourceLatticeFullMap_of a r m hm j + | neg j ih => + change sourceLatticeFullMap a r m hm ((Multiplicative.ofAdd (FreeAbelianGroup.of j))⁻¹)=_ + rw [map_inv,ih,map_neg,trackTranslation_neg] + | add k l ihk ihl => + change sourceLatticeFullMap a r m hm (Multiplicative.ofAdd k*Multiplicative.ofAdd l)=_ + rw [map_mul,ihk,ihl,map_add,trackTranslation_add] + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (i j,u j)))) : + (MulAut.conj (B.t (Multiplicative.ofAdd k))).toMonoidHom.comp + (B.slotStar hlarge h hr hwide V i u hinj) = + B.slotStar hlarge h hr hwide V i (fun j => sourceLatticeOffsets m k (i j)+u j) + (SlotMap_shift_injective V i u hinj (sourceLatticeOffsets m k)) := by + induction k using FreeAbelianGroup.induction_on generalizing u with + | zero => + simp only [ofAdd_zero,map_one,map_zero,Pi.zero_apply,zero_add] + ext s : 1 + rfl + | of j => + simpa only [sourceLatticeOffsets_of] using B.slotStar_translation_two_support hlarge h hr R hR hwide V i u hinj + (Multiplicative.ofAdd (FreeAbelianGroup.of j)) (sourceGeneratorOffsets m j) + (sourceLatticeFullMap_of a r m hm j) {j.1.castSucc,Fin.last m} + (by exact le_trans (Finset.card_insert_le _ _) (by simp)) (sourceGeneratorOffsets_support m j) + | neg j _ => + have hd := sourceLatticeFullMap_offsets a r m hm (-FreeAbelianGroup.of j) + exact B.slotStar_translation_two_support hlarge h hr R hR hwide V i u hinj + (Multiplicative.ofAdd (-FreeAbelianGroup.of j)) _ hd {j.1.castSucc,Fin.last m} + (by exact le_trans (Finset.card_insert_le _ _) (by simp)) (by + intro t ht + rw [map_neg,sourceLatticeOffsets_of,Pi.neg_apply,sourceGeneratorOffsets_support m j t ht,neg_zero]) + | add k l ihk ihl => + have hl := DFunLike.congr_fun (ihl u hinj) + have hk := DFunLike.congr_fun (ihk (fun j => sourceLatticeOffsets m l (i j)+u j) + (SlotMap_shift_injective V i u hinj (sourceLatticeOffsets m l))) + have hoff : (fun j => sourceLatticeOffsets m k (i j)+(sourceLatticeOffsets m l (i j)+u j)) = + (fun j => sourceLatticeOffsets m (k+l) (i j)+u j) := by + funext j + rw [map_add,Pi.add_apply,add_assoc] + ext s : 1 + change B.t (Multiplicative.ofAdd k*Multiplicative.ofAdd l)* + B.slotStar hlarge h hr hwide V i u hinj s* + (B.t (Multiplicative.ofAdd k*Multiplicative.ofAdd l))⁻¹ = _ + rw [map_mul] + calc + _ = B.t (Multiplicative.ofAdd k)* + (B.t (Multiplicative.ofAdd l)* B.slotStar hlarge h hr hwide V i u hinj s* + (B.t (Multiplicative.ofAdd l))⁻¹)*(B.t (Multiplicative.ofAdd k))⁻¹ := by group + _ = _ := by + rw [show B.t (Multiplicative.ofAdd l)*B.slotStar hlarge h hr hwide V i u hinj s* + (B.t (Multiplicative.ofAdd l))⁻¹ = _ from hl s] + exact (hk s).trans (by simp only [hoff]) + +end InitialCoverSystem +end LatticeTranslationTransport + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LocalArrangementAssignments.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LocalArrangementAssignments.lean new file mode 100644 index 0000000000000000000000000000000000000000..46149fdb89e332321e8fd23b1adcec74c2e7c7d1 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LocalArrangementAssignments.lean @@ -0,0 +1,206 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ResolvedBoolean +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FiniteArrangementGerms + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LocalArrangementAssignments +variable {a : ℕ} {ι : Type*} + +noncomputable def cutPolygon (a : ℕ) (j : Fin 4) (c : CutRing) : polygonAlgebra a := + ⟨halfPlane a j c,halfPlane_mem a j c⟩ + +noncomputable def localCutFamily (j : ι → Fin 4) (c : ι → CutRing) + (z : ℝ × ℝ) (i : ι) : polygonAlgebra a := by + classical + exact if cutForm a (j i) z=ordinary (c i) then cutPolygon a (j i) (c i) + else if cutForm a (j i) z cutPolygon a (j i) (c i)) p= + polygonAssignment (localCutFamily j c z) y := by + classical + let σ := polygonAssignment (localCutFamily (a := a) j c z) y + have hactive : ∀ i, cutForm a (j i) z=ordinary (c i) → + if σ i then cutForm a (j i) y.val ordinary (c i)) + z y.val σ hactive hinactive V hV ⟨hz,hz₁,hz₂⟩ + let p' : GenericSquare a := ⟨p,⟨hp.2.1.1.le,hp.2.1.2⟩,⟨hp.2.2.1.le,hp.2.2.2⟩,hgeneric⟩ + refine ⟨p',hp.1,?_⟩ + funext i + change decide (cutForm a (j i) p cutPolygon a (j i) (c i))) := by + rintro σ ⟨y,rfl⟩ + obtain ⟨p,_,hp⟩ := localCutFamily_assignment_realized j c z hz₁ hz₂ y Set.univ isOpen_univ (Set.mem_univ z) + exact ⟨p,hp⟩ + +end LocalArrangementAssignments + +section LocalBooleanAssignments +variable {a : ℕ} {ι κ : Type*} + +noncomputable def polygonBooleanPullback [Finite κ] (U : κ → polygonAlgebra a) + (S : Set (κ → Bool)) : polygonAlgebra a := by + refine ⟨{p | polygonAssignment U p ∈ S},?_⟩ + have he : {p | polygonAssignment U p ∈ S}= + ⋃ σ : S, {p | polygonAssignment U p=σ.val} := by + ext p + simp only [Set.mem_ofPred_eq,Set.mem_iUnion] + constructor + · intro h; exact ⟨⟨_,h⟩,rfl⟩ + · rintro ⟨σ,hσ⟩; exact hσ ▸ σ.property + rw [he] + exact BooleanSubalgebra.iSup_mem fun σ => polygonAssignment_fiber_mem U σ.val + +noncomputable def polygonFormalMask (U : κ → polygonAlgebra a) + (V : polygonAlgebra a) : Set (κ → Bool) := + {σ | ∃ p, polygonAssignment U p=σ ∧ p ∈ V.val} + +theorem polygonFormalMask_mem (U : κ → polygonAlgebra a) (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (U i).val) V.val) (p : GenericSquare a) : + polygonAssignment U p ∈ polygonFormalMask U V ↔ p ∈ V.val := by + constructor + · rintro ⟨q,hq,hqV⟩ + exact (hV q p ((polygonAssignment_eq_iff U q p).mp hq)).mp hqV + · intro hp; exact ⟨p,rfl,hp⟩ + +theorem polygonBooleanPullback_formalMask [Finite κ] + (U : κ → polygonAlgebra a) (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (U i).val) V.val) : + polygonBooleanPullback U (polygonFormalMask U V)=V := by + apply Subtype.ext + ext p + exact polygonFormalMask_mem U V hV p + +noncomputable def localPolygonFamily [Finite κ] + (j : κ → Fin 4) (c : κ → CutRing) (z : ℝ × ℝ) + (R : ι → polygonAlgebra a) (i : ι) : polygonAlgebra a := + polygonBooleanPullback (localCutFamily j c z) + (polygonFormalMask (fun k => cutPolygon a (j k) (c k)) (R i)) + +theorem localPolygonFamily_assignment_realized [Finite κ] + (j : κ → Fin 4) (c : κ → CutRing) (z : ℝ × ℝ) + (hz₁ : z.1 ∈ Set.Ioo (0:ℝ) 1) (hz₂ : z.2 ∈ Set.Ioo (0:ℝ) 1) + (R : ι → polygonAlgebra a) + (hR : ∀ i, ResolvedBy (fun k => halfPlane a (j k) (c k)) (R i).val) + (y : GenericSquare a) (N : Set (ℝ × ℝ)) (hN : IsOpen N) (hz : z ∈ N) : + ∃ p : GenericSquare a, p.val ∈ N ∧ + polygonAssignment R p=polygonAssignment (localPolygonFamily j c z R) y := by + obtain ⟨p,hp,he⟩ := localCutFamily_assignment_realized j c z hz₁ hz₂ y N hN hz + refine ⟨p,hp,?_⟩ + funext i + apply decide_eq_decide.mpr + change (p ∈ (R i).val) ↔ polygonAssignment (localCutFamily j c z) y ∈ + polygonFormalMask (fun k => cutPolygon a (j k) (c k)) (R i) + rw [← he] + exact (polygonFormalMask_mem _ (R i) (hR i) p).symm + +theorem localPolygonFamily_range_subset [Finite κ] + (j : κ → Fin 4) (c : κ → CutRing) (z : ℝ × ℝ) + (hz₁ : z.1 ∈ Set.Ioo (0:ℝ) 1) (hz₂ : z.2 ∈ Set.Ioo (0:ℝ) 1) + (R : ι → polygonAlgebra a) + (hR : ∀ i, ResolvedBy (fun k => halfPlane a (j k) (c k)) (R i).val) : + Set.range (polygonAssignment (localPolygonFamily j c z R)) ⊆ Set.range (polygonAssignment R) := by + rintro σ ⟨y,rfl⟩ + obtain ⟨p,_,hp⟩ := localPolygonFamily_assignment_realized j c z hz₁ hz₂ R hR y + Set.univ isOpen_univ (Set.mem_univ z) + exact ⟨p,hp⟩ + +theorem localCutFamily_locally_eq [Finite κ] + (j : κ → Fin 4) (c : κ → CutRing) (z : ℝ × ℝ) : + ∃ N : Set (ℝ × ℝ), IsOpen N ∧ z ∈ N ∧ + ∀ p : GenericSquare a, p.val ∈ N → + polygonAssignment (localCutFamily j c z) p= + polygonAssignment (fun k => cutPolygon a (j k) (c k)) p := by + classical + let N : Set (ℝ × ℝ) := ⋂ k, + if cutForm a (j k) z=ordinary (c k) then Set.univ + else if cutForm a (j k) z halfPlane a (j k) (c k)) (R i).val) : + ∃ N : Set (ℝ × ℝ), IsOpen N ∧ z ∈ N ∧ + ∀ p : GenericSquare a, p.val ∈ N → ∀ i, + p ∈ (localPolygonFamily j c z R i).val ↔ p ∈ (R i).val := by + obtain ⟨N,hN,hz,h⟩ := localCutFamily_locally_eq (a := a) j c z + refine ⟨N,hN,hz,fun p hp i => ?_⟩ + change polygonAssignment (localCutFamily j c z) p ∈ polygonFormalMask _ (R i) ↔ _ + rw [h p hp] + exact polygonFormalMask_mem _ (R i) (hR i) p + +end LocalBooleanAssignments + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LocalAtomComparison.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LocalAtomComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..3eeacc4d32454c2c7ef9539955b8d663e4b7e1ec --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/LocalAtomComparison.lean @@ -0,0 +1,233 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AssignmentAtoms + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LocalAtomComparison + +variable {I Ω D H : Type*} [Fintype I] [DecidableEq I] [DecidableEq Ω] [Finite Ω] + [Group D] [Group H] + +theorem local_atom_comparison (L : Finset I → Subgroup D) (hmono : Monotone L) + (v : D →* (Ω → alternatingGroup I)) (f : D →* H) + (hgen : Subgroup.closure {h : H | ∃ T : Finset I, T.card ≤ 5 ∧ + ∃ e ∈ L T, h = f e} = ⊤) + (hlaw : ∀ T : Finset I, T.card ≤ 15 → LocalCentralLaw L v f T) + (E : Finset I) (hE : E.card = 5) (a : SwapLabel I) (ha : a.val.support ⊆ E) + (u : Ω × SwapLabel I → D) + (hu : ∀ t, u t ∈ L (E ∪ t.2.val.support)) + (huv : ∀ t, v (u t) = assignmentAtom a t) + (S : Finset I) (hS : S.card ≤ 5) (d : D) (hd : d ∈ L S) + (hvd : ∀ ω, ((v d) ω).val.support ⊆ S) : + ∃ w : FreeGroup (Ω × SwapLabel I), + FreeGroup.lift (assignmentAtom a) w = v d ∧ + QuotientGroup.mk' (Subgroup.center H) (f (FreeGroup.lift u w)) = + QuotientGroup.mk' (Subgroup.center H) (f d) := by + obtain ⟨w,hw,hwu⟩ := supported_atom_word L hmono E a ha u hu (E ∪ S) + Finset.subset_union_left (v d) (fun ω => (hvd ω).trans Finset.subset_union_right) + refine ⟨w,hw,?_⟩ + have hvw : v (FreeGroup.lift u w) = v d := by + change (v.comp (FreeGroup.lift u)) w = v d + rw [hom_comp_freeLift] + simpa only [huv] using hw + have hc : (E ∪ S).card ≤ 10 := + (Finset.card_union_le _ _).trans (by omega) + exact local_equality_mod_center L hmono v f hgen hlaw hc hwu + (hmono Finset.subset_union_right hd) hvw + +theorem local_atoms_generate_center_quotient (L : Finset I → Subgroup D) + (hmono : Monotone L) (v : D →* (Ω → alternatingGroup I)) (f : D →* H) + (hgen : Subgroup.closure {h : H | ∃ T : Finset I, T.card ≤ 5 ∧ + ∃ e ∈ L T, h = f e} = ⊤) + (hlaw : ∀ T : Finset I, T.card ≤ 15 → LocalCentralLaw L v f T) + (hsupp : ∀ S : Finset I, ∀ d ∈ L S, ∀ ω, ((v d) ω).val.support ⊆ S) + (E : Finset I) (hE : E.card = 5) (a : SwapLabel I) (ha : a.val.support ⊆ E) + (u : Ω × SwapLabel I → D) + (hu : ∀ t, u t ∈ L (E ∪ t.2.val.support)) + (huv : ∀ t, v (u t) = assignmentAtom a t) : + Subgroup.closure (Set.range (fun t => QuotientGroup.mk' (Subgroup.center H) (f (u t)))) = ⊤ := by + let q := QuotientGroup.mk' (Subgroup.center H) + let Y := fun t => q (f (u t)) + rw [← FreeGroup.range_lift_eq_closure] + apply top_unique + have hle : (⊤ : Subgroup H) ≤ (FreeGroup.lift Y).range.comap q := by + rw [← hgen] + apply (Subgroup.closure_le _).mpr + rintro _ ⟨S,hS,d,hd,rfl⟩ + obtain ⟨w,_,hw⟩ := local_atom_comparison L hmono v f hgen hlaw E hE a ha u hu huv + S hS d hd (hsupp S d hd) + refine ⟨w,?_⟩ + have heq := DFunLike.congr_fun (hom_comp_freeLift (q.comp f) u) w + exact heq.symm.trans hw + intro z _ + obtain ⟨h,rfl⟩ := QuotientGroup.mk'_surjective (Subgroup.center H) z + exact hle (Subgroup.mem_top h) + +end LocalAtomComparison + +section LocalAtomConjugation + +variable {I Ω D H : Type*} [Fintype I] [DecidableEq I] [DecidableEq Ω] + [Group D] [Group H] + +theorem local_atom_conjugation (L : Finset I → Subgroup D) (hmono : Monotone L) + (v : D →* (Ω → alternatingGroup I)) (f : D →* H) + (hgen : Subgroup.closure {h : H | ∃ T : Finset I, T.card ≤ 5 ∧ + ∃ e ∈ L T, h = f e} = ⊤) + (hlaw : ∀ T : Finset I, T.card ≤ 15 → LocalCentralLaw L v f T) + (E : Finset I) (hE : E.card = 5) (a : SwapLabel I) (ha : a.val.support ⊆ E) + (u : Ω × SwapLabel I → D) + (hu : ∀ t, u t ∈ L (E ∪ t.2.val.support)) + (huv : ∀ t, v (u t) = assignmentAtom a t) (s t : Ω × SwapLabel I) : + let Y := fun t => QuotientGroup.mk' (Subgroup.center H) (f (u t)) + Y s * Y t * (Y s)⁻¹ = + (Y (assignmentAtom a s • (t.1,a)))⁻¹ * Y (assignmentAtom a s • t) := by + dsimp only + let S := E ∪ s.2.val.support ∪ t.2.val.support + have hES : E ⊆ S := Finset.subset_union_left.trans Finset.subset_union_left + have hs : u s ∈ L S := hmono Finset.subset_union_left (hu s) + have ht : u t ∈ L S := hmono + (Finset.union_subset hES Finset.subset_union_right) (hu t) + have hc := atom_conjugation_support E a ha s t + have hb : u (assignmentAtom a s • (t.1,a)) ∈ L S := + hmono (Finset.union_subset hES hc.1) (hu _) + have hd : u (assignmentAtom a s • t) ∈ L S := + hmono (Finset.union_subset hES hc.2) (hu _) + have hcard : S.card ≤ 10 := by + have h1 := Finset.card_union_le E s.2.val.support + have h2 := Finset.card_union_le (E ∪ s.2.val.support) t.2.val.support + rw [swapLabel_card_support] at h1 h2 + dsimp [S] + omega + have heq : v (u s * u t * (u s)⁻¹) = + v ((u (assignmentAtom a s • (t.1,a)))⁻¹ * u (assignmentAtom a s • t)) := by + simp only [map_mul,map_inv,huv] + exact assignmentAtom_conjugation a (assignmentAtom a s) t + have h := local_equality_mod_center L hmono v f hgen hlaw hcard + ((L S).mul_mem ((L S).mul_mem hs ht) ((L S).inv_mem hs)) + ((L S).mul_mem ((L S).inv_mem hb) hd) heq + simpa only [map_mul,map_inv] using h + +theorem local_atom_base (L : Finset I → Subgroup D) (hmono : Monotone L) + (v : D →* (Ω → alternatingGroup I)) (f : D →* H) + (hgen : Subgroup.closure {h : H | ∃ T : Finset I, T.card ≤ 5 ∧ + ∃ e ∈ L T, h = f e} = ⊤) + (hlaw : ∀ T : Finset I, T.card ≤ 15 → LocalCentralLaw L v f T) + (E : Finset I) (hE : E.card = 5) (a : SwapLabel I) + (u : Ω × SwapLabel I → D) + (hu : ∀ t, u t ∈ L (E ∪ t.2.val.support)) + (huv : ∀ t, v (u t) = assignmentAtom a t) (ω : Ω) : + QuotientGroup.mk' (Subgroup.center H) (f (u (ω,a))) = 1 := by + have hc : (E ∪ a.val.support).card ≤ 10 := + (Finset.card_union_le _ _).trans (by rw [hE,swapLabel_card_support]; omega) + have heq : v (u (ω,a)) = v 1 := by rw [huv,assignmentSwap_base_atom,map_one] + simpa only [map_one] using local_equality_mod_center L hmono v f hgen hlaw hc + (hu (ω,a)) (L (E ∪ a.val.support)).one_mem heq + +end LocalAtomConjugation + +section SmallSupportAssignment + +variable {I Ω D H : Type*} [Fintype I] [DecidableEq I] [DecidableEq Ω] [Finite Ω] + [Group D] [Group H] [Group.IsPerfect H] + +theorem small_support_assignment_law_with_atoms + (L : Finset I → Subgroup D) (hmono : Monotone L) + (v : D →* (Ω → alternatingGroup I)) (f : D →* H) (hf : Function.Surjective f) + (hDgen : Subgroup.closure {d : D | ∃ S : Finset I, S.card ≤ 5 ∧ d ∈ L S} = ⊤) + (hsupp : ∀ S : Finset I, ∀ d ∈ L S, ∀ ω, ((v d) ω).val.support ⊆ S) + (hlaw : ∀ T : Finset I, T.card ≤ 15 → LocalCentralLaw L v f T) + (E : Finset I) (hE : E.card = 5) (a : SwapLabel I) (ha : a.val.support ⊆ E) + (u : Ω × SwapLabel I → D) + (hu : ∀ t, u t ∈ L (E ∪ t.2.val.support)) + (huv : ∀ t, v (u t) = assignmentAtom a t) : HasCentralLaw v f := by + classical + have hgen : Subgroup.closure {h : H | ∃ T : Finset I, T.card ≤ 5 ∧ + ∃ e ∈ L T, h = f e} = ⊤ := by + have hi : f '' {d : D | ∃ S : Finset I, S.card ≤ 5 ∧ d ∈ L S} = + {h : H | ∃ T : Finset I, T.card ≤ 5 ∧ ∃ e ∈ L T, h = f e} := by + ext h + constructor + · rintro ⟨d,⟨S,hS,hd⟩,rfl⟩ + exact ⟨S,hS,d,hd,rfl⟩ + · rintro ⟨S,hS,d,hd,rfl⟩ + exact ⟨d,⟨S,hS,hd⟩,rfl⟩ + rw [← hi, ← MonoidHom.map_closure, hDgen, ← MonoidHom.range_eq_map, + MonoidHom.range_eq_top.mpr hf] + let Q := H ⧸ Subgroup.center H + let q : H →* Q := QuotientGroup.mk' (Subgroup.center H) + let P := FreeGroup.lift (assignmentAtom (Ω := Ω) a) + let Y := fun t => q (f (u t)) + have hgenY : Subgroup.closure (Set.range Y) = ⊤ := + local_atoms_generate_center_quotient L hmono v f hgen hlaw hsupp E hE a ha u hu huv + have hcentral : HasCentralLaw P (FreeGroup.lift Y) := by + apply centralLaw_of_atom_conjugations (assignmentAtom a) Y Y (fun t => (t.1,a)) + (fun t s => t.1 = s.1) + · intro t s hts + exact Prod.ext hts rfl + · intro t + rfl + · intro t + exact local_atom_base L hmono v f hgen hlaw E hE a u hu huv t.1 + · intro g t s hts + exact hts + · intro s t + exact local_atom_conjugation L hmono v f hgen hlaw E hE a ha u hu huv s t + · exact hgenY + have hker : P.ker ≤ (FreeGroup.lift Y).ker := by + intro w hw + have hz := (hasCentralLaw_iff P (FreeGroup.lift Y)).mp hcentral w hw + change FreeGroup.lift Y w ∈ Subgroup.center (H ⧸ Subgroup.center H) at hz + rw [perfect_center_quotient] at hz + exact hz + have hP : Function.Surjective P := + FreeGroup.lift_surjective_iff_closure_range_eq_top.mpr (assignmentAtoms_generate a) + let φ : (Ω → alternatingGroup I) →* Q := P.liftOfSurjective hP ⟨_,hker⟩ + have hφ : φ.comp P = FreeGroup.lift Y := P.liftOfRightInverse_comp _ _ _ + have hmap : φ.comp v = q.comp f := by + apply MonoidHom.eq_of_eqOn_dense hDgen + rintro d ⟨S,hS,hd⟩ + obtain ⟨w,hw,hq⟩ := local_atom_comparison L hmono v f hgen hlaw E hE a ha u hu huv + S hS d hd (hsupp S d hd) + change φ (v d) = q (f d) + have hwp : P w = v d := hw + calc + φ (v d) = φ (P w) := congrArg φ hwp.symm + _ = FreeGroup.lift Y w := DFunLike.congr_fun hφ w + _ = q (f (FreeGroup.lift u w)) := + (DFunLike.congr_fun (hom_comp_freeLift (q.comp f) u) w).symm + _ = q (f d) := hq + rw [hasCentralLaw_iff] + intro d hd + have he := DFunLike.congr_fun hmap d + change φ (v d) = q (f d) at he + rw [hd,map_one] at he + have hk : f d ∈ (QuotientGroup.mk' (Subgroup.center H)).ker := he.symm + rwa [QuotientGroup.ker_mk'] at hk + +theorem small_support_assignment_law + (L : Finset I → Subgroup D) (hmono : Monotone L) + (v : D →* (Ω → alternatingGroup I)) (f : D →* H) (hf : Function.Surjective f) + (hDgen : Subgroup.closure {d : D | ∃ S : Finset I, S.card ≤ 5 ∧ d ∈ L S} = ⊤) + (hsupp : ∀ S : Finset I, ∀ d ∈ L S, ∀ ω, ((v d) ω).val.support ⊆ S) + (hlaw : ∀ T : Finset I, T.card ≤ 15 → LocalCentralLaw L v f T) + (E : Finset I) (hE : E.card = 5) (a : SwapLabel I) (ha : a.val.support ⊆ E) + (hcomplete : ∀ S : Finset I, 5 ≤ S.card → S.card ≤ 7 → ∀ g : Ω → alternatingGroup I, + (∀ ω, (g ω).val.support ⊆ S) → ∃ d ∈ L S, v d = g) : HasCentralLaw v f := by + obtain ⟨u,hu⟩ := exists_supported_atom_words L v E hE a ha hcomplete + exact small_support_assignment_law_with_atoms L hmono v f hf hDgen hsupp hlaw E hE a ha u + (fun t => (hu t).1) (fun t => (hu t).2) + +end SmallSupportAssignment + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PairControl.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PairControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..17d54bc3e78dd3e0a92aa117933e23426cd00e8d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PairControl.lean @@ -0,0 +1,193 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GrowthAxisUniform + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PairControl +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι : Type*} [Finite ι] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ i j I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (primitivePair P i j)) + +noncomputable def pairContainer (i : ι) (positive : Bool) : + TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm) := + B.fullGeometricSector hlarge (primitivePair P i i) (h i i) + (if positive then primitiveTests (a := a) (r := r) P i + else (primitiveTests (a := a) (r := r) P i)ᶜ) + +omit [Finite ι] in +theorem pairContainer_eq (i j : ι) (positive : Bool) : + B.pairContainer hlarge P h i positive = + B.fullGeometricSector hlarge (primitivePair P i j) (h i j) + (if positive then primitiveTests (a := a) (r := r) P i + else (primitiveTests (a := a) (r := r) P i)ᶜ) := by + apply B.fullGeometricSector_shared_primitive hlarge (primitivePair P i i) (primitivePair P i j) false false rfl _ _ _ + cases positive with + | false => exact fun x y he => not_congr (resolved_test _ () x y he) + | true => exact resolved_test _ () + +omit [Finite ι] in +theorem pairContainer_supported (i : ι) (positive : Bool) : + B.AlignedSmallSupported (B.pairContainer hlarge P h i positive) := by + apply B.fullGeometricSector_supported + cases positive with + | false => exact fun x y he => not_congr (primitivePair_left_resolved P i i x y he) + | true => exact primitivePair_left_resolved P i i + +omit [Finite ι] in +theorem pairSplit_control (i : ι) (j : Option ι) (positive : Bool) : + SmallControlled B.c (B.pairSplit hlarge P h i j positive) + (B.pairContainer hlarge P h i positive) := by + rw [B.pairContainer_eq hlarge P h i (j.getD i) positive] + exact B.fullGeometricSector_small_control hlarge _ _ _ _ inf_le_right + +omit [Finite ι] in +theorem pairContainer_commute (i : ι) (s t : TrackStar (Fin (m+1))) : + Commute (B.pairContainer hlarge P h i true s) (B.pairContainer hlarge P h i false t) := by + apply B.fullGeometricSector_commute hlarge _ _ _ _ (primitivePair_left_resolved P i i) + exact Set.disjoint_left.mpr (by intro x hx hy; exact hy hx) + +omit [Finite ι] in +theorem pairSplit_commute (h20 : 20 ≤ m+1) (i : ι) (j k : Option ι) + (s t : TrackStar (Fin (m+1))) : + Commute (B.pairSplit hlarge P h i j true s) (B.pairSplit hlarge P h i k false t) := + small_control_disjoint _ B.c B.constant_aligned B.disjoint_aligned (by simpa using h20) + _ _ _ _ (B.pairSplit_supported hlarge P h i j true) + (B.pairSplit_supported hlarge P h i k false) + (B.pairContainer_supported hlarge P h i true) + (B.pairSplit_control hlarge P h i j true) + (B.pairSplit_control hlarge P h i k false) + (B.pairContainer_commute hlarge P h i) s t + +omit [Finite ι] in + +theorem pairStar_small (I : FiveAlphabet (Fin (m+1))) (j : Option ι) : + (B.pairStar hlarge P h j).comp (universalMap (subtypeAlternatingHom I.val)) = + (B.smallPrimitiveInputs hlarge P I j).comp + (universalProjection (alternatingGroup I.val)) := by + cases j with + | none => + change (B.c.comp (universalProjection (alternatingGroup (Fin (m+1))))).comp _ = + (B.initialAlphabet I.val 0).comp _ + rw [MonoidHom.comp_assoc,universalMap_spec,← MonoidHom.comp_assoc,B.initialAlphabet_zero] + | some i => + let b := smallAlphabetBalance hlarge I.val (by rw [I.property.2]; omega) + have hb := smallAlphabetBalance_notMem hlarge I.val (by rw [I.property.2]; omega) + change (B.fullGeometricSector hlarge (primitivePair P i i) (h i i) + (primitiveTests (a := a) (r := r) P i)).comp _ = _ + rw [B.fullGeometricSector_inclusion hlarge _ _ I.val (by rw [I.property.2]) b hb + (h i i I.val (by rw [I.property.2]; omega) b hb) _ (primitivePair_left_resolved P i i)] + exact B.geometricSector_input I.val b hb (primitivePair P i i) (h i i _ (by rw [I.property.2]; omega) b hb) false + +omit [Finite ι] in + +theorem pairStar_range : + (⨆ j, (B.pairStar hlarge P h j).range) = + (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + apply le_antisymm + · apply iSup_le + rintro j x ⟨s,rfl⟩ + exact B.pairStar_mem hlarge P h j s + · rw [smallFamilyEval_range] + apply iSup_le + intro I + apply iSup_le + rintro j x ⟨s,rfl⟩ + obtain ⟨t,rfl⟩ := universalProjection_surjective (alternatingGroup I.val) s + apply le_iSup (fun j => (B.pairStar hlarge P h j).range) j + exact ⟨universalMap (subtypeAlternatingHom I.val) t, + DFunLike.congr_fun (B.pairStar_small hlarge P h I j) t⟩ + +end InitialCoverSystem +end PairControl + +section AssignmentExclusions +variable {E S G K ι Ω : Type*} [Group E] [Group S] [Group G] [Group K] + +noncomputable def copySourceMap (π : E →* S) : FreeGroup (Option ι × E) →* FreeGroup (Option ι × S) := + FreeGroup.map (fun p => (p.1,π p.2)) + +noncomputable def formalAssignmentEval (π : E →* S) : + FreeGroup (Option ι × E) →* ((ι → Bool) → S) := + (assignmentEval (fun i : ι => {σ : ι → Bool | σ i = true})).comp (copySourceMap π) + +theorem formalAssignmentEval_surjective [Finite ι] [Group.IsPerfect S] + (π : E →* S) (hπ : Function.Surjective π) : Function.Surjective (formalAssignmentEval (ι := ι) π) := by + have hv : Function.Surjective (assignmentEval (E := S) (fun i : ι => {σ : ι → Bool | σ i = true})) := by + apply assignmentEval_surjective + intro σ τ h + funext i + exact Bool.eq_iff_iff.mpr (h i) + have hw : Function.Surjective (copySourceMap (ι := ι) π) := by + apply FreeGroup.map_surjective + rintro ⟨i,s⟩ + obtain ⟨t,rfl⟩ := hπ s + exact ⟨(i,t),rfl⟩ + exact hv.comp hw + +theorem forbidden_factor_trivial [Finite ι] [Group.IsPerfect S] + (π : E →* S) (hπ : Function.Surjective π) + (F : Option ι → E →* G) (ρ : G →* K) (c : S →* K) + (σ : ι → Bool) (pattern : Ω → ι → Bool) + (hforbid : σ ∉ Set.range pattern) + (hwhole : ρ.comp (F none) = c.comp π) + (hcomponent : ρ.comp (copyFamilyEval F) = + c.comp ((Pi.evalMonoidHom _ σ).comp (formalAssignmentEval π))) + (hlocal : ∀ w, ((assignmentPullback pattern).comp (formalAssignmentEval π)) w = 1 → + ∀ t, Commute (copyFamilyEval F w) (F none t)) : ∀ s, c s = 1 := by + classical + have hcomm (s t : S) : Commute (c s) (c t) := by + obtain ⟨w,hw⟩ := formalAssignmentEval_surjective (ι := ι) π hπ (Pi.mulSingle σ s) + have hmodel : ((assignmentPullback pattern).comp (formalAssignmentEval π)) w = 1 := by + ext ω + change formalAssignmentEval π w (pattern ω) = 1 + rw [hw,Pi.mulSingle_eq_of_ne] + exact fun he => hforbid ⟨ω,he⟩ + obtain ⟨v,hv⟩ := hπ t + have hh := (hlocal w hmodel v).map ρ + have he := DFunLike.congr_fun hcomponent w + have ht := DFunLike.congr_fun hwhole v + simp only [MonoidHom.comp_apply,Pi.evalMonoidHom_apply,hw,Pi.mulSingle_eq_same] at he + simp only [MonoidHom.comp_apply,hv] at ht + rwa [he,ht] at hh + let : IsMulCommutative c.range := ⟨⟨fun x y => by + obtain ⟨s,hs⟩ := x.property + obtain ⟨t,ht⟩ := y.property + apply Subtype.ext + change x.val*y.val = y.val*x.val + rw [← hs,← ht] + exact (hcomm s t).eq⟩⟩ + intro s + exact congrArg Subtype.val (perfect_hom_to_commGroup c.rangeRestrict s) + +theorem formal_component_of_inputs (π : E →* S) + (F : Option ι → E →* G) (ρ : G →* K) (c : S →* K) (σ : ι → Bool) + (hwhole : ρ.comp (F none) = c.comp π) + (hinput : ∀ i s, ρ (F (some i) s) = if σ i then c (π s) else 1) : + ρ.comp (copyFamilyEval F) = c.comp ((Pi.evalMonoidHom _ σ).comp (formalAssignmentEval π)) := by + apply FreeGroup.ext_hom + rintro ⟨i,s⟩ + cases i with + | none => simpa only [MonoidHom.comp_apply,copyFamilyEval_of,formalAssignmentEval,copySourceMap, + FreeGroup.map.of,assignmentEval,maskFamily,sectorMask_of_mem _ _ _ (Set.mem_univ _), + Pi.evalMonoidHom_apply] using DFunLike.congr_fun hwhole s + | some i => + simp only [MonoidHom.comp_apply,copyFamilyEval_of,formalAssignmentEval,copySourceMap, + FreeGroup.map.of,assignmentEval,maskFamily,Pi.evalMonoidHom_apply] + cases hs : σ i <;> simp [sectorMask,hinput,hs] + +end AssignmentExclusions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PairLawAssembly.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PairLawAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..83149bd526382e607409bb6961e51cb8f66c47c7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PairLawAssembly.lean @@ -0,0 +1,147 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AssignmentGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PairLawAssembly +variable {G E ι : Type*} [Group G] [Group E] + +noncomputable def assignmentRestriction {Ω : Type*} (F : Ω → Type*) [∀ ω, Group (F ω)] + (U : Set Ω) : (∀ ω, F ω) →* (∀ ω, F ω) := by + classical + exact { toFun := fun s ω => if ω ∈ U then s ω else 1 + map_one' := by ext ω; simp + map_mul' := by intro s t; ext ω; by_cases hu : ω ∈ U <;> simp [hu] } + +@[simp] theorem assignmentRestriction_single {Ω : Type*} [DecidableEq Ω] + (F : Ω → Type*) [∀ ω, Group (F ω)] (U : Set Ω) [DecidablePred (· ∈ U)] + (ω : Ω) (s : F ω) : + assignmentRestriction F U (Pi.mulSingle ω s) = + if ω ∈ U then Pi.mulSingle ω s else 1 := by + classical + ext ν + by_cases heq : ν = ω + · subst ν + by_cases hu : ω ∈ U <;> simp [assignmentRestriction, hu] + · by_cases huω : ω ∈ U <;> by_cases huν : ν ∈ U <;> + simp [assignmentRestriction, heq, huω, huν] + +variable [Fintype ι] +variable (A B : ι → Subgroup G) (h : ∀ i, CommutingFactors (A i) (B i)) + (hz : Subgroup.center G = ⊥) + +noncomputable def refinementEquiv : (∀ σ : ι → Bool, refinedFactor A B Finset.univ σ) ≃* G := by + classical + exact commutingFactorsEquiv (fun σ => refinedFactor A B Finset.univ σ) + (fun _ _ hστ _ _ hx hy => refinedFactor_commute A B h hστ hx hy) + (simultaneous_refinement A B h hz Finset.univ) hz + +@[simp] theorem refinementEquiv_single [DecidableEq (ι → Bool)] (σ : ι → Bool) + (x : refinedFactor A B Finset.univ σ) : + refinementEquiv A B h hz (Pi.mulSingle σ x) = x := by + classical + exact commutingFactorsEquiv_single _ _ _ _ _ _ + +theorem refinement_projection (i : ι) : + ((h i).projectLeft hz).comp (refinementEquiv A B h hz).toMonoidHom = + (refinementEquiv A B h hz).toMonoidHom.comp + (assignmentRestriction (fun σ : ι → Bool => refinedFactor A B Finset.univ σ) + {σ | σ i = true}) := by + classical + apply MonoidHom.pi_ext + intro σ s + change (h i).projectLeft hz (refinementEquiv A B h hz (Pi.mulSingle σ s)) = + refinementEquiv A B h hz + (assignmentRestriction (fun σ : ι → Bool => refinedFactor A B Finset.univ σ) + {σ | σ i = true} (Pi.mulSingle σ s)) + rw [refinementEquiv_single, assignmentRestriction_single] + have hs := s.property + simp only [refinedFactor, assignmentFactor, Subgroup.mem_iInf, Finset.mem_univ, + forall_const] at hs + specialize hs i + by_cases hσ : σ i = true + · simp only [Set.mem_ofPred_eq, hσ, ↓reduceIte, refinementEquiv_single] at hs ⊢ + exact (h i).projectLeft_fix hz hs + · simp only [Set.mem_ofPred_eq, hσ, Bool.false_eq_true, ↓reduceIte] at hs ⊢ + rw [map_one] + exact (h i).projectLeft_kill hz hs + +noncomputable def refinementSource (c : E →* G) (σ : ι → Bool) : + E →* refinedFactor A B Finset.univ σ := + (Pi.evalMonoidHom _ σ).comp ((refinementEquiv A B h hz).symm.toMonoidHom.comp c) + +noncomputable def simultaneousAssignmentMap (c : E →* G) : ((ι → Bool) → E) →* G := + (refinementEquiv A B h hz).toMonoidHom.comp + (MonoidHom.pi fun σ => (refinementSource A B h hz c σ).comp (Pi.evalMonoidHom _ σ)) + +@[simp] theorem simultaneousAssignmentMap_whole (c : E →* G) : + (simultaneousAssignmentMap A B h hz c).comp (sectorMask Set.univ) = c := by + ext s + change refinementEquiv A B h hz + (fun σ => refinementSource A B h hz c σ (sectorMask Set.univ s σ)) = c s + simp only [sectorMask_of_mem _ _ _ (Set.mem_univ _)] + exact (refinementEquiv A B h hz).apply_symm_apply (c s) + +theorem simultaneousAssignmentMap_test (c : E →* G) (i : ι) : + (simultaneousAssignmentMap A B h hz c).comp (sectorMask {σ | σ i = true}) = + ((h i).projectLeft hz).comp c := by + ext s + have hp := DFunLike.congr_fun (refinement_projection A B h hz i) + ((refinementEquiv A B h hz).symm (c s)) + change (h i).projectLeft hz + (refinementEquiv A B h hz ((refinementEquiv A B h hz).symm (c s))) = + refinementEquiv A B h hz + (assignmentRestriction (fun σ : ι → Bool => refinedFactor A B Finset.univ σ) + {σ | σ i = true} ((refinementEquiv A B h hz).symm (c s))) at hp + rw [MulEquiv.apply_symm_apply] at hp + rw [MonoidHom.comp_apply, MonoidHom.comp_apply, hp] + change refinementEquiv A B h hz _ = refinementEquiv A B h hz _ + apply (refinementEquiv A B h hz).congr_arg + ext σ + by_cases hσ : σ i = true + · simp [refinementSource, sectorMask, assignmentRestriction, hσ] + · simp [refinementSource, sectorMask, assignmentRestriction, hσ] + +theorem range_comp_subset {X Y Z : Type*} [Group X] [Group Y] [Group Z] + (f : Y →* Z) (g : X →* Y) : (f.comp g).range ≤ f.range := by + rintro y ⟨x, rfl⟩ + exact ⟨g x, rfl⟩ + +theorem simultaneous_assignment_surjection (c : E →* G) (g : ι → E →* G) + (hinput : ∀ i, g i = ((h i).projectLeft hz).comp c) + (hgenerate : c.range ⊔ ⨆ i, (g i).range = ⊤) : + ∃ φ : ((ι → Bool) → E) →* G, + Function.Surjective φ ∧ φ.comp (sectorMask Set.univ) = c ∧ + ∀ i, φ.comp (sectorMask {σ | σ i = true}) = g i := by + let φ := simultaneousAssignmentMap A B h hz c + have hwhole : φ.comp (sectorMask Set.univ) = c := + simultaneousAssignmentMap_whole A B h hz c + have htest : ∀ i, φ.comp (sectorMask {σ | σ i = true}) = g i := by + intro i + exact (simultaneousAssignmentMap_test A B h hz c i).trans (hinput i).symm + refine ⟨φ, ?_, hwhole, htest⟩ + apply MonoidHom.range_eq_top.mp + apply top_unique + calc + ⊤ = c.range ⊔ ⨆ i, (g i).range := hgenerate.symm + _ ≤ φ.range := sup_le ?_ (iSup_le fun i => ?_) + · calc c.range = (φ.comp (sectorMask Set.univ)).range := + congrArg MonoidHom.range hwhole.symm + _ ≤ φ.range := range_comp_subset φ _ + · calc (g _).range = (φ.comp (sectorMask {σ | σ _ = true})).range := + congrArg MonoidHom.range (htest _).symm + _ ≤ φ.range := range_comp_subset φ _ + +end PairLawAssembly + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PerfectCalculus.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PerfectCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..fce062c41e610eb1c835b308bc89910a71156dc5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PerfectCalculus.lean @@ -0,0 +1,305 @@ +import Mathlib + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section PerfectCalculus + +open scoped commutatorElement + +variable {P H Q : Type*} [Group P] [Group H] [Group Q] + +theorem perfect_hom_to_commGroup {A : Type*} [Group A] [IsMulCommutative A] [Group.IsPerfect P] + (f : P →* A) (x : P) : f x = 1 := by + have : Group.IsPerfect f.range := Group.IsPerfect.range f + have : Subsingleton f.range := inferInstance + exact congrArg Subtype.val + (Subsingleton.elim (⟨f x, x, rfl⟩ : f.range) 1) + +theorem perfect_lift_unique [Group.IsPerfect P] (q : H →* Q) + (hq : q.ker ≤ Subgroup.center H) (f g : P →* H) + (hfg : q.comp f = q.comp g) : f = g := by + have hpoint (x : P) : q (f x) = q (g x) := DFunLike.congr_fun hfg x + have hc (x : P) : f x * (g x)⁻¹ ∈ Subgroup.center H := by + apply hq + change q (f x * (g x)⁻¹) = 1 + simp [hpoint] + let d : P →* Subgroup.center H := + { toFun := fun x => ⟨f x * (g x)⁻¹, hc x⟩ + map_one' := by apply Subtype.ext; simp + map_mul' := by + intro x y + apply Subtype.ext + change f (x * y) * (g (x * y))⁻¹ = + (f x * (g x)⁻¹) * (f y * (g y)⁻¹) + rw [map_mul, map_mul, mul_inv_rev] + have hcomm := Subgroup.mem_center_iff.mp (hc y) ((g x)⁻¹) + calc + f x * f y * ((g y)⁻¹ * (g x)⁻¹) = + f x * ((f y * (g y)⁻¹) * (g x)⁻¹) := by simp only [mul_assoc] + _ = f x * ((g x)⁻¹ * (f y * (g y)⁻¹)) := by rw [hcomm] + _ = (f x * (g x)⁻¹) * (f y * (g y)⁻¹) := by simp only [mul_assoc] } + ext x + have heq := congrArg Subtype.val (perfect_hom_to_commGroup d x) + exact mul_inv_eq_one.mp heq + +theorem perfect_commutator_central_trivial (A B : Subgroup H) [Group.IsPerfect A] + (h : ⁅A, B⁆ ≤ Subgroup.center H) : ⁅A, B⁆ = ⊥ := by + have hz : ⁅⁅A, B⁆, (⊤ : Subgroup H)⁆ = ⊥ := + Subgroup.commutator_top_right_eq_bot_iff_le_center.mpr h + have ha : ⁅⁅A, B⁆, A⁆ = ⊥ := + bot_unique ((Subgroup.commutator_mono le_rfl le_top).trans hz.le) + have hb : ⁅⁅B, A⁆, A⁆ = ⊥ := by simpa only [Subgroup.commutator_comm B A] using ha + have hc : ⁅⁅A, A⁆, B⁆ = ⊥ := + Subgroup.commutator_commutator_eq_bot_of_rotate ha hb + simpa only [Subgroup.commutator_eq_self] using hc + +theorem perfect_center_quotient [Group.IsPerfect H] : + Subgroup.center (H ⧸ Subgroup.center H) = ⊥ := + Group.IsPerfect.center_quotient_center_eq_bot H + +theorem central_extension_decomposition [Group.IsPerfect Q] (q : H →* Q) + (hq : Function.Surjective q) (hcentral : q.ker ≤ Subgroup.center H) (x : H) : + ∃ d ∈ commutator H, ∃ z ∈ Subgroup.center H, x = d * z := by + have hmap : (commutator H).map q = ⊤ := by + rw [map_commutator_eq, MonoidHom.range_eq_top.mpr hq, + ← commutator_def, Group.IsPerfect.commutator_eq_top] + obtain ⟨d, hd, hdx⟩ := Subgroup.mem_map.mp (hmap.symm ▸ Subgroup.mem_top (q x)) + refine ⟨d, hd, d⁻¹ * x, hcentral ?_, by simp⟩ + change q (d⁻¹ * x) = 1 + simp [hdx] + +theorem central_extension_commutator_perfect [Group.IsPerfect Q] (q : H →* Q) + (hq : Function.Surjective q) (hcentral : q.ker ≤ Subgroup.center H) : + Group.IsPerfect (commutator H) := by + apply Subgroup.isPerfect_iff.mpr + apply le_antisymm (Subgroup.commutator_le_self _) + rw [commutator_def] + apply Subgroup.commutator_le.mpr + intro x _ y _ + obtain ⟨d, hd, z, hz, rfl⟩ := central_extension_decomposition q hq hcentral x + obtain ⟨e, he, w, hw, rfl⟩ := central_extension_decomposition q hq hcentral y + have hzcomm : ⁅z, e * w⁆ = 1 := + commutatorElement_eq_one_iff_mul_comm.mpr + ((Subgroup.mem_center_iff.mp hz (e * w)).symm) + have hwcomm : ⁅d, w⁆ = 1 := + commutatorElement_eq_one_iff_mul_comm.mpr (Subgroup.mem_center_iff.mp hw d) + rw [commutatorElement_mul_left_eq_conj_mul, hzcomm] + simp only [mul_one, mul_inv_cancel, one_mul] + rw [commutatorElement_mul_right_eq_mul_conj, hwcomm] + simpa only [mul_one, mul_inv_cancel_right, commutator_def] using Subgroup.commutator_mem_commutator hd he + +theorem central_extension_commutator_surjective [Group.IsPerfect Q] (q : H →* Q) + (hq : Function.Surjective q) : + Function.Surjective (q.comp (commutator H).subtype) := by + intro x + have hmap : (commutator H).map q = ⊤ := by + rw [map_commutator_eq, MonoidHom.range_eq_top.mpr hq, + ← commutator_def, Group.IsPerfect.commutator_eq_top] + obtain ⟨d, hd, hdx⟩ := Subgroup.mem_map.mp (hmap.symm ▸ Subgroup.mem_top x) + exact ⟨⟨d, hd⟩, hdx⟩ + +end PerfectCalculus + +open scoped commutatorElement +section FiniteCentralCovers +variable {H Q : Type*} [Group H] [Group Q] + +theorem commutator_eq_of_central_kernel (q : H →* Q) + (hc : q.ker ≤ Subgroup.center H) {x x' : H} (hx : q x = q x') (y : H) : + ⁅x,y⁆ = ⁅x',y⁆ := by + have hz : x'⁻¹*x ∈ q.ker := by simp [hx] + have hzy : Commute (x'⁻¹*x) y := (Subgroup.mem_center_iff.mp (hc hz) y).symm + calc + _ = ⁅x'*(x'⁻¹*x),y⁆ := by simp + _ = ⁅x',y⁆ := by rw [commutatorElement_mul_left_eq_conj_mul,hzy.commutator_eq]; simp + +theorem finite_of_perfect_central_cover [Finite Q] [Group.IsPerfect H] + (q : H →* Q) (hq : Function.Surjective q) (hc : q.ker ≤ Subgroup.center H) : Finite H := by + classical + let s : Q → H := fun x => (hq x).choose + have hs (x : Q) : q (s x) = x := (hq x).choose_spec + let r : Q × Q → commutatorSet H := fun p => + ⟨⁅s p.1,s p.2⁆,commutator_mem_commutatorSet _ _⟩ + have hr : Function.Surjective r := by + rintro ⟨z,hz⟩ + obtain ⟨x,y,rfl⟩ := mem_commutatorSet_iff.mp hz + refine ⟨(q x,q y),Subtype.ext ?_⟩ + change ⁅s (q x),s (q y)⁆ = ⁅x,y⁆ + rw [commutator_eq_of_central_kernel q hc (hs (q x))] + rw [← commutatorElement_inv,commutator_eq_of_central_kernel q hc (hs (q y)), + commutatorElement_inv] + have : Finite (commutatorSet H) := Finite.of_surjective r hr + have : Finite (commutator H) := inferInstance + exact Finite.of_surjective (commutator H).subtype (by + intro x + refine ⟨⟨x,?_⟩,rfl⟩ + rw [Group.IsPerfect.commutator_eq_top] + trivial) +end FiniteCentralCovers + +section UniversalCentralExtension + +open scoped commutatorElement + +variable (E : Type*) [Group E] + +def freeEvaluation : FreeGroup E →* E := FreeGroup.lift id + +@[simp] theorem freeEvaluation_of (x : E) : freeEvaluation E (FreeGroup.of x) = x := + FreeGroup.lift_apply_of + +theorem freeEvaluation_surjective : Function.Surjective (freeEvaluation E) := + fun x => ⟨FreeGroup.of x, freeEvaluation_of E x⟩ + +def centralizingRelations : Subgroup (FreeGroup E) := + ⁅(⊤ : Subgroup (FreeGroup E)), (freeEvaluation E).ker⁆ + +instance : (centralizingRelations E).Normal := by + unfold centralizingRelations + infer_instance + +abbrev CentralizedFree := FreeGroup E ⧸ centralizingRelations E + +def centralFreeMap : CentralizedFree E →* E := + QuotientGroup.lift (centralizingRelations E) (freeEvaluation E) + (fun _ h => Subgroup.commutator_le_right (⊤ : Subgroup (FreeGroup E)) + (freeEvaluation E).ker h) + +@[simp] theorem centralFreeMap_mk (x : FreeGroup E) : + centralFreeMap E (QuotientGroup.mk' (centralizingRelations E) x) = + freeEvaluation E x := rfl + +theorem centralFreeMap_surjective : Function.Surjective (centralFreeMap E) := by + intro x + exact ⟨QuotientGroup.mk' (centralizingRelations E) (FreeGroup.of x), freeEvaluation_of E x⟩ + +theorem centralFreeMap_central : (centralFreeMap E).ker ≤ Subgroup.center (CentralizedFree E) := by + intro x + refine QuotientGroup.induction_on x ?_ + intro w hw + apply Subgroup.mem_center_iff.mpr + intro y + refine QuotientGroup.induction_on y ?_ + intro v + apply commutatorElement_eq_one_iff_mul_comm.mp + change ⁅QuotientGroup.mk' (centralizingRelations E) v, + QuotientGroup.mk' (centralizingRelations E) w⁆ = 1 + rw [← map_commutatorElement] + apply (QuotientGroup.eq_one_iff _).mpr + exact Subgroup.commutator_mem_commutator (Subgroup.mem_top v) hw + +abbrev UniversalExtension := commutator (CentralizedFree E) + +def universalProjection : UniversalExtension E →* E := + (centralFreeMap E).comp (commutator (CentralizedFree E)).subtype + +instance [Group.IsPerfect E] : Group.IsPerfect (UniversalExtension E) := + central_extension_commutator_perfect (centralFreeMap E) + (centralFreeMap_surjective E) (centralFreeMap_central E) + +theorem universalProjection_surjective [Group.IsPerfect E] : + Function.Surjective (universalProjection E) := + central_extension_commutator_surjective (centralFreeMap E) (centralFreeMap_surjective E) + +theorem universalProjection_central : + (universalProjection E).ker ≤ Subgroup.center (UniversalExtension E) := by + intro x hx + apply Subgroup.mem_center_iff.mpr + intro y + apply Subtype.ext + exact Subgroup.mem_center_iff.mp (centralFreeMap_central E hx) y.val + +variable {E} {H Q : Type*} [Group H] [Group Q] + +theorem universal_lift_exists (q : H →* Q) (hq : Function.Surjective q) + (hcentral : q.ker ≤ Subgroup.center H) (f : E →* Q) : + ∃ l : UniversalExtension E →* H, q.comp l = f.comp (universalProjection E) := by + classical + let a : E → H := fun x => (hq (f x)).choose + have ha (x : E) : q (a x) = f x := (hq (f x)).choose_spec + let F : FreeGroup E →* H := FreeGroup.lift a + have hF : q.comp F = f.comp (freeEvaluation E) := by + ext x + simpa [F, freeEvaluation] using ha x + have hrel : centralizingRelations E ≤ F.ker := by + apply Subgroup.commutator_le.mpr + intro x _ r hr + change F ⁅x, r⁆ = 1 + rw [map_commutatorElement] + apply commutatorElement_eq_one_iff_mul_comm.mpr + apply Subgroup.mem_center_iff.mp + apply hcentral + change q (F r) = 1 + have hpoint := DFunLike.congr_fun hF r + simpa only [MonoidHom.comp_apply, MonoidHom.mem_ker.mp hr, map_one] using hpoint + let Fbar : CentralizedFree E →* H := + QuotientGroup.lift (centralizingRelations E) F (fun _ hr => hrel hr) + refine ⟨Fbar.comp (commutator (CentralizedFree E)).subtype, ?_⟩ + ext x + change q (Fbar x.val) = f (centralFreeMap E x.val) + have hpoint (y : CentralizedFree E) : q (Fbar y) = f (centralFreeMap E y) := by + refine QuotientGroup.induction_on y ?_ + intro w + exact DFunLike.congr_fun hF w + exact hpoint x.val + +theorem universal_lift_exists_unique [Group.IsPerfect E] (q : H →* Q) + (hq : Function.Surjective q) (hcentral : q.ker ≤ Subgroup.center H) (f : E →* Q) : + ∃! l : UniversalExtension E →* H, q.comp l = f.comp (universalProjection E) := by + obtain ⟨l, hl⟩ := universal_lift_exists q hq hcentral f + refine ⟨l, hl, ?_⟩ + intro l' hl' + exact perfect_lift_unique q hcentral l' l (hl'.trans hl.symm) + +noncomputable def universalLift [Group.IsPerfect E] (q : H →* Q) + (hq : Function.Surjective q) (hcentral : q.ker ≤ Subgroup.center H) (f : E →* Q) : + UniversalExtension E →* H := + (universal_lift_exists_unique q hq hcentral f).choose + +theorem universalLift_spec [Group.IsPerfect E] (q : H →* Q) + (hq : Function.Surjective q) (hcentral : q.ker ≤ Subgroup.center H) (f : E →* Q) : + q.comp (universalLift q hq hcentral f) = f.comp (universalProjection E) := + (universal_lift_exists_unique q hq hcentral f).choose_spec.1 + +variable [Group.IsPerfect E] [Group.IsPerfect H] [Group.IsPerfect Q] + +noncomputable def universalMap (f : E →* H) : UniversalExtension E →* UniversalExtension H := + universalLift (universalProjection H) (universalProjection_surjective H) + (universalProjection_central H) f + +theorem universalMap_spec (f : E →* H) : + (universalProjection H).comp (universalMap f) = f.comp (universalProjection E) := + universalLift_spec _ _ _ _ + +@[simp] theorem universalMap_id : universalMap (MonoidHom.id E) = + MonoidHom.id (UniversalExtension E) := by + apply perfect_lift_unique (universalProjection E) (universalProjection_central E) + simpa using universalMap_spec (MonoidHom.id E) + +@[simp] theorem universalMap_comp (g : H →* Q) (f : E →* H) : + universalMap (g.comp f) = (universalMap g).comp (universalMap f) := by + apply perfect_lift_unique (universalProjection Q) (universalProjection_central Q) + rw [universalMap_spec, ← MonoidHom.comp_assoc, universalMap_spec] + simp only [MonoidHom.comp_assoc, universalMap_spec] + +noncomputable def universalEquiv (f : E ≃* H) : UniversalExtension E ≃* UniversalExtension H := + MonoidHom.toMulEquiv (universalMap f.toMonoidHom) (universalMap f.symm.toMonoidHom) + (by rw [← universalMap_comp]; simp) + (by rw [← universalMap_comp]; simp) + +instance universalExtension_finite [Finite E] : Finite (UniversalExtension E) := + finite_of_perfect_central_cover (universalProjection E) (universalProjection_surjective E) + (universalProjection_central E) + +end UniversalCentralExtension + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PerfectGeneratingFamilies.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PerfectGeneratingFamilies.lean new file mode 100644 index 0000000000000000000000000000000000000000..d35dbd4c2ae4a738f8f61c553f51abf06791ff71 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PerfectGeneratingFamilies.lean @@ -0,0 +1,187 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FiniteCentralKernel +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TranslationLifts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PerfectGeneratingFamilies + +variable {ι G H : Type*} [Group G] [Group H] + +theorem perfect_iSup (F : ι → Subgroup G) [∀ i, Group.IsPerfect (F i)] : + Group.IsPerfect ↥(⨆ i, F i) := by + apply Subgroup.isPerfect_iff.mpr + apply le_antisymm (Subgroup.commutator_le_self _) + apply iSup_le + intro i + rw [← Subgroup.commutator_eq_self (H := F i)] + exact Subgroup.commutator_mono (le_iSup F i) (le_iSup F i) + +theorem central_perfect_generating_ranges {E : ι → Type*} [∀ i, Group (E i)] + [∀ i, Group.IsPerfect (E i)] [Group.IsPerfect H] + (q : H →* G) (hc : q.ker ≤ Subgroup.center H) + (f : ∀ i, E i →* H) (hf : (⨆ i, (q.comp (f i)).range) = ⊤) : + (⨆ i, (f i).range) = ⊤ := by + let S : Subgroup H := ⨆ i, (f i).range + let (i : ι) : Group.IsPerfect (f i).range := Group.IsPerfect.range (f i) + let : Group.IsPerfect S := perfect_iSup (fun i => (f i).range) + have hm : S.map q = ⊤ := by + simp only [S, Subgroup.map_iSup, ← MonoidHom.range_comp] + exact hf + have hs : Function.Surjective (q.comp S.subtype) := by + apply MonoidHom.range_eq_top.mp + rw [MonoidHom.range_comp, Subgroup.range_subtype] + exact hm + have hr := perfect_lift_range S.subtype q hs hc + simpa only [Subgroup.range_subtype, Group.IsPerfect.commutator_eq_top] using hr + +variable [Group.IsPerfect G] + +theorem universal_generating_ranges {E : ι → Type*} [∀ i, Group (E i)] + [∀ i, Group.IsPerfect (E i)] (f : ∀ i, E i →* G) + (hf : (⨆ i, (f i).range) = ⊤) : + (⨆ i, (universalMap (f i)).range) = ⊤ := by + apply central_perfect_generating_ranges (universalProjection G) + (universalProjection_central G) (fun i => universalMap (f i)) + have he (i : ι) : ((universalProjection G).comp (universalMap (f i))).range = (f i).range := by + rw [universalMap_spec, MonoidHom.range_comp, + MonoidHom.range_eq_top.mpr (universalProjection_surjective (E i)), ← MonoidHom.range_eq_map] + simpa only [he] using hf + +end PerfectGeneratingFamilies + +section FiniteTranslationCentralizers + +variable {α β ι G : Type*} [Group G] + +noncomputable def translationWordMap (β : Type*) : + FreeGroup β →* Multiplicative (FreeAbelianGroup β) := + FreeGroup.lift (fun i => Multiplicative.ofAdd (FreeAbelianGroup.of i)) + +theorem translationWordMap_surjective : Function.Surjective (translationWordMap β) := by + intro x + change ∃ y, translationWordMap β y = + Multiplicative.ofAdd (Multiplicative.toAdd x) + induction Multiplicative.toAdd x using FreeAbelianGroup.induction_on with + | zero => exact ⟨1,map_one _⟩ + | of i => exact ⟨FreeGroup.of i,FreeGroup.lift_apply_of⟩ + | neg i hi => + obtain ⟨w,hw⟩ := hi + exact ⟨w⁻¹,by change translationWordMap β (w⁻¹) = _⁻¹; rw [map_inv,hw]; rfl⟩ + | add x y hx hy => + obtain ⟨w,hw⟩ := hx + obtain ⟨v,hv⟩ := hy + exact ⟨w*v,by change translationWordMap β (w*v) = _*_; rw [map_mul,hw,hv]; rfl⟩ + +theorem translation_lattice_fg [Finite β] : + Group.FG (Multiplicative (FreeAbelianGroup β)) := + Group.fg_of_surjective (translationWordMap_surjective (β := β)) + +theorem translation_centralizers_eventually [Finite β] [Finite ι] + (f : α → G) (w : β → FreeGroup α) (v : ι → FreeGroup α) + (ht : ∀ i j, Commute (FreeGroup.lift f (w i)) (FreeGroup.lift f (w j))) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → + ∀ t : Multiplicative (FreeAbelianGroup β) →* BoundedRelationCover M f, + (∀ i, t (Multiplicative.ofAdd (FreeAbelianGroup.of i)) = + PresentedGroup.mk (shortRelations M f) (w i)) → + ∀ i k, Commute (commutingFamilyHom (fun j => FreeGroup.lift f (w j)) ht k) + (FreeGroup.lift f (v i)) → + Commute (t k) (PresentedGroup.mk (shortRelations M f) (v i)) := by + classical + let T := Multiplicative (FreeAbelianGroup β) + let : Group.FG T := translation_lattice_fg + let q : T →* G := commutingFamilyHom (fun j => FreeGroup.lift f (w j)) ht + let K (i : ι) : Subgroup T := (Subgroup.centralizer {FreeGroup.lift f (v i)}).comap q + have hK (i : ι) : (K i).FG := subgroup_fg_of_comm (K i) + choose S hS using hK + let J := (i : ι) × ↥(S i) + let z : J → T := fun j => j.2.val + choose V hV using fun j : J => translationWordMap_surjective (z j) + let W : FreeGroup β →* FreeGroup α := FreeGroup.lift w + have he : (FreeGroup.lift f).comp W = q.comp (translationWordMap β) := by + ext i + simp only [MonoidHom.comp_apply,W,q,translationWordMap,FreeGroup.lift_apply_of] + exact (commutingFamilyHom_of (fun j => FreeGroup.lift f (w j)) ht i).symm + have hc (j : J) : Commute (FreeGroup.lift f (W (V j))) (FreeGroup.lift f (v j.1)) := by + have hz : z j ∈ K j.1 := by + rw [← hS j.1] + exact Subgroup.subset_closure j.2.property + change q (z j) ∈ Subgroup.centralizer {_} at hz + have hv : FreeGroup.lift f (W (V j)) = q (z j) := by + simpa only [MonoidHom.comp_apply,hV j] using DFunLike.congr_fun he (V j) + rw [hv] + exact Subgroup.mem_centralizer_singleton_iff.mp hz + obtain ⟨L,hL⟩ := finite_word_equalities_eventually f + (fun j : J => W (V j) * v j.1) (fun j => v j.1 * W (V j)) + (fun j => by simpa only [map_mul] using (hc j).eq) + refine ⟨L,fun M hM t ht' i k hk => ?_⟩ + have he' : t.comp (translationWordMap β) = + (PresentedGroup.mk (shortRelations M f)).comp W := by + ext j + simpa [translationWordMap,W] using ht' j + have hk' : k ∈ K i := Subgroup.mem_centralizer_singleton_iff.mpr hk.eq + have hle : K i ≤ (Subgroup.centralizer + {PresentedGroup.mk (shortRelations M f) (v i)}).comap t := by + rw [← hS i] + apply (Subgroup.closure_le _).mpr + intro x hx + let j : J := ⟨i,⟨x,hx⟩⟩ + have hv : t x = PresentedGroup.mk (shortRelations M f) (W (V j)) := by + simpa only [MonoidHom.comp_apply,hV j] using DFunLike.congr_fun he' (V j) + change t x ∈ Subgroup.centralizer {_} + apply Subgroup.mem_centralizer_singleton_iff.mpr + rw [hv] + simpa only [map_mul] using hL M hM j + exact Subgroup.mem_centralizer_singleton_iff.mp (hle hk') + +end FiniteTranslationCentralizers + +section SourceCentralizingTranslations + +variable (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + +noncomputable def sourceLatticeMap : + Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + polygonAlternatingGroup a (m+1) := + commutingFamilyHom (fun i => alternatingGenerator a r m hm (Sum.inr i)) + (source_translation_commute a r m hm) + +theorem source_centralizing_translation_lifts_eventually : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → + ∃ t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm), + (∀ i, t (Multiplicative.ofAdd (FreeAbelianGroup.of i)) = + PresentedGroup.of (Sum.inr i)) ∧ + (coverMap M (alternatingGenerator a r m hm)).comp t = + sourceLatticeMap a r m hm ∧ + ∀ s k, Commute (sourceLatticeMap a r m hm k) + (alternatingGenerator a r m hm s) → + Commute (t k) (PresentedGroup.of s) := by + let f := alternatingGenerator a r m hm + let w : Fin m × Fin 2 → FreeGroup (SourceGeneratorLabel m) := + fun i => FreeGroup.of (sourceTranslationLabel m i) + have hc : ∀ i j, Commute (FreeGroup.lift f (w i)) (FreeGroup.lift f (w j)) := by + intro i j + exact source_translation_commute a r m hm i j + obtain ⟨L₁,hL₁⟩ := commuting_words_lift_eventually f w hc + obtain ⟨L₂,hL₂⟩ := translation_centralizers_eventually f w + (fun s : SourceGeneratorLabel m => FreeGroup.of s) hc + refine ⟨max L₁ L₂,fun M hM => ?_⟩ + obtain ⟨t,ht,htq⟩ := hL₁ M (le_trans (le_max_left _ _) hM) + refine ⟨t,ht,htq,?_⟩ + intro s k hk + exact hL₂ M (le_trans (le_max_right _ _) hM) t ht s k hk + +end SourceCentralizingTranslations + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PhaseClippedModels.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PhaseClippedModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..651322355cec8c56a21aeb3cdbf4b457a745a475 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PhaseClippedModels.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ExteriorClippedModels +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FarClippedModels +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ClippedGerms +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ExteriorPhaseGeometry + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem phase_clipped_model_action_neighborhood {ι : Type*} [Finite ι] + (hlarge : 20 ≤ m+1) (hr : 0 halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))).val) + (hmesh : (1+|ordinary (cutTau^a)|)*(200/(A.geometry.mesh:ℝ)) (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) e).val) (coordinateRectangle a L V).val) → + (coordinateRectangle a L V ≤ + A.geometry.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ) → + ∀ (cell : Fin 2 → Fin A.geometry.mesh), + (coordinateRectangle a L V ≤ spatialTranslate G.offset + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell)) → + ∀ p : GenericSquare a, p ∈ (coordinateRectangle a L V).val → dist p.val z<δ → + (∀ k, ordinary (L k)≤realCoordinate p.val k ∧ realCoordinate p.val k spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + by_cases hσ : ∀ k, σ (k,false)=false ∧ σ (k,true)=true + · obtain ⟨δ,hδ,hact⟩ := A.interior_clipped_model_action_neighborhood hlarge hr d u z G T hz₁ hz₂ + lo hi slope hlo hhi hs hR hmesh σ hσ + refine ⟨δ,hδ,?_⟩ + intro L V hLV hclip hnear n q hW hinc cell hinitial p hp hpδ hpoint f hf hc I s x hx + exact hact L V hLV (hclip hσ) hnear n q hW hinc cell hinitial p hp hpδ hpoint f hf hc I s x hx + · obtain ⟨O,hO,hz,hlocal⟩ := T.decisions_locally_eq hr + obtain ⟨δ,hδ,hball⟩ := Metric.isOpen_iff.mp hO z hz + refine ⟨min δ G.radius,lt_min hδ G.radius_pos,?_⟩ + intro L V hLV hclip hnear n q hW hinc cell hinitial p hp hpδ hpoint f hf hc I s x hx + have hperiod (P : polygonAlgebra a) : spatialTranslate G.offset P=spatialTranslate u P := by + change spatialTranslate (u+((G.period 0:CutRing),(G.period 1:CutRing))) P=_ + rw [spatialTranslate_add,spatialTranslate_integral] + have hinitial' : coordinateRectangle a L V≤ spatialTranslate u + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell) := by + simpa only [hperiod] using hinitial + have hb (k : Fin 2) : symmetricWindowStart r k≤endpointLabel (-r) ∧ + endpointLabel (-r) halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))).val) + (hmesh : (1+|ordinary (cutTau^a)|)*(200/(A.geometry.mesh:ℝ)) (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) e).val) (coordinateRectangle a L V).val) → + (coordinateRectangle a L V ≤ + A.geometry.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ) → + ∀ (cell : Fin 2 → Fin A.geometry.mesh), + (coordinateRectangle a L V ≤ spatialTranslate G.offset + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) cell)) → + ∀ p : GenericSquare a, p ∈ (coordinateRectangle a L V).val → dist p.val z<δ → + (∀ k, ordinary (L k)≤realCoordinate p.val k ∧ realCoordinate p.val k spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + classical + have hall σ := A.phase_clipped_model_action_neighborhood hlarge hr d u z G hbox T hz₁ hz₂ + lo hi slope hlo hhi hs hR hmesh σ + choose δ hδ hact using hall + obtain ⟨σ₀,_,hmin⟩ := Finset.univ.exists_min_image δ + (show (Finset.univ : Finset (Fin 2 × Bool → Bool)).Nonempty from Finset.univ_nonempty) + refine ⟨δ σ₀,hδ σ₀,?_⟩ + intro σ L V hLV hclip hnear n q hW hinc cell hinitial p hp hpδ hpoint f hf hc I s x hx + have hb : δ σ₀≤δ σ := hmin σ (Finset.mem_univ σ) + exact hact σ L V hLV hclip (fun k => ⟨(hnear k).1.trans_le hb,(hnear k).2.trans_le hb⟩) + n q hW hinc cell hinitial p hp (hpδ.trans_le hb) hpoint f hf hc I s x hx + +end InitialCoverSystem.PatchAtlas + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PolygonAtomLaw.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PolygonAtomLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4c6563c447d904812f9b3d70f4df0e5eff73b19 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PolygonAtomLaw.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.StarAtomLaw + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonAtomLaw +variable {a m : ℕ} {Ω : Type*} + +@[simp] theorem PolygonLabelling.tableHom_single_mask [Fintype Ω] (v : PolygonLabelling a Ω) + (ω : Ω) : v.tableHom.comp (sectorMask {ω}) = conditionalAlternatingHom (m := m) (v.fiber ω) := by + classical + ext s : 1 + change v.tableHom (sectorMask {ω} s) = conditionalAlternatingHom (v.fiber ω) s + have he : sectorMask {ω} s = Pi.mulSingle ω s := by + ext ν + by_cases hh : ν=ω <;> simp [sectorMask,hh] + rw [he,v.tableHom_single] + +noncomputable def polygonPartitionLabelling (U : Ω → polygonAlgebra a) + (hcover : ∀ p : GenericSquare a, ∃ i, p ∈ (U i).val) + (hdisjoint : Pairwise fun i j => Disjoint (U i).val (U j).val) : PolygonLabelling a Ω where + label p := (hcover p).choose + fiber_mem i := by + have he : {p | (hcover p).choose = i} = (U i).val := by + ext p + constructor + · intro hp + change (hcover p).choose = i at hp + simpa only [hp] using (hcover p).choose_spec + · intro hp + by_contra hh + exact Set.disjoint_left.mp (hdisjoint hh) (hcover p).choose_spec hp + rw [he] + exact (U i).property + +theorem polygonPartitionLabelling_fiber (U : Ω → polygonAlgebra a) + (hcover : ∀ p : GenericSquare a, ∃ i, p ∈ (U i).val) + (hdisjoint : Pairwise fun i j => Disjoint (U i).val (U j).val) (i : Ω) : + (polygonPartitionLabelling U hcover hdisjoint).fiber i = U i := by + apply Subtype.ext + ext p + change (hcover p).choose = i ↔ p ∈ (U i).val + constructor + · intro hp; simpa only [hp] using (hcover p).choose_spec + · intro hp + by_contra hh + exact Set.disjoint_left.mp (hdisjoint hh) (hcover p).choose_spec hp + +theorem polygonPartitionLabelling_surjective (U : Ω → polygonAlgebra a) + (hcover : ∀ p : GenericSquare a, ∃ i, p ∈ (U i).val) + (hdisjoint : Pairwise fun i j => Disjoint (U i).val (U j).val) + (hne : ∀ i, (U i).val.Nonempty) : + Function.Surjective (polygonPartitionLabelling U hcover hdisjoint).label := by + intro i + obtain ⟨p,hp⟩ := hne i + refine ⟨p,?_⟩ + change p ∈ ((polygonPartitionLabelling U hcover hdisjoint).fiber i).val + rwa [polygonPartitionLabelling_fiber] + +theorem centralOn_polygon_atoms {H : Type*} [Group H] [Fintype Ω] + (q : H →* polygonAlternatingGroup a m) (U : Ω → polygonAlgebra a) + (hcover : ∀ p : GenericSquare a, ∃ i, p ∈ (U i).val) + (hdisjoint : Pairwise fun i j => Disjoint (U i).val (U j).val) + (hne : ∀ i, (U i).val.Nonempty) + (f : Ω → UniversalExtension (alternatingGroup (Fin m)) →* H) + (hcomm : Pairwise fun i j => ∀ s t, Commute (f i s) (f j t)) + (hproj : ∀ i, q.comp (f i) = (conditionalAlternatingHom (U i)).comp + (universalProjection (alternatingGroup (Fin m)))) : + CentralOn q (⨆ i, (f i).range) := by + let v := polygonPartitionLabelling U hcover hdisjoint + apply centralOn_of_star_atoms q v.tableHom + (v.tableHom_injective (polygonPartitionLabelling_surjective U hcover hdisjoint hne)) f hcomm + intro i + rw [PolygonLabelling.tableHom_single_mask] + change q.comp (f i) = (conditionalAlternatingHom + ((polygonPartitionLabelling U hcover hdisjoint).fiber i)).comp _ + rw [polygonPartitionLabelling_fiber] + exact hproj i + +end PolygonAtomLaw + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PolygonCommutingRepresentatives.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PolygonCommutingRepresentatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..10173fcf48cd7bcdf3c8f2672ce6c7a3b43adc1a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PolygonCommutingRepresentatives.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonSmallPartition + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonCommutingRepresentatives + +open Classical Set +namespace PolygonObject.BankEmbedding +variable {a m : ℕ} + +theorem commuting_representatives (hm : 0 < m) (f g : polygonFullGroup a m) : + ∃u v : polygonFullGroup a m, + (∃a₀ : polygonAlternatingGroup a m,u=a₀.val*f) ∧ + (∃b₀ c : polygonAlternatingGroup a m,v=c.val*(b₀.val*g)*c.val⁻¹) ∧ Commute u v := by + let δ : ℝ := (m:ℝ)/100 + have hδ : 0<δ := by dsimp [δ]; positivity + obtain ⟨a₀,S,hS,hf⟩ := small_support_coset f hδ + obtain ⟨b₀,T,hT,hg⟩ := small_support_coset g hδ + have htotal : (∑i,PolygonArea.area (S i))+(∑i,PolygonArea.area (S i)ᶜ)=(m:ENNReal) := by + rw [←Finset.sum_add_distrib] + simp only [PolygonArea.area_compl,Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul,mul_one] + have htwo : ENNReal.ofReal δ+ENNReal.ofReal δ<(m:ENNReal) := by + rw [←ENNReal.ofReal_add hδ.le hδ.le,←ENNReal.ofReal_natCast] + apply ENNReal.ofReal_lt_ofReal_iff (by positivity) |>.mpr + dsimp [δ] + have : (0:ℝ) < m := Nat.cast_pos.mpr hm + linarith + have hTS : (∑i,PolygonArea.area (T i))<∑i,PolygonArea.area (S i)ᶜ := by + by_contra hn + have hle := add_le_add hS.le ((le_of_not_gt hn).trans hT.le) + rw [htotal] at hle + exact (not_le_of_gt htwo) hle + obtain ⟨e,he⟩ := exists_into hTS + have hten : 10*(∑i,PolygonArea.area (T i))<∑_i : Fin m,PolygonArea.area (⊥ : polygonAlgebra a)ᶜ := by + calc + _≤10*ENNReal.ofReal δ := mul_le_mul le_rfl hT.le (by positivity) (by positivity) + _<(m:ENNReal) := by + rw [←ENNReal.ofReal_ofNat 10,←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10),←ENNReal.ofReal_natCast] + apply ENNReal.ofReal_lt_ofReal_iff (by positivity) |>.mpr + dsimp [δ] + have : (0:ℝ) < m := Nat.cast_pos.mpr hm + linarith + _=_ := by simp [PolygonArea.area_top] + obtain ⟨c,hc,_⟩ := alternating_extension T (fun _ => ⊥) e + (fun _ => id) (fun _ => id) hten + let u : polygonFullGroup a m := a₀.val*f + let v : polygonFullGroup a m := c.val*(b₀.val*g)*c.val⁻¹ + have hvfix : ∀y : TrackPoint a m,y.2∈(S y.1).val → v.val y=y := by + intro y hy + have hpre : (c.val.val.symm y).2∉(T (c.val.val.symm y).1).val := by + intro hp + let p : (PolygonObject.mk m T).Point := ⟨c.val.val.symm y,hp⟩ + have hcp : e p=y := by rw [←hc p]; exact c.val.val.apply_symm_apply y + have hi := he p + rw [hcp] at hi + exact hi hy + change c.val.val ((b₀.val*g).val (c.val.val.symm y))=y + rw [hg _ hpre] + exact c.val.val.apply_symm_apply y + refine ⟨u,v,⟨a₀,rfl⟩,⟨b₀,c,rfl⟩,?_⟩ + have hh : Commute v.val u.val := supported_fixer_commute hvfix hf + exact Subtype.ext hh.symm.eq + +end PolygonObject.BankEmbedding + +local instance polygonFullNormal (a m : ℕ) : (polygonAlternatingGroup a m).Normal := + polygonAlternatingGroup_normal a m + +theorem polygonFullGroup_quotient_commutative (a m : ℕ) (hm : 0 < m) : + IsMulCommutative (polygonFullGroup a m ⧸ polygonAlternatingGroup a m) := by + let q := QuotientGroup.mk' (polygonAlternatingGroup a m) + refine ⟨⟨?_⟩⟩ + intro x y + obtain ⟨f,rfl⟩ := QuotientGroup.mk'_surjective (polygonAlternatingGroup a m) x + obtain ⟨g,rfl⟩ := QuotientGroup.mk'_surjective (polygonAlternatingGroup a m) y + obtain ⟨u,v,⟨a₀,rfl⟩,⟨b₀,c,rfl⟩,hc⟩ := PolygonObject.BankEmbedding.commuting_representatives hm f g + have ha : q a₀.val=1 := (QuotientGroup.eq_one_iff a₀.val).mpr a₀.property + have hb : q b₀.val=1 := (QuotientGroup.eq_one_iff b₀.val).mpr b₀.property + have hcc : q c.val=1 := (QuotientGroup.eq_one_iff c.val).mpr c.property + have hh := hc.map q + simpa only [map_mul,map_inv,ha,hb,hcc,one_mul,mul_one,inv_one] using hh.eq + +theorem polygonFullGroup_commutator_eq (a m : ℕ) (hm : 5 ≤ m) : + _root_.commutator (polygonFullGroup a m)=polygonAlternatingGroup a m := by + apply le_antisymm + · exact Subgroup.Normal.quotient_commutative_iff_commutator_le.mp + (polygonFullGroup_quotient_commutative a m (by omega)) + · have hp := Subgroup.isPerfect_iff.mp (polygonAlternatingGroup_perfect a m hm) + rw [←hp] + exact Subgroup.commutator_mono le_top le_top + +end PolygonCommutingRepresentatives + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveCentralLaws.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveCentralLaws.lean new file mode 100644 index 0000000000000000000000000000000000000000..c6941990369c225608035e70d099234752effdac --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveCentralLaws.lean @@ -0,0 +1,179 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FinitePrimitiveResolution +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FinePatchAtlas +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveGlobalTemplates + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section PrimitiveCentralLaws +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem primitive_full_central {ι : Type} [Finite ι] + (ha : 0 ?_⟩ + obtain ⟨A⟩ := hL M hM B + intro ι hι P I b hb + exact A.toPatchAtlas.primitive_family_law_all ha hlarge hr P A.far_mesh I b hb + +end PrimitiveCentralLaws + +theorem polygon_family_primitive_resolution {a : ℕ} {ι : Type} [Finite ι] + (r : CutRing) (hr : 0 (spatialTranslate p.val.2 (initialTest a r p.val.1)).val) (V i).val := by + classical + let _ := Fintype.ofFinite ι + choose S hS using fun i => polygon_finite_primitive_resolution r hr (V i) + refine ⟨Finset.univ.biUnion S,fun i x y he => hS i x y ?_⟩ + intro p + exact he ⟨p.val,Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ i,p.property⟩⟩ + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +def AllPrimitiveLaws : Prop := + ∀ (ι : Type) [Finite ι] (P : ι → Fin 5 × (CutRing × CutRing)) + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I), B.PrimitiveFamilyLaw I b hb P + +variable (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) + +theorem fullGeometricSector_independent {ι κ : Type} [Finite ι] [Finite κ] + (P : ι → Fin 5 × (CutRing × CutRing)) (Q : κ → Fin 5 × (CutRing × CutRing)) + (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val) + (hV' : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) Q i).val) V.val) : + B.fullGeometricSector hlarge P (fun I _ b hb => h ι P I b hb) V = + B.fullGeometricSector hlarge Q (fun I _ b hb => h κ Q I b hb) V := by + let R : ι ⊕ κ → Fin 5 × (CutRing × CutRing) := Sum.elim P Q + rw [B.fullGeometricSector_subfamily hlarge R P Sum.inl rfl + (fun I _ b hb => h _ R I b hb) _ V hV, + B.fullGeometricSector_subfamily hlarge R Q Sum.inr rfl + (fun I _ b hb => h _ R I b hb) _ V hV'] + +noncomputable def polygonStar (hr : 0 p.val) (fun I _ b hb => h S (fun p => p.val) I b hb) V + +theorem polygonStar_eq (hr : 0 (primitiveTests (a := a) (r := r) P i).val) V.val) : + B.polygonStar hlarge h hr V = B.fullGeometricSector hlarge P (fun I _ b hb => h ι P I b hb) V := by + apply B.fullGeometricSector_independent hlarge h _ P V _ hV + exact (polygon_finite_primitive_resolution r hr V).choose_spec + +theorem polygonStar_projection (hr : 0 if b then W else V + obtain ⟨S,hS⟩ := polygon_family_primitive_resolution r hr R + have hV := hS false + have hW := hS true + change ResolvedBy _ V.val at hV + change ResolvedBy _ W.val at hW + rw [B.polygonStar_eq hlarge h hr (fun p : S => p.val) V hV, + B.polygonStar_eq hlarge h hr (fun p : S => p.val) W hW] + exact B.fullGeometricSector_commute hlarge _ _ V W hV hd s t + +theorem polygonStar_union (hr : 0 if b then W else V + obtain ⟨S,hS⟩ := polygon_family_primitive_resolution r hr R + have hV := hS false + have hW := hS true + change ResolvedBy _ V.val at hV + change ResolvedBy _ W.val at hW + have hU : ResolvedBy (fun p : S => (spatialTranslate p.val.2 (initialTest a r p.val.1)).val) + (V ⊔ W).val := fun x y he => or_congr (hV x y he) (hW x y he) + rw [B.polygonStar_eq hlarge h hr (fun p : S => p.val) (V ⊔ W) hU, + B.polygonStar_eq hlarge h hr (fun p : S => p.val) V hV, + B.polygonStar_eq hlarge h hr (fun p : S => p.val) W hW] + exact B.fullGeometricSector_union hlarge _ _ V W hV hd s + +theorem polygonStars_finite_central (hr : 0 p.val) + (fun I _ b hb => h S (fun p => p.val) I b hb)).mono + apply iSup_le + intro i + rw [B.polygonStar_eq hlarge h hr (fun p : S => p.val) (V i) (hS i)] + rintro x ⟨s,rfl⟩ + exact B.fullGeometricSector_mem hlarge _ _ (V i) s + +end InitialCoverSystem + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveChartActions.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveChartActions.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2627adf150fa2c9979884d139ac4fb7e29c0e61 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveChartActions.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.RectangularAtlas +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GridFormalPatching + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PrimitiveChartActions +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem primitive_coordinate_action (hlarge : 20 ≤ m+1) + (g : ∀ n, B.CoordinateWindowLaw n) + (P : ι → Fin 5 × (CutRing × CutRing)) (Q : κ → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card≤15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (h' : ∀ I, I.card≤15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb Q) + (i : ι) (i' : κ) (j j' : Fin 2) (u u' : CutRing × CutRing) + (hp : P i=(coordinateTestIndex j,u)) (hp' : Q i'=(coordinateTestIndex j',u')) + (V V' W : polygonAlgebra a) + (hV : ResolvedBy (fun _ : Unit => (spatialTranslate u (coordinatePrimitive a j)).val) V.val) + (hV' : ResolvedBy (fun _ : Unit => (spatialTranslate u' (coordinatePrimitive a j')).val) V'.val) + (n : ℕ) (q : Fin 2 → ℤ) + (hW : ResolvedBy (fun s => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) s).val) W.val) + (heq : V ⊓ W=V' ⊓ W) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (g n) q W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) : + ∀ x ∈ f.range, + B.fullGeometricSector (by omega) P h V (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) P h V (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) Q h' V' (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) Q h' V' (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + let S : Unit → Fin 5 × (CutRing × CutRing) := fun _ => (coordinateTestIndex j,u) + let T : Unit → Fin 5 × (CutRing × CutRing) := fun _ => (coordinateTestIndex j',u') + have hs := fun I (_ : I.card≤15) b hb => B.coordinateFamilyLaw_all g (fun _ : Unit => j) (fun _ => u) I b hb + have ht := fun I (_ : I.card≤15) b hb => B.coordinateFamilyLaw_all g (fun _ : Unit => j') (fun _ => u') I b hb + have h₀ := B.fullGeometricSector_shared_primitive (by omega) P S i () hp h hs V + (by simpa only [primitiveTests,primitiveFamilyTests,hp,initialTest_coordinate] using hV) + have h₁ := B.fullGeometricSector_shared_primitive (by omega) Q T i' () hp' h' ht V' + (by simpa only [primitiveTests,primitiveFamilyTests,hp',initialTest_coordinate] using hV') + rw [h₀,h₁] + exact B.coordinate_charts_action hlarge g (fun _ : Unit => j) (fun _ => u) + (fun _ : Unit => j') (fun _ => u') V V' W + (by simpa only [primitiveTests,primitiveFamilyTests,initialTest_coordinate] using hV) + (by simpa only [primitiveTests,primitiveFamilyTests,initialTest_coordinate] using hV') + n q hW heq f hf hc I s + +namespace RectangularAtlas +variable {B} (A : B.RectangularAtlas) + +theorem slope_chart_eq (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card≤15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (i : ι) (d : Fin 2) (z : CutRing × CutRing) (hp : P i=(slopeTestIndex d,z)) : + A.slope hlarge d z=B.fullGeometricSector hlarge P h + (spatialTranslate z (clippedSlopePrimitive a r (slopeDirection d))) := by + unfold slope tangentSign + simp only [↓reduceIte] + apply B.fullGeometricSector_shared_primitive hlarge _ P (Sum.inl (0:Fin 2)) i + · simpa only [translatedTemplate,tangentChartTemplate,ite_true,add_zero] using hp.symm + · intro x y he + have hh := he () + simpa only [primitiveTests,primitiveFamilyTests,translatedTemplate,tangentChartTemplate, + ite_true,add_zero,initialTest_slope] using hh + +end RectangularAtlas +end InitialCoverSystem +end PrimitiveChartActions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveCopies.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveCopies.lean new file mode 100644 index 0000000000000000000000000000000000000000..434c7b58bf0c0cf97ac3156eec81ffb2d3cdeb8e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveCopies.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.ReserveAtom +import OAI.GroupTheory.SimpleAmenable.CentralCovers.InitialCoverSystem + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PrimitiveCopies + +namespace InitialCoverSystem + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +noncomputable def initialConditional (j : Fin 5) : + alternatingGroup (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm) := + B.initialTable.comp (polygonTableInput (initialTest a r) j) + +@[simp] theorem initialConditional_input (j : Fin 5) + (s : alternatingGroup (Fin (m+1))) (hs : s.val.support.card ≤ 5) : + B.initialConditional j s = PresentedGroup.of (sourceConditionalLabel m (j,⟨s.val,s.property,hs⟩)) := + B.initialTable_input (j,⟨s.val,s.property,hs⟩) + +theorem initialConditional_projection (j : Fin 5) : + (coverMap M (alternatingGenerator a r m hm)).comp (B.initialConditional j) = + conditionalAlternatingHom (initialTest a r j) := by + rw [initialConditional,← MonoidHom.comp_assoc,B.initialTable_projection] + apply MonoidHom.ext + intro s + exact actualPolygonTableHom_input (initialTest a r) j s + +theorem initialConditional_zero : B.initialConditional 0 = B.c := + B.initialTable_constant + +noncomputable def initialAlphabet (I : Finset (Fin (m+1))) (j : Fin 5) : + alternatingGroup I →* BoundedRelationCover M (alternatingGenerator a r m hm) := + (B.initialConditional j).comp (subtypeAlternatingHom I) + +theorem initialAlphabet_aligned (I : Finset (Fin (m+1))) (j : Fin 5) + (s : alternatingGroup I) : + B.initialAlphabet I j s ∈ sourceAlignedGroup a r m hm M B.t I := by + have hle : Subgroup.closure {g : alternatingGroup I | Equiv.Perm.IsThreeCycle g.val} ≤ + (sourceAlignedGroup a r m hm M B.t I).comap (B.initialAlphabet I j) := by + apply (Subgroup.closure_le _).mpr + intro g hg + change B.initialConditional j (subtypeAlternatingHom I g) ∈ + sourceAlignedGroup a r m hm M B.t I + have hc : (subtypeAlternatingHom I g).val.support.card ≤ 5 := by + change (Equiv.Perm.ofSubtype g.val).support.card ≤ 5 + have hI : (Subtype.fintype (fun x : Fin (m+1) => x ∈ I)) = + (inferInstance : Fintype I) := Subsingleton.elim _ _ + rw [Equiv.Perm.support_ofSubtype, Finset.card_map, hI, hg.card_support] + decide + rw [B.initialConditional_input j _ hc] + exact alignedGroup_input _ _ _ + ((j,⟨(subtypeAlternatingHom I g).val,(subtypeAlternatingHom I g).property,hc⟩) : + SmallConditional m) + (Equiv.Perm.mem_range_ofSubtype_iff.mp ⟨g.val,rfl⟩) + rw [alternatingGroup.closure_isThreeCycles_eq_top] at hle + exact hle (Subgroup.mem_top s) + +noncomputable def translatedAlphabet (I : Finset (Fin (m+1))) (j : Fin 5) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) : + alternatingGroup I →* BoundedRelationCover M (alternatingGenerator a r m hm) := + (MulAut.conj (B.t k)).toMonoidHom.comp (B.initialAlphabet I j) + +theorem translatedAlphabet_aligned (I : Finset (Fin (m+1))) (j : Fin 5) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) (s : alternatingGroup I) : + B.translatedAlphabet I j k s ∈ sourceAlignedGroup a r m hm M B.t I := + alignedGroup_conjugate _ _ _ k (B.initialAlphabet_aligned I j s) + +theorem initialAlphabet_orbit_independent (I : Finset (Fin (m+1))) (j : Fin 5) + (k l : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (hkl : ∀ s : alternatingGroup I, + sourceLatticeMap a r m hm k * conditionalAlternatingHom (initialTest a r j) + (subtypeAlternatingHom I s) * (sourceLatticeMap a r m hm k)⁻¹ = + sourceLatticeMap a r m hm l * conditionalAlternatingHom (initialTest a r j) + (subtypeAlternatingHom I s) * (sourceLatticeMap a r m hm l)⁻¹) : + B.translatedAlphabet I j k = B.translatedAlphabet I j l := by + apply MonoidHom.eq_of_eqOn_dense alternatingGroup.closure_isThreeCycles_eq_top + intro s hs + have hc : (subtypeAlternatingHom I s).val.support.card ≤ 5 := by + change (Equiv.Perm.ofSubtype s.val).support.card ≤ 5 + have hI : (Subtype.fintype (fun x : Fin (m+1) => x ∈ I)) = + (inferInstance : Fintype I) := Subsingleton.elim _ _ + rw [Equiv.Perm.support_ofSubtype, Finset.card_map, hI, hs.card_support] + decide + change B.t k * B.initialConditional j (subtypeAlternatingHom I s) * (B.t k)⁻¹ = + B.t l * B.initialConditional j (subtypeAlternatingHom I s) * (B.t l)⁻¹ + rw [B.initialConditional_input j _ hc] + exact lifted_translation_orbit_independent (sourceLatticeMap a r m hm) B.t + (alternatingGenerator a r m hm (sourceConditionalLabel m + (j,⟨(subtypeAlternatingHom I s).val,(subtypeAlternatingHom I s).property,hc⟩))) + _ (B.t_stabilizers _) k l (hkl s) + +end InitialCoverSystem +end PrimitiveCopies + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveFormalSectors.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveFormalSectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..af08dca61212708f2b25172dfa369e835b3ecf09 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveFormalSectors.lean @@ -0,0 +1,197 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.StarProjection +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentGeometry +import OAI.GroupTheory.SimpleAmenable.Configurations.FormalSectorProjection +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PrimitiveFormalSectors +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + {ι κ : Type*} [Finite ι] [Finite κ] + +omit [Finite ι] in +theorem starFamily_projection (hlarge : 15 < m+1) (P : ι → Fin 5 × (CutRing × CutRing)) + (i : Option ι) : + (coverMap M (alternatingGenerator a r m hm)).comp (A.starFamily hlarge P i)= + (conditionalAlternatingHom (match i with + | none => wholePolygon a + | some i => primitiveTests (a := a) (r := r) P i)).comp (universalProjection _) := by + cases i with + | none => exact congrArg (fun f => f.comp (universalProjection _)) B.c_projection + | some i => + apply B.fullGeometricSector_projection + have he : spatialTranslate (P i).2 (initialTest a r (P i).1)= + primitiveTests (a := a) (r := r) + (translatedTemplate (initialPatchPrimitives r A.geometry.mesh) (P i).2) (Sum.inl (P i).1) := by + simp [primitiveTests,primitiveFamilyTests,translatedTemplate,initialPatchPrimitives] + rw [he] + exact resolved_test _ _ + +theorem formalSector_projection (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (T : FormalStarTable (A.starFamily hlarge P)) + (V : Set (ι → Bool)) (s : TrackStar (Fin (m+1))) : + coverMap M (alternatingGenerator a r m hm) (T.sector V s)= + formalPolygonTable (primitiveTests (a := a) (r := r) P) + (sectorMask V (universalProjection _ s)) := by + apply T.sector_projection (by simp only [Nat.card_fin]; omega) + (coverMap M (alternatingGenerator a r m hm)) (actualPolygonTableHom _) + (actualPolygonTableHom_injective _) + (assignmentPullback (fun σ : Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)) => σ.val)) + (assignmentPullback_surjective _ Subtype.val_injective) + intro i + rw [A.starFamily_projection] + ext t : 1 + cases i with + | none => exact (formalPolygonTable_whole _ _).symm + | some i => exact (formalPolygonTable_test (primitiveTests (a := a) (r := r) P) i (universalProjection _ t)).symm + +theorem formalSector_subfamily_eq (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (T : FormalStarTable (A.starFamily hlarge P)) (v : κ → ι) + (h : ∀ I, I.card≤15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P ∘ v)) + (U : Set (κ → Bool)) (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (P ∘ v) i).val) V.val) + (hUV : ∀ x, polygonAssignment (primitiveTests (a := a) (r := r) (P ∘ v)) x ∈ U ↔ x ∈ V.val) : + T.sector ((fun σ : ι → Bool => σ ∘ v) ⁻¹' U)= + B.fullGeometricSector hlarge (P ∘ v) h V := by + apply (B.fullPrimitiveFamily_central hlarge (P ∘ v) h).lift_unique + (coverMap M (alternatingGenerator a r m hm)) + (smallFamilyEval (B.smallPrimitiveInputs hlarge (P ∘ v))).range + · have hh := T.sector_subfamily_range v U + have he : (fun i : Option κ => A.starFamily hlarge P (i.map v))= + A.starFamily hlarge (P ∘ v) := by + funext i; cases i <;> rfl + rw [he,star_small_range_eq (by simpa using (by omega : 5 ≤ m+1)) _ _ + (A.starFamily_small hlarge (P ∘ v))] at hh + exact hh + · rintro x ⟨s,rfl⟩ + exact (B.fullPrimitiveTable hlarge (P ∘ v) h).sector_mem _ s + · rw [B.fullGeometricSector_projection hlarge (P ∘ v) h V hV] + apply MonoidHom.ext + intro s + rw [MonoidHom.comp_apply,A.formalSector_projection] + apply Subtype.ext + apply Subtype.ext + apply Equiv.ext + intro p + change (actualPolygonTableHom _ _).val.val p = _ + rw [actualPolygonTableHom_apply] + change ((sectorMask ((fun σ : ι → Bool => σ ∘ v) ⁻¹' U) (universalProjection _ s) + (polygonAssignment (primitiveTests (a := a) (r := r) P) p.2)).val p.1,p.2)= + conditionalPerm V (universalProjection _ s).val p + rw [conditionalPerm_apply] + have he : polygonAssignment (primitiveTests (a := a) (r := r) P) p.2 ∘ v= + polygonAssignment (primitiveTests (a := a) (r := r) (P ∘ v)) p.2 := rfl + have hp : polygonAssignment (primitiveTests (a := a) (r := r) P) p.2 ∈ + ((fun σ : ι → Bool => σ ∘ v) ⁻¹' U) ↔ p.2 ∈ V.val := by + change _ ∘ v ∈ U ↔ _ + rw [he] + exact hUV p.2 + by_cases hx : p.2 ∈ V.val + · rw [sectorMask_of_mem _ _ _ (hp.mpr hx),ite_eq_left hx] + · rw [sectorMask_of_not_mem _ _ _ (fun h => hx (hp.mp h)),ite_eq_right hx] + rfl + +end InitialCoverSystem.PatchAtlas +end PrimitiveFormalSectors + +section FormalRectangleSplits + +theorem resolvedPartitionSelector {a : ℕ} {ι D : Type*} [Nonempty D] + (R : ι → polygonAlgebra a) (W : D → polygonAlgebra a) + (hW : ∀ d, ResolvedBy (fun i => (R i).val) (W d).val) + (hcover : ∀ x, ∃ d, x ∈ (W d).val) + (hdisjoint : Pairwise fun d e => Disjoint (W d).val (W e).val) : + ∃ χ : (ι → Bool) → D, ∀ x d, χ (polygonAssignment R x)=d ↔ x ∈ (W d).val := by + classical + let C (σ : ι → Bool) (d : D) := ∃ x, polygonAssignment R x=σ ∧ x ∈ (W d).val + let χ (σ : ι → Bool) : D := if h : ∃ d, C σ d then h.choose else Classical.choice inferInstance + refine ⟨χ,?_⟩ + intro x d + have hc : ∃ d, C (polygonAssignment R x) d := by + obtain ⟨e,he⟩ := hcover x + exact ⟨e,x,rfl,he⟩ + have hm : x ∈ (W (χ (polygonAssignment R x))).val := by + have hh : C (polygonAssignment R x) (χ (polygonAssignment R x)) := by + dsimp only [χ] + rw [dite_eq_left hc] + exact hc.choose_spec + obtain ⟨y,hy,hm⟩ := hh + exact (hW _ y x ((polygonAssignment_eq_iff R y x).mp hy)).mp hm + constructor + · intro he + rwa [← he] + · intro hd + by_contra he + exact Set.disjoint_left.mp (hdisjoint he) hm hd + +namespace FormalStarTable +variable {α ι κ H : Type*} [Fintype α] [DecidableEq α] [Group H] + [Group.IsPerfect (alternatingGroup α)] {F : Option ι → TrackStar α →* H} + (T : FormalStarTable F) + +theorem sector_empty : T.sector ∅=1 := by + ext s + change (centralSector T.model ∅ s).val=1 + rw [centralSector_empty] + rfl + +theorem sector_range_le_biUnion (W : κ → Set (ι → Bool)) (S : Finset κ) + (hd : Pairwise fun i j => Disjoint (W i) (W j)) (K : Subgroup H) + (hK : ∀ i ∈ S, (T.sector (W i)).range ≤ K) : + (T.sector (⋃ i ∈ S, W i)).range ≤ K := by + classical + induction S using Finset.induction_on with + | empty => simp [T.sector_empty] + | @insert i S hi ih => + have hdis : Disjoint (W i) (⋃ j ∈ S, W j) := by + apply Set.disjoint_iUnion_right.mpr + intro j + apply Set.disjoint_iUnion_right.mpr + intro hj + exact hd (by intro he; subst j; exact hi hj) + have he : (⋃ j ∈ insert i S, W j)=W i ∪ ⋃ j ∈ S, W j := by + ext x + simp only [Set.mem_iUnion,Finset.mem_insert,Set.mem_union] + constructor + · rintro ⟨j,(rfl|hj),hx⟩ + · exact Or.inl hx + · exact Or.inr ⟨j,hj,hx⟩ + · rintro (hx|⟨j,hj,hx⟩) + · exact ⟨i,Or.inl rfl,hx⟩ + · exact ⟨j,Or.inr hj,hx⟩ + rw [he] + rintro x ⟨s,rfl⟩ + rw [T.sector_union hdis] + exact K.mul_mem (hK i (Finset.mem_insert_self i S) ⟨s,rfl⟩) + (ih (fun j hj => hK j (Finset.mem_insert_of_mem hj)) ⟨s,rfl⟩) + +theorem sector_range_le_partition [Fintype κ] (W : κ → Set (ι → Bool)) (V : Set (ι → Bool)) + (hd : Pairwise fun i j => Disjoint (W i) (W j)) + (hc : ∀ σ, σ ∈ V ↔ ∃ i, σ ∈ W i) : + (T.sector V).range ≤ ⨆ i, (T.sector (W i)).range := by + have he : V=⋃ i ∈ (Finset.univ : Finset κ), W i := by + ext σ + simpa only [Set.mem_iUnion,Finset.mem_univ,exists_true_left] using hc σ + rw [he] + exact T.sector_range_le_biUnion W Finset.univ hd _ (fun i _ => le_iSup (fun j => (T.sector (W j)).range) i) + +end FormalStarTable +end FormalRectangleSplits + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGeometricGeneration.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGeometricGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..d293fea4595bfcecaada468d910c442e76a4858a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGeometricGeneration.lean @@ -0,0 +1,253 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TrackTranslationChart +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.Supported + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PrimitiveGeometricGeneration + +theorem cutForm_sub (a : ℕ) (j : Fin 4) (p q : ℝ × ℝ) : + cutForm a j (p-q) = cutForm a j p - cutForm a j q := by + fin_cases j <;> simp [cutForm] <;> ring + +private theorem fract_small_lift {r x : ℝ} (hr : 0 < r ∧ r < 1/2) + (hx : -r < x ∧ x < r) : ∃ k : Fin 2, Int.fract x = x + k.val := by + by_cases hx0 : 0 ≤ x + · refine ⟨0,?_⟩ + simp only [Fin.val_zero,Nat.cast_zero,add_zero] + exact Int.fract_eq_self.mpr ⟨hx0,by linarith⟩ + · refine ⟨1,?_⟩ + have hf : ⌊x⌋ = (-1 : ℤ) := Int.floor_eq_iff.mpr (by constructor <;> norm_num <;> linarith) + simp [Int.fract,hf] + +private theorem fract_small_lift_unique {r x : ℝ} (hr : 0 < r ∧ r < 1/2) + (hx : -r < x ∧ x < r) (k : Fin 2) + (hk : -r ≤ Int.fract x - k.val ∧ Int.fract x - k.val < r) : + Int.fract x - k.val = x := by + obtain ⟨j,hj⟩ := fract_small_lift hr hx + fin_cases j <;> fin_cases k <;> + simp only [Nat.cast_zero,Nat.cast_one,add_zero,sub_zero] at hj hk ⊢ <;> + linarith + +theorem mem_circularBoxPiece {a : ℕ} (r : CutRing) (k : Fin 2 × Fin 2) + (p : GenericSquare a) : p ∈ (circularBoxPiece a r k).val ↔ + (-ordinary r ≤ p.val.1-k.1.val ∧ p.val.1-k.1.val < ordinary r) ∧ + (-ordinary r ≤ p.val.2-k.2.val ∧ p.val.2-k.2.val < ordinary r) := by + simp only [circularBoxPiece,Set.mem_inter_iff,Set.mem_compl_iff,halfPlane, + Set.mem_ofPred_eq,not_lt,cutForm,Matrix.cons_val_zero,Matrix.cons_val_one, + map_add,map_neg,map_natCast] + constructor <;> rintro ⟨⟨h1,h2⟩,⟨h3,h4⟩⟩ <;> constructor <;> constructor <;> linarith + +theorem mem_clippedSlope_lift {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (p : GenericSquare a) (t : ℝ × ℝ) + (ht : (-ordinary r < t.1 ∧ t.1 < ordinary r) ∧ + (-ordinary r < t.2 ∧ t.2 < ordinary r)) + (hp : p.val = (Int.fract t.1,Int.fract t.2)) : + p ∈ (clippedSlopePrimitive a r j).val ↔ 0 ≤ cutForm a j t := by + classical + have hform (k : Fin 2 × Fin 2) + (hk : (p.val.1-k.1.val,p.val.2-k.2.val) = t) : + cutForm a j p.val - ordinary (integralCutForm a j (k.1.val,k.2.val)) = + cutForm a j t := by + rw [← cutForm_ordinary,← cutForm_sub] + simpa only [map_natCast,Prod.sub_def] using congrArg (cutForm a j) hk + constructor + · intro h + obtain ⟨k,hk,hside⟩ := Set.mem_iUnion.mp h + have hb := (mem_circularBoxPiece r k p).mp hk + have he : (p.val.1-k.1.val,p.val.2-k.2.val) = t := by + apply Prod.ext + · simpa only [hp] using fract_small_lift_unique hr ht.1 k.1 (by simpa only [hp] using hb.1) + · simpa only [hp] using fract_small_lift_unique hr ht.2 k.2 (by simpa only [hp] using hb.2) + have hs : ordinary (integralCutForm a j (k.1.val,k.2.val)) ≤ cutForm a j p.val := not_lt.mp hside + linarith [hform k he] + · intro h + obtain ⟨kx,hx⟩ := fract_small_lift hr ht.1 + obtain ⟨ky,hy⟩ := fract_small_lift hr ht.2 + let k : Fin 2 × Fin 2 := (kx,ky) + have he : (p.val.1-k.1.val,p.val.2-k.2.val) = t := by + simp [hp,k,hx,hy] + apply Set.mem_iUnion.mpr + refine ⟨k,(mem_circularBoxPiece r k p).mpr ?_,?_⟩ + · have h1 : p.val.1-k.1.val = t.1 := congrArg Prod.fst he + have h2 : p.val.2-k.2.val = t.2 := congrArg Prod.snd he + constructor <;> constructor <;> linarith [ht.1.1,ht.1.2,ht.2.1,ht.2.2] + · change ¬cutForm a j p.val < ordinary (integralCutForm a j (k.1.val,k.2.val)) + linarith [hform k he] + +theorem translated_clippedSlope_local {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (u : CutRing × CutRing) + (p : GenericSquare a) + (hp : (-ordinary r < p.val.1-ordinary u.1 ∧ p.val.1-ordinary u.1 < ordinary r) ∧ + (-ordinary r < p.val.2-ordinary u.2 ∧ p.val.2-ordinary u.2 < ordinary r)) : + translate a (-u) p ∈ (clippedSlopePrimitive a r j).val ↔ + ordinary (integralCutForm a j u) ≤ cutForm a j p.val := by + rw [mem_clippedSlope_lift r j hr (translate a (-u) p) + (p.val - (ordinary u.1,ordinary u.2)) hp (by simp [sub_eq_add_neg])] + rw [cutForm_sub,cutForm_ordinary] + exact sub_nonneg + +private theorem exists_cut_parameter (f : ℝ → ℝ × ℝ) (hf : Continuous f) + (x : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ u : CutRing, dist (f (ordinary u)) (f x) < ε := by + exact ordinary_denseRange.exists_mem_open (hf.isOpen_preimage _ Metric.isOpen_ball) + ⟨x,by simpa using hε⟩ + +theorem slope_line_anchor (a : ℕ) (j : Fin 4) (hj : j = 2 ∨ j = 3) + (z : CutRing) (p : ℝ × ℝ) (hp : cutForm a j p = ordinary z) + {ε : ℝ} (hε : 0 < ε) : + ∃ u : CutRing × CutRing, integralCutForm a j u = z ∧ + dist (ordinary u.1,ordinary u.2) p < ε := by + rcases hj with rfl | rfl + · let f : ℝ → ℝ × ℝ := fun x => (x,ordinary z + Real.goldenRatio^a*x) + have hf : Continuous f := continuous_id.prodMk (continuous_const.add (continuous_const.mul continuous_id)) + obtain ⟨u,hu⟩ := exists_cut_parameter f hf p.1 hε + have he : f p.1 = p := by + apply Prod.ext + · rfl + · change ordinary z + Real.goldenRatio^a*p.1 = p.2 + simp [cutForm] at hp + linarith + refine ⟨(u,z+cutTau^a*u),?_,?_⟩ + · simp [integralCutForm] + · simpa only [f,map_add,map_mul,map_pow,ordinary_cutTau,he] using hu + · let f : ℝ → ℝ × ℝ := fun y => (ordinary z + Real.goldenRatio^a*y,y) + have hf : Continuous f := (continuous_const.add (continuous_const.mul continuous_id)).prodMk continuous_id + obtain ⟨u,hu⟩ := exists_cut_parameter f hf p.2 hε + have he : f p.2 = p := by + apply Prod.ext + · change ordinary z + Real.goldenRatio^a*p.2 = p.1 + simp [cutForm] at hp + linarith + · rfl + refine ⟨(z+cutTau^a*u,u),?_,?_⟩ + · simp [integralCutForm] + · simpa only [f,map_add,map_mul,map_pow,ordinary_cutTau,he] using hu + +noncomputable def ordinaryBox (l h : CutRing × CutRing) : Set (ℝ × ℝ) := + Set.Ioo (ordinary l.1) (ordinary h.1) ×ˢ Set.Ioo (ordinary l.2) (ordinary h.2) + +noncomputable def genericBox (a : ℕ) (l h : CutRing × CutRing) : Set (GenericSquare a) := + Subtype.val ⁻¹' ordinaryBox l h + +theorem genericBox_eq {a : ℕ} (l h : CutRing × CutRing) : genericBox a l h = + ((halfPlane a 0 l.1)ᶜ ∩ halfPlane a 0 h.1) ∩ + ((halfPlane a 1 l.2)ᶜ ∩ halfPlane a 1 h.2) := by + ext p + have hx : p.val.1 ≠ ordinary l.1 := p.property.2.2 0 l.1 + have hy : p.val.2 ≠ ordinary l.2 := p.property.2.2 1 l.2 + simp only [genericBox,ordinaryBox, + Set.mem_inter_iff,Set.mem_compl_iff,halfPlane,Set.mem_ofPred_eq,cutForm, + Matrix.cons_val_zero,Matrix.cons_val_one,not_lt] + exact and_congr (and_congr (lt_iff_le_and_ne.trans (and_iff_left hx.symm)) Iff.rfl) + (and_congr (lt_iff_le_and_ne.trans (and_iff_left hy.symm)) Iff.rfl) + +theorem genericBox_mem {a : ℕ} (B : BooleanSubalgebra (Set (GenericSquare a))) + (hcoord : ∀ (j : Fin 2) z, halfPlane a (Fin.castLE (by omega) j) z ∈ B) + (l h : CutRing × CutRing) : genericBox a l h ∈ B := by + rw [genericBox_eq] + exact BooleanSubalgebra.inf_mem + (BooleanSubalgebra.inf_mem (BooleanSubalgebra.compl_mem (hcoord 0 l.1)) (hcoord 0 h.1)) + (BooleanSubalgebra.inf_mem (BooleanSubalgebra.compl_mem (hcoord 1 l.2)) (hcoord 1 h.2)) + +theorem exists_box_in_open {U : Set (ℝ × ℝ)} (hU : IsOpen U) + (p : ℝ × ℝ) (hp : p ∈ U) : + ∃ l h : CutRing × CutRing, p ∈ ordinaryBox l h ∧ ordinaryBox l h ⊆ U := by + obtain ⟨ε,hε,hball⟩ := Metric.isOpen_iff.mp hU p hp + obtain ⟨l₁,hl₁,hlp⟩ := exists_cut_between (show p.1-ε < p.1 by linarith) + obtain ⟨l₂,hl₂,hlq⟩ := exists_cut_between (show p.2-ε < p.2 by linarith) + obtain ⟨h₁,hph,hh₁⟩ := exists_cut_between (show p.1 < p.1+ε by linarith) + obtain ⟨h₂,hqh,hh₂⟩ := exists_cut_between (show p.2 < p.2+ε by linarith) + refine ⟨(l₁,l₂),(h₁,h₂),⟨⟨hlp,hph⟩,⟨hlq,hqh⟩⟩,?_⟩ + rintro q ⟨⟨hqx,hqx'⟩,⟨hqy,hqy'⟩⟩ + apply hball + change max (dist q.1 p.1) (dist q.2 p.2) < ε + rw [max_lt_iff,Real.dist_eq,Real.dist_eq,abs_lt,abs_lt] + constructor <;> constructor <;> linarith + +theorem halfPlane_locally_generated {a : ℕ} (r : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (B : BooleanSubalgebra (Set (GenericSquare a))) + (htrans : ∀ u U, U ∈ B → translate a u ⁻¹' U ∈ B) + (j : Fin 4) (hj : j = 2 ∨ j = 3) + (hprimitive : (clippedSlopePrimitive a r j).val ∈ B) + (z : CutRing) (p : ℝ × ℝ) : + ∃ l h : CutRing × CutRing, ∃ D : Set (GenericSquare a), + p ∈ ordinaryBox l h ∧ D ∈ B ∧ + ∀ q : GenericSquare a, q.val ∈ ordinaryBox l h → + (q ∈ halfPlane a j z ↔ q ∈ D) := by + rcases lt_trichotomy (cutForm a j p) (ordinary z) with hp | hp | hp + · obtain ⟨l,h,hl,hsub⟩ := exists_box_in_open + (isOpen_lt (cutForm_continuous a j) continuous_const) p hp + refine ⟨l,h,Set.univ,hl,BooleanSubalgebra.top_mem,?_⟩ + intro q hq + exact iff_true_intro (hsub hq) + · obtain ⟨u,hu,hup⟩ := slope_line_anchor a j hj z p hp hr.1 + have hpU : p ∈ {q : ℝ × ℝ | + (-ordinary r < q.1-ordinary u.1 ∧ q.1-ordinary u.1 < ordinary r) ∧ + (-ordinary r < q.2-ordinary u.2 ∧ q.2-ordinary u.2 < ordinary r)} := by + change max (dist (ordinary u.1) p.1) (dist (ordinary u.2) p.2) < ordinary r at hup + rw [max_lt_iff,Real.dist_eq,Real.dist_eq,abs_lt,abs_lt] at hup + exact ⟨⟨by linarith [hup.1.2],by linarith [hup.1.1]⟩, + ⟨by linarith [hup.2.2],by linarith [hup.2.1]⟩⟩ + have hU : IsOpen {q : ℝ × ℝ | + (-ordinary r < q.1-ordinary u.1 ∧ q.1-ordinary u.1 < ordinary r) ∧ + (-ordinary r < q.2-ordinary u.2 ∧ q.2-ordinary u.2 < ordinary r)} := + ((isOpen_lt continuous_const (continuous_fst.sub continuous_const)).inter + (isOpen_lt (continuous_fst.sub continuous_const) continuous_const)).inter + ((isOpen_lt continuous_const (continuous_snd.sub continuous_const)).inter + (isOpen_lt (continuous_snd.sub continuous_const) continuous_const)) + obtain ⟨l,h,hl,hsub⟩ := exists_box_in_open hU p hpU + refine ⟨l,h,(translate a (-u) ⁻¹' (clippedSlopePrimitive a r j).val)ᶜ,hl, + BooleanSubalgebra.compl_mem (htrans _ _ hprimitive),?_⟩ + intro q hq + change cutForm a j q.val < ordinary z ↔ ¬translate a (-u) q ∈ (clippedSlopePrimitive a r j).val + rw [translated_clippedSlope_local r j hr u q (hsub hq),hu,not_le] + · obtain ⟨l,h,hl,hsub⟩ := exists_box_in_open + (isOpen_lt continuous_const (cutForm_continuous a j)) p hp + refine ⟨l,h,∅,hl,BooleanSubalgebra.bot_mem,?_⟩ + intro q hq + change cutForm a j q.val < ordinary z ↔ False + exact iff_false_intro (not_lt.mpr (le_of_lt (hsub hq))) + +theorem slope_cuts_generated {a : ℕ} (r : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (B : BooleanSubalgebra (Set (GenericSquare a))) + (htrans : ∀ u U, U ∈ B → translate a u ⁻¹' U ∈ B) + (hcoord : ∀ (j : Fin 2) z, halfPlane a (Fin.castLE (by omega) j) z ∈ B) + (j : Fin 4) (hj : j = 2 ∨ j = 3) + (hprimitive : (clippedSlopePrimitive a r j).val ∈ B) (z : CutRing) : + halfPlane a j z ∈ B := by + classical + choose l h D hp hD he using halfPlane_locally_generated r hr B htrans j hj hprimitive z + have hK : IsCompact (Set.Icc (0 : ℝ) 1 ×ˢ Set.Icc (0 : ℝ) 1) := isCompact_Icc.prod isCompact_Icc + obtain ⟨s,hs⟩ := hK.elim_finite_subcover (fun p => ordinaryBox (l p) (h p)) + (fun _ => isOpen_Ioo.prod isOpen_Ioo) (by intro p _; exact Set.mem_iUnion.mpr ⟨p,hp p⟩) + have heq : halfPlane a j z = ⋃ p ∈ s, genericBox a (l p) (h p) ∩ D p := by + ext q + constructor + · intro hq + have hqK : q.val ∈ Set.Icc (0 : ℝ) 1 ×ˢ Set.Icc (0 : ℝ) 1 := + ⟨⟨q.property.1.1,q.property.1.2.le⟩,⟨q.property.2.1.1,q.property.2.1.2.le⟩⟩ + obtain ⟨p,hps,hqp⟩ := Set.mem_iUnion₂.mp (hs hqK) + exact Set.mem_iUnion₂.mpr ⟨p,hps,hqp,(he p q hqp).mp hq⟩ + · intro hq + obtain ⟨p,_,hqp,hqD⟩ := Set.mem_iUnion₂.mp hq + exact (he p q hqp).mpr hqD + rw [heq] + exact BooleanSubalgebra.biSup_mem s.finite_toSet (fun p _ => + BooleanSubalgebra.inf_mem (genericBox_mem B hcoord _ _) (hD p)) + +end PrimitiveGeometricGeneration + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGermActions.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGermActions.lean new file mode 100644 index 0000000000000000000000000000000000000000..8aa66c6a788a8188491b2d15f961d976e1f87031 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGermActions.lean @@ -0,0 +1,178 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CrossingCellActions +import OAI.GroupTheory.SimpleAmenable.Homology.FiniteCutResolution +import OAI.GroupTheory.SimpleAmenable.CentralCovers.RefinedClippedModels + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem primitive_germ_action_neighborhood {ι : Type*} [Finite ι] + (hlarge : 20 ≤ m+1) (hr : 0 halfPlane a (j i) (c i)) (spatialTranslate p.2 (initialTest a r p.1)).val) + (hmesh : (1+|ordinary (cutTau^a)|)*(200/(A.geometry.mesh:ℝ)) ordinary (e i)) → e 0=0 → e (Fin.last N)=1 → + (∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) → + (∀ k, cutFraction (pointCoordinate G.oldOffset k-r) ∈ Set.range e) → + (∀ k, cutFraction (pointCoordinate G.oldOffset k+r) ∈ Set.range e) → + ∀ cell : Fin 2 → Fin N, + (∀ k, |ordinary (e (cell k).castSucc)-realCoordinate z k|<δ ∧ + |ordinary (e (cell k).succ)-realCoordinate z k|<δ) → + ∀ (n : ℕ) (q : Fin 2 → ℤ), + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (refinedGridRectangle a N e cell).val → + ∀ initial : Fin 2 → Fin A.geometry.mesh, + refinedGridRectangle a N e cell ≤ spatialTranslate G.oldOffset + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) initial) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q + (refinedGridRectangle a N e cell)) → + ∀ (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)), + ∀ x ∈ f.range, + A.primitiveStar (by omega) p (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.primitiveStar (by omega) p (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate p.2 (initialTest a r p.1)) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate p.2 (initialTest a r p.1)) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + cases G with + | constant u => + obtain ⟨δ,hδ,hlocal⟩ := T.refined_cells_locally_decided hr + refine ⟨δ,hδ,?_⟩ + intro N e he hzero hlast hmesh' _ _ cell hnear n q hW _ _ f hf hc I s x hx + apply A.constant_model_action hlarge hr T hz₁ hz₂ u f hf ?_ I s x hx + exact A.coordinate_control_inward_gate hlarge T.vertex T.offset _ + (A.coordinate_inward_resolved T.vertex T.offset z) n q _ hW + (fun p hp => (hlocal N e he hzero hlast hmesh' cell hnear p hp).1) f hf hc + | coordinate d u G => + have hlo : j (idx false)=axisDirection d ∧ c (idx false)=G.lower := ⟨congrArg Prod.fst (hidx false),congrArg Prod.snd (hidx false)⟩ + have hhi : j (idx true)=axisDirection d ∧ c (idx true)=G.upper := ⟨congrArg Prod.fst (hidx true),congrArg Prod.snd (hidx true)⟩ + have hR' : ResolvedBy (fun i => halfPlane a (j i) (c i)) (spatialTranslate u (coordinatePrimitive a d)).val := by + simpa only [initialTest_coordinate] using hR + obtain ⟨O,hO,hz,hact⟩ := A.coordinate_model_action_neighborhood hlarge hr d u z G T hz₁ hz₂ + (idx false) (idx true) hlo hhi hR' + obtain ⟨δ,hδ,hball⟩ := Metric.isOpen_iff.mp hO z hz + refine ⟨δ,hδ,?_⟩ + intro N e he hzero hlast hmesh' _ _ cell hnear n q hW _ _ f hf hc I s x hx + simp only [initialTest_coordinate] + exact hact n q _ hW + (fun p hp => hball (refinedGridRectangle_point_near e he hzero hlast hmesh' cell z δ hnear p hp)) + f hf hc I s x hx + | slope d u G hbox => + have hlo (k : Fin 2) : j (idx (.inl (k,false)))=axisDirection k ∧ + c (idx (.inl (k,false)))=pointCoordinate G.offset k-r := ⟨congrArg Prod.fst (hidx (.inl (k,false))),congrArg Prod.snd (hidx (.inl (k,false)))⟩ + have hhi (k : Fin 2) : j (idx (.inl (k,true)))=axisDirection k ∧ + c (idx (.inl (k,true)))=pointCoordinate G.offset k+r := ⟨congrArg Prod.fst (hidx (.inl (k,true))),congrArg Prod.snd (hidx (.inl (k,true)))⟩ + have hs : j (idx (.inr ()))=slopeDirection d ∧ + c (idx (.inr ()))=integralCutForm a (slopeDirection d) G.offset := ⟨congrArg Prod.fst (hidx (.inr ())),congrArg Prod.snd (hidx (.inr ()))⟩ + have hR' : ResolvedBy (fun i => halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))).val := by + simpa only [initialTest_slope] using hR + simpa only [PrimitiveGerm.oldOffset,initialTest_slope] using + A.refined_clipped_model_action_neighborhood hlarge hr d u z G hbox T hz₁ hz₂ + (fun k => idx (.inl (k,false))) (fun k => idx (.inl (k,true))) (idx (.inr ())) hlo hhi hs hR' hmesh + +theorem primitive_family_local_templates {ι : Type*} [Finite ι] + (ha : 0 ordinary (e i)) → e 0=0 → e (Fin.last N)=1 → + (∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) → + (∀ i k, cutFraction (pointCoordinate (G i).oldOffset k-r) ∈ Set.range e) → + (∀ i k, cutFraction (pointCoordinate (G i).oldOffset k+r) ∈ Set.range e) → + ∀ cell : Fin 2 → Fin N, + (∀ k, |ordinary (e (cell k).castSucc)-realCoordinate z k|<δ ∧ + |ordinary (e (cell k).succ)-realCoordinate z k|<δ) → + ∀ (n : ℕ) (q : Fin 2 → ℤ), + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (refinedGridRectangle a N e cell).val → + (∀ i, ∃ initial : Fin 2 → Fin A.geometry.mesh, + refinedGridRectangle a N e cell ≤ spatialTranslate (G i).oldOffset + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) initial)) → + ∀ (J : Type) (f : J → TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)), + (∀ v, B.AlignedSmallSupported (f v)) → + (∀ v, SmallControlled B.c (f v) (B.windowSector (by omega) n (A.rectangles.rectangles n) q + (refinedGridRectangle a N e cell))) → + ∃ L : B.LocalPatchTemplate (by omega) (A.starFamily (by omega) P) f, + ∀ x : GenericSquare a, x ∈ L.margin.val → + polygonAssignment L.predicates x ∈ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)) := by + classical + let _ := Fintype.ofFinite ι + let G (i : ι) := Classical.choice (PrimitiveGerm.nonempty (a := a) (z := z) hr (P i)) + let R := primitiveTests (a := a) (r := r) P + let K := Σ i, (G i).Index + let dir : K → Fin 4 := fun v => ((G v.1).cuts v.2).1 + let cut : K → CutRing := fun v => ((G v.1).cuts v.2).2 + obtain ⟨S,hR,hS⟩ := finite_cut_resolution_extend R dir cut + let j : S → Fin 4 := fun p => p.val.1 + let c : S → CutRing := fun p => p.val.2 + obtain ⟨T⟩ := A.geometry.inwardChart_exists ha j c z + let idx (i : ι) (k : (G i).Index) : S := ⟨(G i).cuts k,hS ⟨i,k⟩⟩ + have hidx i k : (j (idx i k),c (idx i k))=(G i).cuts k := rfl + have hres i : ResolvedBy (fun s => halfPlane a (j s) (c s)) + (spatialTranslate (P i).2 (initialTest a r (P i).1)).val := hR i + have hact i := A.primitive_germ_action_neighborhood hlarge hr (P i) z (G i) T hz₁ hz₂ + (idx i) (hidx i) (hres i) hmesh + choose δ hδ hacts using hact + obtain ⟨δ₀,hδ₀,hinside⟩ := T.refined_cells_locally_decided hr + let radius : Option ι → ℝ := Option.elim' δ₀ δ + have hpositive (i : Option ι) : 0 exact hδ₀ + | some i => exact hδ i + obtain ⟨imin,_,hmin⟩ := Finset.univ.exists_min_image radius + (show (Finset.univ : Finset (Option ι)).Nonempty from Finset.univ_nonempty) + refine ⟨G,radius imin,hpositive imin,?_⟩ + intro N e he hzero hlast hmesh' hlends huends cell hnear n q hW hinitial J f hf hc + have hnear₀ k : |ordinary (e (cell k).castSucc)-realCoordinate z k|<δ₀ ∧ + |ordinary (e (cell k).succ)-realCoordinate z k|<δ₀ := by + have hm : radius imin≤δ₀ := hmin none (Finset.mem_univ none) + exact ⟨(hnear k).1.trans_le hm,(hnear k).2.trans_le hm⟩ + have hinc : refinedGridRectangle a N e cell ≤ A.geometry.inwardMargin T.vertex T.offset z := + fun p hp => (hinside N e he hzero hlast hmesh' cell hnear₀ p hp).1 + let L : B.LocalPatchTemplate (by omega) (A.starFamily (by omega) P) f := { + index := Fin 4 ⊕ (Fin 2 × Fin (A.geometry.window-1)) + tests := A.concurrentPrimitives T.vertex T.offset + lawful := A.concurrentLaw T.vertex T.offset + margin := A.geometry.inwardMargin T.vertex T.offset z + predicates := T.polygons R + margin_resolved := A.concurrent_inward_resolved T.vertex T.offset z + predicates_resolved := A.inward_model_resolved T R + controlled := fun v => A.coordinate_control_inward_gate hlarge T.vertex T.offset _ + (A.coordinate_inward_resolved T.vertex T.offset z) n q _ hW hinc (f v) (hf v) (hc v) + action := by + intro i I s v x hx + let I' : ControlAlphabet (Fin (m+1)) := ⟨I.val,by rw [I.property.2]; omega⟩ + have hneari k : |ordinary (e (cell k).castSucc)-realCoordinate z k|<δ i ∧ + |ordinary (e (cell k).succ)-realCoordinate z k|<δ i := by + have hm : radius imin≤δ i := hmin (some i) (Finset.mem_univ (some i)) + exact ⟨(hnear k).1.trans_le hm,(hnear k).2.trans_le hm⟩ + obtain ⟨initial,hi⟩ := hinitial i + exact hacts i N e he hzero hlast hmesh' (hlends i) (huends i) cell hneari n q hW + initial hi (f v) (hf v) (hc v) I' s x hx } + refine ⟨L,?_⟩ + intro x hx + obtain ⟨y,_,hy⟩ := T.polygons_assignment_realized hr hz₁ hz₂ R hR x hx Set.univ isOpen_univ (Set.mem_univ z) + exact ⟨y,hy⟩ + +end InitialCoverSystem.PatchAtlas + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGlobalTemplates.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGlobalTemplates.lean new file mode 100644 index 0000000000000000000000000000000000000000..a538559344b6795cbb1c241c487baf652af43a92 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveGlobalTemplates.lean @@ -0,0 +1,212 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ClosedLocalAssignments +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalGridPieces +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RefinementNeighborhoods +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveGermActions + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem primitive_family_global_templates {ι : Type*} [Finite ι] + (ha : 0 ordinary (e i)) ∧ e 0=0 ∧ e (Fin.last N)=1 ∧ + (∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) ∧ + ∃ n : ℕ, ∃ q : Fin 2 → ℤ, + (∀ cell : Fin 2 → Fin N, + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (refinedGridRectangle a N e cell).val) ∧ + ∀ (cell : Fin 2 → Fin N) (J : Type) + (f : J → TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)), + (∀ v, B.AlignedSmallSupported (f v)) → + (∀ v, SmallControlled B.c (f v) (B.windowSector (by omega) n (A.rectangles.rectangles n) q + (refinedGridRectangle a N e cell))) → + ∃ L : B.LocalPatchTemplate (by omega) (A.starFamily (by omega) P) f, + ∀ x : GenericSquare a, x ∈ L.margin.val → + polygonAssignment L.predicates x ∈ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)) := by + classical + let _ := Fintype.ofFinite ι + let Z := {z : ℝ × ℝ // z ∈ Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1} + have hlocal (z : Z) := A.primitive_family_local_templates ha hlarge hr P z.val z.property.1 z.property.2 hmesh + choose G δ hδ htemplates using hlocal + let O : Z → Set (ℝ × ℝ) := fun z => Metric.ball z.val (δ z) + have hO z : IsOpen (O z) := Metric.isOpen_ball + have hcover : Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 ⊆ ⋃ z, O z := by + intro z hz + exact Set.mem_iUnion.mpr ⟨⟨z,hz⟩,Metric.mem_ball_self (hδ ⟨z,hz⟩)⟩ + obtain ⟨s,hs⟩ := (isCompact_Icc.prod isCompact_Icc).elim_finite_subcover O hO hcover + have hcov : Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 ⊆ ⋃ z : s, O z.val := by + intro x hx + obtain ⟨z,hz⟩ := Set.mem_iUnion.mp (hs hx) + obtain ⟨hz,hx⟩ := Set.mem_iUnion.mp hz + exact Set.mem_iUnion.mpr ⟨⟨z,hz⟩,hx⟩ + let S : Finset CutRing := Finset.univ.biUnion (fun z : s => Finset.univ.biUnion (fun i : ι => + Finset.univ.biUnion (fun k : Fin 2 => + {pointCoordinate (G z.val i).oldOffset k-r,pointCoordinate (G z.val i).oldOffset k+r}))) + have hSlo (z : s) (i : ι) (k : Fin 2) : pointCoordinate (G z.val i).oldOffset k-r ∈ S := by + simp only [S,Finset.mem_biUnion,Finset.mem_univ,true_and,Finset.mem_insert,Finset.mem_singleton] + exact ⟨z,i,k,Or.inl rfl⟩ + have hShi (z : s) (i : ι) (k : Fin 2) : pointCoordinate (G z.val i).oldOffset k+r ∈ S := by + simp only [S,Finset.mem_biUnion,Finset.mem_univ,true_and,Finset.mem_insert,Finset.mem_singleton] + exact ⟨z,i,k,Or.inr rfl⟩ + obtain ⟨N,hN,e,he,hzero,hlast,hfine,hends,hgrids,hboxes⟩ := compact_common_refining_grid S + (fun _ : s × ι => A.geometry.mesh) (fun _ => A.geometry.mesh_large) + (fun _ => symmetricWindowStart r) (fun k => (G k.1.val k.2).oldOffset) + (fun z : s => O z.val) (fun z => hO z.val) hcov (fun _ => 1) (fun _ => by norm_num) + obtain ⟨n,q,hW⟩ := refinedGridRectangle_resolved (a := a) r e + refine ⟨N,hN,e,he,hzero,hlast,hfine,n,q,hW,?_⟩ + intro cell J f hf hc + obtain ⟨z,hz,_⟩ := hboxes cell + have hnear := closedRefinedBox_endpoint_near e he cell z.val.val (δ z.val) hz + exact htemplates z.val N e he hzero hlast hfine + (fun i k => hends _ (hSlo z i k)) (fun i k => hends _ (hShi z i k)) + cell hnear n q (hW cell) + (fun i => refinedGridRectangle_subset_translated_window e he hzero hlast hfine cell + A.geometry.mesh A.geometry.mesh_large (symmetricWindowStart r) (G z.val i).oldOffset + (hgrids (z,i))) J f hf hc + +theorem primitiveStar_zero (hlarge : 15 < m+1) (u : CutRing × CutRing) : + A.primitiveStar hlarge (0,u)=B.c.comp (universalProjection _) := by + unfold primitiveStar + have hu : spatialTranslate u (initialTest a r 0)=wholePolygon a := by + apply Subtype.ext + ext p + simp [spatialTranslate,initialTest,wholePolygon] + rw [hu,B.fullGeometricSector_whole] + +theorem primitive_table_with_coordinates {κ : Type*} [Fintype κ] + (hlarge : 25 ≤ m+1) (hr : 0 rfl,T,Set.univ,?_⟩ + rw [T.sector_input none,A.primitiveStar_zero] + rfl + have hcoordinate (e : Fin 2) (w : CutRing × CutRing) : + ∃ Q : Option (Option κ) → Fin 5 × (CutRing × CutRing), + (∀ k, Q (some (some k))=(coordinateTestIndex (j k),v k)) ∧ + ∃ T : FormalStarTable (A.starFamily (by omega) Q), + ∃ U : Set (Option (Option κ) → Bool), T.sector U=A.primitiveStar (by omega) (coordinateTestIndex e,w) := by + let T := Classical.choice (hc 0 0 e w) + refine ⟨_,fun _ => rfl,T,{σ | σ (some none)=true},?_⟩ + exact T.sector_input (some (some none)) + have hslope (d : Fin 2) (u : CutRing × CutRing) : + ∃ Q : Option (Option κ) → Fin 5 × (CutRing × CutRing), + (∀ k, Q (some (some k))=(coordinateTestIndex (j k),v k)) ∧ + ∃ T : FormalStarTable (A.starFamily (by omega) Q), + ∃ U : Set (Option (Option κ) → Bool), T.sector U=A.primitiveStar (by omega) (slopeTestIndex d,u) := by + let T := Classical.choice (hc d u 0 0) + refine ⟨_,fun _ => rfl,T,{σ | σ none=true},?_⟩ + exact T.sector_input (some none) + rcases p with ⟨p,u⟩ + fin_cases p + · exact hconstant u + · exact hcoordinate 0 u + · exact hcoordinate 1 u + · exact hslope 0 u + · exact hslope 1 u + +theorem primitive_family_actual_global_law {ι : Type} [Finite ι] + (ha : 0 ⟨0,hN⟩⟩ + let κ := Fin 2 × Fin (n-1) + let W : D → polygonAlgebra a := refinedGridRectangle a N e + let Q₀ := coordinateWindowPrimitives n q + let P' : Option ι → Fin 5 × (CutRing × CutRing) := Option.elim' (0,0) P + have ht (i : Option ι) := A.primitive_table_with_coordinates hlarge hr ha (P' i) + (Prod.fst : κ → Fin 2) (fun k : κ => (Q₀ k).2) + choose Q hQ T U hU using ht + let F := fun i => A.starFamily (by omega) (Q i) + have hinput : formalGridInput F T U=A.starFamily (by omega) P := by + funext i + change (T i).sector (U i)=_ + rw [hU] + cases i with + | none => exact A.primitiveStar_zero (by omega) 0 + | some i => rfl + have hsub (i : Option ι) : Q i ∘ (fun k : κ => some (some k))=Q₀ := by + funext k + exact hQ i k + have hcoord (i : Option ι) : ∀ I, I.card ≤ 15 → ∀ b hb, + B.PrimitiveFamilyLaw I b hb (Q i ∘ (fun k : κ => some (some k))) := by + rw [hsub] + exact fun I _ b hb => A.rectangles.rectangles n I b hb q + have hmasks (i : Option ι) := A.formalRectangleMasks (by omega) (Q i) (T i) + (fun k : κ => some (some k)) (hcoord i) W + (by rw [hsub]; exact hW) + (refinedGridRectangle_cover hN e he hzero hlast hfine) + (refinedGridRectangle_disjoint e he hzero hlast hfine) + choose C hdis hcover hj' hk' hactual using hmasks + let j : D → TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm) := + fun d => B.windowSector (by omega) n (A.rectangles.rectangles n) q (W d) + let k : D → TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm) := + fun d => B.windowSector (by omega) n (A.rectangles.rectangles n) q (W d)ᶜ + have hj (i : Option ι) (d : D) : (T i).sector (C i d)=j d := by + rw [hj'] + simp only [hsub] + rfl + have hk (i : Option ι) (d : D) : (T i).sector (C i d)ᶜ=k d := by + rw [hk'] + simp only [hsub] + rfl + have hF (i : Option ι) (v) : B.AlignedSmallSupported (F i v) := + A.starFamily_supported (by omega) (Q i) v + have hc (i : Option ι) : F i none=B.c.comp (universalProjection _) := rfl + have hpieces (d : D) : ∀ i, B.AlignedSmallSupported (formalGridPiece F T U C d i) := + formalGridPiece_supported F T U C _ hF d + have hcontrols (d : D) : ∀ i, SmallControlled B.c (formalGridPiece F T U C d i) (j d) := + formalGridPiece_control F T U C B.c hc j hj d + have htemplates' (d : D) : ∃ L : B.LocalPatchTemplate (by omega) + (formalGridInput F T U) (formalGridPiece F T U C d), + ∀ x : GenericSquare a, x ∈ L.margin.val → + polygonAssignment L.predicates x ∈ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)) := by + rw [hinput] + exact htemplates d (Option ι) (formalGridPiece F T U C d) (hpieces d) (hcontrols d) + choose L hreal using htemplates' + apply B.independent_actual_patching hlarge F T U C hF hc hdis hcover j k hj hk + (fun d => B.fullGeometricSector_supported (by omega) Q₀ _ (W d) (hW d)) + (fun d s t => B.fullGeometricSector_commute (by omega) Q₀ _ (W d) (W d)ᶜ + (hW d) disjoint_compl_right s t) ?_ (B.smallPrimitiveInputs (by omega) P) ?_ + (primitiveTests (a := a) (r := r) P) L hreal + · rw [hinput] + rfl + · intro I i + rw [hinput] + exact A.starFamily_small (by omega) P I i + +end InitialCoverSystem.PatchAtlas + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveStarCoherence.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveStarCoherence.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8c1664b4a51dfafec79495fdb87c252be2e34ec --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveStarCoherence.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.IndividualGridSplits +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CrossingCellActions +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws +import OAI.GroupTheory.SimpleAmenable.CentralCovers.InitialGridActions +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InwardPlanarGerms + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PrimitiveStarCoherence +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem primitiveStar_eq_of_predicate (hlarge : 15 < m+1) (j : Fin 5) + (u v : CutRing × CutRing) + (he : spatialTranslate u (initialTest a r j)=spatialTranslate v (initialTest a r j)) : + A.primitiveStar hlarge (j,u)=A.primitiveStar hlarge (j,v) := by + unfold primitiveStar + rw [he] + apply B.fullGeometricSector_shared_test hlarge _ _ (Sum.inl j) (Sum.inl j) + · rfl + · simpa only [translatedTemplate,initialPatchPrimitives,Sum.elim_inl,add_zero] using he + · intro x y hh + have h := hh () + simpa only [primitiveTests,primitiveFamilyTests,translatedTemplate,initialPatchPrimitives, + Sum.elim_inl,add_zero,he] using h + +theorem primitiveStar_periodic (hlarge : 15 < m+1) (j : Fin 5) + (u : CutRing × CutRing) (k : Fin 2 → ℤ) : + A.primitiveStar hlarge (j,u+((k 0:CutRing),(k 1:CutRing)))= + A.primitiveStar hlarge (j,u) := by + apply A.primitiveStar_eq_of_predicate hlarge j + rw [spatialTranslate_add,spatialTranslate_integral] + +theorem concurrent_primitiveStar (hlarge : 15 < m+1) + (t : VertexType (commonVertexDenominator a)) (u : CutRing × CutRing) (j : Fin 4) : + B.fullGeometricSector hlarge (A.concurrentPrimitives t u) (A.concurrentLaw t u) + (A.geometry.positiveDecision t u j)= + A.primitiveStar hlarge (⟨j.val+1,by omega⟩,u+A.geometry.anchors t j) := by + unfold primitiveStar + apply B.fullGeometricSector_shared_test hlarge _ _ (Sum.inl j) + (Sum.inl ⟨j.val+1,by omega⟩) + · rfl + · simp only [concurrentPrimitives,translatedTemplate,Sum.elim_inl,initialPatchPrimitives,add_zero] + · intro x y hh + have h := hh () + simpa [primitiveTests,primitiveFamilyTests,concurrentPrimitives,translatedTemplate, + ConcurrentGeometry.positiveDecision,initialTest] using h + +theorem concurrent_slope (hlarge : 15 < m+1) + (t : VertexType (commonVertexDenominator a)) (u : CutRing × CutRing) (d : Fin 2) : + B.fullGeometricSector hlarge (A.concurrentPrimitives t u) (A.concurrentLaw t u) + (A.geometry.positiveDecision t u (slopeDirection d))= + A.rectangles.slope hlarge d (u+A.geometry.anchors t (slopeDirection d)) := by + have h := A.concurrent_primitiveStar hlarge t u (slopeDirection d) + have he : (⟨(slopeDirection d).val+1,by omega⟩:Fin 5)=slopeTestIndex d := rfl + rw [he,A.primitiveStar_slope] at h + exact h + +end InitialCoverSystem.PatchAtlas +end PrimitiveStarCoherence + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveTable.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveTable.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a0fd98c9d2e668a10bb191da0563d5fed66e9f7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveTable.lean @@ -0,0 +1,145 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveWords +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.Sectors + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ActualPrimitiveTable + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {ι : Type*} [Finite ι] + +theorem subtypeAlternatingHom_injective {X : Type*} [Fintype X] [DecidableEq X] + (I : Finset X) : Function.Injective (subtypeAlternatingHom I) := by + intro s t h + apply Subtype.ext + exact Equiv.Perm.ofSubtype_injective (congrArg Subtype.val h) + +noncomputable def tableAlphabetHom (I : Finset (Fin (m+1))) {Ω : Type*} : + (Ω → alternatingGroup I) →* (Ω → alternatingGroup (Fin (m+1))) where + toFun s ω := subtypeAlternatingHom I (s ω) + map_one' := by funext ω; exact map_one _ + map_mul' s t := by funext ω; exact map_mul _ _ _ + +theorem tableAlphabetHom_injective (I : Finset (Fin (m+1))) {Ω : Type*} : + Function.Injective (tableAlphabetHom (Ω := Ω) I) := by + intro s t h + funext ω + exact subtypeAlternatingHom_injective I (congrFun h ω) + +noncomputable def actualAlphabetTableHom (I : Finset (Fin (m+1))) + (U : ι → polygonAlgebra a) : + (Set.range (polygonAssignment U) → alternatingGroup I) →* polygonAlternatingGroup a (m+1) := + (actualPolygonTableHom U).comp (tableAlphabetHom I) + +theorem actualAlphabetTableHom_injective (I : Finset (Fin (m+1))) + (U : ι → polygonAlgebra a) : Function.Injective (actualAlphabetTableHom I U) := + (actualPolygonTableHom_injective U).comp (tableAlphabetHom_injective I) + +noncomputable def actualTestMask (U : ι → polygonAlgebra a) (i : ι) : + Set (Set.range (polygonAssignment U)) := {ω | ω.val i = true} + +omit [Finite ι] in +theorem actualTestMask_separates (U : ι → polygonAlgebra a) + (ω ν : Set.range (polygonAssignment U)) + (h : ∀ i, ω ∈ actualTestMask U i ↔ ν ∈ actualTestMask U i) : ω = ν := by + apply Subtype.ext + funext i + apply Bool.eq_iff_iff.mpr + exact h i + +theorem tableAlphabetHom_mask (I : Finset (Fin (m+1))) {Ω : Type*} + (V : Set Ω) (s : alternatingGroup I) : + tableAlphabetHom I (sectorMask V s) = sectorMask V (subtypeAlternatingHom I s) := by + classical + funext ω + by_cases h : ω ∈ V <;> simp [tableAlphabetHom,sectorMask,h] + +theorem actualPolygonTableHom_whole (U : ι → polygonAlgebra a) + (s : alternatingGroup (Fin (m+1))) : + actualPolygonTableHom U (sectorMask Set.univ s) = + conditionalAlternatingHom (wholePolygon a) s := by + apply Subtype.ext + apply Subtype.ext + apply Equiv.ext + intro p + rw [actualPolygonTableHom_apply] + simp only [sectorMask_of_mem Set.univ s _ (Set.mem_univ _)] + change (s.val p.1,p.2) = conditionalPerm (wholePolygon a) s.val p + rw [conditionalPerm_apply] + simp only [wholePolygon,Set.mem_univ,ite_true] + +theorem actualAlphabetTableHom_masks (I : Finset (Fin (m+1))) + (U : ι → polygonAlgebra a) (i : Option ι) : + (actualAlphabetTableHom I U).comp (maskFamily (actualTestMask U) i) = + (conditionalAlternatingHom (match i with + | none => wholePolygon a + | some j => U j)).comp (subtypeAlternatingHom I) := by + apply MonoidHom.ext + intro s + cases i with + | none => + change actualPolygonTableHom U (tableAlphabetHom I (sectorMask Set.univ s)) = _ + rw [tableAlphabetHom_mask,actualPolygonTableHom_whole] + rfl + | some j => + change actualPolygonTableHom U (tableAlphabetHom I (sectorMask (actualTestMask U j) s)) = _ + rw [tableAlphabetHom_mask] + exact actualPolygonTableHom_input U j (subtypeAlternatingHom I s) + +namespace InitialCoverSystem + +variable (B : InitialCoverSystem a r m hm M) + +noncomputable def primitiveTests (P : ι → Fin 5 × (CutRing × CutRing)) : + ι → polygonAlgebra a := fun i => primitiveFamilyTests (r := r) P (some i) + +omit [Finite ι] in +theorem primitiveFamily_aligned (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) : + (copyFamilyEval (B.primitiveFamily I b hb P)).range ≤ + sourceAlignedGroup a r m hm M B.t I := by + rw [copyFamilyEval_range] + apply iSup_le + intro i s hs + obtain ⟨t,rfl⟩ := hs + cases i with + | none => exact B.initialAlphabet_aligned I 0 t + | some j => exact B.primitiveCopy_aligned I b hb (P j) t + +noncomputable def primitiveTable (I : Finset (Fin (m+1))) + [Group.IsPerfect (alternatingGroup I)] + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : B.PrimitiveFamilyLaw I b hb P) : + ActualLawfulTable (coverMap M (alternatingGenerator a r m hm)) + (actualAlphabetTableHom I (primitiveTests (a := a) (r := r) P)) := + actualFamilyTable (actualTestMask (primitiveTests (a := a) (r := r) P)) (B.primitiveFamily I b hb P) + (coverMap M (alternatingGenerator a r m hm)) (actualAlphabetTableHom I (primitiveTests (a := a) (r := r) P)) + (actualAlphabetTableHom_injective I (primitiveTests (a := a) (r := r) P)) + (fun i => by + rw [B.primitiveFamily_projection,actualAlphabetTableHom_masks] + cases i <;> rfl) + (actualTestMask_separates (primitiveTests (a := a) (r := r) P)) h + +theorem primitiveTable_sector_aligned (I : Finset (Fin (m+1))) + [Group.IsPerfect (alternatingGroup I)] + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : B.PrimitiveFamilyLaw I b hb P) + (V : Set (Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)))) + (s : UniversalExtension (alternatingGroup I)) : + (B.primitiveTable I b hb P h).sector V s ∈ sourceAlignedGroup a r m hm M B.t I := + B.primitiveFamily_aligned I b hb P ((B.primitiveTable I b hb P h).sector_mem V s) + +end InitialCoverSystem +end ActualPrimitiveTable + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveWords.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveWords.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4c02ee09782745338453b315b82ae41178184eb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrimitiveWords.lean @@ -0,0 +1,213 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveCopies +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CommonTranslatedCopies +import OAI.GroupTheory.SimpleAmenable.Arithmetic.CompiledTranslations +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ConditionalFamilyLaws + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PrimitiveWords + +abbrev SmallAlt (m : ℕ) := {s : alternatingGroup (Fin (m+1)) // s.val.support.card ≤ 5} + +theorem smallAlt_free_surjective (m : ℕ) : + Function.Surjective (FreeGroup.lift (fun s : SmallAlt m => s.val)) := by + apply MonoidHom.range_eq_top.mp + rw [FreeGroup.range_lift_eq_closure] + apply top_unique + rw [← alternatingGroup.closure_isThreeCycles_eq_top] + apply Subgroup.closure_mono + intro s hs + exact ⟨⟨s,by rw [hs.card_support]; omega⟩,rfl⟩ + +noncomputable def smallAltWord {m : ℕ} (s : alternatingGroup (Fin (m+1))) : + FreeGroup (SmallAlt m) := (smallAlt_free_surjective m s).choose + +@[simp] theorem smallAltWord_eval {m : ℕ} (s : alternatingGroup (Fin (m+1))) : + FreeGroup.lift (fun t : SmallAlt m => t.val) (smallAltWord s) = s := + (smallAlt_free_surjective m s).choose_spec + +noncomputable def conditionalWord {m : ℕ} (j : Fin 5) + (s : alternatingGroup (Fin (m+1))) : FreeGroup (SourceGeneratorLabel m) := + FreeGroup.map (fun t : SmallAlt m => sourceConditionalLabel m + (j,⟨t.val.val,t.val.property,t.property⟩)) (smallAltWord s) + +theorem conditionalWord_eval {m : ℕ} {H : Type*} [Group H] + (f : SourceGeneratorLabel m → H) (h : alternatingGroup (Fin (m+1)) →* H) + (j : Fin 5) (hj : ∀ t : SmallAlt m, + f (sourceConditionalLabel m (j,⟨t.val.val,t.val.property,t.property⟩)) = h t.val) + (s : alternatingGroup (Fin (m+1))) : FreeGroup.lift f (conditionalWord j s) = h s := by + have he : (FreeGroup.lift f).comp (FreeGroup.map (fun t : SmallAlt m => + sourceConditionalLabel m (j,⟨t.val.val,t.val.property,t.property⟩))) = + h.comp (FreeGroup.lift (fun t : SmallAlt m => t.val)) := by + apply FreeGroup.ext_hom + intro t + simpa only [MonoidHom.comp_apply, FreeGroup.map.of,FreeGroup.lift_apply_of] using hj t + simpa only [MonoidHom.comp_apply,conditionalWord,smallAltWord_eval] using + DFunLike.congr_fun he (smallAltWord s) + +noncomputable def primitiveWord {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) + (p : Fin 5 × (CutRing × CutRing)) (s : alternatingGroup I) : + FreeGroup (SourceGeneratorLabel m) := + let k := (commonFrame a r m hm I b hb p.2).k + latticeWord k * conditionalWord p.1 (subtypeAlternatingHom I s) * (latticeWord k)⁻¹ + +namespace InitialCoverSystem + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +theorem conditionalWord_mk (j : Fin 5) (s : alternatingGroup (Fin (m+1))) : + PresentedGroup.mk (shortRelations M (alternatingGenerator a r m hm)) (conditionalWord j s) = + B.initialConditional j s := by + have he : FreeGroup.lift (PresentedGroup.of : SourceGeneratorLabel m → + BoundedRelationCover M (alternatingGenerator a r m hm)) = + PresentedGroup.mk (shortRelations M (alternatingGenerator a r m hm)) := by + ext i + rfl + rw [← he] + exact conditionalWord_eval _ (B.initialConditional j) j + (fun t => (B.initialConditional_input j t.val t.property).symm) s + +theorem primitiveWord_mk (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) + (p : Fin 5 × (CutRing × CutRing)) (s : alternatingGroup I) : + PresentedGroup.mk (shortRelations M (alternatingGenerator a r m hm)) + (primitiveWord (a := a) (r := r) (hm := hm) I b hb p s) = B.primitiveCopy I b hb p s := by + simp only [primitiveWord,map_mul,map_inv,B.latticeWord_mk,B.conditionalWord_mk] + rfl + +end InitialCoverSystem + +theorem primitiveWord_eval {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) + (p : Fin 5 × (CutRing × CutRing)) (s : alternatingGroup I) : + FreeGroup.lift (alternatingGenerator a r m hm) + (primitiveWord (a := a) (r := r) (hm := hm) I b hb p s) = + conditionalAlternatingHom (spatialTranslate p.2 (initialTest a r p.1)) + (subtypeAlternatingHom I s) := by + have ht : ∀ i, sourceLatticeMap a r m hm (Multiplicative.ofAdd (FreeAbelianGroup.of i)) = + alternatingGenerator a r m hm (sourceTranslationLabel m i) := by + intro i + exact commutingFamilyHom_of _ _ i + rw [primitiveWord,map_mul,map_mul,map_inv,latticeWord_eval _ _ ht] + rw [conditionalWord_eval _ (conditionalAlternatingHom (initialTest a r p.1)) p.1 + (fun _ => rfl)] + exact (commonFrame a r m hm I b hb p.2).conditional_projection _ s + +end PrimitiveWords + +section PrimitiveFamilyLaws + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {ι : Type*} + +noncomputable def primitiveFamilyTests (P : ι → Fin 5 × (CutRing × CutRing)) : + Option ι → polygonAlgebra a + | none => wholePolygon a + | some i => spatialTranslate (P i).2 (initialTest a r (P i).1) + +namespace InitialCoverSystem + +variable (B : InitialCoverSystem a r m hm M) + +noncomputable def primitiveFamily (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) : + Option ι → alternatingGroup I →* BoundedRelationCover M (alternatingGenerator a r m hm) + | none => B.initialAlphabet I 0 + | some i => B.primitiveCopy I b hb (P i) + +def PrimitiveFamilyLaw (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) : Prop := + CentralOn (coverMap M (alternatingGenerator a r m hm)) + (copyFamilyEval (B.primitiveFamily I b hb P)).range + +theorem primitiveFamily_projection (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) (i : Option ι) : + (coverMap M (alternatingGenerator a r m hm)).comp (B.primitiveFamily I b hb P i) = + (conditionalAlternatingHom (primitiveFamilyTests (a := a) (r := r) P i)).comp (subtypeAlternatingHom I) := by + cases i with + | none => + rw [primitiveFamily,initialAlphabet,← MonoidHom.comp_assoc, + B.initialConditional_projection] + rfl + | some i => exact B.primitiveCopy_projection I b hb (P i) + +end InitialCoverSystem + +noncomputable def primitiveFamilyWord (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) : + Option ι × alternatingGroup I → FreeGroup (SourceGeneratorLabel m) + | (none,s) => conditionalWord 0 (subtypeAlternatingHom I s) + | (some i,s) => primitiveWord (a := a) (r := r) (hm := hm) I b hb (P i) s + +theorem primitiveFamilyWord_eval (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) + (i : Option ι × alternatingGroup I) : + FreeGroup.lift (alternatingGenerator a r m hm) + (primitiveFamilyWord (a := a) (r := r) (hm := hm) I b hb P i) = + conditionalAlternatingHom (primitiveFamilyTests (a := a) (r := r) P i.1) (subtypeAlternatingHom I i.2) := by + rcases i with ⟨i,s⟩ + cases i with + | none => + exact conditionalWord_eval _ (conditionalAlternatingHom (initialTest a r 0)) 0 + (fun _ => rfl) _ + | some i => exact primitiveWord_eval I b hb (P i) s + +namespace InitialCoverSystem + +variable (B : InitialCoverSystem a r m hm M) + +theorem primitiveFamilyWord_mk (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (P : ι → Fin 5 × (CutRing × CutRing)) + (i : Option ι × alternatingGroup I) : + PresentedGroup.mk (shortRelations M (alternatingGenerator a r m hm)) + (primitiveFamilyWord (a := a) (r := r) (hm := hm) I b hb P i) = + B.primitiveFamily I b hb P i.1 i.2 := by + rcases i with ⟨i,s⟩ + cases i with + | none => exact B.conditionalWord_mk 0 (subtypeAlternatingHom I s) + | some i => exact B.primitiveWord_mk I b hb (P i) s + +end InitialCoverSystem + +theorem primitiveFamilyLaw_eventually [Finite ι] + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (hm' : 15 ≤ m+1) + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) + (P : ι → Fin 5 × (CutRing × CutRing)) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ B : InitialCoverSystem a r m hm M, + B.PrimitiveFamilyLaw I b hb P := by + let U := primitiveFamilyTests (a := a) (r := r) P + let input : Option ι × alternatingGroup I → + (Set.range (polygonAssignment U) → alternatingGroup (Fin (m+1))) := + fun i => polygonTableInput U i.1 (subtypeAlternatingHom I i.2) + obtain ⟨L,hL⟩ := finite_table_with_inputs_eventually (alternatingGenerator a r m hm) + (actualPolygonTableHom U) input (primitiveFamilyWord (a := a) (r := r) (hm := hm) I b hb P) + (fun i => (primitiveFamilyWord_eval I b hb P i).trans + (actualPolygonTableHom_input U i.1 (subtypeAlternatingHom I i.2)).symm) + (alternatingGenerator_surjective a r m hr hm' hm) + refine ⟨L,fun M hM B => ?_⟩ + obtain ⟨ρ,hρ,hin⟩ := hL M hM + have hc : CentralOn (coverMap M (alternatingGenerator a r m hm)) ρ.range := by + apply centralOn_of_table + rw [hρ] + exact actualPolygonTableHom_injective U + apply hc.mono + rw [copyFamilyEval_range] + apply iSup_le + rintro i y ⟨s,rfl⟩ + refine ⟨input (i,s),?_⟩ + rw [hin,B.primitiveFamilyWord_mk] + +end PrimitiveFamilyLaws + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrivateBankFixer.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrivateBankFixer.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf30b96f9c857af3bfe81a73e1a55c1a15ae8be2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/PrivateBankFixer.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PrivateBankWord + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +namespace InitialCoverSystem + +section +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 hb (bankColumn_subset e 1 hi)) u + (F.restrict (bankColumn_subset e 1)) V (universalMap (orderedTrackHom (bankColumn e 1)) s) + have hh := (hzw.inv_right.mul_right hc).mul_right hzw + rw [← he] at hh + have he' : w⁻¹*(w*B.distinctSlotStar hlarge h hr (bankColumn e 0) u + (F.restrict (bankColumn_subset e 0)) V s*w⁻¹)*w = + B.distinctSlotStar hlarge h hr (bankColumn e 0) u (F.restrict (bankColumn_subset e 0)) V s := by group + rwa [he'] at hh + +end + +section +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +theorem sourceAlignedGroup_supported (J : Finset (Fin (m+1))) + (z : BoundedRelationCover M (alternatingGenerator a r m hm)) + (hz : z ∈ sourceAlignedGroup a r m hm M B.t J) : + SupportedIn (coverMap M (alternatingGenerator a r m hm) z).val.val + {p : TrackPoint a (m+1) | p.1 ∈ J} := by + classical + let q : BoundedRelationCover M (alternatingGenerator a r m hm) →* Equiv.Perm (TrackPoint a (m+1)) := + (polygonFullGroup a (m+1)).subtype.comp + ((polygonAlternatingGroup a (m+1)).subtype.comp (coverMap M (alternatingGenerator a r m hm))) + let K : Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm)) := { + carrier := {z | SupportedIn (q z) {p : TrackPoint a (m+1) | p.1 ∈ J}} + one_mem' := by intro p hp; simp + mul_mem' := by + intro x y hx hy p hp + rw [map_mul,Equiv.Perm.mul_apply,hy p hp,hx p hp] + inv_mem' := by + intro x hx + change SupportedIn (q x⁻¹) _ + rw [map_inv] + exact supported_inv hx } + have hK : sourceAlignedGroup a r m hm M B.t J ≤ K := by + apply (Subgroup.closure_le _).mpr + rintro _ ⟨c,hc,k,rfl⟩ + change SupportedIn (q (B.t k * PresentedGroup.of (sourceConditionalLabel m c) * (B.t k)⁻¹)) _ + rw [map_mul,map_mul,map_inv] + obtain ⟨d,hd⟩ := sourceLatticeFullMap_translation a r m hm k + have ht : q (B.t k) = (trackTranslation (a:=a) d).val := by + have ht := congrArg Subtype.val (DFunLike.congr_fun B.t_projection k) + change (coverMap M (alternatingGenerator a r m hm) (B.t k)).val = + sourceLatticeFullMap a r m hm k at ht + exact congrArg Subtype.val (ht.trans hd) + rw [ht] + have hs : SupportedIn (q (PresentedGroup.of (sourceConditionalLabel m c))) + {p : TrackPoint a (m+1) | p.1 ∈ J} := by + intro p hp + have hf : c.2.val p.1=p.1 := Equiv.Perm.notMem_support.mp (fun hi => hp (hc hi)) + change (conditionalPerm (initialTest a r c.1) c.2.val) p=p + simp [conditionalPerm,hf] + apply (supported_conjugate (trackTranslation (a:=a) d).val hs).mono + rintro p ⟨⟨i,x⟩,hi,rfl⟩ + exact hi + exact hK hz + +end + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (coordinateRectangle a L V).val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles n) q (coordinateRectangle a L V))) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (t : BoundedRelationCover M (alternatingGenerator a r m hm)) (ht : t ∈ f.range) : + A.slope (by omega) d z (universalMap (subtypeAlternatingHom I.val) s)*t* + (A.slope (by omega) d z (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + A.slope (by omega) d z' (universalMap (subtypeAlternatingHom I.val) s)*t* + (A.slope (by omega) d z' (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + obtain ⟨w,rfl⟩ := slope_same_intercept a d z z' hline + obtain ⟨c,hc'⟩ := real_slope_parameter a d z x hx + exact B.tangent_line_slide hlarge hr A.rectangles A.k A.p A.u A.v A.inverse A.charts A.short + A.labels d z w L V hLV hz hz' c (by simpa only [← hc'] using hnear) n q hW f hf hc I s t ht + +end RectangularAtlas +end InitialCoverSystem + +theorem rectangularAtlas_eventually {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (hSlope : 8000 < ordinary (cutTau^a)) (hconj : |conjugate (cutTau^a)| < 1/1000) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ B : InitialCoverSystem a r m hm M, + Nonempty B.RectangularAtlas := by + obtain ⟨s,u,v,hs,hsr,huv,hshort⟩ := exists_symmetric_short_chart a r hr.1 + obtain ⟨k,p,hp⟩ := exists_full_overlap_window a r u + obtain ⟨s₁,hs₁,hs₁'⟩ := exists_cut_between (by linarith : (0:ℝ) < ordinary r/8) + obtain ⟨L₁,hL₁⟩ := coordinate_all_eventually (hm := hm) hlarge hr hSlope hconj + obtain ⟨L₂,hL₂⟩ := tangentChartTables_eventually (hm := hm) hr (by omega) k p u + obtain ⟨L₃,hL₃⟩ := tangentChartTables_eventually (hm := hm) hr (by omega) + (symmetricWindowLength s₁) (symmetricWindowStart s₁) u + refine ⟨L₁+L₂+L₃,fun M hM B => ⟨⟨k,p,u,v,huv,?_,hp,hL₁ M (by omega) B,?_,s₁,hs₁,hs₁',?_⟩⟩⟩ + · nlinarith + · intro d e z I _ b hb + exact hL₂ M (by omega) B d e z I b hb + · intro d e z I _ b hb + exact hL₃ M (by omega) B d e z I b hb + +end RectangularAtlas + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/RefinedClippedModels.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/RefinedClippedModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7cf699985647d58d536664ebb9209ed2dea9246 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/RefinedClippedModels.lean @@ -0,0 +1,204 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PhaseClippedModels +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CoordinateModels +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.LocalClippedBoxFormula +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RefinedLocalDecisions + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem refined_clipped_model_action_neighborhood {ι : Type*} [Finite ι] + (hlarge : 20 ≤ m+1) (hr : 0 halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))).val) + (hmesh : (1+|ordinary (cutTau^a)|)*(200/(A.geometry.mesh:ℝ)) ordinary (e i)) → e 0=0 → e (Fin.last N)=1 → + (∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) → + (∀ k, cutFraction (pointCoordinate G.offset k-r) ∈ Set.range e) → + (∀ k, cutFraction (pointCoordinate G.offset k+r) ∈ Set.range e) → + ∀ cell : Fin 2 → Fin N, + (∀ k, |ordinary (e (cell k).castSucc)-realCoordinate z k|<δ ∧ + |ordinary (e (cell k).succ)-realCoordinate z k|<δ) → + ∀ (n : ℕ) (q : Fin 2 → ℤ), + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (refinedGridRectangle a N e cell).val → + ∀ initial : Fin 2 → Fin A.geometry.mesh, + refinedGridRectangle a N e cell ≤ spatialTranslate G.offset + (windowRectangle a A.geometry.mesh (symmetricWindowStart r) initial) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q + (refinedGridRectangle a N e cell)) → + ∀ (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)), + ∀ x ∈ f.range, + A.primitiveStar (by omega) (slopeTestIndex d,u) (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.primitiveStar (by omega) (slopeTestIndex d,u) (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + obtain ⟨δ₀,hδ₀,hdecisions⟩ := T.refined_cells_locally_decided hr + obtain ⟨δ₁,hδ₁,hact⟩ := A.uniform_clipped_model_action_neighborhood hlarge hr d u z G hbox T hz₁ hz₂ + lo hi slope hlo hhi hs hR hmesh + refine ⟨min δ₀ δ₁,lt_min hδ₀ hδ₁,?_⟩ + intro N e he hzero hlast hmesh' hlor hhir cell hnear n q hW initial hinitial f hf hc I s x hx + have hnear₀ k := And.intro ((hnear k).1.trans_le (min_le_left δ₀ δ₁)) + ((hnear k).2.trans_le (min_le_left δ₀ δ₁)) + have hnear₁ k := And.intro ((hnear k).1.trans_le (min_le_right δ₀ δ₁)) + ((hnear k).2.trans_le (min_le_right δ₀ δ₁)) + have hlocal := hdecisions N e he hzero hlast hmesh' cell hnear₀ + let idx (k : Fin 2 × Bool) : ι := if k.2 then hi k.1 else lo k.1 + have hidx (k : Fin 2 × Bool) : j (idx k)=axisDirection k.1 ∧ c (idx k)=G.axialCut k := by + obtain ⟨k,b⟩ := k + cases b + · exact hlo k + · exact hhi k + have hends (k : Fin 2 × Bool) : cutFraction (G.axialCut k) ∈ Set.range e := by + obtain ⟨k,b⟩ := k + cases b + · exact hlor k + · exact hhir k + obtain ⟨σ,hgate⟩ := T.refined_coordinate_phase e he hzero hlast hmesh' cell Prod.fst G.axialCut idx hidx hends hlocal + obtain ⟨p,hp⟩ := refinedGridRectangle_nonempty e he hzero hlast hmesh' cell + apply hact σ (fun k => e (cell k).castSucc) (fun k => e (cell k).succ) + (fun k => (he (Fin.castSucc_lt_succ (i := cell k))).le) ?_ hnear₁ n q hW hgate initial hinitial p hp + (refinedGridRectangle_point_near e he hzero hlast hmesh' cell z δ₁ hnear₁ p hp) + ((refinedGridRectangle_mem e he hzero hlast hmesh' cell p).mp hp) f hf hc I s x hx + intro hσ + exact T.refined_interior_phase_bounds e he hzero hlast hmesh' cell G.offset lo hi hlo hhi hlor hhir σ hσ + hgate (fun p hp => (hlocal p hp).2) + +end InitialCoverSystem.PatchAtlas + +section PrimitiveGerms + +inductive PrimitiveGerm (a : ℕ) (r : CutRing) (z : ℝ × ℝ) : + Fin 5 × (CutRing × CutRing) → Type + | constant (u : CutRing × CutRing) : PrimitiveGerm a r z (0,u) + | coordinate (d : Fin 2) (u : CutRing × CutRing) (g : CoordinateGerm a d u z) : + PrimitiveGerm a r z (coordinateTestIndex d,u) + | slope (d : Fin 2) (u : CutRing × CutRing) + (g : ClippedGerm a r (slopeDirection d) u z) (box : g.BoxValid) : + PrimitiveGerm a r z (slopeTestIndex d,u) + +namespace PrimitiveGerm +variable {a : ℕ} {r : CutRing} {z : ℝ × ℝ} {p : Fin 5 × (CutRing × CutRing)} + +theorem nonempty (hr : 0 Unit + | .coordinate _ _ _ => Bool + | .slope _ _ _ _ => Sum (Fin 2 × Bool) Unit + +instance (G : PrimitiveGerm a r z p) : Finite G.Index := by + cases G <;> dsimp only [Index] <;> infer_instance + +noncomputable def cuts (G : PrimitiveGerm a r z p) : G.Index → Fin 4 × CutRing := by + cases G with + | constant u => exact fun _ => (0,0) + | coordinate d u g => exact fun b : Bool => (axisDirection d,if b then g.upper else g.lower) + | slope d u g box => + exact Sum.elim + (fun k : Fin 2 × Bool => (axisDirection k.1,if k.2 then pointCoordinate g.offset k.1+r else pointCoordinate g.offset k.1-r)) + (fun _ => (slopeDirection d,integralCutForm a (slopeDirection d) g.offset)) + +noncomputable def oldOffset : PrimitiveGerm a r z p → CutRing × CutRing + | .constant _ => 0 + | .coordinate _ _ _ => 0 + | .slope _ _ g _ => g.offset + +end PrimitiveGerm +end PrimitiveGerms + +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem constant_model_action {ι : Type*} [Finite ι] + (hlarge : 20 ≤ m+1) (hr : 0 spatialTranslate u (initialTest a r 0)) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (initialTest a r 0)) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + let R : Unit → polygonAlgebra a := fun _ => spatialTranslate u (initialTest a r 0) + have hR : R ()=wholePolygon a := by simp [R,initialTest] + have hresolve : ResolvedBy (fun i => halfPlane a (j i) (c i)) (R ()).val := by + rw [hR]; exact fun _ _ _ => Iff.rfl + have he : wholePolygon a ⊓ A.geometry.inwardMargin T.vertex T.offset z = + T.polygons R () ⊓ A.geometry.inwardMargin T.vertex T.offset z := by + apply Subtype.ext + ext p + change (True ∧ _) ↔ (_ ∧ _) + by_cases hp : p ∈ (A.geometry.inwardMargin T.vertex T.offset z).val + · obtain ⟨q,_,hh⟩ := T.polygons_assignment_realized hr hz₁ hz₂ R (fun _ => hresolve) + p hp Set.univ isOpen_univ (Set.mem_univ z) + have hval : p ∈ (T.polygons R ()).val := by + have hq : q ∈ (R ()).val := by rw [hR]; trivial + exact (show q ∈ (R ()).val ↔ p ∈ (T.polygons R ()).val by + simpa only [polygonAssignment,decide_eq_true_eq] using Bool.eq_iff_iff.mp (congrFun hh ())).mp hq + simp only [hp,hval] + · simp only [hp,and_false] + have hpstar : A.primitiveStar (by omega) (0,u)= + B.c.comp (universalProjection (alternatingGroup (Fin (m+1)))) := by + unfold primitiveStar + have hu : spatialTranslate u (initialTest a r 0)=wholePolygon a := hR + rw [hu,B.fullGeometricSector_whole] + rw [hpstar] + have hh := B.chart_action_transfer hlarge (A.concurrentPrimitives T.vertex T.offset) + (A.concurrentLaw T.vertex T.offset) (wholePolygon a) (T.polygons R ()) + (A.geometry.inwardMargin T.vertex T.offset z) (fun _ _ _ => Iff.rfl) + (A.inward_model_resolved T R ()) (A.concurrent_inward_resolved T.vertex T.offset z) he f hf hc I s x hx + rw [B.fullGeometricSector_whole] at hh + exact hh + +end InitialCoverSystem.PatchAtlas + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SectorDifferenceRange.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SectorDifferenceRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..41acea308b464e7286d650b22afdfa73807179c3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SectorDifferenceRange.lean @@ -0,0 +1,193 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AxisAnchorFamily +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ClippedIntervals + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SectorDifferenceRange +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι : Type*} [Finite ι] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem fullGeometricSector_sdiff_range (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (V W : polygonAlgebra a) (hWV : W ≤ V) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) W.val) + (K : Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm))) + (hV : (B.fullGeometricSector hlarge P h V).range ≤ K) + (hW' : (B.fullGeometricSector hlarge P h W).range ≤ K) : + (B.fullGeometricSector hlarge P h (V \ W)).range ≤ K := by + have he : W ⊔ (V \ W) = V := by + apply Subtype.ext + ext x + change (x ∈ W.val ∨ x ∈ V.val ∧ x ∉ W.val) ↔ x ∈ V.val + constructor + · rintro (hx|hx); exact hWV hx; exact hx.1 + · intro hx; by_cases hh : x ∈ W.val; exact Or.inl hh; exact Or.inr ⟨hx,hh⟩ + have hd : Disjoint W.val (V \ W).val := Set.disjoint_left.mpr (by rintro x hx ⟨_,h⟩; exact h hx) + rintro x ⟨s,rfl⟩ + have hh := B.fullGeometricSector_union hlarge P h W (V \ W) hW hd s + rw [he] at hh + have hm := K.mul_mem (K.inv_mem (hW' ⟨s,rfl⟩)) (hV ⟨s,rfl⟩) + rw [hh,inv_mul_cancel_left] at hm + exact hm + +end InitialCoverSystem +end SectorDifferenceRange + +section AnchorIntersectionRange +attribute [local instance] cutOrdinaryOrder +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem axisSector_anchor_intersection_range (hlarge : 15 < m+1) (n : ℕ) (g : B.CoordinateWindowLaw n) + (d : Fin 2) (k : ℕ) (hk : k ≤ n) (p : ℤ) (u v s t : CutRing) + (huv : ordinary u ≤ ordinary v) (hlen : ordinary v-ordinary u < 1) + (hu : p ≤ endpointLabel u ∧ endpointLabel u < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) + (hs : p ≤ endpointLabel s ∧ endpointLabel s < p+k) + (ht : p ≤ endpointLabel t ∧ endpointLabel t < p+k) + (K : Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm))) + (hU : (B.axisSector hlarge n g d k hk p (coordinateInterval a d u v)).range ≤ K) + (hS : (B.axisSector hlarge n g d k hk p + (coordinateInterval a d u (clippedLabel u v (endpointLabel s)))).range ≤ K) + (hT : (B.axisSector hlarge n g d k hk p + (coordinateInterval a d u (clippedLabel u v (endpointLabel t)))).range ≤ K) : + (B.axisSector hlarge n g d k hk p + (coordinateInterval a d u v ⊓ coordinateInterval a d s t)).range ≤ K := by + let S := coordinateInterval a d u (clippedLabel u v (endpointLabel s)) + let T := coordinateInterval a d u (clippedLabel u v (endpointLabel t)) + have hsl : p ≤ endpointLabel (clippedLabel u v (endpointLabel s)) ∧ + endpointLabel (clippedLabel u v (endpointLabel s)) < p+k := by + rcases clippedLabel_label u v (endpointLabel s) with h|h <;> rw [h] <;> assumption + have htl : p ≤ endpointLabel (clippedLabel u v (endpointLabel t)) ∧ + endpointLabel (clippedLabel u v (endpointLabel t)) < p+k := by + rcases clippedLabel_label u v (endpointLabel t) with h|h <;> rw [h] <;> assumption + have hSr := axisInterval_resolved (a := a) (r := r) d k p u _ hu hsl + have hTr := axisInterval_resolved (a := a) (r := r) d k p u _ hu htl + have hSb := clippedLabel_bounds u v (endpointLabel s) huv + have hTb := clippedLabel_bounds u v (endpointLabel t) huv + rw [coordinateInterval_anchor_formula d u v s t huv hlen] + split_ifs with h + · apply B.fullGeometricSector_sdiff_range hlarge _ _ T S ?_ hSr K hT hS + apply coordinateInterval_mono d _ _ _ _ le_rfl hSb.1 ?_ (by linarith) + exact min_le_min_left v h + · have hST : T ≤ S := by + apply coordinateInterval_mono d _ _ _ _ le_rfl hTb.1 ?_ (by linarith) + exact min_le_min_left v (le_of_not_ge h) + have hdiff : (B.axisSector hlarge n g d k hk p (S \ T)).range ≤ K := + B.fullGeometricSector_sdiff_range hlarge _ _ S T hST hTr K hS hT + apply B.fullGeometricSector_sdiff_range hlarge _ _ _ (S \ T) ?_ ?_ K hU hdiff + · exact (sdiff_le : S \ T ≤ S).trans (coordinateInterval_mono d _ _ _ _ le_rfl hSb.1 hSb.2 hlen) + · exact BooleanSubalgebra.sdiff_mem (L := resolvedAlgebra _) hSr hTr + +end InitialCoverSystem +end AnchorIntersectionRange + +section AnchorGeneration +namespace AxisAnchorFamily +variable {n l : ℕ} {q : ℤ} (A : AxisAnchorFamily n l q) +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (g : B.CoordinateWindowLaw n) (d : Fin 2) + +noncomputable def prefixGroup : Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm)) := + ⨆ i : Fin l, ⨆ j : Fin (A.count i+1), ((A.cuts i).prefixCopy B hlarge g d j.val).range + +theorem anchor_range_prefixGroup (i : Fin l) : + ((A.cuts i).anchorCopy B hlarge g d).range ≤ A.prefixGroup B hlarge g d := by + unfold prefixGroup + rw [← (A.cuts i).prefix_last B hlarge g d] + exact (le_iSup (fun j : Fin (A.count i+1) => ((A.cuts i).prefixCopy B hlarge g d j.val).range) + (Fin.last (A.count i))).trans (le_iSup (fun i : Fin l => ⨆ j : Fin (A.count i+1), + ((A.cuts i).prefixCopy B hlarge g d j.val).range) i) + +theorem interval_prefix_range (i : Fin l) (k : ℕ) (hk : k ≤ n) (p : ℤ) (v : CutRing) + (hu : p ≤ endpointLabel ((A.cuts i).cut 0) ∧ endpointLabel ((A.cuts i).cut 0) < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) + (hcut : v ∈ Set.range (A.cuts i).cut) : + (B.axisSector hlarge n g d k hk p (coordinateInterval a d ((A.cuts i).cut 0) v)).range ≤ + A.prefixGroup B hlarge g d := by + unfold prefixGroup + obtain ⟨j,rfl⟩ := hcut + have he : B.axisSector hlarge n g d k hk p (coordinateInterval a d ((A.cuts i).cut 0) ((A.cuts i).cut j)) = + (A.cuts i).prefixCopy B hlarge g d j.val := by + simp only [AxisCutSequence.prefixCopy,AxisCutSequence.index_fin] + exact B.axisInterval_copy_eq hlarge n g d _ _ _ _ _ _ _ _ hu hv + ((A.cuts i).lower_label j) ((A.cuts i).cut_label j) + rw [he] + exact (le_iSup (fun j : Fin (A.count i+1) => ((A.cuts i).prefixCopy B hlarge g d j.val).range) j).trans + (le_iSup (fun i : Fin l => ⨆ j : Fin (A.count i+1), + ((A.cuts i).prefixCopy B hlarge g d j.val).range) i) + +theorem old_interval_range (hl : 201 ≤ l) (k : ℕ) (hk : k ≤ n) (p : ℤ) (s t : CutRing) + (hs : p ≤ endpointLabel s ∧ endpointLabel s < p+k) + (ht : p ≤ endpointLabel t ∧ endpointLabel t < p+k) + (hanchor : ∀ j : Fin (l+1), p ≤ endpointLabel (windowCut l q j) ∧ endpointLabel (windowCut l q j) < p+k) + (hcuts : ∀ i : Fin l, ∀ z ∈ ({s,t} : Finset CutRing), + clippedLabel ((A.cuts i).cut 0) ((A.cuts i).cut (Fin.last (A.count i))) (endpointLabel z) ∈ + Set.range (A.cuts i).cut) : + (B.axisSector hlarge n g d k hk p (coordinateInterval a d s t)).range ≤ A.prefixGroup B hlarge g d := by + classical + let f : Fin l → polygonAlgebra a := fun i => windowCell a d l q i ⊓ coordinateInterval a d s t + have hV := axisInterval_resolved (a := a) (r := r) d k p s t hs ht + have hW (i : Fin l) : ResolvedBy (fun j => (InitialCoverSystem.primitiveTests (a := a) (r := r) + (axisWindowPrimitives d k p) j).val) (f i).val := by + exact BooleanSubalgebra.inf_mem (L := resolvedAlgebra _) + (axisInterval_resolved d k p _ _ (hanchor i.castSucc) (hanchor i.succ)) hV + apply (B.fullGeometricSector_partition_range hlarge (axisWindowPrimitives d k p) + (fun I _ b hb => B.axisFamilyLaw n g d k hk p I b hb) _ f hW ?_ ?_).trans + · apply iSup_le + intro i + change (B.axisSector hlarge n g d k hk p (windowCell a d l q i ⊓ coordinateInterval a d s t)).range ≤ _ + have hlu := hanchor i.castSucc + have hlv := hanchor i.succ + rw [← A.lower i] at hlu + rw [← A.upper i] at hlv + change (B.axisSector hlarge n g d k hk p (coordinateInterval a d _ _ ⊓ _)).range ≤ _ + rw [← A.lower i,← A.upper i] + apply B.axisSector_anchor_intersection_range hlarge n g d k hk p _ _ s t + ((A.cuts i).ordered (Fin.last (A.count i))).1 (A.intervalLength hl i) hlu hlv hs ht + · have he : B.axisSector hlarge n g d k hk p + (coordinateInterval a d ((A.cuts i).cut 0) ((A.cuts i).cut (Fin.last (A.count i)))) = + (A.cuts i).anchorCopy B hlarge g d := by + exact B.axisInterval_copy_eq hlarge n g d _ _ _ _ _ _ _ _ hlu hlv + ((A.cuts i).lower_label 0) ((A.cuts i).upper_label 0) + rw [he] + exact A.anchor_range_prefixGroup B hlarge g d i + · apply A.interval_prefix_range B hlarge g d i k hk p _ hlu ?_ (hcuts i s (by simp)) + rcases clippedLabel_label ((A.cuts i).cut 0) ((A.cuts i).cut (Fin.last (A.count i))) (endpointLabel s) with h|h + · rw [h]; exact hlv + · rw [h]; exact hs + · apply A.interval_prefix_range B hlarge g d i k hk p _ hlu ?_ (hcuts i t (by simp)) + rcases clippedLabel_label ((A.cuts i).cut 0) ((A.cuts i).cut (Fin.last (A.count i))) (endpointLabel t) with h|h + · rw [h]; exact hlv + · rw [h]; exact ht + · intro i j hij + exact (windowCell_pairwise_disjoint d l hl q hij).mono Set.inter_subset_left Set.inter_subset_left + · intro x + constructor + · intro hx + obtain ⟨i,hi⟩ := windowCell_cover d l hl q x + exact ⟨i,hi,hx⟩ + · rintro ⟨i,hi⟩; exact hi.2 + +end AxisAnchorFamily +end AnchorGeneration + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SelectedInwardActions.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SelectedInwardActions.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc827b3701f44603428b1161fcd78b3aa5098747 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SelectedInwardActions.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentGeometry +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InactiveNeighborhoodActions + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SelectedInwardActions +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (A : B.PatchAtlas) {ι : Type*} + +theorem selected_active_slope_actions + (hlarge : 20 ≤ m+1) (hr : 0 (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) e).val) (coordinateRectangle a L V).val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q + (coordinateRectangle a L V))) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (b : BoundedRelationCover M (alternatingGenerator a r m hm)) (hb : b ∈ f.range) : + A.rectangles.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s)*b* + (A.rectangles.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + A.rectangles.slope (by omega) d (T.offset+A.geometry.anchors T.vertex (j i)) + (universalMap (subtypeAlternatingHom I.val) s)*b* + (A.rectangles.slope (by omega) d (T.offset+A.geometry.anchors T.vertex (j i)) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + have hLdist : dist (ordinary (L 0),ordinary (L 1)) z < A.geometry.epsilon/2 := by + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨(hnear 0).1,(hnear 1).1⟩ + have hVdist : dist (ordinary (V 0),ordinary (V 1)) z < A.geometry.epsilon/2 := by + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨(hnear 0).2,(hnear 1).2⟩ + have hclip' : ∀ k, -ordinary r ≤ ordinary (L k)-ordinary (pointCoordinate (T.offset+A.geometry.anchors T.vertex (j i)) k) ∧ + ordinary (V k)-ordinary (pointCoordinate (T.offset+A.geometry.anchors T.vertex (j i)) k) ≤ ordinary r := by + intro k + have hL := (T.active_bound i hi) (ordinary (L 0),ordinary (L 1)) + (fun l => (T.neighborhood _ hLdist l).imp le_of_lt le_of_lt) k + have hV := (T.active_bound i hi) (ordinary (V 0),ordinary (V 1)) + (fun l => (T.neighborhood _ hVdist l).imp le_of_lt le_of_lt) k + have heL : realCoordinate (ordinary (L 0),ordinary (L 1)) k=ordinary (L k) := by fin_cases k <;> rfl + have heV : realCoordinate (ordinary (V 0),ordinary (V 1)) k=ordinary (V k) := by fin_cases k <;> rfl + rw [heL] at hL + rw [heV] at hV + have hL' := (abs_lt.mp hL).1 + have hV' := (abs_lt.mp hV).2 + have hrad := A.geometry.radius + have hpos := A.geometry.positive + constructor <;> linarith + have hline : integralCutForm a (slopeDirection d) v= + integralCutForm a (slopeDirection d) (T.offset+A.geometry.anchors T.vertex (j i)) := by + rw [hv,← hd,(T.active_anchor i hi)] + have hz : cutForm a (slopeDirection d) z=ordinary (integralCutForm a (slopeDirection d) v) := by + rw [hv,← hd]; exact hi + have hnear' : ∀ k, |ordinary (L k)-realCoordinate z k| ≤ ordinary r/4 ∧ + |ordinary (V k)-realCoordinate z k| ≤ ordinary r/4 := by + intro k + have hh := hnear k + have hrad := A.geometry.radius + have hpos := A.geometry.positive + constructor <;> linarith + exact A.rectangles.slope_line_action hlarge hr d v (T.offset+A.geometry.anchors T.vertex (j i)) hline L V hLV + hclip hclip' z hz hnear' n q hW f hf hc I s b hb + +end InitialCoverSystem.PatchAtlas +end SelectedInwardActions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/ShiftedRouting.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/ShiftedRouting.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d0b87cc26ed59963739bf0861cbc6af0cc8086e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/ShiftedRouting.lean @@ -0,0 +1,169 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RoutingIndependence +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CanonicalSlotStars +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FrameCompatibility +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TranslationRoutingHelpers + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ShiftedRouting +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (i j,u j)))) : + B.SlotRouting hlarge h hr V i u where + alphabet := P.alphabet + card_le := P.alphabet_card + source_mem := P.source_mem + target := P.target + target_mem := fun j => P.row_subset j (orderedTrackAlphabet_mem _ 1) + offsets := orderedOffsets P.target u + offsets_spec := orderedOffsets_apply P.target u + frame := balancedOffsetFrame a r m hm _ b (by + intro ht + obtain ⟨j,_,rfl⟩ := Finset.mem_map.mp ht + exact hb (P.row_subset j (orderedTrackAlphabet_mem _ 1))) (orderedOffsets P.target u) + word := B.privateRoutingWord hlarge h hr i u P b hb V + aligned := (B.privateRoutingWord_properties hlarge h hr i u P b hb V hinj).1 + supported := (B.privateRoutingWord_properties hlarge h hr i u P b hb V hinj).2.1 + transport := (B.privateRoutingWord_properties hlarge h hr i u P b hb V hinj).2.2 + +noncomputable def shift {V : polygonAlgebra a} {i : Fin 5 → Fin (m+1)} + {u : Fin 5 → CutRing × CutRing} (ρ : B.SlotRouting hlarge h hr V i u) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (d : Fin (m+1) → CutRing × CutRing) + (hd : sourceLatticeFullMap a r m hm k=trackTranslation d) + (htarget : ∀ j, d (ρ.target j)=d (i j)) + (halign : (MulAut.conj (B.t k)) ρ.word ∈ + ⨆ W : polygonAlgebra a, (B.polygonStar hlarge h hr W).range) + (hsupp : (MulAut.conj (B.t k)) ρ.word ∈ sourceAlignedGroup a r m hm M B.t ρ.alphabet) : + B.SlotRouting hlarge h hr V i (fun j => d (i j)+u j) where + alphabet := ρ.alphabet + card_le := ρ.card_le + source_mem := ρ.source_mem + target := ρ.target + target_mem := ρ.target_mem + offsets := d+ρ.offsets + offsets_spec := by intro j; simp only [Pi.add_apply,ρ.offsets_spec,htarget] + frame := ρ.frame.shift k d hd + word := (MulAut.conj (B.t k)) ρ.word + aligned := halign + supported := hsupp + transport := by + intro j x + have ht : (coverMap M (alternatingGenerator a r m hm) (B.t k)).val=trackTranslation d := by + have hh := congrArg Subtype.val (DFunLike.congr_fun B.t_projection k) + exact hh.trans hd + have hp : (i j,translate a (d (i j)+u j) x.val) = + (trackTranslation d).val (i j,translate a (u j) x.val) := by + simp only [trackTranslation_apply,translate_add] + rw [hp] + change (coverMap M (alternatingGenerator a r m hm) (B.t k*ρ.word*(B.t k)⁻¹)).val.val _ = _ + rw [map_mul,map_mul,map_inv] + change (coverMap M (alternatingGenerator a r m hm) (B.t k)).val.val + ((coverMap M (alternatingGenerator a r m hm) ρ.word).val.val + ((coverMap M (alternatingGenerator a r m hm) (B.t k)).val.val.symm _)) = _ + rw [ht,Equiv.symm_apply_apply,ρ.transport j x] + simp only [trackTranslation_apply,htarget,translate_add] + +theorem shift_star {V : polygonAlgebra a} {i : Fin 5 → Fin (m+1)} + {u : Fin 5 → CutRing × CutRing} (ρ : B.SlotRouting hlarge h hr V i u) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (d : Fin (m+1) → CutRing × CutRing) + (hd : sourceLatticeFullMap a r m hm k=trackTranslation d) + (htarget : ∀ j, d (ρ.target j)=d (i j)) + (halign : (MulAut.conj (B.t k)) ρ.word ∈ + ⨆ W : polygonAlgebra a, (B.polygonStar hlarge h hr W).range) + (hsupp : (MulAut.conj (B.t k)) ρ.word ∈ sourceAlignedGroup a r m hm M B.t ρ.alphabet) : + (ρ.shift k d hd htarget halign hsupp).star = + (MulAut.conj (B.t k)).toMonoidHom.comp ρ.star := by + ext s : 1 + have he := DFunLike.congr_fun (B.frameStar_shift hlarge h hr (orderedTrackAlphabet ρ.target) + ρ.offsets ρ.frame k d hd V) (universalMap (orderedTrackHom ρ.target) s) + change B.frameStar hlarge h hr _ _ _ V _ = + B.t k*B.distinctSlotStar hlarge h hr ρ.target ρ.offsets ρ.frame V s*(B.t k)⁻¹ at he + change (B.t k*ρ.word*(B.t k)⁻¹)⁻¹ * + B.frameStar hlarge h hr (orderedTrackAlphabet ρ.target) (d+ρ.offsets) (ρ.frame.shift k d hd) V + (universalMap (orderedTrackHom ρ.target) s) *((B.t k*ρ.word*(B.t k)⁻¹)⁻¹)⁻¹ = + B.t k*(ρ.word⁻¹*B.distinctSlotStar hlarge h hr ρ.target ρ.offsets ρ.frame V s*(ρ.word⁻¹)⁻¹)*(B.t k)⁻¹ + rw [he] + group + +end SlotRouting + +variable (R : alternatingGroup (Fin (m+1)) → + Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (hR : ∀ s k, B.c s * B.t k * (B.c s)⁻¹ = B.t (R s k)) + (hwide : 100 ≤ m+1) + +include R hR + +theorem slotStar_zero_commute (V : polygonAlgebra a) (i : Fin 5 → Fin (m+1)) + (u : Fin 5 → CutRing × CutRing) + (hinj : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (d : Fin (m+1) → CutRing × CutRing) + (hd : sourceLatticeFullMap a r m hm k=trackTranslation d) + (J : Finset (Fin (m+1))) (hJ : J.card≤28) + (hsupp : ∀ t, t∉J → d t=0) (hz : ∀ j, d (i j)=0) + (s : UniversalExtension (alternatingGroup (Fin 5))) : + Commute (B.t k) (B.slotStar hlarge h hr hwide V i u hinj s) := by + classical + have hres : 20 ≤ ((Finset.univ : Finset (Fin (m+1))) \ + (J ∪ Finset.univ.image i)).card := by + rw [Finset.card_sdiff_of_subset (Finset.subset_univ _)] + have h₁ := Finset.card_union_le J (Finset.univ.image i) + have h₂ := Finset.card_image_le (f := i) (s := Finset.univ) + simp only [Finset.card_univ,Fintype.card_fin] at h₂ ⊢ + omega + obtain ⟨P,hP⟩ := exists_privateRoutingBank i J hres + obtain ⟨b,_,hb⟩ := Finset.exists_mem_notMem_of_card_lt_card + (show P.alphabet.card < (Finset.univ : Finset (Fin (m+1))).card by + have hc := P.alphabet_card + simp only [Finset.card_univ,Fintype.card_fin] + omega) + let ρ := SlotRouting.privateBank (B := B) (hlarge := hlarge) (h := h) (hr := hr) + V i u P b hb hinj + rw [B.slotStar_eq_routing hlarge h hr R hR hwide V i u hinj ρ] + have hzrow (j l : Fin 5) : d (P.row j l)=0 := by + by_cases hl : l=0 + · subst l; rw [P.source j]; exact hz j + · exact hsupp _ (hP j l hl) + have hw : Commute (B.t k) ρ.word := by + change Commute (B.t k) (((List.finRange 5).map _).prod) + apply Commute.list_prod_right + intro z hmem + obtain ⟨j,_,rfl⟩ := List.mem_map.mp hmem + exact B.distinctSlotStar_zero_commute hlarge h hr (P.row j) b + (fun ht => hb (P.row_subset j ht)) (fun _ => u j) _ V k d hd (hzrow j) privateCycleStar + have ht : Commute (B.t k) (B.distinctSlotStar hlarge h hr ρ.target ρ.offsets ρ.frame V s) := + B.distinctSlotStar_zero_commute hlarge h hr ρ.target b + (by intro ht; obtain ⟨j,_,he⟩ := Finset.mem_map.mp ht + exact hb (he ▸ P.row_subset j (orderedTrackAlphabet_mem _ 1))) + ρ.offsets ρ.frame V k d hd (fun j => hzrow j 1) s + exact (hw.inv_right.mul_right ht).mul_right hw.inv_right.inv_right + +end InitialCoverSystem +end ShiftedRouting + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SimultaneousActiveActions.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SimultaneousActiveActions.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb91997e98ce4b412ba1ba0484f1a1524fb0bb7f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SimultaneousActiveActions.lean @@ -0,0 +1,194 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentGeometry +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalStarTables +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CompactFineGrid +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveFormalSectors + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SimultaneousActiveActions +namespace InitialCoverSystem.RectangularAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (A : B.RectangularAtlas) (C : ConcurrentGeometry a r) + +theorem simultaneous_active_slope_actions {ι : Type*} + (hlarge : 20 ≤ m+1) (hr : 0 < ordinary r ∧ ordinary r < 1/2) (ha : 0 < a) + (j : ι → Fin 4) (c : ι → CutRing) (z : ℝ × ℝ) : + ∃ t : VertexType (commonVertexDenominator a), ∃ u : CutRing × CutRing, + (∀ p : ℝ × ℝ, dist p z < C.epsilon/2 → ∀ k, + ordinary ((C.margins t).lower k+pointCoordinate u k) (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) e).val) (coordinateRectangle a L V).val → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles n) q + (coordinateRectangle a L V)) → + ∀ (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)), + ∀ b ∈ f.range, + A.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s)*b* + (A.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + A.slope (by omega) d (u+C.anchors t (j i)) (universalMap (subtypeAlternatingHom I.val) s)*b* + (A.slope (by omega) d (u+C.anchors t (j i)) (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + obtain ⟨t,u,hmargin,hactive⟩ := C.simultaneous_active_neighborhood ha j c z + refine ⟨t,u,hmargin,fun i hi => ⟨(hactive i hi).1,?_⟩⟩ + intro d hd v hv L V hLV hclip hnear n q hW f hf hc I s b hb + have hLdist : dist (ordinary (L 0),ordinary (L 1)) z < C.epsilon/2 := by + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨(hnear 0).1,(hnear 1).1⟩ + have hVdist : dist (ordinary (V 0),ordinary (V 1)) z < C.epsilon/2 := by + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨(hnear 0).2,(hnear 1).2⟩ + have hclip' : ∀ k, -ordinary r ≤ ordinary (L k)-ordinary (pointCoordinate (u+C.anchors t (j i)) k) ∧ + ordinary (V k)-ordinary (pointCoordinate (u+C.anchors t (j i)) k) ≤ ordinary r := by + intro k + have hL := (hactive i hi).2 (ordinary (L 0),ordinary (L 1)) + (fun l => (hmargin _ hLdist l).imp le_of_lt le_of_lt) k + have hV := (hactive i hi).2 (ordinary (V 0),ordinary (V 1)) + (fun l => (hmargin _ hVdist l).imp le_of_lt le_of_lt) k + have heL : realCoordinate (ordinary (L 0),ordinary (L 1)) k=ordinary (L k) := by fin_cases k <;> rfl + have heV : realCoordinate (ordinary (V 0),ordinary (V 1)) k=ordinary (V k) := by fin_cases k <;> rfl + rw [heL] at hL + rw [heV] at hV + have hL' := (abs_lt.mp hL).1 + have hV' := (abs_lt.mp hV).2 + have hrad := C.radius + have hpos := C.positive + constructor <;> linarith + have hline : integralCutForm a (slopeDirection d) v= + integralCutForm a (slopeDirection d) (u+C.anchors t (j i)) := by + rw [hv,← hd,(hactive i hi).1] + have hz : cutForm a (slopeDirection d) z=ordinary (integralCutForm a (slopeDirection d) v) := by + rw [hv,← hd]; exact hi + have hnear' : ∀ k, |ordinary (L k)-realCoordinate z k| ≤ ordinary r/4 ∧ + |ordinary (V k)-realCoordinate z k| ≤ ordinary r/4 := by + intro k + have hh := hnear k + have hrad := C.radius + have hpos := C.positive + constructor <;> linarith + exact A.slope_line_action hlarge hr d v (u+C.anchors t (j i)) hline L V hLV + hclip hclip' z hz hnear' n q hW f hf hc I s b hb + +end InitialCoverSystem.RectangularAtlas +end SimultaneousActiveActions + +section ActualFormalPartitions +variable {a : ℕ} {ι D : Type*} + +theorem polygon_partition_formal_extension (U : ι → polygonAlgebra a) + (W : D → polygonAlgebra a) (d₀ : D) + (hW : ∀ d, ResolvedBy (fun i => (U i).val) (W d).val) + (hd : Pairwise fun d e => Disjoint (W d).val (W e).val) + (hc : ∀ x : GenericSquare a, ∃ d, x ∈ (W d).val) : + ∃ C : D → Set (ι → Bool), + (Pairwise fun d e => Disjoint (C d) (C e)) ∧ + (∀ σ, ∃ d, σ ∈ C d) ∧ + ∀ d x, polygonAssignment U x ∈ C d ↔ x ∈ (W d).val := by + classical + let chooseCell (σ : ι → Bool) : D := + if h : ∃ x : GenericSquare a, polygonAssignment U x=σ then + Classical.choose (hc (Classical.choose h)) else d₀ + refine ⟨fun d => {σ | chooseCell σ=d},?_,?_,?_⟩ + · intro d e hde + apply Set.disjoint_left.mpr + intro σ hσ hτ + exact hde (hσ.symm.trans hτ) + · intro σ + exact ⟨chooseCell σ,rfl⟩ + · intro d x + have hx : ∃ y : GenericSquare a, polygonAssignment U y=polygonAssignment U x := ⟨x,rfl⟩ + have hy := Classical.choose_spec hx + have hcell := Classical.choose_spec (hc (Classical.choose hx)) + have hactual : x ∈ (W (chooseCell (polygonAssignment U x))).val := by + dsimp only [chooseCell] + rw [dite_eq_left hx] + exact (hW _ _ _ ((polygonAssignment_eq_iff U _ _).mp hy)).mp hcell + change chooseCell (polygonAssignment U x)=d ↔ x ∈ (W d).val + constructor + · intro he; exact he ▸ hactual + · intro hxW + by_contra hn + exact Set.disjoint_left.mp (hd hn) hactual hxW + +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + {J κ : Type*} [Finite κ] {η : J → Type*} [∀ i, Finite (η i)] + +theorem independent_formal_partition (hlarge : 15 < m+1) + (P : (i : J) → η i → Fin 5 × (CutRing × CutRing)) + (T : ∀ i, FormalStarTable (A.starFamily hlarge (P i))) + (Q : κ → Fin 5 × (CutRing × CutRing)) + (v : (i : J) → κ → η i) (he : ∀ i, P i ∘ v i=Q) + (hQ : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb Q) + (W : D → polygonAlgebra a) (d₀ : D) + (hW : ∀ d, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) Q j).val) (W d).val) + (hd : Pairwise fun d e => Disjoint (W d).val (W e).val) + (hc : ∀ x : GenericSquare a, ∃ d, x ∈ (W d).val) : + ∃ C : (i : J) → D → Set (η i → Bool), + (∀ i, Pairwise fun d e => Disjoint (C i d) (C i e)) ∧ + (∀ i σ, ∃ d, σ ∈ C i d) ∧ + (∀ i d, (T i).sector (C i d)=B.fullGeometricSector hlarge Q hQ (W d)) ∧ + (∀ i d, (T i).sector (C i d)ᶜ=B.fullGeometricSector hlarge Q hQ (W d)ᶜ) := by + classical + obtain ⟨U,hUd,hUc,hU⟩ := polygon_partition_formal_extension + (primitiveTests (a := a) (r := r) Q) W d₀ hW hd hc + let C : (i : J) → D → Set (η i → Bool) := fun i d => + (fun σ : η i → Bool => σ ∘ v i) ⁻¹' U d + refine ⟨C,?_,?_,?_,?_⟩ + · intro i d e hde + apply Set.disjoint_left.mpr + intro σ hσ hτ + exact Set.disjoint_left.mp (hUd hde) hσ hτ + · intro i σ + exact hUc (σ ∘ v i) + · intro i d + have h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P i ∘ v i) := by rw [he i]; exact hQ + have hWd : ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (P i ∘ v i) j).val) (W d).val := by + rw [he i]; exact hW d + have hUd' : ∀ x, polygonAssignment (primitiveTests (a := a) (r := r) (P i ∘ v i)) x ∈ U d ↔ x ∈ (W d).val := by + rw [he i]; exact hU d + have hh := A.formalSector_subfamily_eq hlarge (P i) (T i) (v i) h (U d) (W d) hWd hUd' + simpa only [C,he i] using hh + · intro i d + have h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P i ∘ v i) := by rw [he i]; exact hQ + have hWd : ResolvedBy (fun j => (primitiveTests (a := a) (r := r) (P i ∘ v i) j).val) ((W d)ᶜ).val := by + rw [he i] + intro x y hxy + exact not_congr (hW d x y hxy) + have hUd' : ∀ x, polygonAssignment (primitiveTests (a := a) (r := r) (P i ∘ v i)) x ∈ (U d)ᶜ ↔ x ∈ ((W d)ᶜ).val := by + rw [he i] + intro x + exact not_congr (hU d x) + have hh := A.formalSector_subfamily_eq hlarge (P i) (T i) (v i) h (U d)ᶜ (W d)ᶜ hWd hUd' + simpa only [C,he i,Set.preimage_compl] using hh + +end InitialCoverSystem.PatchAtlas +end ActualFormalPartitions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallFamilyGlobal.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallFamilyGlobal.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3eef9c51c0710a76a53f8242f370edcac50d3bd --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallFamilyGlobal.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.LocalAtomComparison +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SmallFamilyWords + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SmallFamilyGlobal + +variable {D H Q T : Type*} [Group D] [Group H] [Group Q] [Group T] + +theorem centralOn_range_iff_hasCentralLaw (q : H →* Q) (e : D →* H) + (v : D →* T) (ρ : T →* Q) (hρ : Function.Injective ρ) + (he : q.comp e = ρ.comp v) : + CentralOn q e.range ↔ HasCentralLaw v e.rangeRestrict := by + have hk (w : D) : q (e w) = 1 ↔ v w = 1 := by + have hh := DFunLike.congr_fun he w + change q (e w) = ρ (v w) at hh + rw [hh,← map_one ρ] + exact hρ.eq_iff + rw [hasCentralLaw_iff] + constructor + · intro h w hw + exact h ((hk w).mpr hw) + · intro h x hx + obtain ⟨w,hw⟩ := x.property + have hx' : q (e w) = 1 := by + change q x.val = 1 at hx + simpa only [hw] using hx + have ht := h w ((hk w).mp hx') + have heq : e.rangeRestrict w = x := Subtype.ext hw + rwa [heq] at ht + +variable {α ι Ω : Type*} [Fintype α] [DecidableEq α] [Finite ι] [Finite Ω] + +theorem smallFamily_centralOn + (U : ι → Set Ω) (hsep : ∀ ω ν, (∀ i, ω ∈ U i ↔ ν ∈ U i) → ω = ν) + (F : (I : FiveAlphabet α) → Option ι → alternatingGroup I.val →* H) + (q : H →* Q) (ρ : (Ω → alternatingGroup α) →* Q) (hρ : Function.Injective ρ) + (hproj : ∀ I i, q.comp (F I i) = + ρ.comp ((maskFamily U i).comp (subtypeAlternatingHom I.val))) + (K : Finset α → Subgroup H) + (hlaw : ∀ S, S.card ≤ 15 → CentralOn q (K S)) + (hcontain : ∀ S, S.card ≤ 15 → ∀ I, I.val ⊆ S → ∀ i, (F I i).range ≤ K S) + (hα : 5 ≤ Fintype.card α) : CentralOn q (smallFamilyEval F).range := by + classical + let e := smallFamilyEval F + let v := smallFamilyModel (α := α) U + have he : q.comp e = ρ.comp v := by + apply FreeGroup.ext_hom + rintro ⟨I,i,s⟩ + simpa only [e,v,MonoidHom.comp_apply,smallFamilyModel,smallFamilyEval_of] using + DFunLike.congr_fun (hproj I i) s + apply (centralOn_range_iff_hasCentralLaw q e v ρ hρ he).mpr + let : Group.IsPerfect e.range := smallFamilyEval_perfect F + obtain ⟨E,_hEsub,hE⟩ := Finset.exists_subset_card_eq (show 5 ≤ (Finset.univ : Finset α).card by simpa using hα) + obtain ⟨x,hx⟩ := Finset.card_pos.mp (show 0 < E.card by omega) + obtain ⟨y,hy,hyx⟩ := Finset.exists_mem_ne (show 1 < E.card by omega) x + let a : SwapLabel α := ⟨Equiv.swap x y,x,y,Ne.symm hyx,rfl⟩ + have ha : a.val.support ⊆ E := by + change (Equiv.swap x y).support ⊆ E + rw [Equiv.Perm.support_swap (Ne.symm hyx)] + exact Finset.insert_subset_iff.mpr ⟨hx,Finset.singleton_subset_iff.mpr hy⟩ + refine small_support_assignment_law (smallFamilyLocal (ι := ι)) smallFamilyLocal_mono + v e.rangeRestrict e.rangeRestrict_surjective smallFamilyLocal_generate + (smallFamilyModel_support U) ?_ E hE a ha ?_ + · intro S hS d hd hv z hz + apply Commute.of_map (f := e.range.subtype) Subtype.val_injective + have hle := smallFamilyLocal_map_le F S (K S) (hcontain S hS) + apply (centralOn_iff q (K S)).mp (hlaw S hS) (e d) (hle ⟨d,hd,rfl⟩) + · have hh := DFunLike.congr_fun he d + change q (e d) = ρ (v d) at hh + rw [hh,hv,map_one] + · exact hle ⟨z,hz,rfl⟩ + · intro S hS _ g hg + exact smallFamilyModel_complete U hsep S hS g hg + +end SmallFamilyGlobal + +section GlobalPrimitiveTable + +theorem exists_alphabet_balance {α : Type*} [Fintype α] [DecidableEq α] + (S : Finset α) (hS : S.card < Fintype.card α) : ∃ b, b ∉ S := by + classical + by_contra h + push Not at h + have he : S = Finset.univ := Finset.eq_univ_iff_forall.mpr h + rw [he,Finset.card_univ] at hS + exact (lt_irrefl _ hS) + +noncomputable def smallAlphabetBalance {m : ℕ} (hlarge : 15 < m+1) + (S : Finset (Fin (m+1))) (hS : S.card ≤ 15) : Fin (m+1) := + (exists_alphabet_balance S (by simpa using lt_of_le_of_lt hS hlarge)).choose + +theorem smallAlphabetBalance_notMem {m : ℕ} (hlarge : 15 < m+1) + (S : Finset (Fin (m+1))) (hS : S.card ≤ 15) : + smallAlphabetBalance hlarge S hS ∉ S := + (exists_alphabet_balance S (by simpa using lt_of_le_of_lt hS hlarge)).choose_spec + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι : Type*} [Finite ι] + +noncomputable def smallPrimitiveInputs (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (I : FiveAlphabet (Fin (m+1))) : + Option ι → alternatingGroup I.val →* BoundedRelationCover M (alternatingGenerator a r m hm) := + B.primitiveFamily I.val (smallAlphabetBalance hlarge I.val (by rw [I.property.2]; omega)) + (smallAlphabetBalance_notMem hlarge I.val (by rw [I.property.2]; omega)) P + +noncomputable def smallPrimitiveCarrier (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) (S : Finset (Fin (m+1))) : + Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm)) := + if hS : S.card ≤ 15 then + (copyFamilyEval (B.primitiveFamily S (smallAlphabetBalance hlarge S hS) + (smallAlphabetBalance_notMem hlarge S hS) P)).range + else ⊥ + +theorem smallPrimitiveInputs_projection (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) (I : FiveAlphabet (Fin (m+1))) (i : Option ι) : + (coverMap M (alternatingGenerator a r m hm)).comp (B.smallPrimitiveInputs hlarge P I i) = + (actualPolygonTableHom (primitiveTests (a := a) (r := r) P)).comp + ((maskFamily (actualTestMask (primitiveTests (a := a) (r := r) P)) i).comp + (subtypeAlternatingHom I.val)) := by + rw [smallPrimitiveInputs,B.primitiveFamily_projection] + have he := actualAlphabetTableHom_masks I.val (primitiveTests (a := a) (r := r) P) i + change ((actualPolygonTableHom _).comp (alphabetAssignment I.val)).comp _ = _ at he + rw [MonoidHom.comp_assoc,alphabetAssignment_mask] at he + exact he.symm + +omit [Finite ι] in +theorem smallPrimitiveInputs_local (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) (S : Finset (Fin (m+1))) (hS : S.card ≤ 15) + (I : FiveAlphabet (Fin (m+1))) (hIS : I.val ⊆ S) (i : Option ι) : + (B.smallPrimitiveInputs hlarge P I i).range ≤ B.smallPrimitiveCarrier hlarge P S := by + rw [smallPrimitiveCarrier,dite_eq_left hS] + rintro x ⟨s,rfl⟩ + rw [copyFamilyEval_range] + apply le_iSup (fun j => (B.primitiveFamily S (smallAlphabetBalance hlarge S hS) + (smallAlphabetBalance_notMem hlarge S hS) P j).range) i + refine ⟨subalphabetHom hIS s,?_⟩ + exact DFunLike.congr_fun (B.primitiveFamily_inclusion hIS _ _ _ _ P i) s + +theorem fullPrimitiveFamily_central (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) : + CentralOn (coverMap M (alternatingGenerator a r m hm)) + (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + apply smallFamily_centralOn (actualTestMask (primitiveTests (a := a) (r := r) P)) + (actualTestMask_separates _) (B.smallPrimitiveInputs hlarge P) _ + (actualPolygonTableHom _) (actualPolygonTableHom_injective _) + (B.smallPrimitiveInputs_projection hlarge P) (B.smallPrimitiveCarrier hlarge P) ?_ + (B.smallPrimitiveInputs_local hlarge P) (by simpa using (by omega : 5 ≤ m+1)) + intro S hS + rw [smallPrimitiveCarrier,dite_eq_left hS] + exact h S hS _ _ + +end InitialCoverSystem +end GlobalPrimitiveTable + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallFormalGlobal.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallFormalGlobal.lean new file mode 100644 index 0000000000000000000000000000000000000000..6263eeef34cb02d54966d48b9d70a49e60be4c65 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallFormalGlobal.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.LocalAtomComparison +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FullAlphabetGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SmallFormalGlobal +variable {α ι Ω H : Type*} [Fintype α] [DecidableEq α] [Finite ι] [Finite Ω] [Group H] + +theorem smallFamily_assignment_law + (U : ι → Set Ω) (hsep : ∀ ω ν, (∀ i, ω ∈ U i ↔ ν ∈ U i) → ω=ν) + (F : (I : FiveAlphabet α) → Option ι → alternatingGroup I.val →* H) + (hlaw : ∀ S : Finset α, S.card≤15 → ∀ w ∈ smallFamilyLocal (ι := ι) S, + smallFamilyModel U w=1 → ∀ v ∈ smallFamilyLocal (ι := ι) S, + Commute (smallFamilyEval F w) (smallFamilyEval F v)) + (hα : 5≤Fintype.card α) : + HasCentralLaw (smallFamilyModel U) (smallFamilyEval F).rangeRestrict := by + classical + let e := smallFamilyEval F + let v := smallFamilyModel (α := α) U + let : Group.IsPerfect e.range := smallFamilyEval_perfect F + obtain ⟨E,_hEsub,hE⟩ := Finset.exists_subset_card_eq + (show 5≤(Finset.univ : Finset α).card by simpa using hα) + obtain ⟨x,hx⟩ := Finset.card_pos.mp (show 0 {σ : ι → Bool | σ i=true}) w=1 → + ∀ v ∈ smallFamilyLocal (ι := ι) S, + Commute (smallFamilyEval F w) (smallFamilyEval F v)) + (hα : 5≤Fintype.card α) : + ∃ φ : ((ι → Bool) → alternatingGroup α) →* + ((smallFamilyEval F).range ⧸ Subgroup.center (smallFamilyEval F).range), + Function.Surjective φ ∧ + φ.comp (smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true})) = + (QuotientGroup.mk' _).comp (smallFamilyEval F).rangeRestrict := by + classical + have hs : ∀ σ τ : ι → Bool, + (∀ i, σ ∈ {σ : ι → Bool | σ i=true} ↔ τ ∈ {σ : ι → Bool | σ i=true}) → σ=τ := by + intro σ τ h + funext i + exact Bool.eq_iff_iff.mpr (h i) + have h := smallFamily_assignment_law _ hs F hlaw hα + obtain ⟨φ,hφ⟩ := (hasCentralLaw_iff_modelMap _ _ + (smallFamilyModel_surjective _ hs hα)).mp h + exact ⟨φ,centralLaw_modelMap_surjective _ _ (smallFamilyEval F).rangeRestrict_surjective φ hφ,hφ⟩ + +end SmallFormalGlobal + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallSectorGeneration.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallSectorGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3c1e260315da44b8deb3550e20d35b34d39df31 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallSectorGeneration.lean @@ -0,0 +1,76 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.WindowIntervals + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SmallSectorGeneration + +variable {α : Type*} [Fintype α] [DecidableEq α] + +abbrev FiveSubalphabet (J : Finset α) := {I : Finset α // I ⊆ J ∧ I.card = 5} + +instance fiveSubalphabet_perfect (J : Finset α) (I : FiveSubalphabet J) : + Group.IsPerfect (alternatingGroup I.val) := alphabetPerfect I.val (by rw [I.property.2]) + +theorem subalphabet_five_generate (J : Finset α) (hJ : 5 ≤ J.card) : + (⨆ I : FiveSubalphabet J, (subalphabetHom I.property.1).range) = ⊤ := by + apply top_unique + rw [← alternatingGroup.closure_isThreeCycles_eq_top] + apply (Subgroup.closure_le _).mpr + intro g hg + let σ := subtypeAlternatingHom J g + have hs : σ.val.support ⊆ J := (subtypeAlternatingHom_mem_range J σ).mp ⟨g,rfl⟩ + have hc : σ.val.support.card = 3 := by + change (Equiv.Perm.ofSubtype g.val).support.card = 3 + have hF : (Subtype.fintype (fun x : α => x ∈ J)) = (inferInstance : Fintype J) := Subsingleton.elim _ _ + rw [Equiv.Perm.support_ofSubtype,Finset.card_map,hF,hg.card_support] + obtain ⟨I,hSI,hIJ,hI⟩ := Finset.exists_subsuperset_card_eq hs (by omega : σ.val.support.card ≤ 5) hJ + obtain ⟨t,ht⟩ := (subtypeAlternatingHom_mem_range I σ).mpr hSI + apply le_iSup (fun I : FiveSubalphabet J => (subalphabetHom I.property.1).range) ⟨I,hIJ,hI⟩ + refine ⟨t,?_⟩ + apply subtypeAlternatingHom_injective J + exact (DFunLike.congr_fun (subtypeAlternatingHom_comp hIJ) t).trans ht + +theorem universal_subalphabet_five_generate (J : Finset α) (hJ : 5 ≤ J.card) + [Group.IsPerfect (alternatingGroup J)] : + (⨆ I : FiveSubalphabet J, (universalMap (subalphabetHom I.property.1)).range) = ⊤ := + universal_generating_ranges (fun I : FiveSubalphabet J => subalphabetHom I.property.1) + (subalphabet_five_generate J hJ) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι : Type*} [Finite ι] + +theorem geometricSector_five_generate + (J : Finset (Fin (m+1))) (hJ : 5 ≤ J.card) [Group.IsPerfect (alternatingGroup J)] + (b : Fin (m+1)) (hb : b ∉ J) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : B.PrimitiveFamilyLaw J b hb P) + (g : ∀ I : FiveSubalphabet J, B.PrimitiveFamilyLaw I.val b + (fun hi => hb (I.property.1 hi)) P) + (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val) : + (B.geometricSector J b hb P h V).range = + ⨆ I : FiveSubalphabet J, (B.geometricSector I.val b + (fun hi => hb (I.property.1 hi)) P (g I) V).range := by + rw [MonoidHom.range_eq_map,← universal_subalphabet_five_generate J hJ,Subgroup.map_iSup] + apply iSup_congr + intro I + rw [← MonoidHom.range_comp] + congr 1 + exact B.geometricSector_inclusion I.property.1 b b (fun hi => hb (I.property.1 hi)) hb + P (g I) h V hV + +end InitialCoverSystem +end SmallSectorGeneration + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallStarRelators.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallStarRelators.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ca9c404c6428fda678c21f8bfcae371261a1be1 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/SmallStarRelators.lean @@ -0,0 +1,162 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.TemplateFormalRelators + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SmallStarRelators +variable {α ι Ω H Q : Type*} [Fintype α] [DecidableEq α] [Group H] [Group Q] + [Group.IsPerfect (alternatingGroup α)] + +noncomputable def alphabetStarLift (I : FiveAlphabet α) (s : alternatingGroup I.val) : + TrackStar α := universalMap (subtypeAlternatingHom I.val) + (Classical.choose (universalProjection_surjective (alternatingGroup I.val) s)) + +@[simp] theorem alphabetStarLift_projection (I : FiveAlphabet α) (s : alternatingGroup I.val) : + universalProjection (alternatingGroup α) (alphabetStarLift I s)=subtypeAlternatingHom I.val s := by + have h := DFunLike.congr_fun (universalMap_spec (subtypeAlternatingHom I.val)) + (Classical.choose (universalProjection_surjective (alternatingGroup I.val) s)) + simpa only [MonoidHom.comp_apply,alphabetStarLift, + Classical.choose_spec (universalProjection_surjective (alternatingGroup I.val) s)] using h + +noncomputable def smallFamilyStarWord : SmallFamilyWord α ι →* + FreeGroup (Option ι × TrackStar α) := + FreeGroup.lift (fun l => FreeGroup.of (l.2.1,alphabetStarLift l.1 l.2.2)) + +theorem smallFamilyStarWord_model : + (formalAssignmentEval (ι := ι) (universalProjection (alternatingGroup α))).comp + smallFamilyStarWord = + smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true}) := by + apply FreeGroup.ext_hom + rintro ⟨I,i,s⟩ + change formalAssignmentEval (universalProjection (alternatingGroup α)) + (FreeGroup.of (i,alphabetStarLift I s)) = _ + ext σ + cases i with + | none => simp [formalAssignmentEval,assignmentEval,copySourceMap,maskFamily,sectorMask,smallFamilyModel] + | some i => + cases hi : σ i <;> + simp [formalAssignmentEval,assignmentEval,copySourceMap,maskFamily,sectorMask,smallFamilyModel,hi] + +theorem smallFamilyStarWord_eval (F : Option ι → TrackStar α →* H) + (f : (I : FiveAlphabet α) → Option ι → alternatingGroup I.val →* H) + (hspec : ∀ I i, (F i).comp (universalMap (subtypeAlternatingHom I.val))= + (f I i).comp (universalProjection (alternatingGroup I.val))) : + (copyFamilyEval F).comp smallFamilyStarWord=smallFamilyEval f := by + apply FreeGroup.ext_hom + rintro ⟨I,i,s⟩ + have h := DFunLike.congr_fun (hspec I i) + (Classical.choose (universalProjection_surjective (alternatingGroup I.val) s)) + simpa only [MonoidHom.comp_apply,smallFamilyStarWord,FreeGroup.lift_apply_of, + copyFamilyEval_of,smallFamilyEval_of,alphabetStarLift, + Classical.choose_spec (universalProjection_surjective (alternatingGroup I.val) s)] using h + +theorem smallFamilyStarWord_supported + (L : Finset α → Subgroup H) (hmono : Monotone L) + (F : Option ι → TrackStar α →* H) (hF : ∀ i, SmallSupported L (F i)) + (S : Finset α) (w : SmallFamilyWord α ι) (hw : w ∈ smallFamilyLocal S) : + copyFamilyEval F (smallFamilyStarWord w) ∈ L S := by + have hle : smallFamilyLocal (ι := ι) S ≤ (L S).comap + ((copyFamilyEval F).comp smallFamilyStarWord) := by + apply (Subgroup.closure_le _).mpr + rintro x ⟨⟨I,i,s⟩,hI,rfl⟩ + let J : ControlAlphabet α := ⟨I.val,by have hi := I.property.2; omega, + by have hi := I.property.2; omega⟩ + apply hmono hI + apply hF i J + refine ⟨Classical.choose (universalProjection_surjective (alternatingGroup I.val) s),?_⟩ + simp [smallFamilyStarWord,alphabetStarLift,J] + exact hle hw + +theorem template_supported_word_controls + (L : Finset α → Subgroup H) (hmono : Monotone L) (c : alternatingGroup α →* H) + (hc : ∀ σ I, ∀ x ∈ L I, c σ*x*(c σ)⁻¹ ∈ L (I.map σ.val.toEmbedding)) + (hd : ∀ I J, Disjoint I J → ∀ x ∈ L I, ∀ y ∈ L J, Commute x y) + {q : H →* Q} {v : (Ω → alternatingGroup α) →* Q} (T : ActualLawfulTable q v) + (U : ι → Set Ω) (V : Set Ω) + (hT : ∀ i : Option ι, SmallSupported L (T.sector (templateSides U V i))) + (f : TrackStar α →* H) (hf : SmallSupported L f) + (hcontrol : SmallControlled c f (T.sector V)) + (S : Finset α) (hS : S.card+10 ≤ Fintype.card α) + (w : SmallFamilyWord α ι) (hw : w ∈ smallFamilyLocal S) + (hrel : smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true}) w=1) : + ∀ x ∈ f.range, Commute + (copyFamilyEval (fun i => T.sector (templateSides U V i)) (smallFamilyStarWord w)) x := by + have hm : formalAssignmentEval (universalProjection (alternatingGroup α)) + (smallFamilyStarWord w)=1 := by + have h := DFunLike.congr_fun (smallFamilyStarWord_model (α := α) (ι := ι)) w + exact h.trans hrel + have hz := T.template_relator_central U V _ hm + exact small_control_transfer L c hc hd f (T.sector V) hf hcontrol S _ + (smallFamilyStarWord_supported L hmono _ hT S w hw) hS + (fun J s => show Commute _ (T.sector V (universalMap (subtypeAlternatingHom J.val) s)) from + (hz _ (T.sector_mem _ _)).symm) + +end SmallStarRelators + +section CellConstantActions +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι : Type*} [Finite ι] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem cell_constant_action (hlarge : 20 ≤ m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (U W : polygonAlgebra a) + (hU : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) U.val) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) W.val) + (b : Bool) (he : U ⊓ W = if b then W else ⊥) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.fullGeometricSector (by omega) P h W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) : + ∀ x ∈ f.range, + B.fullGeometricSector (by omega) P h U (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) P h U (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + (if b then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)*x* + (if b then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)⁻¹ := by + have hspec := DFunLike.congr_fun (universalMap_spec (subtypeAlternatingHom I.val)) s + simp only [MonoidHom.comp_apply] at hspec + cases b with + | false => + have hh := B.chart_action_transfer hlarge P h U ⊥ W hU + (fun _ _ _ => Iff.rfl) hW (by simpa using he) f hf hc I s + simpa only [Bool.false_eq_true,↓reduceIte,B.fullGeometricSector_bot,MonoidHom.one_apply] using hh + | true => + have hh := B.chart_action_transfer hlarge P h U (wholePolygon a) W hU + (fun _ _ _ => Iff.rfl) hW (by change U ⊓ W=⊤ ⊓ W; simpa using he) f hf hc I s + simpa only [↓reduceIte,B.fullGeometricSector_whole,MonoidHom.comp_apply,hspec] using hh + +theorem cell_restrict_action (hlarge : 20 ≤ m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (U W : polygonAlgebra a) + (hU : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) U.val) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) W.val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.fullGeometricSector (by omega) P h W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) : + ∀ x ∈ f.range, + B.fullGeometricSector (by omega) P h U (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) P h U (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) P h (U ⊓ W) (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) P h (U ⊓ W) (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + exact B.chart_action_transfer hlarge P h U (U ⊓ W) W hU + (fun x y hh => and_congr (hU x y hh) (hW x y hh)) hW + (by rw [inf_assoc,inf_idem]) f hf hc I s + +end InitialCoverSystem +end CellConstantActions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/StarAtomLaw.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/StarAtomLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..acd2a4fbef9bc0bc1e539fa1101805ca363e71bb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/StarAtomLaw.lean @@ -0,0 +1,169 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ChartControlChain +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.LabelShiftedCharts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section StarAtomLaw + +variable {E H Q Ω : Type*} [Group E] [Group H] [Group Q] + +theorem assignmentProjection_central : + (assignmentProjection (E := E) (Ω := Ω)).ker ≤ + Subgroup.center (Ω → UniversalExtension E) := by + intro x hx + apply Subgroup.mem_center_iff.mpr + intro y + funext ω + have hω : universalProjection E (x ω) = 1 := congrFun (show assignmentProjection x = 1 from hx) ω + exact Subgroup.mem_center_iff.mp (universalProjection_central E hω) (y ω) + +variable [Fintype Ω] + +theorem centralOn_of_star_atoms (q : H →* Q) (v : (Ω → E) →* Q) + (hv : Function.Injective v) (f : Ω → UniversalExtension E →* H) + (hc : Pairwise fun i j => ∀ s t, Commute (f i s) (f j t)) + (hf : ∀ ω, q.comp (f ω) = (v.comp (sectorMask {ω})).comp (universalProjection E)) : + CentralOn q (⨆ ω, (f ω).range) := by + classical + let ρ := MonoidHom.noncommPiCoprod f hc + have hρ : q.comp ρ = v.comp assignmentProjection := by + apply MonoidHom.pi_ext + intro ω s + change q (MonoidHom.noncommPiCoprod f hc (Pi.mulSingle ω s)) = + v (assignmentProjection (Pi.mulSingle ω s)) + rw [MonoidHom.noncommPiCoprod_mulSingle] + rw [show q (f ω s) = v (sectorMask {ω} (universalProjection E s)) from + DFunLike.congr_fun (hf ω) s] + congr 1 + ext ν + by_cases he : ν = ω + · subst ν + simp [assignmentProjection,sectorMask] + · simp [assignmentProjection,sectorMask,he] + rw [← MonoidHom.noncommPiCoprod_range f (hcomm := hc),centralOn_iff] + rintro x ⟨s,rfl⟩ hx y ⟨t,rfl⟩ + have hs : assignmentProjection s = 1 := by + apply hv + have he := DFunLike.congr_fun hρ s + change q (ρ s) = v (assignmentProjection s) at he + rw [← he,hx,map_one] + have hz := assignmentProjection_central (E := E) (Ω := Ω) hs + exact (show Commute s t from (Subgroup.mem_center_iff.mp hz t).symm).map ρ + +end StarAtomLaw + +section ChartOverlapBridge +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem old_rectangle_bridge_to_chart (hlarge : 20 ≤ m+1) + {K δ : ℝ} (hK : 0 ≤ K) (hδ : 0 < δ) + (k : ℕ) (q : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k q u) + (l v : Fin 2 → CutRing) + (hl : ∀ j, q j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < q j+k) + (hv : ∀ j, q j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < q j+k) + (hlen : ∀ j, ordinary (v j)-ordinary (l j) < 1) : + ∃ N : ℕ, 160 ≤ N ∧ ∀ n : ℕ, N ≤ n → ∀ g : B.CoordinateWindowLaw n, + ∀ (s : Fin 2 → ℕ) (hs : ∀ j, s j ≤ n) (p : Fin 2 → ℤ), + ∀ L V : Fin 2 → CutRing, + (∀ j, ordinary (L j) ≤ ordinary (V j)) → + (∀ j, p j ≤ endpointLabel (L j) ∧ endpointLabel (L j) < p j+s j) → + (∀ j, p j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < p j+s j) → + ∀ (d : Fin 2) (e : Fin 5) (z : CutRing × CutRing), + (∀ j, ((pointLabel z j+q j-p j).natAbs:ℝ) ≤ (K+1)*(n:ℝ)) → + (∀ j, ordinary (l j)+ordinary (pointCoordinate z j) ≤ ordinary (L j)-δ) → + (∀ j, ordinary (V j)+δ ≤ ordinary (v j)+ordinary (pointCoordinate z j)) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + (∀ j, SmallControlled B.c f + (B.axisSector (by omega) n g j (s j) (hs j) (p j) (coordinateInterval a j (L j) (V j)))) → + SmallControlled B.c f (B.fullGeometricSector (by omega) + (translatedTemplate (tangentChartTemplate a k q d (signedShortSteps u e)) z) + (h d e z) (spatialTranslate z (coordinateRectangle a l v))) := by + obtain ⟨N,hN,hbridge⟩ := B.old_rectangle_bridge_control hlarge hK hδ + refine ⟨max N (8*k),le_trans hN (le_max_left _ _),?_⟩ + intro n hn g s hs p L V hLV hL hV d e z hpq hlo hup f hf hc + have hnN : N ≤ n := (le_max_left _ _).trans hn + have hkn : k ≤ n/8 := (Nat.le_div_iff_mul_le (by omega : 0 < 8)).mpr (by omega) + rw [B.tangentChartSector_eq_window (by omega) k q u h n (by omega) g d e z l v hl hv, + spatialTranslate_coordinateRectangle] + apply hbridge n hnN g s hs p (fun j => pointLabel z j+q j) hpq L V + (fun j => l j+pointCoordinate z j) (fun j => v j+pointCoordinate z j) hLV + · intro j + simpa only [map_add] using hlo j + · intro j + simpa only [map_add] using hup j + · intro j + simpa only [map_add,add_sub_add_right_eq_sub] using hlen j + · exact hL + · exact hV + · intro j + simp only [endpointLabel_add,pointLabel] + have hh := hl j + omega + · intro j + simp only [endpointLabel_add,pointLabel] + have hh := hv j + omega + · exact hf + · exact hc + +theorem tangent_chart_chain_control (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + {K δ : ℝ} (hK : 0 ≤ K) (hδ : 0 < δ) + (k : ℕ) (q : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k q u) + (l v : Fin 2 → CutRing) + (hl : ∀ j, q j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < q j+k) + (hv : ∀ j, q j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < q j+k) + (hlv : ∀ j, ordinary (l j) ≤ ordinary (v j)) + (hlen : ∀ j, ordinary (v j)-ordinary (l j) < 1) + (hbox : ∀ j, -ordinary r < ordinary (l j) ∧ ordinary (v j) < ordinary r) + (hbox' : ∀ (d : Fin 2) (e : Fin 5) (j : Fin 2), + -ordinary r < ordinary (l j)-ordinary (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) ∧ + ordinary (v j)-ordinary (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) < ordinary r) : + ∃ N : ℕ, 160 ≤ N ∧ ∀ n : ℕ, N ≤ n → ∀ g : B.CoordinateWindowLaw n, + ∀ (s : Fin 2 → ℕ) (hs : ∀ j, s j ≤ n) (p : Fin 2 → ℤ), + ∀ L V : Fin 2 → CutRing, + (∀ j, ordinary (L j) ≤ ordinary (V j)) → + (∀ j, p j ≤ endpointLabel (L j) ∧ endpointLabel (L j) < p j+s j) → + (∀ j, p j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < p j+s j) → + ∀ (d : Fin 2) (T : ℕ) (z : ℕ → CutRing × CutRing) (e : ℕ → Fin 5), + (∀ i, i < T → z (i+1) = z i+tangentOffset a d (signedShortSteps u (e i))) → + (∀ i, i < T → ∀ j, ((pointLabel (z i) j+q j-p j).natAbs:ℝ) ≤ (K+1)*(n:ℝ)) → + (∀ i, i < T → ∀ j, ordinary (l j)+ordinary (pointCoordinate (z i) j) ≤ ordinary (L j)-δ) → + (∀ i, i < T → ∀ j, ordinary (V j)+δ ≤ ordinary (v j)+ordinary (pointCoordinate (z i) j)) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + (∀ j, SmallControlled B.c f + (B.axisSector (by omega) n g j (s j) (hs j) (p j) (coordinateInterval a j (L j) (V j)))) → + SmallControlled B.c f (B.tangentSign (by omega) k q u h d (z 0) true) → + SmallControlled B.c f (B.tangentSign (by omega) k q u h d (z T) true) := by + obtain ⟨N,hN,hbridge⟩ := B.old_rectangle_bridge_to_chart hlarge hK hδ k q u h l v hl hv hlen + refine ⟨N,hN,?_⟩ + intro n hn g s hs p L V hLV hL hV d T z e hz hpq hlo hup f hf hc hstart + apply small_control_action_chain B.c f + (fun i => B.tangentSign (by omega) k q u h d (z i) true) T hstart + intro i hi I t x hx + rw [hz i hi] + exact B.tangentSign_step_action hlarge hr k q u h d (e i) (z i) l v hl hv hlv hlen hbox + (hbox' d (e i)) f hf + (hbridge n hn g s hs p L V hLV hL hV d (e i) (z i) (hpq i hi) (hlo i hi) (hup i hi) f hf hc) + I t x hx + +end InitialCoverSystem +end ChartOverlapBridge + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/StarProjection.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/StarProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..192a15b00dab7ffe99ae0f630532b79ec71c2c85 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/StarProjection.lean @@ -0,0 +1,229 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalCoordinates + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ActualStarProjection +variable {a m : ℕ} {ι : Type*} [Finite ι] + +noncomputable def formalPolygonTable (U : ι → polygonAlgebra a) : + ((ι → Bool) → alternatingGroup (Fin (m+1))) →* polygonAlternatingGroup a (m+1) := + (actualPolygonTableHom U).comp (assignmentPullback (fun ω : Set.range (polygonAssignment U) => ω.val)) + +theorem formalPolygonTable_whole (U : ι → polygonAlgebra a) (s : alternatingGroup (Fin (m+1))) : + formalPolygonTable U (sectorMask Set.univ s) = conditionalAlternatingHom (wholePolygon a) s := by + change actualPolygonTableHom U _ = _ + have he : assignmentPullback (fun ω : Set.range (polygonAssignment U) => ω.val) + (sectorMask Set.univ s) = sectorMask Set.univ s := by + ext ω; simp [assignmentPullback,sectorMask] + rw [he] + exact actualPolygonTableHom_whole U s + +theorem formalPolygonTable_test (U : ι → polygonAlgebra a) (i : ι) (s : alternatingGroup (Fin (m+1))) : + formalPolygonTable U (sectorMask {σ | σ i = true} s) = conditionalAlternatingHom (U i) s := by + change actualPolygonTableHom U _ = _ + have he : assignmentPullback (fun ω : Set.range (polygonAssignment U) => ω.val) + (sectorMask {σ | σ i = true} s) = polygonTableInput U i s := by rfl + rw [he] + exact actualPolygonTableHom_input U i s + +theorem formalPolygonTable_eq_one (U : ι → polygonAlgebra a) + (f : (ι → Bool) → alternatingGroup (Fin (m+1))) (h : formalPolygonTable U f = 1) + (σ : ι → Bool) (hσ : σ ∈ Set.range (polygonAssignment U)) : f σ = 1 := by + have he := actualPolygonTableHom_injective U (h.trans (map_one _).symm) + exact congrFun he ⟨σ,hσ⟩ + +variable {E H : Type*} [Group E] [Group H] + +theorem actualStar_eval_projection (π : E →* alternatingGroup (Fin (m+1))) + (U : ι → polygonAlgebra a) (F : Option ι → E →* H) + (q : H →* polygonAlternatingGroup a (m+1)) + (hq : ∀ j, q.comp (F j) = + (conditionalAlternatingHom (match j with | none => wholePolygon a | some i => U i)).comp π) : + q.comp (copyFamilyEval F) = (formalPolygonTable U).comp (formalAssignmentEval π) := by + apply FreeGroup.ext_hom + rintro ⟨j,s⟩ + simp only [MonoidHom.comp_apply,copyFamilyEval_of,formalAssignmentEval,copySourceMap, + FreeGroup.map.of,assignmentEval] + have he := DFunLike.congr_fun (hq j) s + simp only [MonoidHom.comp_apply] at he + rw [he] + cases j with + | none => exact (formalPolygonTable_whole U (π s)).symm + | some i => exact (formalPolygonTable_test U i (π s)).symm + +end ActualStarProjection + +section PairProjection +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ i j I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (primitivePair P i j)) + +omit [Finite ι] in +theorem pairStar_projection (j : Option ι) : + (coverMap M (alternatingGenerator a r m hm)).comp (B.pairStar hlarge P h j) = + (conditionalAlternatingHom (primitiveFamilyTests (a := a) (r := r) P j)).comp + (universalProjection (alternatingGroup (Fin (m+1)))) := by + cases j with + | none => + change (coverMap _ _).comp (B.c.comp _) = _ + rw [← MonoidHom.comp_assoc,B.c_projection] + rfl + | some i => + exact B.fullGeometricSector_projection hlarge _ _ _ (primitivePair_left_resolved P i i) + +omit [Finite ι] in + +theorem pairStar_subfamily_mem (v : κ → ι) + (hp : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P ∘ v)) + (j : Option κ) (s : TrackStar (Fin (m+1))) : + B.pairStar hlarge P h (j.map v) s ∈ + (smallFamilyEval (B.smallPrimitiveInputs hlarge (P ∘ v))).range := by + cases j with + | none => exact B.constant_range_full hlarge (P ∘ v) ⟨_,rfl⟩ + | some j => + change B.fullGeometricSector hlarge (primitivePair P (v j) (v j)) (h (v j) (v j)) + (primitiveTests (a := a) (r := r) (primitivePair P (v j) (v j)) false) s ∈ _ + rw [B.fullGeometricSector_shared_primitive hlarge (primitivePair P (v j) (v j)) (P ∘ v) + false j rfl _ hp _ (resolved_test _ ())] + exact B.fullGeometricSector_mem hlarge _ hp _ s + +end InitialCoverSystem +end PairProjection + +section PairExclusionLocal +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ i j I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (primitivePair P i j)) + +omit [Finite ι] in +theorem pairStar_subfamily_local (v : κ → ι) + (hp : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P ∘ v)) + (w : FreeGroup (Option κ × TrackStar (Fin (m+1)))) + (hw : ((assignmentPullback (polygonAssignment (primitiveTests (a := a) (r := r) (P ∘ v)))).comp + (formalAssignmentEval (universalProjection (alternatingGroup (Fin (m+1)))))) w = 1) + (s : TrackStar (Fin (m+1))) : + Commute (copyFamilyEval (fun j => B.pairStar hlarge P h (j.map v)) w) + (B.pairStar hlarge P h none s) := by + let U := primitiveTests (a := a) (r := r) (P ∘ v) + let F := fun j : Option κ => B.pairStar hlarge P h (j.map v) + have hproj j : (coverMap M (alternatingGenerator a r m hm)).comp (F j) = + (conditionalAlternatingHom (match j with | none => wholePolygon a | some i => U i)).comp + (universalProjection (alternatingGroup (Fin (m+1)))) := by + rw [show F j = B.pairStar hlarge P h (j.map v) from rfl,B.pairStar_projection] + cases j <;> rfl + have he := DFunLike.congr_fun (actualStar_eval_projection + (universalProjection (alternatingGroup (Fin (m+1)))) U F _ hproj) w + simp only [MonoidHom.comp_apply] at he + have hz : (coverMap M (alternatingGenerator a r m hm)) (copyFamilyEval F w) = 1 := by + rw [he] + change actualPolygonTableHom U _ = 1 + have hz : assignmentPullback (fun ω : Set.range (polygonAssignment U) => ω.val) + (formalAssignmentEval (universalProjection (alternatingGroup (Fin (m+1)))) w) = 1 := by + funext ω + obtain ⟨p,hp⟩ := ω.property + have he := congrFun hw p + change formalAssignmentEval (universalProjection (alternatingGroup (Fin (m+1)))) w + (polygonAssignment U p) = 1 at he + simpa only [assignmentPullback,MonoidHom.coe_mk,OneHom.coe_mk,Function.comp_apply,hp,Pi.one_apply] using he + rw [hz,map_one] + have hm : (copyFamilyEval F).range ≤ (smallFamilyEval (B.smallPrimitiveInputs hlarge (P ∘ v))).range := by + rw [copyFamilyEval_range] + apply iSup_le + rintro j x ⟨t,rfl⟩ + exact B.pairStar_subfamily_mem hlarge P h v hp j t + exact (centralOn_iff _ _).mp (B.fullPrimitiveFamily_central hlarge (P ∘ v) hp) + _ (hm ⟨w,rfl⟩) hz _ (B.constant_range_full hlarge (P ∘ v) ⟨_,rfl⟩) + +end InitialCoverSystem +end PairExclusionLocal + +section PairActualLaw +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ D : Type*} [Fintype ι] [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ i j I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (primitivePair P i j)) + +include h in + +theorem pair_actual_central (h20 : 20 ≤ m+1) (v : D → κ → ι) + (hp : ∀ d I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P ∘ v d)) + (hexclude : ∀ σ : ι → Bool, + σ ∉ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)) → + ∃ d, σ ∘ v d ∉ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) (P ∘ v d)))) : + CentralOn (coverMap M (alternatingGenerator a r m hm)) + (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range := by + classical + let K := (smallFamilyEval (B.smallPrimitiveInputs hlarge P)).range + let : Group.IsPerfect K := smallFamilyEval_perfect _ + let π := universalProjection (alternatingGroup (Fin (m+1))) + let F := B.pairCarrierStar hlarge P h + let c := B.pairCarrierConstant hlarge P + let q := (coverMap M (alternatingGenerator a r m hm)).comp K.subtype + let U := primitiveTests (a := a) (r := r) P + obtain ⟨φ,hφ,hφc,hφi⟩ := B.pair_formal_quotient hlarge P h h20 + have hF : F none = c.comp π := rfl + have hgen : Function.Surjective (copyFamilyEval F) := by + apply MonoidHom.range_eq_top.mp + rw [copyFamilyEval_range] + exact codRestrict_iSup_top _ _ (B.pairStar_mem hlarge P h) (B.pairStar_range hlarge P h) + have hproj j : q.comp (F j) = + (conditionalAlternatingHom (match j with | none => wholePolygon a | some i => U i)).comp π := by + change (coverMap _ _).comp (B.pairStar hlarge P h j) = _ + rw [B.pairStar_projection] + cases j <;> rfl + have heval := actualStar_eval_projection π U F q hproj + apply formal_centralOn_of_exclusions π c F hF φ hφc hφi q + (Set.range (polygonAssignment U)) hgen + · intro w hw σ hσ + have he := DFunLike.congr_fun heval w + simp only [MonoidHom.comp_apply] at he + exact formalPolygonTable_eq_one U _ (he.symm.trans hw) σ hσ + · intro σ hσ + obtain ⟨d,hd⟩ := hexclude σ hσ + apply formal_exclusion_of_subfamily π c F hF φ hφ hφc hφi + (universalProjection_surjective _) (v d) σ + (polygonAssignment (primitiveTests (a := a) (r := r) (P ∘ v d))) hd + intro w hw t + apply Subtype.ext + have he := DFunLike.congr_fun (copyFamilyEval_comp (fun j => F (j.map (v d))) K.subtype) w + change copyFamilyEval (fun j => B.pairStar hlarge P h (j.map (v d))) w = + (copyFamilyEval (fun j => F (j.map (v d))) w).val at he + change (copyFamilyEval (fun j => F (j.map (v d))) w).val * B.pairStar hlarge P h none t = + B.pairStar hlarge P h none t * (copyFamilyEval (fun j => F (j.map (v d))) w).val + rw [← he] + exact (B.pairStar_subfamily_local hlarge P h (v d) (hp d) w hw t).eq + +include hlarge h in + +theorem pair_actual_law (h20 : 20 ≤ m+1) (v : D → κ → ι) + (hp : ∀ d I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb (P ∘ v d)) + (hexclude : ∀ σ : ι → Bool, + σ ∉ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) P)) → + ∃ d, σ ∘ v d ∉ Set.range (polygonAssignment (primitiveTests (a := a) (r := r) (P ∘ v d)))) + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) : B.PrimitiveFamilyLaw I b hb P := + (B.pair_actual_central hlarge P h h20 v hp hexclude).mono + (B.primitiveFamily_range_full_all hlarge P I b hb) + +end InitialCoverSystem +end PairActualLaw + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TangentRectangleCommutation.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TangentRectangleCommutation.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c4783e8f1dfc494c3dd1e695ab6de4c86cb312c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TangentRectangleCommutation.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.Rectangles +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CoverUniformBridges + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section TangentRectangleCommutation +namespace InitialCoverSystem +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem tangent_rectangle_commutation_uniform (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (s u v : CutRing) (hs : 0 < ordinary s) (hsr : ordinary s < ordinary r/2) + (huv : u*v=1) + (hshort : (1+|ordinary (cutTau^a)|)*(|ordinary u|+|ordinary (cutTau*u)|) < ordinary s/4) + {A C D E : ℝ} (hA : 0 ≤ A) (hC : 0 ≤ C) (hD : 0 ≤ D) (hE : 0 ≤ E) : + ∃ N : ℕ, 160 ≤ N ∧ ∀ (M : ℕ) (B : InitialCoverSystem a r m hm M) + (_h : B.TangentChartLaws (symmetricWindowLength s) (symmetricWindowStart s) u), + ∀ n : ℕ, N ≤ n → ∀ g : B.CoordinateWindowLaw n, + ∀ (R S : LabelledRectangle n) (w : CutRing), + |ordinary w| ≤ A/(n:ℝ) → |(endpointLabel w:ℝ)| ≤ C*(n:ℝ) → + ∀ (d : Fin 2) (z : CutRing × CutRing), + (∀ j, |(pointLabel z j+symmetricWindowStart s j-R.start j:ℝ)| ≤ E*(n:ℝ)) → + (∀ j, |ordinary (R.lower j)-ordinary (pointCoordinate z j)| ≤ D/(n:ℝ)) → + (∀ j, |ordinary (R.upper j)-ordinary (pointCoordinate z j)| ≤ D/(n:ℝ)) → + Nonempty (R.ChartFit s z) → Nonempty (S.ChartFit s (z+tangentOffset a d w)) → + (∀ j, ordinary (signQuadrantLower s d true j)+ordinary (pointCoordinate z j) ≤ ordinary (R.lower j)) → + (∀ j, ordinary (R.upper j) ≤ ordinary (signQuadrantUpper s d true j)+ordinary (pointCoordinate z j)) → + (∀ j, ordinary (signQuadrantLower s d false j)+ordinary (pointCoordinate (z+tangentOffset a d w) j) ≤ ordinary (S.lower j)) → + (∀ j, ordinary (S.upper j) ≤ ordinary (signQuadrantUpper s d false j)+ordinary (pointCoordinate (z+tangentOffset a d w) j)) → + ∀ x y, Commute (B.rectangleCopy (by omega) g R x) (B.rectangleCopy (by omega) g S y) := by + obtain ⟨N,hN,htransport⟩ := tangent_transport_uniform_cover_uniform + (a := a) (hm := hm) hlarge hr s u v hs hsr huv hshort hA hC hD hE + refine ⟨N,hN,?_⟩ + intro M B h n hn g R S w hw hw' d z hp hlo hup hfit hfit' hRL hRU hSL hSU + obtain ⟨fit⟩ := hfit + obtain ⟨fit'⟩ := hfit' + have hsr' : ordinary s < ordinary r := by linarith [hr.1] + have hcR := B.rectangleCopy_quadrant_control hlarge hr s u ⟨hs,hsr'⟩ h g R d z true fit hRL hRU + have hcS := B.rectangleCopy_quadrant_control hlarge hr s u ⟨hs,hsr'⟩ h g S d + (z+tangentOffset a d w) false fit' hSL hSU + have hfinal := htransport M B h n hn g R.length R.length_le R.start R.lower R.upper + R.ordered R.lower_label R.upper_label w hw hw' d z hp hlo hup + (B.rectangleCopy (by omega) g R) (B.rectangleCopy_supported (by omega) g R) + (B.rectangleCopy_axes_control (by omega) g R) hcR + exact small_control_disjoint _ B.c B.constant_aligned B.disjoint_aligned + (by simpa using hlarge) _ _ _ _ + (B.rectangleCopy_supported (by omega) g R) (B.rectangleCopy_supported (by omega) g S) + (B.tangentSign_supported (by omega) _ _ u h d (z+tangentOffset a d w) true) + hfinal hcS (B.tangentSign_opposite_commute (by omega) _ _ u h d (z+tangentOffset a d w)) + +end InitialCoverSystem +end TangentRectangleCommutation + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateActualRelators.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateActualRelators.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ddae5ef7854df06781d5ae3b1105ee01f7a7429 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateActualRelators.lean @@ -0,0 +1,158 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.TemplateRelators +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalLaws + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section TemplateActualRelators +variable {E H Q ι Ω : Type*} [Group E] [Group H] [Group Q] [Group.IsPerfect E] +namespace ActualLawfulTable +variable {q : H →* Q} {v : (Ω → E) →* Q} (T : ActualLawfulTable q v) + +theorem template_relator_central_on (U : ι → Set Ω) (V : Set Ω) + (w : FreeGroup (Option ι × UniversalExtension E)) + (hw : ∀ ω ∈ V, formalAssignmentEval (universalProjection E) w (templateAssignment U ω)=1) : + copyFamilyEval (fun j : Option ι => T.sector (templateSides U V j)) w ∈ + Subgroup.centralizer (T.carrier : Set H) := by + let f := copyFamilyEval (fun j : Option ι => T.sector (templateSides U V j)) + have hf : f.range ≤ T.carrier := by + rw [copyFamilyEval_range] + apply iSup_le + rintro i y ⟨s,rfl⟩ + exact T.sector_mem _ _ + have hm : maskedAssignmentPullback (templateAssignment U) V + (formalAssignmentEval (universalProjection E) w)=1 := by + classical + ext ω + change (if ω ∈ V then _ else 1)=1 + split_ifs with hω + · exact hw ω hω + · rfl + have hq : q (f w)=1 := by + have hh := DFunLike.congr_fun (T.template_eval_projection U V) w + simpa only [MonoidHom.comp_apply,hm,map_one] using hh + have hc := T.law (show (⟨f w,hf ⟨w,rfl⟩⟩ : T.carrier) ∈ + (q.comp T.carrier.subtype).ker from hq) + intro x hx + exact congrArg Subtype.val (Subgroup.mem_center_iff.mp hc ⟨x,hx⟩) + +end ActualLawfulTable +end TemplateActualRelators + +section TemplateSupportedActualRelators +variable {α H Q ι Ω : Type*} [Fintype α] [DecidableEq α] [Group H] [Group Q] + [Group.IsPerfect (alternatingGroup α)] + +theorem template_supported_word_controls_on + (L : Finset α → Subgroup H) (hmono : Monotone L) (c : alternatingGroup α →* H) + (hc : ∀ σ I, ∀ x ∈ L I, c σ*x*(c σ)⁻¹ ∈ L (I.map σ.val.toEmbedding)) + (hd : ∀ I J, Disjoint I J → ∀ x ∈ L I, ∀ y ∈ L J, Commute x y) + {q : H →* Q} {v : (Ω → alternatingGroup α) →* Q} (T : ActualLawfulTable q v) + (U : ι → Set Ω) (V : Set Ω) + (hT : ∀ i : Option ι, SmallSupported L (T.sector (templateSides U V i))) + (f : TrackStar α →* H) (hf : SmallSupported L f) + (hcontrol : SmallControlled c f (T.sector V)) + (S : Finset α) (hS : S.card+10 ≤ Fintype.card α) + (w : SmallFamilyWord α ι) (hw : w ∈ smallFamilyLocal S) + (hrel : ∀ ω ∈ V, smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true}) w + (templateAssignment U ω)=1) : + ∀ x ∈ f.range, Commute + (copyFamilyEval (fun i => T.sector (templateSides U V i)) (smallFamilyStarWord w)) x := by + have hm : ∀ ω ∈ V, formalAssignmentEval (universalProjection (alternatingGroup α)) + (smallFamilyStarWord w) (templateAssignment U ω)=1 := by + intro ω hω + have he := DFunLike.congr_fun (smallFamilyStarWord_model (α := α) (ι := ι)) w + exact (congrFun he (templateAssignment U ω)).trans (hrel ω hω) + have hz := T.template_relator_central_on U V _ hm + exact small_control_transfer L c hc hd f (T.sector V) hf hcontrol S _ + (smallFamilyStarWord_supported L hmono _ hT S w hw) hS + (fun J s => show Commute _ (T.sector V (universalMap (subtypeAlternatingHom J.val) s)) from + (hz _ (T.sector_mem _ _)).symm) + +end TemplateSupportedActualRelators + +section ActualTemplateActualWords + +theorem smallActualRelator_at {a : ℕ} {α ι : Type*} [Fintype α] [DecidableEq α] + (R : ι → polygonAlgebra a) (w : SmallFamilyWord α ι) + (hw : smallFamilyModel (actualTestMask R) w=1) + (σ : ι → Bool) (hσ : σ ∈ Set.range (polygonAssignment R)) : + smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true}) w σ=1 := by + rw [smallActualModel_pullback] at hw + exact congrFun hw ⟨σ,hσ⟩ + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem actual_template_actual_word_controls (hlarge : 25 ≤ m+1) + (P : κ → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (U : ι → polygonAlgebra a) (V : polygonAlgebra a) + (hU : ∀ i, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) P j).val) (U i).val) + (hV : ResolvedBy (fun j => (primitiveTests (a := a) (r := r) P j).val) V.val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.fullGeometricSector (by omega) P h V)) + (S : Finset (Fin (m+1))) (hS : S.card ≤ 15) + (w : SmallFamilyWord (Fin (m+1)) ι) (hw : w ∈ smallFamilyLocal S) + (R : ι → polygonAlgebra a) + (hreal : ∀ x ∈ V.val, polygonAssignment U x ∈ Set.range (polygonAssignment R)) + (hrel : smallFamilyModel (actualTestMask R) w=1) : + ∀ x ∈ f.range, Commute + (copyFamilyEval (fun i => B.fullGeometricSector (by omega) P h (marginFamily U V i)) + (smallFamilyStarWord w)) x := by + let masks := fun W : polygonAlgebra a => resolvedPolygonMask + (primitiveTests (a := a) (r := r) P) W.val + have he (i : Option ι) : masks (marginFamily U V i)=templateSides (fun i => masks (U i)) (masks V) i := by + cases i with + | none => rfl + | some i => exact resolvedPolygonMask_inter _ V.val (U i).val hV (hU i) + have hs i : SmallSupported (sourceAlignedGroup a r m hm M B.t) + ((B.fullPrimitiveTable (by omega) P h).sector + (templateSides (fun i => masks (U i)) (masks V) i)) := by + rw [← he i] + apply B.fullGeometricSector_supported + cases i with + | none => exact hV + | some i => exact fun x y hh => and_congr (hV x y hh) (hU i x y hh) + have hm : ∀ ω ∈ masks V, + smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true}) w + (templateAssignment (fun i => masks (U i)) ω)=1 := by + rintro ⟨σ,x,rfl⟩ hx + have hxV := (resolvedPolygonMask_mem _ V.val hV x).mp hx + have he : templateAssignment (fun i => masks (U i)) + ⟨polygonAssignment (primitiveTests (a := a) (r := r) P) x,⟨x,rfl⟩⟩= + polygonAssignment U x := by + funext i + apply decide_eq_decide.mpr + exact resolvedPolygonMask_mem _ (U i).val (hU i) x + rw [he] + exact smallActualRelator_at R w hrel _ (hreal x hxV) + have hh := template_supported_word_controls_on _ (sourceAlignedGroup_mono B.t) + B.c B.constant_aligned B.disjoint_aligned (B.fullPrimitiveTable (by omega) P h) + (fun i => masks (U i)) (masks V) hs f hf hc S (by simp only [Fintype.card_fin]; omega) + w hw hm + have heval : (fun i => B.fullGeometricSector (by omega) P h (marginFamily U V i))= + (fun i => (B.fullPrimitiveTable (by omega) P h).sector + (templateSides (fun i => masks (U i)) (masks V) i)) := by + funext i + exact congrArg ((B.fullPrimitiveTable (by omega) P h).sector) (he i) + rw [heval] + exact hh + +end InitialCoverSystem +end ActualTemplateActualWords + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateFormalRelators.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateFormalRelators.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4d31be4cdb9348671761840c0330aeadac7d436 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateFormalRelators.lean @@ -0,0 +1,163 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PairControl +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CentralRangeReflection + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section TemplateFormalRelators +variable {E H Q Ω ι : Type*} [Group E] [Group H] [Group Q] + +noncomputable def maskedAssignmentPullback (r : Ω → ι → Bool) (V : Set Ω) : + ((ι → Bool) → E) →* (Ω → E) := by + classical + exact { toFun := fun f ω => if ω ∈ V then f (r ω) else 1 + map_one' := by ext ω; simp + map_mul' := by intro f g; ext ω; by_cases h : ω ∈ V <;> simp [h] } + +noncomputable def templateSides (U : ι → Set Ω) (V : Set Ω) : Option ι → Set Ω + | none => V + | some i => V ∩ U i + +noncomputable def templateAssignment (U : ι → Set Ω) (ω : Ω) : ι → Bool := by + classical + exact fun i => decide (ω ∈ U i) + +theorem template_mask_eval (U : ι → Set Ω) (V : Set Ω) : + copyFamilyEval (fun j : Option ι => (sectorMask (templateSides U V j)).comp (universalProjection E)) = + (maskedAssignmentPullback (templateAssignment U) V).comp + (formalAssignmentEval (universalProjection E)) := by + classical + apply FreeGroup.ext_hom + rintro ⟨j,s⟩ + ext ω + cases j with + | none => + simp [copyFamilyEval_of,templateSides,formalAssignmentEval,assignmentEval, + copySourceMap,maskFamily,maskedAssignmentPullback,sectorMask]; rfl + | some i => + by_cases hV : ω ∈ V <;> by_cases hi : ω ∈ U i <;> + simp [copyFamilyEval_of,templateSides,formalAssignmentEval,assignmentEval, + copySourceMap,maskFamily,maskedAssignmentPullback,sectorMask,templateAssignment,hV,hi] + +namespace ActualLawfulTable +variable [Group.IsPerfect E] {q : H →* Q} {v : (Ω → E) →* Q} + (T : ActualLawfulTable q v) + +theorem template_eval_projection (U : ι → Set Ω) (V : Set Ω) : + q.comp (copyFamilyEval (fun j : Option ι => T.sector (templateSides U V j))) = + (v.comp (maskedAssignmentPullback (templateAssignment U) V)).comp + (formalAssignmentEval (universalProjection E)) := by + rw [MonoidHom.comp_assoc,← template_mask_eval] + apply FreeGroup.ext_hom + rintro ⟨j,s⟩ + simp only [MonoidHom.comp_apply,copyFamilyEval_of] + exact T.sector_projection_apply _ _ + +theorem template_relator_central (U : ι → Set Ω) (V : Set Ω) + (w : FreeGroup (Option ι × UniversalExtension E)) + (hw : formalAssignmentEval (universalProjection E) w=1) : + copyFamilyEval (fun j : Option ι => T.sector (templateSides U V j)) w ∈ + Subgroup.centralizer (T.carrier : Set H) := by + let f := copyFamilyEval (fun j : Option ι => T.sector (templateSides U V j)) + have hf : f.range ≤ T.carrier := by + rw [copyFamilyEval_range] + apply iSup_le + rintro i y ⟨s,rfl⟩ + exact T.sector_mem _ _ + have hq : q (f w)=1 := by + have hh := DFunLike.congr_fun (T.template_eval_projection U V) w + simpa only [MonoidHom.comp_apply,hw,map_one] using hh + have hc := T.law (show (⟨f w,hf ⟨w,rfl⟩⟩ : T.carrier) ∈ + (q.comp T.carrier.subtype).ker from hq) + intro x hx + exact congrArg Subtype.val (Subgroup.mem_center_iff.mp hc ⟨x,hx⟩) + +end ActualLawfulTable +end TemplateFormalRelators + +section TemplateControlledRelators +variable {E E' S S' H Ω ι : Type*} [Group E] [Group E'] [Group S] + [Group S'] [Group H] + +theorem copyFamilyEval_comp_source (F : Option ι → E →* H) (ψ : E' →* E) : + (copyFamilyEval F).comp (copySourceMap ψ)=copyFamilyEval (fun i => (F i).comp ψ) := by + apply FreeGroup.ext_hom + rintro ⟨i,x⟩ + simp [copySourceMap] + +theorem formalAssignmentEval_natural (π : E →* S) (π' : E' →* S') + (ψ : E' →* E) (ρ : S' →* S) (hπ : π.comp ψ=ρ.comp π') : + (formalAssignmentEval (ι := ι) π).comp (copySourceMap ψ)= + (assignmentPost ρ).comp (formalAssignmentEval π') := by + classical + apply FreeGroup.ext_hom + rintro ⟨i,x⟩ + ext σ + have hx := DFunLike.congr_fun hπ x + change π (ψ x)=ρ (π' x) at hx + cases i with + | none => + simpa [formalAssignmentEval,copySourceMap,assignmentEval,maskFamily,sectorMask, + assignmentPost] using hx + | some i => + cases hi : σ i <;> + simp [formalAssignmentEval,copySourceMap,assignmentEval,maskFamily,sectorMask, + assignmentPost,hi,hx] + +variable {α Q : Type*} [Fintype α] [DecidableEq α] [Group Q] + [Group.IsPerfect (alternatingGroup α)] + +theorem template_small_relator_controls + (L : Finset α → Subgroup H) (c : alternatingGroup α →* H) + (hc : ∀ σ I, ∀ x ∈ L I, c σ*x*(c σ)⁻¹ ∈ L (I.map σ.val.toEmbedding)) + (hd : ∀ I J, Disjoint I J → ∀ x ∈ L I, ∀ y ∈ L J, Commute x y) + (hα : 20 ≤ Fintype.card α) + {q : H →* Q} {v : (Ω → alternatingGroup α) →* Q} (T : ActualLawfulTable q v) + (U : ι → Set Ω) (V : Set Ω) + (hT : ∀ i : Option ι, SmallSupported L (T.sector (templateSides U V i))) + (f : TrackStar α →* H) (hf : SmallSupported L f) + (hcontrol : SmallControlled c f (T.sector V)) + (I : ControlAlphabet α) (w : FreeGroup (Option ι × UniversalExtension (alternatingGroup I.val))) + (hw : formalAssignmentEval (universalProjection (alternatingGroup I.val)) w=1) : + ∀ x ∈ f.range, Commute + (copyFamilyEval (fun i : Option ι => (T.sector (templateSides U V i)).comp + (universalMap (subtypeAlternatingHom I.val))) w) x := by + let ψ := universalMap (subtypeAlternatingHom I.val) + let F := fun i : Option ι => T.sector (templateSides U V i) + let u := copyFamilyEval (fun i => (F i).comp ψ) w + have hu : u ∈ L I.val := by + have he : (copyFamilyEval (fun i => (F i).comp ψ)).range ≤ L I.val := by + rw [copyFamilyEval_range] + apply iSup_le + intro i + exact hT i I + exact he ⟨w,rfl⟩ + have he : u=copyFamilyEval F (copySourceMap ψ w) := + (DFunLike.congr_fun (copyFamilyEval_comp_source F ψ) w).symm + have hw' : formalAssignmentEval (universalProjection (alternatingGroup α)) + (copySourceMap ψ w)=1 := by + have hh := DFunLike.congr_fun (formalAssignmentEval_natural + (universalProjection (alternatingGroup α)) (universalProjection (alternatingGroup I.val)) + ψ (subtypeAlternatingHom I.val) (universalMap_spec _)) w + simpa only [MonoidHom.comp_apply,hw,map_one] using hh + have hz : u ∈ Subgroup.centralizer (T.carrier : Set H) := by + rw [he] + exact T.template_relator_central U V _ hw' + exact small_control_transfer L c hc hd f (T.sector V) hf hcontrol I.val u hu + (by have hh := I.property.2; omega) + (fun J s => show Commute u (T.sector V (universalMap (subtypeAlternatingHom J.val) s)) from + (hz _ (T.sector_mem _ _)).symm) + +end TemplateControlledRelators + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateRelators.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateRelators.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3e57128a1e3ff79cc902f65687995c8ac8360b8 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TemplateRelators.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.SmallStarRelators + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ActualTemplateRelators + +theorem sourceAlignedGroup_mono {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm)) : + Monotone (sourceAlignedGroup a r m hm M t) := by + intro I J hIJ + apply Subgroup.closure_mono + rintro y ⟨b,hb,u,rfl⟩ + exact ⟨b,hb.trans hIJ,u,rfl⟩ + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +noncomputable def marginFamily (U : ι → polygonAlgebra a) (V : polygonAlgebra a) : + Option ι → polygonAlgebra a + | none => V + | some i => V ⊓ U i + +theorem actual_template_word_controls (hlarge : 25 ≤ m+1) + (P : κ → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (U : ι → polygonAlgebra a) (V : polygonAlgebra a) + (hU : ∀ i, ResolvedBy (fun j => (primitiveTests (a := a) (r := r) P j).val) (U i).val) + (hV : ResolvedBy (fun j => (primitiveTests (a := a) (r := r) P j).val) V.val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.fullGeometricSector (by omega) P h V)) + (S : Finset (Fin (m+1))) (hS : S.card ≤ 15) + (w : SmallFamilyWord (Fin (m+1)) ι) (hw : w ∈ smallFamilyLocal S) + (hrel : smallFamilyModel (fun i : ι => {σ : ι → Bool | σ i=true}) w=1) : + ∀ x ∈ f.range, Commute + (copyFamilyEval (fun i => B.fullGeometricSector (by omega) P h (marginFamily U V i)) + (smallFamilyStarWord w)) x := by + let masks := fun W : polygonAlgebra a => resolvedPolygonMask + (primitiveTests (a := a) (r := r) P) W.val + have he (i : Option ι) : masks (marginFamily U V i)=templateSides (fun i => masks (U i)) (masks V) i := by + cases i with + | none => rfl + | some i => exact resolvedPolygonMask_inter _ V.val (U i).val hV (hU i) + have hs i : SmallSupported (sourceAlignedGroup a r m hm M B.t) + ((B.fullPrimitiveTable (by omega) P h).sector + (templateSides (fun i => masks (U i)) (masks V) i)) := by + rw [← he i] + apply B.fullGeometricSector_supported + cases i with + | none => exact hV + | some i => exact fun x y hh => and_congr (hV x y hh) (hU i x y hh) + have hh := template_supported_word_controls _ (sourceAlignedGroup_mono B.t) + B.c B.constant_aligned B.disjoint_aligned (B.fullPrimitiveTable (by omega) P h) + (fun i => masks (U i)) (masks V) hs f hf hc S (by simp only [Fintype.card_fin]; omega) + w hw hrel + have heval : (fun i => B.fullGeometricSector (by omega) P h (marginFamily U V i))= + (fun i => (B.fullPrimitiveTable (by omega) P h).sector + (templateSides (fun i => masks (U i)) (masks V) i)) := by + funext i + exact congrArg ((B.fullPrimitiveTable (by omega) P h).sector) (he i) + rw [heval] + exact hh + +end InitialCoverSystem +end ActualTemplateRelators + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TranslatedDisjoint.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TranslatedDisjoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..6299184b0217d6007f26bad152e553337f706e23 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/TranslatedDisjoint.lean @@ -0,0 +1,145 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.LiftedTranslationOrbits +import OAI.GroupTheory.SimpleAmenable.Arithmetic.LatticeRange +import OAI.GroupTheory.SimpleAmenable.Configurations.ConditionalTranslationStabilizers + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section TranslatedDisjoint + +theorem generator_commutations_eventually {α G : Type*} [Finite α] [Group G] + (f : α → G) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ i j, Commute (f i) (f j) → + Commute (PresentedGroup.of i : BoundedRelationCover M f) (PresentedGroup.of j) := by + let β := {p : α × α // Commute (f p.1) (f p.2)} + obtain ⟨L,hL⟩ := finite_word_equalities_eventually f + (fun p : β => FreeGroup.of p.val.1 * FreeGroup.of p.val.2) + (fun p : β => FreeGroup.of p.val.2 * FreeGroup.of p.val.1) + (fun p => by simpa only [map_mul,FreeGroup.lift_apply_of] using p.property.eq) + refine ⟨L,fun M hM i j hij => ?_⟩ + have he := hL M hM ⟨(i,j),hij⟩ + change _*_ = _*_ + simpa only [map_mul,PresentedGroup.of] using he + +theorem lifted_common_shift_commute {A G H : Type*} [CommGroup A] [Group G] [Group H] + (q : A →* G) (t : A →* H) (x₁ x₂ : G) (y₁ y₂ : H) + (hc₁ : ∀ k, Commute (q k) x₁ → Commute (t k) y₁) + (hc₂ : ∀ k, Commute (q k) x₂ → Commute (t k) y₂) + (hy : Commute y₁ y₂) (u v w : A) + (hw₁ : q u*x₁*(q u)⁻¹ = q w*x₁*(q w)⁻¹) + (hw₂ : q v*x₂*(q v)⁻¹ = q w*x₂*(q w)⁻¹) : + Commute (t u*y₁*(t u)⁻¹) (t v*y₂*(t v)⁻¹) := by + rw [lifted_translation_orbit_independent q t x₁ y₁ hc₁ u w hw₁, + lifted_translation_orbit_independent q t x₂ y₂ hc₂ v w hw₂] + change _*_ = _*_ + calc + _ = t w*(y₁*y₂)*(t w)⁻¹ := by group + _ = t w*(y₂*y₁)*(t w)⁻¹ := by rw [hy.eq] + _ = _ := by group + +theorem conditionalHom_disjoint_alphabets {a m : ℕ} (U V : polygonAlgebra a) + (σ ρ : Equiv.Perm (Fin m)) (h : Disjoint σ.support ρ.support) : + Commute (conditionalHom U σ) (conditionalHom V ρ) := by + have hh := Equiv.Perm.Disjoint.commute (Equiv.Perm.disjoint_iff_disjoint_support.mpr h) + change _*_ = _*_ + apply Subtype.ext + apply Equiv.ext + intro p + change conditionalPerm U σ (conditionalPerm V ρ p) = + conditionalPerm V ρ (conditionalPerm U σ p) + have hp := DFunLike.congr_fun hh.eq p.1 + simp only [Equiv.Perm.mul_apply] at hp + by_cases hu : p.2 ∈ U.val <;> by_cases hv : p.2 ∈ V.val + all_goals simp [conditionalPerm,hu,hv,hp] + +variable (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + +theorem source_disjoint_common_shift + (σ ρ : Equiv.Perm (Fin (m+1))) (hd : Disjoint σ.support ρ.support) + (hb : σ.support.card + ρ.support.card < m+1) + (U V : polygonAlgebra a) + (u v : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) : + ∃ w, sourceLatticeFullMap a r m hm u * conditionalHom U σ * + (sourceLatticeFullMap a r m hm u)⁻¹ = + sourceLatticeFullMap a r m hm w * conditionalHom U σ * + (sourceLatticeFullMap a r m hm w)⁻¹ ∧ + sourceLatticeFullMap a r m hm v * conditionalHom V ρ * + (sourceLatticeFullMap a r m hm v)⁻¹ = + sourceLatticeFullMap a r m hm w * conditionalHom V ρ * + (sourceLatticeFullMap a r m hm w)⁻¹ := by + classical + obtain ⟨d,hu⟩ := sourceLatticeFullMap_translation a r m hm u + obtain ⟨e,hv⟩ := sourceLatticeFullMap_translation a r m hm v + have hcard : (σ.support ∪ ρ.support).card < (Finset.univ : Finset (Fin (m+1))).card := by + simpa only [Finset.card_univ,Fintype.card_fin] using + lt_of_le_of_lt (Finset.card_union_le _ _) hb + obtain ⟨b,_,hbi⟩ := Finset.exists_mem_notMem_of_card_lt_card hcard + let z : Fin (m+1) → CutRing × CutRing := fun i => if i ∈ σ.support then d i else e i + obtain ⟨w,f,hw,hf⟩ := sourceLatticeFullMap_prescribed a r m hm + (σ.support ∪ ρ.support) b hbi z + refine ⟨w,?_,?_⟩ + · rw [hu,hw] + apply conditional_conjugation_support + intro i hi + have hi' : i ∈ σ.support := Equiv.Perm.mem_support.mpr hi + rw [hf i (Finset.mem_union_left _ hi')] + simp only [z,ite_eq_left hi'] + · rw [hv,hw] + apply conditional_conjugation_support + intro i hi + have hi' : i ∈ ρ.support := Equiv.Perm.mem_support.mpr hi + have hin : i ∉ σ.support := fun h => Finset.disjoint_left.mp hd h hi' + rw [hf i (Finset.mem_union_right _ hi')] + simp only [z,ite_eq_right hin] + +theorem source_translated_disjoint_eventually (hm' : 10 < m+1) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → + ∃ t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm), + (∀ i, t (Multiplicative.ofAdd (FreeAbelianGroup.of i)) = PresentedGroup.of (Sum.inr i)) ∧ + (coverMap M (alternatingGenerator a r m hm)).comp t = sourceLatticeMap a r m hm ∧ + ∀ (j k : Fin 5) + (σ ρ : {σ : Equiv.Perm (Fin (m+1)) // + σ ∈ alternatingGroup (Fin (m+1)) ∧ σ.support.card ≤ 5}), + Disjoint σ.val.support ρ.val.support → ∀ u v, + Commute (t u * PresentedGroup.of (Sum.inl (j,σ)) * (t u)⁻¹) + (t v * PresentedGroup.of (Sum.inl (k,ρ)) * (t v)⁻¹) := by + obtain ⟨L₁,hL₁⟩ := source_centralizing_translation_lifts_eventually a r m hm + obtain ⟨L₂,hL₂⟩ := generator_commutations_eventually (alternatingGenerator a r m hm) + refine ⟨max L₁ L₂,fun M hM => ?_⟩ + obtain ⟨t,ht,htq,hc⟩ := hL₁ M (le_trans (le_max_left _ _) hM) + refine ⟨t,ht,htq,?_⟩ + intro j k σ ρ hd u v + have hy : Commute (PresentedGroup.of (Sum.inl (j,σ)) : + BoundedRelationCover M (alternatingGenerator a r m hm)) + (PresentedGroup.of (Sum.inl (k,ρ))) := by + apply hL₂ M (le_trans (le_max_right _ _) hM) + change _*_ = _*_ + apply Subtype.ext + exact (conditionalHom_disjoint_alphabets (initialTest a r j) + (initialTest a r k) σ.val ρ.val hd).eq + obtain ⟨w,hw₁,hw₂⟩ := source_disjoint_common_shift a r m hm σ.val ρ.val hd + (by have hσ := σ.property.2; have hρ := ρ.property.2; omega) + (initialTest a r j) (initialTest a r k) u v + apply lifted_common_shift_commute (sourceLatticeMap a r m hm) t + (alternatingGenerator a r m hm (Sum.inl (j,σ))) + (alternatingGenerator a r m hm (Sum.inl (k,ρ))) _ _ + (hc (Sum.inl (j,σ))) (hc (Sum.inl (k,ρ))) hy u v w + · apply Subtype.ext + exact hw₁ + · apply Subtype.ext + exact hw₂ + +end TranslatedDisjoint + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/UniformTangentTransport.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/UniformTangentTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..4970a44332a65f706b32b6f24a204409f6710aca --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/UniformTangentTransport.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.StarAtomLaw +import OAI.GroupTheory.SimpleAmenable.Configurations.SymmetricCharts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section UniformTangentTransport +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem tangent_transport_uniform (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (s u v : CutRing) (hs : 0 < ordinary s) (hsr : ordinary s < ordinary r/2) + (huv : u*v=1) + (hshort : (1+|ordinary (cutTau^a)|)*(|ordinary u|+|ordinary (cutTau*u)|) < ordinary s/4) + (h : B.TangentChartLaws (symmetricWindowLength s) (symmetricWindowStart s) u) + {A C D E : ℝ} (hA : 0 ≤ A) (hC : 0 ≤ C) (hD : 0 ≤ D) (hE : 0 ≤ E) : + ∃ N : ℕ, 160 ≤ N ∧ ∀ n : ℕ, N ≤ n → ∀ g : B.CoordinateWindowLaw n, + ∀ (t : Fin 2 → ℕ) (ht : ∀ j, t j ≤ n) (p : Fin 2 → ℤ) (L V : Fin 2 → CutRing), + (∀ j, ordinary (L j) ≤ ordinary (V j)) → + (∀ j, p j ≤ endpointLabel (L j) ∧ endpointLabel (L j) < p j+t j) → + (∀ j, p j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < p j+t j) → + ∀ w : CutRing, |ordinary w| ≤ A/(n:ℝ) → |(endpointLabel w:ℝ)| ≤ C*(n:ℝ) → + ∀ (d : Fin 2) (z₀ : CutRing × CutRing), + (∀ j, |(pointLabel z₀ j+symmetricWindowStart s j-p j:ℝ)| ≤ E*(n:ℝ)) → + (∀ j, |ordinary (L j)-ordinary (pointCoordinate z₀ j)| ≤ D/(n:ℝ)) → + (∀ j, |ordinary (V j)-ordinary (pointCoordinate z₀ j)| ≤ D/(n:ℝ)) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + (∀ j, SmallControlled B.c f + (B.axisSector (by omega) n g j (t j) (ht j) (p j) (coordinateInterval a j (L j) (V j)))) → + SmallControlled B.c f (B.tangentSign (by omega) (symmetricWindowLength s) + (symmetricWindowStart s) u h d z₀ true) → + SmallControlled B.c f (B.tangentSign (by omega) (symmetricWindowLength s) + (symmetricWindowStart s) u h d (z₀+tangentOffset a d w) true) := by + obtain ⟨K,hK,N₁,hN₁,hgeo⟩ := uniform_tangent_chart_geometry a u v s huv hs hshort hA hC hD hE + have hl := fun j => (symmetricWindow_labels s j).1 + have hv := fun j => (symmetricWindow_labels s j).2.2 + have hlen : ∀ _ : Fin 2, ordinary s-ordinary (-s) < 1 := by + intro j + rw [map_neg] + linarith [hr.2] + have hbox (j : Fin 2) : -ordinary r < ordinary (-s) ∧ ordinary s < ordinary r := by + rw [map_neg] + constructor <;> linarith [hr.1] + obtain ⟨N₂,hN₂,hchain⟩ := B.tangent_chart_chain_control hlarge hr hK + (by linarith : 0 < ordinary s/4) (symmetricWindowLength s) (symmetricWindowStart s) u h + (fun _ => -s) (fun _ => s) hl hv (fun _ => by rw [map_neg]; linarith) hlen hbox + (fun d e j => (symmetric_chart_overlap_boxes a r s u hs hsr hshort d e j).2) + refine ⟨max N₁ N₂,hN₂.trans (le_max_right _ _),?_⟩ + intro n hn g t ht p L V hLV hL hV w hw hw' d z₀ hp hLo hVo f hf hc hstart + have hn₁ : N₁ ≤ n := (le_max_left _ _).trans hn + have hn₂ : N₂ ≤ n := (le_max_right _ _).trans hn + obtain ⟨T,z,e,hz0,hzT,hstep,hpq,hlo,hup⟩ := hgeo n hn₁ w hw hw' d z₀ + (symmetricWindowStart s) p L V hp hLo hVo + have hh := hchain n hn₂ g t ht p L V hLV hL hV d T z e hstep + (fun i _ => hpq i) (fun i _ => by simpa only [map_neg] using hlo i) + (fun i _ => hup i) f hf hc (by simpa only [hz0] using hstart) + simpa only [hzT] using hh + +end InitialCoverSystem +end UniformTangentTransport + +section ContainingChartWindow +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem tangentChartSector_eq_containing_window (hlarge : 15 < m+1) + (k : ℕ) (q : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k q u) + (n : ℕ) (g : B.CoordinateWindowLaw n) (p : Fin 2 → ℤ) + (d : Fin 2) (e : Fin 5) (z : CutRing × CutRing) + (hstart : ∀ j, p j ≤ pointLabel z j+q j) + (hend : ∀ j, pointLabel z j+q j+k ≤ p j+n) + (l v : Fin 2 → CutRing) + (hl : ∀ j, q j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < q j+k) + (hv : ∀ j, q j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < q j+k) : + B.fullGeometricSector hlarge + (translatedTemplate (tangentChartTemplate a k q d (signedShortSteps u e)) z) (h d e z) + (spatialTranslate z (coordinateRectangle a l v)) = + B.windowSector hlarge n g p (spatialTranslate z (coordinateRectangle a l v)) := by + apply B.chartCoordinateSector_eq_window hlarge n g p + _ (h d e z) Sum.inr Prod.fst (fun i => z+(coordinateWindowPrimitives k q i).2) + · intro i + rfl + · intro i + change p i.1 ≤ pointLabel (z+(coordinateWindowPrimitives k q i).2) i.1 + simp only [pointLabel_add,coordinateWindow_pointLabel] + have hh := hstart i.1 + omega + · intro i + change pointLabel (z+(coordinateWindowPrimitives k q i).2) i.1 < p i.1+(n-1:ℕ) + simp only [pointLabel_add,coordinateWindow_pointLabel] + have hi := i.2.isLt + have hh := hend i.1 + omega + · intro x y he + apply (translatedTemplate_resolved (a := a) (r := r) (coordinateWindowPrimitives k q) + (coordinateRectangle a l v) (fun x y he => and_congr + (coordinateLabelWindow_resolved k q 0 (l 0) (v 0) (hl 0) (hv 0) x y he) + (coordinateLabelWindow_resolved k q 1 (l 1) (v 1) (hl 1) (hv 1) x y he)) z) x y + simpa only [primitiveTests,primitiveFamilyTests,translatedTemplate,coordinateWindowPrimitives, + initialTest_coordinate] using he + +theorem tangentSign_supported (hlarge : 15 < m+1) + (k : ℕ) (q : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k q u) + (d : Fin 2) (z : CutRing × CutRing) (positive : Bool) : + B.AlignedSmallSupported (B.tangentSign hlarge k q u h d z positive) := by + unfold tangentSign + apply B.fullGeometricSector_supported + have hh := tangentChart_first_resolved (a := a) (r := r) (k := k) q d (signedShortSteps u 0) z + cases positive with + | false => exact fun x y he => not_congr (hh x y he) + | true => exact hh + +theorem tangentSign_control_from_rectangle (hlarge : 20 ≤ m+1) + (k : ℕ) (q : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k q u) + (n : ℕ) (g : B.CoordinateWindowLaw n) (p : Fin 2 → ℤ) + (d : Fin 2) (z : CutRing × CutRing) (positive : Bool) + (hstart : ∀ j, p j ≤ pointLabel z j+q j) + (hend : ∀ j, pointLabel z j+q j+k ≤ p j+n) + (l v : Fin 2 → CutRing) + (hl : ∀ j, q j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < q j+k) + (hv : ∀ j, q j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < q j+k) + (hside : coordinateRectangle a l v ≤ if positive then clippedSlopePrimitive a r (slopeDirection d) + else (clippedSlopePrimitive a r (slopeDirection d))ᶜ) + (R : polygonAlgebra a) (hR : R ≤ spatialTranslate z (coordinateRectangle a l v)) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n g p R)) : + SmallControlled B.c f (B.tangentSign (by omega) k q u h d z positive) := by + let P := translatedTemplate (tangentChartTemplate a k q d (signedShortSteps u 0)) z + let V := spatialTranslate z (coordinateRectangle a l v) + have hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val := + tangentChart_rectangle_resolved q d _ z l v hl hv + have he := B.tangentChartSector_eq_containing_window (by omega) k q u h n g p d 0 z hstart hend l v hl hv + have hcV : SmallControlled B.c f (B.fullGeometricSector (by omega) P (h d 0 z) V) := by + rw [he] + refine B.control_trans hlarge f (B.windowSector (by omega) n g p R) _ hf ?_ hc ?_ + · rw [← he] + exact B.fullGeometricSector_supported (by omega) P (h d 0 z) V hV + · exact B.fullGeometricSector_small_control (by omega) _ _ R V hR + apply B.control_trans hlarge f _ _ hf (B.tangentSign_supported (by omega) k q u h d z positive) hcV + unfold tangentSign + apply B.fullGeometricSector_small_control + cases positive with + | false => exact spatialTranslate_mono z hside + | true => exact spatialTranslate_mono z hside + +end InitialCoverSystem +end ContainingChartWindow + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/WholeCoverCentrality.lean b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/WholeCoverCentrality.lean new file mode 100644 index 0000000000000000000000000000000000000000..41cfccfc1c787e839b8d31921258b402dd5467de --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/CentralCovers/WholeCoverCentrality.lean @@ -0,0 +1,181 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FiniteSlotRefinement +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveCentralLaws +import OAI.GroupTheory.SimpleAmenable.RandomFields.RecoveredConstantCovariance +import OAI.GroupTheory.SimpleAmenable.Configurations.SlotInputGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section WholeCoverCentrality +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (B.polygonStar hlarge h hr W).range) + (initialTest a r b.1) + refine ⟨universalMap (subtypeAlternatingHom I.val) (universalMap (orderedTrackHom ι) t),?_⟩ + rw [show B.polygonStar hlarge h hr (initialTest a r b.1) + (universalMap (subtypeAlternatingHom I.val) (universalMap (orderedTrackHom ι) t)) = + B.initialAlphabet I.val b.1 (universalProjection _ (universalMap (orderedTrackHom ι) t)) from + DFunLike.congr_fun (B.polygonStar_initial_alphabet hlarge h hr b.1 I) _] + rw [show universalProjection _ (universalMap (orderedTrackHom ι) t)=orderedTrackHom ι s from + (DFunLike.congr_fun (universalMap_spec (orderedTrackHom ι)) t).trans (by rw [MonoidHom.comp_apply,ht])] + change B.initialConditional b.1 (subtypeAlternatingHom (orderedTrackAlphabet ι) (orderedTrackHom ι s))=_ + have hh := DFunLike.congr_fun (orderedTrackHom_comp ι) s + change subtypeAlternatingHom (orderedTrackAlphabet ι) (orderedTrackHom ι s) = fiveAlternatingHom ι s at hh + rw [hh,hs,B.initialConditional_input _ _ b.2.property.2] + rfl + +variable (R : alternatingGroup (Fin (m+1)) → + Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (hR : ∀ s k, B.c s * B.t k * (B.c s)⁻¹ = B.t (R s k)) + (hwide : 100 ≤ m+1) +include R hR + +theorem uniformSlotTransport_initial (b : SmallConditional m) : + B.UniformSlotTransport hlarge h hr hwide (PresentedGroup.of (Sum.inl b)) := by + intro V i k u v htr hi hk + have hspatial : ∀ (j : Fin 5) (x : V.val), translate a (u j) x.val=translate a (v j) x.val := by + intro j x + have he := congrArg Prod.snd (htr j x) + have hp := coverMap_of M (alternatingGenerator a r m hm) (Sum.inl b) + have hh := congrArg (fun g : polygonAlternatingGroup a (m+1) => + (g.val.val (i j,translate a (u j) x.val)).2) hp + exact hh.symm.trans he + have heq : SlotMap a (m+1) V (fun j => (k j,u j))= + SlotMap a (m+1) V (fun j => (k j,v j)) := by + funext p + exact congrArg (fun z => (k p.1,z)) (hspatial p.1 p.2) + have hk' : Function.Injective (SlotMap a (m+1) V (fun j => (k j,u j))) := by + rw [heq]; exact hk + have htr' : ∀ (j : Fin 5) (x : V.val), + (coverMap M (alternatingGenerator a r m hm) (PresentedGroup.of (Sum.inl b))).val.val + (i j,translate a (u j) x.val)=(k j,translate a (u j) x.val) := by + intro j x + exact (htr j x).trans (congrArg (fun z => (k j,z)) (hspatial j x).symm) + have ht := B.slotStar_aligned_transport hlarge h hr R hR hwide V i k u hi hk' + b.2.val.support b.2.property.2 (PresentedGroup.of (Sum.inl b)) + (B.initial_input_mem_polygonStars hlarge h hr b) + (alignedGroup_input B.t _ _ b (Finset.Subset.refl _)) htr' + exact ht.trans (B.slotStar_parameterwise hlarge h hr R hR hwide V k k u v hk' hk + (fun j x => congrArg (fun z => (k j,z)) (hspatial j x))) + +theorem uniformSlotTransport_lattice + (k₀ : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) : + B.UniformSlotTransport hlarge h hr hwide (B.t k₀) := by + intro V i k u v htr hi hk + let d := sourceLatticeOffsets m (Multiplicative.toAdd k₀) + let u' := fun j => d (i j)+u j + have hi' := SlotMap_shift_injective V i u hi d + have ht := B.slotStar_translation_lattice hlarge h hr R hR hwide + (Multiplicative.toAdd k₀) V i u hi + apply ht.trans + apply B.slotStar_parameterwise hlarge h hr R hR hwide V i k u' v hi' hk + intro j x + have he := htr j x + rw [show coverMap M (alternatingGenerator a r m hm) (B.t k₀)=sourceLatticeMap a r m hm k₀ from + DFunLike.congr_fun B.t_projection k₀] at he + change (sourceLatticeFullMap a r m hm k₀).val (i j,translate a (u j) x.val)=_ at he + have hp := congrArg (fun g : polygonFullGroup a (m+1) => + g.val (i j,translate a (u j) x.val)) + (sourceLatticeFullMap_offsets a r m hm (Multiplicative.toAdd k₀)) + have hh := hp.symm.trans he + change (i j,translate a (d (i j)) (translate a (u j) x.val))=_ at hh + simpa only [u',translate_add] using hh + +theorem uniformSlotTransport_all + (z : BoundedRelationCover M (alternatingGenerator a r m hm)) : + B.UniformSlotTransport hlarge h hr hwide z := by + change z ∈ B.slotTransportSubgroup hlarge h hr hwide R hR + apply PresentedGroup.generated_by _ (B.slotTransportSubgroup hlarge h hr hwide R hR) _ z + intro j + cases j with + | inl b => exact B.uniformSlotTransport_initial hlarge h hr R hR hwide b + | inr k => + have he := B.uniformSlotTransport_lattice hlarge h hr R hR hwide + (Multiplicative.ofAdd (FreeAbelianGroup.of k)) + rw [B.t_base] at he + exact he + +include hlarge h hr hwide + +theorem coverMap_kernel_central : + (coverMap M (alternatingGenerator a r m hm)).ker ≤ + Subgroup.center (BoundedRelationCover M (alternatingGenerator a r m hm)) := by + intro w hw + have hw' : coverMap M (alternatingGenerator a r m hm) w=1 := hw + have hc : ∀ z∈ B.slotGroup hlarge h hr hwide, Commute w z := by + intro z hz + induction hz using Subgroup.closure_induction with + | mem z hz => + obtain ⟨V,i,u,hi,s,rfl⟩ := hz + have he := B.uniformSlotTransport_all hlarge h hr R hR hwide w V i i u u + (by intro j x; rw [hw']; rfl) hi hi + have hh := DFunLike.congr_fun he s + change w*B.slotStar hlarge h hr hwide V i u hi s*w⁻¹= + B.slotStar hlarge h hr hwide V i u hi s at hh + exact mul_inv_eq_iff_eq_mul.mp hh + | one => exact Commute.one_right w + | mul x y _ _ hx hy => exact hx.mul_right hy + | inv x _ hx => exact hx.inv_right + rw [Subgroup.mem_center_iff] + intro z + have hh : z∈B.slotGroup hlarge h hr hwide := by + rw [B.slotGroup_eq_top hlarge h hr R hR hwide] + trivial + exact (hc z hh).eq.symm + +end InitialCoverSystem +end WholeCoverCentrality + +section SourceCentralCover + +theorem source_cover_centrality {a m : ℕ} {r : CutRing} (hm : 2 ≤ m) + (ha : 0 face_smul i g.val x) (fun g x => face_smul j g.val x) + f (fun g => alternating_transitive f g hm) + +lemma altFace_H0_isIso (a m p : ℕ) (hm : 3*(p+1)+1 < m) (i : Fin (p+1)) : + IsIso ((groupHomology.functor ℤ (polygonAlternatingGroup a m) 0).map (altFaceHom a m p i)) := by + let f := standardLE a m (p+1) (by omega : p+1 ≤ m) + exact TransitiveInduction.isIso_map_equivariant_H0 (G:=polygonAlternatingGroup a m) + (face i) (fun g x => face_smul i g.val x) f + (fun g => alternating_transitive f g hm) (fun g => alternating_transitive _ g (by omega)) + +lemma altBoundary_two_H0_isIso (a m : ℕ) (hm : 10 < m) : + IsIso ((groupHomology.functor ℤ (polygonAlternatingGroup a m) 0).map (altBoundary a m 2)) := by + have he : altBoundary a m 2=altFaceHom a m 2 0-altFaceHom a m 2 1+altFaceHom a m 2 2 := by + change (Rep.resFunctor _).map (boundary a m 2)=_ + rw [boundary_three, Functor.map_add, Functor.map_sub] + rw [he, Functor.map_add, Functor.map_sub, + altFace_H0_eq a m 2 (by omega) 1 0, altFace_H0_eq a m 2 (by omega) 2 0, + sub_self,zero_add] + exact altFace_H0_isIso a m 2 hm 0 + +lemma altColumn_H1_isZero (a p n : ℕ) (hn : 32 ≤ n) (hm : 3*p+1 < p+n) : + IsZero (groupHomology (altColumn a (p+n) p) 1) := by + have := alternatingStabilizer_perfect a p n hn + exact (TrivialHomology.H1_isZero_of_perfect + (G:=MulAction.stabilizer (polygonAlternatingGroup a (p+n)) (standard a p n))).of_iso + (alternatingOrbitHomologyIso a p n hm 1) + +lemma altBoundary_zero_H2_epi (a m : ℕ) (hm : 34 ≤ m) : + Epi ((groupHomology.functor ℤ (polygonAlternatingGroup a m) 2).map (altBoundary a m 0)) := by + have := altBoundary_zero_epi a m (by omega) + have : IsIso (BoundedHomologyEdge.Hmap 0 (altBoundary a m 2)) := + altBoundary_two_H0_isIso a m (by omega) + have hz : IsZero (groupHomology (altColumn a m 2) 1) := by + have he : m=2+(m-2) := by omega + rw [he] + exact altColumn_H1_isZero a 2 (m-2) (by omega) (by omega) + exact BoundedHomologyEdge.chain_H2_epi (altBoundary a m 0) (altBoundary a m 1) + (altBoundary a m 2) (altBoundary_square a m 0) (altBoundary_square a m 1) + (altBoundary_exact a m 0 (by omega) (by omega)) + (altBoundary_exact a m 1 (by omega) (by omega)) hz + +end PolygonPlacement.Configuration +end SimpleAmenable + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/BooleanStages.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/BooleanStages.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c2b597704110cf3d8edc35a0246bdeb4ce50891 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/BooleanStages.lean @@ -0,0 +1,179 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonDiagramRefinement +import OAI.GroupTheory.SimpleAmenable.Configurations.TrajectoryLabels + +namespace OAI + +section + +section + +open Classical Set CategoryTheory +namespace SimpleAmenable.PolygonObject + +structure BooleanPartition (a : ℕ) where + size : ℕ + color : GenericSquare a → Fin size + onto : Function.Surjective color + polygon : ∀ b, {x | color x=b}∈polygonAlgebra a + +namespace BooleanPartition +variable {a : ℕ} +noncomputable def cell (P : BooleanPartition a) (b : Fin P.size) : polygonAlgebra a := + ⟨_,P.polygon b⟩ +noncomputable def point (P : BooleanPartition a) (b : Fin P.size) : GenericSquare a := + (P.onto b).choose +@[simp] theorem color_point (P : BooleanPartition a) (b : Fin P.size) : + P.color (P.point b)=b := (P.onto b).choose_spec + +variable {ι : Type} [Fintype ι] (S : ι → polygonAlgebra a) +noncomputable def signature (x : GenericSquare a) : ι → Bool := fun i => decide (x∈(S i).val) + +theorem signature_fiber (b : ι → Bool) : {x | signature S x=b}∈polygonAlgebra a := by + have he : {x | signature S x=b} = ⋂ i, if b i then (S i).val else (S i).valᶜ := by + ext x + simp only [Set.mem_ofPred_eq,Set.mem_iInter] + constructor + · intro h i + have hx := congrFun h i + cases hb : b i <;> simp_all [signature] + · intro h + funext i + have hi := h i + cases hb : b i <;> simp_all [signature] + rw [he] + apply BooleanSubalgebra.iInf_mem + intro i + split_ifs + · exact (S i).property + · exact (polygonAlgebra a).compl_mem (S i).property + +noncomputable def generated : BooleanPartition a where + size := Fintype.card (Set.range (signature S)) + color x := Fintype.equivFin (Set.range (signature S)) ⟨_,⟨x,rfl⟩⟩ + onto b := by + obtain ⟨x,hx⟩ := ((Fintype.equivFin (Set.range (signature S))).symm b).property + refine ⟨x,?_⟩ + apply (Equiv.eq_symm_apply _).mp + exact Subtype.ext hx + polygon b := by + convert signature_fiber S (((Fintype.equivFin (Set.range (signature S))).symm b).val) using 1 + ext x + simp only [Set.mem_ofPred_eq] + rw [← Equiv.eq_symm_apply,Subtype.ext_iff] + +theorem generated_constant {x y : GenericSquare a} + (h : (generated S).color x=(generated S).color y) (i : ι) : + x∈(S i).val ↔ y∈(S i).val := by + have h' := congrArg (fun z : Set.range (signature S) => z.val) + ((Fintype.equivFin (Set.range (signature S))).injective h) + have hi := congrFun h' i + by_cases hx : x∈(S i).val <;> by_cases hy : y∈(S i).val <;> simp_all [signature] + +theorem exists_common (S : ι → polygonAlgebra a) : + ∃ P : BooleanPartition a, ∀ i x y, P.color x=P.color y → + (x∈(S i).val ↔ y∈(S i).val) := + ⟨generated S,fun i _ _ h => generated_constant S h i⟩ + +end BooleanPartition +end SimpleAmenable.PolygonObject + +end + +section + +open Classical Set CategoryTheory +namespace SimpleAmenable.PolygonObject + +namespace Labelled +variable {a n : ℕ} + +noncomputable def forget : Labelled a n ⥤ PolygonObject a where + obj U := U.polygon + map f := f.arrow + +@[simp] lemma inv_arrow {U V : Labelled a n} (f : U ⟶ V) : + (inv f).arrow=inv f.arrow := (forget (a:=a) (n:=n)).map_inv f + +def ObjectUniform (P : BooleanPartition a) (U : Labelled a n) : Prop := + ∀ j x y, P.color x=P.color y → (x∈(U.polygon.cell j).val ↔ y∈(U.polygon.cell j).val) + +def ArrowUniform (P : BooleanPartition a) {U V : Labelled a n} (f : U ⟶ V) : Prop := + ∀ x y, x.val.1=y.val.1 → P.color x.val.2=P.color y.val.2 → + (f.arrow.toEquiv x).val.1=(f.arrow.toEquiv y).val.1 + +lemma arrowUniform_id (P : BooleanPartition a) (U : Labelled a n) : + ArrowUniform P (𝟙 U) := fun _ _ h _ => h + +lemma arrowUniform_comp (P : BooleanPartition a) {U V W : Labelled a n} + {f : U ⟶ V} {g : V ⟶ W} (hf : ArrowUniform P f) (hg : ArrowUniform P g) : + ArrowUniform P (f≫g) := by + intro x y h hP + apply hg + · exact hf x y h hP + · rw [f.positional x,f.positional y] + exact hP + +lemma arrowUniform_inv (P : BooleanPartition a) {U V : Labelled a n} + (hU : ObjectUniform P U) {f : U ⟶ V} (hf : ArrowUniform P f) : + ArrowUniform P (inv f) := by + intro x y h hP + let x' := (inv f).arrow.toEquiv x + let y' := (inv f).arrow.toEquiv y + have hx : x'.val.2=x.val.2 := (inv f).positional x + have hy : y'.val.2=y.val.2 := (inv f).positional y + have hmem : y.val.2∈(U.polygon.cell x'.val.1).val := + (hU x'.val.1 x'.val.2 y.val.2 (by rw [hx]; exact hP)).mp x'.property + let z : U.polygon.Point := ⟨(x'.val.1,y.val.2),hmem⟩ + have htrack : (f.arrow.toEquiv z).val.1=y.val.1 := by + have h' := hf z x' rfl (by simp only [z,hx]; exact hP.symm) + rw [show f.arrow.toEquiv x'=x from by + dsimp only [x']; rw [inv_arrow,inv_arrow_apply,Equiv.apply_symm_apply]] at h' + exact h'.trans h + have hz : f.arrow.toEquiv z=y := by + apply Subtype.ext + exact Prod.ext htrack (f.positional z) + have he : z=y' := by + apply f.arrow.toEquiv.injective + rw [hz] + dsimp only [y']; rw [inv_arrow,inv_arrow_apply,Equiv.apply_symm_apply] + change x'.val.1=y'.val.1 + have ht := congrArg (fun w : U.polygon.Point => w.val.1) he + exact ht + +variable {κ τ : Type} [Fintype κ] [Fintype τ] + (U : κ → Labelled a n) (src dst : τ → κ) (f : ∀t,U (src t) ⟶ U (dst t)) + +theorem exists_uniform_partition : + ∃ P : BooleanPartition a, (∀ k,ObjectUniform P (U k)) ∧ + (∀ t,ArrowUniform P (f t)) := by + let I := (Σ k,Fin (U k).polygon.tracks) ⊕ + (Σ t,Fin (U (src t)).polygon.tracks × Fin (U (dst t)).polygon.tracks) + let S : I → polygonAlgebra a := Sum.elim + (fun kj => (U kj.1).polygon.cell kj.2) + (fun tij => ⟨{x | ∃hx : x∈((U (src tij.1)).polygon.cell tij.2.1).val, + ((f tij.1).arrow.toEquiv ⟨(tij.2.1,x),hx⟩).val.1=tij.2.2}, + targetTrack_fiber_polygon (f tij.1).arrow tij.2.1 tij.2.2⟩) + obtain ⟨P,hP⟩ := BooleanPartition.exists_common S + refine ⟨P,?_,?_⟩ + · intro k j x y h + exact hP (.inl ⟨k,j⟩) x y h + · intro t x y h hxy + have h' := hP (.inr ⟨t,x.val.1,(f t).arrow.toEquiv x |>.val.1⟩) x.val.2 y.val.2 hxy + have hx : x.val.2∈(S (.inr ⟨t,x.val.1,(f t).arrow.toEquiv x |>.val.1⟩)).val := + ⟨x.property,rfl⟩ + obtain ⟨hy,he⟩ := h'.mp hx + have hpt : (⟨(x.val.1,y.val.2),hy⟩ : (U (src t)).polygon.Point)=y := by + apply Subtype.ext + exact Prod.ext h rfl + rw [hpt] at he + exact he.symm + +end Labelled +end SimpleAmenable.PolygonObject + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellFiber.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellFiber.lean new file mode 100644 index 0000000000000000000000000000000000000000..c02d81386d296ff9e05ed524481edaf97e33cf12 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellFiber.lean @@ -0,0 +1,204 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.StageFiberSum +import OAI.GroupTheory.SimpleAmenable.Simplicial.TripleComposition +import OAI.GroupTheory.SimpleAmenable.Configurations.EmptyStage +import OAI.GroupTheory.SimpleAmenable.Configurations.PointFiberEvaluation +import OAI.GroupTheory.SimpleAmenable.Configurations.CellFunctor +import OAI.GroupTheory.SimpleAmenable.Simplicial.CellMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.PointFiberMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.StageMonoidal + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled.Cell +open BarFinitePower + +variable {a n : ℕ} (P : polygonAlgebra a) (l : LabelledStage.ReducedLabel n) +variable (c : GenericSquare a × (Fin n → CutRing × CutRing)) +variable (hp : c.1∈P.val) (hl : l.val=c.2) +noncomputable def fiber (U : FiniteSetGroupoid) : + Fin U.size ≃ PointFiber.Fiber (object P l U) c where + toFun i := ⟨⟨(i,c.1),hp⟩,rfl,hl⟩ + invFun y := y.val.val.1 + left_inv _ := rfl + right_inv y := by apply Subtype.ext; apply Subtype.ext; exact Prod.ext rfl y.property.1.symm +lemma fiber_natural {U V : FiniteSetGroupoid} (f : U ⟶ V) (x : Fin U.size) : + fiber P l c hp hl V (f x)= + PointFiber.fiberMap (arrow P l f) c (fiber P l c hp hl U x) := rfl +noncomputable def evaluationIso : + 𝟭 FiniteSetGroupoid ≅ functor P l ⋙ PointFiber.evaluation ⋙ project _ c := + NatIso.ofComponents (fun U => asIso (X := U) (Y := PointFiber.E.obj (object P l U) c) + ((fiber P l c hp hl U).trans (PointFiber.enumerate (object P l U) c))) (by + intro U V f + apply Equiv.ext; intro x + change PointFiber.enumerate (object P l V) c (fiber P l c hp hl V (f x)) = + PointFiber.E.map (arrow P l f) c (PointFiber.enumerate (object P l U) c + (fiber P l c hp hl U x)) + rw [PointFiber.E_map_enum,fiber_natural]) +lemma evaluationIso_apply (U : FiniteSetGroupoid) (x : Fin U.size) : + (evaluationIso P l c hp hl).hom.app U x = + PointFiber.enumerate (object P l U) c (fiber P l c hp hl U x) := rfl +lemma fiber_sum_left (U V : FiniteSetGroupoid) (x : Fin U.size) : + PointFiber.fiberMap (tensorArrow P l U V) c + (PointFiber.fiberSum (object P l U) (object P l V) c (.inl (fiber P l c hp hl U x))) = + fiber P l c hp hl (U⊗V) (FiniteSetGroupoid.sumEquiv U V (.inl x)) := rfl +lemma fiber_sum_right (U V : FiniteSetGroupoid) (x : Fin V.size) : + PointFiber.fiberMap (tensorArrow P l U V) c + (PointFiber.fiberSum (object P l U) (object P l V) c (.inr (fiber P l c hp hl V x))) = + fiber P l c hp hl (U⊗V) (FiniteSetGroupoid.sumEquiv U V (.inr x)) := rfl +noncomputable instance evaluationIsoMonoidal : NatTrans.IsMonoidal (evaluationIso P l c hp hl).hom where + unit := by apply Equiv.ext; intro x; exact Fin.elim0 x + tensor U V := by + apply Equiv.ext; intro x + change (evaluationIso P l c hp hl).hom.app (U⊗V) x = + PointFiber.E.map (tensorArrow P l U V) c + (PointFiber.mu (object P l U) (object P l V) c + (FiniteSetGroupoid.sumHom ((evaluationIso P l c hp hl).hom.app U) + ((evaluationIso P l c hp hl).hom.app V) x)) + obtain ⟨x,rfl⟩ := (FiniteSetGroupoid.sumEquiv U V).surjective x + cases x with + | inl x => erw [FiniteSetGroupoid.sumHom_inl,evaluationIso_apply,PointFiber.mu_inl, + PointFiber.E_map_enum,fiber_sum_left,evaluationIso_apply] + | inr x => erw [FiniteSetGroupoid.sumHom_inr,evaluationIso_apply,PointFiber.mu_inr, + PointFiber.E_map_enum,fiber_sum_right,evaluationIso_apply] + +variable {hp hl} +lemma fiber_empty (h : ¬(c.1∈P.val ∧ l.val=c.2)) (U : FiniteSetGroupoid) : + IsEmpty (PointFiber.Fiber (object P l U) c) := ⟨fun x => h + ⟨x.property.1 ▸ x.val.property,x.property.2⟩⟩ +lemma empty_size (h : ¬(c.1∈P.val ∧ l.val=c.2)) (U : FiniteSetGroupoid) : + (PointFiber.E.obj (object P l U) c).size=0 := by + have := fiber_empty P l c h U + exact @Fintype.card_eq_zero _ (PointFiber.instFintypeFiber (object P l U) c) _ +noncomputable def emptyIso (h : ¬(c.1∈P.val ∧ l.val=c.2)) : + FiniteSetGroupoid.terminal ⋙ FiniteSetGroupoid.emptyFunctor ≅ + functor P l ⋙ PointFiber.evaluation ⋙ project _ c := + NatIso.ofComponents (fun U => asIso (X := FiniteSetGroupoid.empty) + (Y := PointFiber.E.obj (object P l U) c) (finCongr (empty_size P l c h U).symm)) (by + intros; apply Equiv.ext; intro x; exact Fin.elim0 x) +noncomputable instance emptyIsoMonoidal (h : ¬(c.1∈P.val ∧ l.val=c.2)) : + NatTrans.IsMonoidal (emptyIso P l c h).hom where + unit := by apply Equiv.ext; intro x; exact Fin.elim0 x + tensor _ _ := by apply Equiv.ext; intro x; exact Fin.elim0 x +end SimpleAmenable.PolygonObject.Labelled.Cell + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open UniformObject BarFinitePower + +variable {a n : ℕ} (S : Stage a n) +variable (b : Fin S.partition.size × Fin S.support.card) + (c : GenericSquare a × (Fin n → CutRing × CutRing)) + (hp : S.partition.color c.1=b.1) (hl : S.L b.2=c.2) + +noncomputable def pointFiber (U : S.Obj) : + UniformObject.Fiber U b ≃ Labelled.PointFiber.Fiber U.obj c where + toFun x := ⟨⟨(x.val.val.1,c.1), + (U.uniform x.val.val.1 x.val.val.2 c.1 (by + rw [x.property.1,S.partition.color_point,hp])).mp x.val.property⟩,rfl, + x.property.2.trans hl⟩ + invFun y := ⟨⟨(y.val.val.1,S.partition.point b.1), + (U.uniform y.val.val.1 y.val.val.2 (S.partition.point b.1) (by + rw [y.property.1,hp,S.partition.color_point])).mp y.val.property⟩,rfl, + y.property.2.trans hl.symm⟩ + left_inv x := by apply Subtype.ext; apply Subtype.ext; exact Prod.ext rfl x.property.1.symm + right_inv y := by apply Subtype.ext; apply Subtype.ext; exact Prod.ext rfl y.property.1.symm + +lemma pointFiber_natural {U V : S.Obj} (f : U ⟶ V) (x : Fiber U b) : + pointFiber S b c hp hl V (fiberMap f b x)= + Labelled.PointFiber.fiberMap f.arrow c (pointFiber S b c hp hl U x) := by + apply Subtype.ext + apply Subtype.ext + apply Prod.ext + · exact f.uniform x.val (pointFiber S b c hp hl U x).val rfl (by + change S.partition.color x.val.val.2=S.partition.color c.1 + rw [x.property.1,S.partition.color_point,hp]) + · exact (f.arrow.positional (pointFiber S b c hp hl U x).val).symm + +noncomputable def pointEvaluationIso : + evaluation (P:=S.partition) (L:=S.L) ⋙ project _ b ≅ + S.forget ⋙ Labelled.PointFiber.evaluation ⋙ project _ c := + NatIso.ofComponents (fun U => asIso (X := UniformObject.E.obj U b) + (Y := Labelled.PointFiber.E.obj U.obj c) + ((enumerate U b).symm.trans ((pointFiber S b c hp hl U).trans + (Labelled.PointFiber.enumerate U.obj c)))) (by + intro U V f + apply Equiv.ext + intro x + obtain ⟨x,rfl⟩ := (enumerate U b).surjective x + dsimp only [Functor.comp_map,Pi.eval,project,asIso_hom,Equiv.trans_apply,Equiv.symm_apply_apply] + change Labelled.PointFiber.enumerate V.obj c (pointFiber S b c hp hl V + ((enumerate V b).symm (UniformObject.E.map f b (enumerate U b x)))) = + Labelled.PointFiber.E.map f.arrow c (Labelled.PointFiber.enumerate U.obj c + (pointFiber S b c hp hl U ((enumerate U b).symm (enumerate U b x)))) + rw [E_map_enum,Equiv.symm_apply_apply,Equiv.symm_apply_apply, + Labelled.PointFiber.E_map_enum,pointFiber_natural]) + +lemma pointFiber_sum_inl (U V : S.Obj) (x : Fiber U b) : + pointFiber S b c hp hl (UniformObject.sum U V) (fiberSum U V b (.inl x)) = + Labelled.PointFiber.fiberSum U.obj V.obj c (.inl (pointFiber S b c hp hl U x)) := rfl +lemma pointFiber_sum_inr (U V : S.Obj) (x : Fiber V b) : + pointFiber S b c hp hl (UniformObject.sum U V) (fiberSum U V b (.inr x)) = + Labelled.PointFiber.fiberSum U.obj V.obj c (.inr (pointFiber S b c hp hl V x)) := rfl +lemma pointEvaluationIso_enum (U : S.Obj) (x : Fiber U b) : + (pointEvaluationIso S b c hp hl).hom.app U (enumerate U b x) = + Labelled.PointFiber.enumerate U.obj c (pointFiber S b c hp hl U x) := by + change Labelled.PointFiber.enumerate U.obj c (pointFiber S b c hp hl U + ((enumerate U b).symm (enumerate U b x)))=_ + rw [Equiv.symm_apply_apply] + +instance pointEvaluationIso_monoidal : NatTrans.IsMonoidal (pointEvaluationIso S b c hp hl).hom where + unit := by apply Equiv.ext; intro x; exact Fin.elim0 x + tensor U V := by + change ((𝟙 _ ≫ mu U V b) ≫ _) = (_ ≫ (𝟙 _ ≫ Labelled.PointFiber.mu U.obj V.obj c) ≫ + (Labelled.PointFiber.E.map (𝟙 (U.obj ⊗ V.obj))) c) + rw [CategoryTheory.Functor.map_id] + simp only [Category.id_comp] + apply Equiv.ext + intro x + change (pointEvaluationIso S b c hp hl).hom.app (UniformObject.sum U V) (mu U V b x) = + Labelled.PointFiber.mu U.obj V.obj c + (FiniteSetGroupoid.sumHom ((pointEvaluationIso S b c hp hl).hom.app U) + ((pointEvaluationIso S b c hp hl).hom.app V) x) + obtain ⟨x,rfl⟩ := (FiniteSetGroupoid.sumEquiv (UniformObject.E.obj U b) (UniformObject.E.obj V b)).surjective x + cases x with + | inl x => + obtain ⟨x,rfl⟩ := (enumerate U b).surjective x + erw [mu_inl,pointEvaluationIso_enum,pointFiber_sum_inl,FiniteSetGroupoid.sumHom_inl, + pointEvaluationIso_enum,Labelled.PointFiber.mu_inl] + | inr x => + obtain ⟨x,rfl⟩ := (enumerate V b).surjective x + erw [mu_inr,pointEvaluationIso_enum,pointFiber_sum_inr,FiniteSetGroupoid.sumHom_inr, + pointEvaluationIso_enum,Labelled.PointFiber.mu_inr] + +variable {S b hp hl} +lemma pointFiber_empty_of_new_label (hc : ∀j,S.L j ≠ c.2) (U : S.Obj) : + IsEmpty (Labelled.PointFiber.Fiber U.obj c) := ⟨by + intro x + obtain ⟨j,hj⟩ := U.supported x.val.val.1 + exact hc j (hj.trans x.property.2)⟩ +lemma point_new_label_size (hc : ∀j,S.L j ≠ c.2) (U : S.Obj) : + (Labelled.PointFiber.E.obj U.obj c).size=0 := by + have := pointFiber_empty_of_new_label c hc U + exact Fintype.card_eq_zero +noncomputable def emptyPointIso (hc : ∀j,S.L j ≠ c.2) : + FiniteSetGroupoid.terminal ⋙ FiniteSetGroupoid.emptyFunctor ≅ + S.forget ⋙ Labelled.PointFiber.evaluation ⋙ project _ c := + NatIso.ofComponents (fun U => asIso (X := FiniteSetGroupoid.empty) + (Y := Labelled.PointFiber.E.obj U.obj c) (finCongr (point_new_label_size c hc U).symm)) (by + intros; apply Equiv.ext; intro x; exact Fin.elim0 x) +noncomputable instance emptyPointIsoMonoidal (hc : ∀j,S.L j ≠ c.2) : + NatTrans.IsMonoidal (emptyPointIso c hc).hom where + unit := by apply Equiv.ext; intro x; exact Fin.elim0 x + tensor _ _ := by apply Equiv.ext; intro x; exact Fin.elim0 x + +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellFunctor.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellFunctor.lean new file mode 100644 index 0000000000000000000000000000000000000000..dcae2060a8900df0d783b9bcec6f081843e3bda3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellFunctor.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.LabelledMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.FiniteSetMonoidal +import OAI.GroupTheory.SimpleAmenable.Configurations.StageOrder + +namespace OAI + +section +open CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled.Cell + +variable {a n : ℕ} (P : polygonAlgebra a) (l : LabelledStage.ReducedLabel n) + +noncomputable abbrev object (U : FiniteSetGroupoid) : Labelled a n := + ⟨⟨U.size,fun _ => P⟩,fun _ => l.val,fun _ => l.property⟩ +noncomputable def pointMap {U V : FiniteSetGroupoid} (f : U ⟶ V) : + (object P l U).polygon.Point ≃ (object P l V).polygon.Point where + toFun x := ⟨(f x.val.1,x.val.2),x.property⟩ + invFun y := ⟨(f.symm y.val.1,y.val.2),y.property⟩ + left_inv x := by apply Subtype.ext; exact Prod.ext (f.symm_apply_apply _) rfl + right_inv y := by apply Subtype.ext; exact Prod.ext (f.apply_symm_apply _) rfl +noncomputable def arrow {U V : FiniteSetGroupoid} (f : U ⟶ V) : object P l U ⟶ object P l V where + arrow := relabelArrow (pointMap P l f) f (fun _ => rfl) + positional _ := rfl + labelled _ := rfl +noncomputable def functor : FiniteSetGroupoid ⥤ Labelled a n where + obj := object P l + map := arrow P l + map_id _ := by apply Hom.ext; apply Arrow.ext; apply Equiv.ext; intro x; rfl + map_comp _ _ := by apply Hom.ext; apply Arrow.ext; apply Equiv.ext; intro x; rfl +@[simp] lemma arrow_apply {U V : FiniteSetGroupoid} (f : U ⟶ V) + (x : (object P l U).polygon.Point) : + ((arrow P l f).arrow.toEquiv x).val = (f x.val.1,x.val.2) := rfl + +noncomputable def tensorPoint (U V : FiniteSetGroupoid) : + (sum (object P l U) (object P l V)).polygon.Point ≃ (object P l (U⊗V)).polygon.Point where + toFun x := ⟨x.val,by + obtain ⟨y,rfl⟩ := (sumPointEquiv (object P l U).polygon (object P l V).polygon).surjective x + cases y with + | inl y => simpa only [sumPointEquiv_inl,object] using y.property + | inr y => simpa only [sumPointEquiv_inr,object] using y.property⟩ + invFun x := ⟨x.val,by + change x.val.2 ∈ (Fin.addCases (motive := fun _ => polygonAlgebra a) + (fun _ => P) (fun _ => P) x.val.1).val + refine Fin.addCases (motive := fun i => x.val.2 ∈ (Fin.addCases + (motive := fun _ => polygonAlgebra a) (fun _ => P) (fun _ => P) i).val) + (fun i => ?_) (fun i => ?_) x.val.1 + · simpa only [Fin.addCases_left,object] using x.property + · simpa only [Fin.addCases_right,object] using x.property⟩ + left_inv _ := rfl + right_inv _ := rfl +noncomputable def tensorArrow (U V : FiniteSetGroupoid) : + (object P l U) ⊗ (object P l V) ⟶ object P l (U⊗V) where + arrow := relabelArrow (tensorPoint P l U V) id (fun _ => rfl) + positional _ := rfl + labelled x := by + change l.val = Fin.addCases (fun _ => l.val) (fun _ => l.val) x.val.1 + refine Fin.addCases (motive := fun i => l.val = Fin.addCases + (motive := fun _ => Fin n → CutRing × CutRing) (fun _ => l.val) (fun _ => l.val) i) + (fun i => ?_) (fun i => ?_) x.val.1 + · simp only [Fin.addCases_left] + · simp only [Fin.addCases_right] +@[simp] lemma tensorArrow_apply (U V : FiniteSetGroupoid) + (x : (sum (object P l U) (object P l V)).polygon.Point) : + ((tensorArrow P l U V).arrow.toEquiv x).val=x.val := rfl +noncomputable def unitArrow : 𝟙_ (Labelled a n) ⟶ object P l (𝟙_ FiniteSetGroupoid) where + arrow := relabelArrow { + toFun x := Fin.elim0 x.val.1 + invFun x := Fin.elim0 x.val.1 + left_inv x := Fin.elim0 x.val.1 + right_inv x := Fin.elim0 x.val.1 } Fin.elim0 (fun x => Fin.elim0 x.val.1) + positional x := Fin.elim0 x.val.1 + labelled x := Fin.elim0 x.val.1 + +end SimpleAmenable.PolygonObject.Labelled.Cell + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellRelabel.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellRelabel.lean new file mode 100644 index 0000000000000000000000000000000000000000..243758c8a9f1b4f312bfa5bceeab95954210c45b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CellRelabel.lean @@ -0,0 +1,44 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.LabelRelabel +import OAI.GroupTheory.SimpleAmenable.Configurations.CellFunctor +import OAI.GroupTheory.SimpleAmenable.Simplicial.CellMonoidal + +namespace OAI + +section +open CategoryTheory MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled.Cell + +variable {a n m : ℕ} +variable (f : (Fin n → CutRing × CutRing) → (Fin m → CutRing × CutRing)) + (hf : ∀g, Reduced g → Reduced (f g)) +variable (P : polygonAlgebra a) (l : LabelledStage.ReducedLabel n) +noncomputable def relabelIso : + functor P l ⋙ relabel f hf ≅ functor P ⟨f l.val,hf l.val l.property⟩ := + NatIso.ofComponents (fun U => asIso (X := (relabel f hf).obj (object P l U)) + (Y := object P ⟨f l.val,hf l.val l.property⟩ U) + { arrow := 𝟙 _ + positional _ := rfl + labelled _ := rfl }) (by + intro U V g + apply Hom.ext + change _ ≫ 𝟙 _ = 𝟙 _ ≫ _ + simp only [Category.comp_id] + rfl) +noncomputable instance relabelIsoMonoidal : NatTrans.IsMonoidal (relabelIso f hf P l).hom where + unit := by + apply Hom.ext + change (𝟙 _ ≫ (unitArrow P l).arrow) ≫ 𝟙 _ = (unitArrow P ⟨f l.val,hf l.val l.property⟩).arrow + simp only [Category.id_comp,Category.comp_id] + rfl + tensor U V := by + apply Hom.ext + change (𝟙 _ ≫ (tensorArrow P l U V).arrow) ≫ 𝟙 _ = + sumArrow (𝟙 _) (𝟙 _) ≫ (tensorArrow P ⟨f l.val,hf l.val l.property⟩ U V).arrow + simp only [Category.id_comp,Category.comp_id,sumArrow_id] + rfl +end SimpleAmenable.PolygonObject.Labelled.Cell + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CofinalPowers.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CofinalPowers.lean new file mode 100644 index 0000000000000000000000000000000000000000..aac114fdb56ed4eb550e135e6fb5faf1f563c5c5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/CofinalPowers.lean @@ -0,0 +1,55 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FiniteGroupHomology + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits +namespace CofinalPowers + +variable {P:Type} [CommMonoid P] +noncomputable def sequence (x:P) : ℕ ⥤ ActionCategory P P where + obj n := (x^n:P) + map {n m} f := ⟨x^(m-n),by + change x^(m-n)*x^n=x^m + rw [←pow_add,Nat.sub_add_cancel (leOfHom f)]⟩ + map_id n := by + apply Functor.Elements.hom_ext + change x^(n-n)=1 + simp + map_comp {n m k} f g := by + apply Functor.Elements.hom_ext + change x^(k-n)=x^(k-m)*x^(m-n) + rw [←pow_add] + congr 1 + have h:=leOfHom f; have h':=leOfHom g; omega +lemma final (x:P) (hx:∀p:P,∃q n,p*q=x^n) : (sequence x).Final := by + apply Functor.final_of_exists_of_isFiltered + · intro p + obtain ⟨q,n,h⟩:=hx p.back + exact ⟨n,⟨⟨q,by change q*p.back=x^n; simpa only [mul_comm] using h⟩⟩⟩ + · intro p n f g + obtain ⟨q,k,h⟩:=hx p.back + refine ⟨n+k,homOfLE (Nat.le_add_right n k),?_⟩ + apply Functor.Elements.hom_ext + change x^(n+k-n)*f.hom=x^(n+k-n)*g.hom + rw [Nat.add_sub_cancel_left] + have eh : f.hom*p.back=g.hom*p.back:=f.map_val.trans g.map_val.symm + rw [←h] + simpa only [mul_assoc,mul_left_comm,mul_comm] using congrArg (fun p:P=>p*q) eh +noncomputable def colimitIso {A:Type*} [Category A] (x:P) (hx:∀p:P,∃q n,p*q=x^n) + (F:ActionCategory P P ⥤ A) [HasColimit F] [HasColimit (sequence x ⋙ F)] : + colimit (sequence x ⋙ F) ≅ colimit F := by + haveI := final x hx + exact Functor.Final.colimitIso (sequence x) F +lemma finite_colimit_iff {R:Type} [Ring R] (x:P) (hx:∀p:P,∃q n,p*q=x^n) + (F:ActionCategory P P ⥤ ModuleCat R) (N n:ℕ) (hn:N≤n) + (hf : ∀ m : ℕ, N ≤ m → IsIso (F.map ((sequence x).map (homOfLE (Nat.le_succ m))))) : + Module.Finite R (F.obj ((sequence x).obj n)) ↔ Module.Finite R (colimit F:ModuleCat R) := by + exact (FixedStageReturn.finite_stage_iff_colimit (sequence x ⋙ F) N n hf hn).trans + (Module.Finite.equiv_iff (colimitIso x hx F).toLinearEquiv) +end CofinalPowers + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ConditionalIntervalDifference.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ConditionalIntervalDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e118e8950410d576a7f6554e5bffd7856acc5d9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ConditionalIntervalDifference.lean @@ -0,0 +1,43 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CellGeometry + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConditionalIntervalDifference +variable {a m : ℕ} + +theorem conditionalAlternatingHom_union (U V : polygonAlgebra a) + (hd : Disjoint U.val V.val) (s : alternatingGroup (Fin m)) : + conditionalAlternatingHom (U ⊔ V) s = conditionalAlternatingHom U s*conditionalAlternatingHom V s := by + apply Subtype.ext + apply Subtype.ext + apply Equiv.ext + intro p + change conditionalPerm (U ⊔ V) s.val p = conditionalPerm U s.val (conditionalPerm V s.val p) + by_cases hu : p.2 ∈ U.val <;> by_cases hv : p.2 ∈ V.val + · exact False.elim (Set.disjoint_left.mp hd hu hv) + all_goals simp [conditionalPerm,hu,hv] + +theorem conditionalAlternatingHom_interval_difference (d : Fin 2) (u v w : CutRing) + (huv : ordinary u ≤ ordinary v) (hvw : ordinary v ≤ ordinary w) + (hlen : ordinary w-ordinary u < 1) (s : alternatingGroup (Fin m)) : + (conditionalAlternatingHom (coordinateInterval a d u v) s)⁻¹ * + conditionalAlternatingHom (coordinateInterval a d u w) s = + conditionalAlternatingHom (coordinateInterval a d v w) s := by + rw [coordinateInterval_union d u v w huv hvw hlen, + conditionalAlternatingHom_union _ _ (coordinateInterval_disjoint d u v v w huv le_rfl hvw hlen)] + group + +end ConditionalIntervalDifference + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ConditionalTranslationStabilizers.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ConditionalTranslationStabilizers.lean new file mode 100644 index 0000000000000000000000000000000000000000..47fcb2393de7aafa9c4708d2358153d51cef3b69 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ConditionalTranslationStabilizers.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.FiveTrackGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConditionalTranslationStabilizers + +variable {a m : ℕ} + +theorem trackTranslation_conditional_commute (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) (d : Fin m → CutRing × CutRing) + (hd : ∀ i, σ i ≠ i → d i = 0) : + Commute (trackTranslation d) (conditionalHom U σ) := by + have he := conditional_translation_conjugate U σ d 0 hd + have hU : (⟨translate a (-0) ⁻¹' U.val,polygon_preimage_translate (-0) U.property⟩ : + polygonAlgebra a) = U := by + apply Subtype.ext + ext p + simp only [Set.mem_preimage,neg_zero,translate_zero] + rw [hU] at he + have hx := congrArg (fun z => z * trackTranslation d) he + change _*_ = _*_ + simpa only [mul_assoc,inv_mul_cancel,mul_one] using hx.symm + +theorem conditional_conjugation_support (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) (d e : Fin m → CutRing × CutRing) + (hde : ∀ i, σ i ≠ i → d i = e i) : + trackTranslation d * conditionalHom U σ * (trackTranslation d)⁻¹ = + trackTranslation e * conditionalHom U σ * (trackTranslation e)⁻¹ := by + have hc := trackTranslation_conditional_commute U σ (d-e) (by + intro i hi + change d i - e i = 0 + rw [hde i hi,sub_self]) + rw [trackTranslation_sub] at hc + have hcomm : Commute (trackTranslation (a := a) d) (trackTranslation e) := by + change _*_ = _*_ + rw [← trackTranslation_add,← trackTranslation_add,add_comm d e] + have he := congrArg (fun z => trackTranslation e * z * (trackTranslation d)⁻¹) hc.eq + rw [hcomm.inv_right.eq] at he + have hh : trackTranslation e * ((trackTranslation e)⁻¹ * trackTranslation d * conditionalHom U σ) * + (trackTranslation d)⁻¹ = trackTranslation d * conditionalHom U σ * (trackTranslation d)⁻¹ := by group + rw [hh] at he + convert he using 1; group + +end ConditionalTranslationStabilizers + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/DistinctSlotStars.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/DistinctSlotStars.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb36af5bd953ba5607e03526cce617fc29502724 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/DistinctSlotStars.lean @@ -0,0 +1,124 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FrameDisjointness + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section DistinctSlotStars + +noncomputable def fiveAlternatingHom {m : ℕ} (ι : Fin 5 ↪ Fin m) : + alternatingGroup (Fin 5) →* alternatingGroup (Fin m) := + (fiveTrackHom ι).codRestrict _ (fiveTrack_sign ι) + +noncomputable def orderedTrackAlphabet {m : ℕ} (ι : Fin 5 ↪ Fin m) : Finset (Fin m) := + Finset.univ.map ι + +instance orderedTrackAlphabetPerfect {m : ℕ} (ι : Fin 5 ↪ Fin m) : + Group.IsPerfect (alternatingGroup (orderedTrackAlphabet ι)) := by + classical + apply Group.IsPerfect.mk + apply commutator_alternatingGroup_eq_top + rw [Nat.card_eq_fintype_card,Fintype.card_coe,orderedTrackAlphabet,Finset.card_map,Finset.card_univ,Fintype.card_fin] + +noncomputable def orderedTrackHom {m : ℕ} (ι : Fin 5 ↪ Fin m) : + alternatingGroup (Fin 5) →* alternatingGroup (orderedTrackAlphabet ι) := + (MonoidHom.ofInjective (subtypeAlternatingHom_injective (orderedTrackAlphabet ι))).symm.toMonoidHom.comp + ((fiveAlternatingHom ι).codRestrict (subtypeAlternatingHom (orderedTrackAlphabet ι)).range + (fun s => (subtypeAlternatingHom_mem_range _ _).mpr (alphabet_support_subset ι s))) + +@[simp] theorem orderedTrackHom_comp {m : ℕ} (ι : Fin 5 ↪ Fin m) : + (subtypeAlternatingHom (orderedTrackAlphabet ι)).comp (orderedTrackHom ι) = + fiveAlternatingHom ι := by + ext s : 1 + exact MonoidHom.apply_ofInjective_symm (subtypeAlternatingHom_injective _) _ + +@[simp] theorem orderedTrackAlphabet_mem {m : ℕ} (ι : Fin 5 ↪ Fin m) (j : Fin 5) : + ι j ∈ orderedTrackAlphabet ι := Finset.mem_map.mpr ⟨j,Finset.mem_univ _,rfl⟩ + +theorem orderedTrackHom_apply {m : ℕ} (ι : Fin 5 ↪ Fin m) + (s : alternatingGroup (Fin 5)) (j : Fin 5) : + ((orderedTrackHom ι s).val ⟨ι j,orderedTrackAlphabet_mem ι j⟩).val = ι (s.val j) := by + have he := congrArg (fun t : alternatingGroup (Fin m) => t.val (ι j)) + (DFunLike.congr_fun (orderedTrackHom_comp ι) s) + change Equiv.Perm.ofSubtype (orderedTrackHom ι s).val (ι j) = + Equiv.Perm.viaEmbedding s.val ι (ι j) at he + rw [Equiv.Perm.ofSubtype_apply_of_mem _ (orderedTrackAlphabet_mem ι j), + Equiv.Perm.viaEmbedding_apply] at he + exact he + +noncomputable def slotAlternatingHom {a m : ℕ} (V : polygonAlgebra a) + (slots : Fin 5 → Fin m × (CutRing × CutRing)) + (hinj : Function.Injective (SlotMap a m V slots)) : + alternatingGroup (Fin 5) →* polygonAlternatingGroup a m := + ((slotHom V slots hinj).comp (alternatingGroup (Fin 5)).subtype).codRestrict _ + (fun s => slotHom_alternating_mem V slots hinj s.property) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (ι j,u (ι j))) + (slots_injective_of_tracks V _ ι.injective)).comp (universalProjection (alternatingGroup (Fin 5))) := by + ext s : 1 + apply Subtype.ext + apply Subtype.ext + apply Equiv.ext + intro p + by_cases hp : p ∈ Set.range (SlotMap a (m+1) V (fun j => (ι j,u (ι j)))) + · obtain ⟨⟨j,x⟩,rfl⟩ := hp + change (coverMap M (alternatingGenerator a r m hm) (B.distinctSlotStar hlarge h hr ι u F V s)).val.val + (ι j,translate a (u (ι j)) x.val) = + slotPerm V (fun j => (ι j,u (ι j))) _ (universalProjection _ s).val + (SlotMap a (m+1) V (fun j => (ι j,u (ι j))) (j,x)) + rw [slotPerm_apply] + exact B.distinctSlotStar_apply hlarge h hr ι u F V s j x + · have hp' : p ∉ frameDomain (orderedTrackAlphabet ι) u V := by + rintro ⟨i,hi,x,hx,rfl⟩ + obtain ⟨j,hj,rfl⟩ := Finset.mem_map.mp hi + exact hp ⟨(j,⟨x,hx⟩),rfl⟩ + have he := B.frameStar_supported hlarge h hr (orderedTrackAlphabet ι) u F V + (universalMap (orderedTrackHom ι) s) p hp' + change (coverMap M (alternatingGenerator a r m hm) (B.distinctSlotStar hlarge h hr ι u F V s)).val.val p = + slotPerm V (fun j => (ι j,u (ι j))) _ (universalProjection _ s).val p + rw [slotPerm_apply_of_notMem _ _ _ _ hp] + exact he + +end InitialCoverSystem +end DistinctSlotStars + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/EmptyStage.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/EmptyStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad9b3fc4eeb9c95134cf6c633ccd39bcd20bd3b2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/EmptyStage.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.BarContractible +import OAI.GroupTheory.SimpleAmenable.Simplicial.FiniteSetMonoidal + +namespace OAI + +section + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory MonoidalCategory +namespace IntervalBar.Diagram + +open FreeChains +lemma bar₃_acyclic {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] + [∀x y:C,Subsingleton (x ⟶ y)] (hh:∀x y:C,Nonempty (x ⟶ y)) + (n:ℕ) (hn:0 ⟨homOfAll hh 0 x y⟩) q hq + · intro p q hq _ + exact bar₂_acyclic (fun x y => ⟨homOfAll hh p x y⟩) q hq + · exact hn + · omega +end IntervalBar.Diagram +namespace SimpleAmenable.PolygonObject.FiniteSetGroupoid +abbrev Terminal := Discrete PUnit +instance terminalSymmetric : SymmetricCategory Terminal where + braiding X Y := eqToIso (Subsingleton.elim _ _) + braiding_naturality_left := by intros; exact Subsingleton.elim _ _ + braiding_naturality_right := by intros; exact Subsingleton.elim _ _ + hexagon_forward := by intros; exact Subsingleton.elim _ _ + hexagon_reverse := by intros; exact Subsingleton.elim _ _ + symmetry := by intros; exact Subsingleton.elim _ _ +noncomputable def terminal {C:Type} [Category.{0} C] : C ⥤ Terminal := + (Functor.const C).obj ⟨PUnit.unit⟩ +noncomputable instance terminalMonoidal {C:Type} [Category.{0} C] [MonoidalCategory C] : + (terminal (C:=C)).Monoidal := Functor.CoreMonoidal.toMonoidal { + εIso := Iso.refl _ + μIso _ _ := Iso.refl _ + μIso_hom_natural_left := by intros; exact Subsingleton.elim _ _ + μIso_hom_natural_right := by intros; exact Subsingleton.elim _ _ + associativity := by intros; exact Subsingleton.elim _ _ + left_unitality := by intros; exact Subsingleton.elim _ _ + right_unitality := by intros; exact Subsingleton.elim _ _ } +noncomputable instance terminalBraided {C:Type} [Category.{0} C] [MonoidalCategory C] [BraidedCategory C] : + (terminal (C:=C)).Braided where + braided _ _ := Subsingleton.elim _ _ +noncomputable def emptyFunctor : Terminal ⥤ FiniteSetGroupoid := + (Functor.const _).obj empty +noncomputable instance emptyFunctorMonoidal : emptyFunctor.Monoidal := + Functor.CoreMonoidal.toMonoidal { + εIso := Iso.refl _ + μIso _ _ := Iso.refl _ + μIso_hom_natural_left := by intros; apply Equiv.ext; intro x; exact Fin.elim0 x + μIso_hom_natural_right := by intros; apply Equiv.ext; intro x; exact Fin.elim0 x + associativity := by intros; apply Equiv.ext; intro x; exact Fin.elim0 x + left_unitality := by intros; apply Equiv.ext; intro x; exact Fin.elim0 x + right_unitality := by intros; apply Equiv.ext; intro x; exact Fin.elim0 x } +noncomputable instance : emptyFunctor.Braided where + braided _ _ := by apply Equiv.ext; intro x; exact Fin.elim0 x +end SimpleAmenable.PolygonObject.FiniteSetGroupoid + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiberAddition.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiberAddition.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f22a83b8d0bba733d3b3f6bfaab8b2e1796b937 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiberAddition.lean @@ -0,0 +1,172 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.TripleReindex +import OAI.GroupTheory.SimpleAmenable.Configurations.EmptyStage +import OAI.GroupTheory.SimpleAmenable.Simplicial.FiberSum + +namespace OAI + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory +namespace BarFiberProduct + +universe homSource homTarget +variable {A C D:Type} [Category.{homSource} A] [Category.{homTarget} C] + [Category.{homTarget} D] + [MonoidalCategory A] [MonoidalCategory C] [MonoidalCategory D] + [BraidedCategory A] [BraidedCategory C] [BraidedCategory D] +noncomputable instance prodFunctorBraided (F:A⥤C) (G:A⥤D) [F.Braided] [G.Braided] : + (F.prod' G).Braided where + braided X Y := by + apply CategoryTheory.Prod.hom_ext + · simp only [CategoryTheory.prod_comp_fst,Functor.prod'_μ_fst] + change Functor.LaxMonoidal.μ F X Y ≫ F.map (β_ X Y).hom = + (β_ (F.obj X) (F.obj Y)).hom ≫ Functor.LaxMonoidal.μ F Y X + exact Functor.Braided.braided (F:=F) X Y + · simp only [CategoryTheory.prod_comp_snd,Functor.prod'_μ_snd] + change Functor.LaxMonoidal.μ G X Y ≫ G.map (β_ X Y).hom = + (β_ (G.obj X) (G.obj Y)).hom ≫ Functor.LaxMonoidal.μ G Y X + exact Functor.Braided.braided (F:=G) X Y +end BarFiberProduct +namespace IntervalBar.Diagram + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +lemma bar₃Map_id_homology (j:ℕ) : + SSet.homologyMap (bar₃Map (𝟭 C)) DiagonalResolution.Z j=𝟙 _ := by + have := bar₃Map_homology_isIso (𝟭 C) j + apply (cancel_epi (SSet.homologyMap (bar₃Map (𝟭 C)) DiagonalResolution.Z j)).mp + rw [Category.comp_id,← SSet.homologyMap_comp,←bar₃Map_comp] + exact bar₃Map_eq_of_monoidalNatTrans (Functor.leftUnitor (𝟭 C)).hom j +end IntervalBar.Diagram +namespace SimpleAmenable.PolygonObject.FiniteSetGroupoid +open BarFiberProduct IntervalBar.Diagram BarFinitePower +open LabelledStage.Stage + +noncomputable def merge : (Bool → FiniteSetGroupoid) ⥤ FiniteSetGroupoid := + (project Bool true).prod' (project Bool false) ⋙ tensor FiniteSetGroupoid +noncomputable instance : merge.Braided := by unfold merge; infer_instance +noncomputable def selected (b k:Bool) : FiniteSetGroupoid ⥤ FiniteSetGroupoid := + match b,k with + | false,false => 𝟭 _ + | true,true => 𝟭 _ + | _,_ => terminal.{0} ⋙ emptyFunctor.{0} +noncomputable instance selectedMonoidal (b k:Bool) : (selected b k).Monoidal := by + cases b <;> cases k <;> unfold selected <;> infer_instance +noncomputable instance selectedBraided (b k:Bool) : (selected b k).Braided := by + cases b <;> cases k <;> unfold selected <;> infer_instance +noncomputable def insertFiber (b:Bool) : FiniteSetGroupoid ⥤ (Bool→FiniteSetGroupoid) := + Functor.pi' (selected b) +noncomputable instance (b:Bool) : (insertFiber b).Braided := by unfold insertFiber; infer_instance +noncomputable def insertCoordinate (b k:Bool) : insertFiber b ⋙ project Bool k ≅ selected b k := Iso.refl _ +noncomputable instance (b k:Bool) : NatTrans.IsMonoidal (insertCoordinate b k).hom where + unit := by + simp [insertCoordinate,insertFiber,project,toEquiv] + cases b <;> cases k <;> rfl + tensor U V := by + change Functor.LaxMonoidal.μ (selected b k) U V ≫ 𝟙 _ = + (𝟙 _ ⊗ₘ 𝟙 _) ≫ Functor.LaxMonoidal.μ (selected b k) U V + rw [id_tensorHom_id,Category.comp_id,Category.id_comp] +lemma selected_homology (b k:Bool) (j:ℕ) (hj:0 cases k + · exact bar₃Map_id_homology j + · change SSet.homologyMap (bar₃Map (terminal.{0} ⋙ emptyFunctor.{0})) DiagonalResolution.Z j=0 + rw [bar₃Map_comp,SSet.homologyMap_comp] + have hz := bar₃_acyclic (C:=Terminal.{0}) (fun x y => ⟨eqToHom (Subsingleton.elim x y)⟩) j hj + rw [hz.eq_of_src (SSet.homologyMap (bar₃Map emptyFunctor.{0}) DiagonalResolution.Z j) 0,comp_zero] + · change SSet.homologyMap (bar₃Map (terminal.{0} ⋙ emptyFunctor.{0})) DiagonalResolution.Z j=0 + rw [bar₃Map_comp,SSet.homologyMap_comp] + have hz := bar₃_acyclic (C:=Terminal.{0}) (fun x y => ⟨eqToHom (Subsingleton.elim x y)⟩) j hj + rw [hz.eq_of_src (SSet.homologyMap (bar₃Map emptyFunctor.{0}) DiagonalResolution.Z j) 0,comp_zero] + · exact bar₃Map_id_homology j +noncomputable def mergeInsertIso (b:Bool) : insertFiber b ⋙ merge ≅ 𝟭 FiniteSetGroupoid := by + cases b + · exact NatIso.ofComponents (fun U => asIso (C := FiniteSetGroupoid) + (X := sum empty U) (Y := U) (left U)) (by + intro U V f + change sumHom (𝟙 empty) f ≫ left V = left U ≫ f + exact (leftUnitor_naturality f)) + · exact NatIso.ofComponents (fun U => asIso (C := FiniteSetGroupoid) + (X := sum U empty) (Y := U) (right U)) (by + intro U V f + change sumHom f (𝟙 empty) ≫ right V = right U ≫ f + exact (rightUnitor_naturality f)) +lemma merge_μ (U V:Bool→FiniteSetGroupoid) : + Functor.LaxMonoidal.μ merge U V=tensorμ (U true) (U false) (V true) (V false) := by + unfold merge + rw [Functor.LaxMonoidal.comp_μ] + change tensorμ (U true) (U false) (V true) (V false) ≫ + sumHom (Functor.LaxMonoidal.μ ((project Bool true).prod' (project Bool false)) U V).1 + (Functor.LaxMonoidal.μ ((project Bool true).prod' (project Bool false)) U V).2 = _ + rw [Functor.prod'_μ_fst,Functor.prod'_μ_snd] + change tensorμ (U true) (U false) (V true) (V false) ≫ sumHom (𝟙 _) (𝟙 _) = _ + rw [sumHom_id] + apply Equiv.ext; intro x; rfl +lemma mergeInsert_false_μ (U V:FiniteSetGroupoid) : + Functor.LaxMonoidal.μ (insertFiber false ⋙ merge) U V = tensorμ empty U empty V := by + rw [Functor.LaxMonoidal.comp_μ,merge_μ] + change tensorμ _ _ _ _ ≫ sumHom (𝟙 _) (𝟙 _) = _ + rw [sumHom_id] + apply Equiv.ext; intro x; rfl +lemma mergeInsert_true_μ (U V:FiniteSetGroupoid) : + Functor.LaxMonoidal.μ (insertFiber true ⋙ merge) U V = tensorμ U empty V empty := by + rw [Functor.LaxMonoidal.comp_μ,merge_μ] + change tensorμ _ _ _ _ ≫ sumHom (𝟙 _) (𝟙 _) = _ + rw [sumHom_id] + apply Equiv.ext; intro x; rfl +noncomputable instance mergeInsertMonoidal (b:Bool) : NatTrans.IsMonoidal (mergeInsertIso b).hom where + unit := by cases b <;> apply Equiv.ext <;> intro x <;> exact Fin.elim0 x + tensor U V := by + cases b + · rw [mergeInsert_false_μ] + change tensorμ empty U empty V ≫ left (sum U V) = sumHom (left U) (left V) ≫ 𝟙 _ + rw [Category.comp_id,tensorμ_eq] + dsimp only [CategoryStruct.comp,instGroupoid,toEquiv] + apply Equiv.ext; intro x + obtain ⟨z,rfl⟩ := (sumEquiv (sum empty U) (sum empty V)).surjective x + cases z with + | inl z => + obtain ⟨t,rfl⟩ := (sumEquiv empty U).surjective z + cases t with + | inl t => exact Fin.elim0 t + | inr t => + simp [toEquiv,sumHom,assoc,swap,left,inv_eq,Equiv.trans_apply,MonoidalCategory.tensorObj] + dsimp only [sum,empty] + rw [Equiv.symm_apply_apply] + rfl + | inr z => + obtain ⟨t,rfl⟩ := (sumEquiv empty V).surjective z + cases t with + | inl t => exact Fin.elim0 t + | inr t => + simp [toEquiv,sumHom,assoc,swap,left,inv_eq,Equiv.trans_apply,MonoidalCategory.tensorObj] + dsimp only [sum,empty] + rw [Equiv.symm_apply_apply] + rfl + · rw [mergeInsert_true_μ] + change tensorμ U empty V empty ≫ right (sum U V) = sumHom (right U) (right V) ≫ 𝟙 _ + rw [Category.comp_id,tensorμ_eq] + dsimp only [CategoryStruct.comp,instGroupoid,toEquiv] + apply Equiv.ext; intro x + obtain ⟨z,rfl⟩ := (sumEquiv (sum U empty) (sum V empty)).surjective x + cases z with + | inl z => + obtain ⟨t,rfl⟩ := (sumEquiv U empty).surjective z + cases t with + | inr t => exact Fin.elim0 t + | inl t => + simp [toEquiv,sumHom,assoc,swap,right,inv_eq,Equiv.trans_apply,MonoidalCategory.tensorObj] + dsimp only [sum,empty] + rw [Equiv.symm_apply_apply] + rfl + | inr z => + obtain ⟨t,rfl⟩ := (sumEquiv V empty).surjective z + cases t with + | inr t => exact Fin.elim0 t + | inl t => + simp [toEquiv,sumHom,assoc,swap,right,inv_eq,Equiv.trans_apply,MonoidalCategory.tensorObj] + dsimp only [sum,empty] + rw [Equiv.symm_apply_apply] + rfl +end SimpleAmenable.PolygonObject.FiniteSetGroupoid + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiberBinary.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiberBinary.lean new file mode 100644 index 0000000000000000000000000000000000000000..aad39143e5f062a3bd047dff506719fcd68098ea --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiberBinary.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.StageBinary +import OAI.GroupTheory.SimpleAmenable.Homology.PiBinary + +namespace OAI + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable.PolygonTracks +open FreeChains ComponentTranslation ComponentStable + +attribute [local instance 1200] Rep.hV2 Submodule.module Submodule.Quotient.module +lemma large_complement (a:ℕ) (p:Skeleton (PolygonObject a)) : + ∃n,32 ≤ n ∧ ∃r,r*p=componentGenerator a^n := by + obtain ⟨r,k,h⟩:=componentGenerator_cofinal a p + refine ⟨32+k,by omega,componentGenerator a^32*r,?_⟩ + rw [mul_assoc,mul_comm r p,h,pow_add] +noncomputable def fiberToStage (a:ℕ) (p:Skeleton (PolygonObject a)) (n:ℕ) + (r:Skeleton (PolygonObject a)) (h:r*p=componentGenerator a^n) : + Fiber p ⥤ SingleObj (polygonFullGroup a n) := + ComponentTranslation.translate r p (componentGenerator a^n) h ⋙ + (standardFiberInclusion a n).asEquivalence.inverse +noncomputable def fiberToStageGlobal (a:ℕ) (p:Skeleton (PolygonObject a)) (n:ℕ) + (r:Skeleton (PolygonObject a)) (h:r*p=componentGenerator a^n) : + fiberToStage a p n r h ⋙ standardNerveInclusion a n ≅ + (property p).ι ⋙ tensorLeft (repr r) := by + exact Functor.isoWhiskerRight + (Functor.isoWhiskerLeft (ComponentTranslation.translate r p _ h) + (standardFiberInclusion a n).asEquivalence.counitIso) (property (componentGenerator a^n)).ι +lemma fiber_value_mem (a:ℕ) (p q:Skeleton (PolygonObject a)) + (z:((nerve (Fiber p)⊗nerve (Fiber q)).homology Z 2:A)) : + pullD (nerveMap (property p).ι) (nerveMap (property q).ι) 2 z ∈ mixedImage a := by + obtain ⟨n,hn,r,hr⟩:=large_complement a p + obtain ⟨m,hm,s,hs⟩:=large_complement a q + let f:=fiberToStage a p n r hr + let g:=fiberToStage a q m s hs + have h : SSet.homologyMap (nerveMap f⊗ₘnerveMap g) Z 2 ≫ + pullD (nerveMap (standardNerveInclusion a n)) (nerveMap (standardNerveInclusion a m)) 2 = + pullD (nerveMap (property p).ι) (nerveMap (property q).ι) 2 := by + rw [pullD_comp] + change pullD (nerveMap (fiberToStage a p n r hr ⋙ standardNerveInclusion a n)) + (nerveMap (fiberToStage a q m s hs ⋙ standardNerveInclusion a m)) 2 = _ + rw [pullD_congr (fiberToStageGlobal a p n r hr) (fiberToStageGlobal a q m s hs)] + change pullD (nerveMap (property p).ι ≫ nerveMap (tensorLeft _)) + (nerveMap (property q).ι ≫ nerveMap (tensorLeft _)) 2 = _ + rw [pullD_left,pullD_right] + have hv:=stage_value_mem a n m hn hm (SSet.homologyMap (nerveMap f⊗ₘnerveMap g) Z 2 z) + have he:=congrArg (fun k=>k z) h + exact he ▸ hv +lemma binaryD_quotient_zero (a:ℕ) : binaryD (C:=PolygonObject a) 2 ≫ ModuleCat.ofHom (mixedImage a).mkQ=0 := by + apply (cancel_epi (SSet.homologyMap (PiSSet.binaryIso (fun _:Fin 2=>nerve (PolygonObject a))).hom Z 2)).mp + apply (PiFiber.homologyIsColimit (PolygonObject a) (Fin 2) 2).hom_ext + intro p + change SSet.homologyMap (PiFiber.inclusion (PolygonObject a) (Fin 2) p.as) Z 2 ≫ + (SSet.homologyMap (PiSSet.binaryIso (fun _:Fin 2=>nerve (PolygonObject a))).hom Z 2 ≫ + (binaryD 2 ≫ ModuleCat.ofHom (mixedImage a).mkQ)) = _ + erw [←SSet.homologyMap_comp_assoc,PiFiber.binary_inclusion,SSet.homologyMap_comp_assoc] + have hp : pullD (nerveMap (property (p.as 0)).ι) (nerveMap (property (p.as 1)).ι) 2 ≫ + ModuleCat.ofHom (mixedImage a).mkQ=0 := by + apply ModuleCat.hom_ext + apply LinearMap.ext + intro z + exact (Submodule.Quotient.mk_eq_zero (mixedImage a)).mpr (fiber_value_mem a (p.as 0) (p.as 1) z) + change SSet.homologyMap _ Z 2 ≫ (pullD _ _ 2 ≫ ModuleCat.ofHom (mixedImage a).mkQ)=_ + erw [hp,comp_zero] +lemma mixedImage_finite (a:ℕ) + [Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a 32) ℤ) 1)] : + Module.Finite ℤ (mixedImage a) := by + let X:=nerve (SingleObj (polygonFullGroup a 32)) + have hf : ∀i,i<2 → Module.Finite ℤ (X.homology Z i:A) := by + intro i hi + interval_cases i + · exact BarFinitePower.homology_zero_finite X + · exact Module.Finite.equiv (GroupNerveCoordinates.homologyIso (polygonFullGroup a 32) 1).symm.toLinearEquiv + have :=ConnectedProduct.finite_projection_kernel X X 2 hf hf + exact Module.Finite.range _ +end SimpleAmenable.PolygonTracks + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiniteAlignedConfiguration.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiniteAlignedConfiguration.lean new file mode 100644 index 0000000000000000000000000000000000000000..642e2118169ccb6938f38252231a83763c8de1a2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiniteAlignedConfiguration.lean @@ -0,0 +1,50 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FinitelyManyTranslationRelations + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiniteAlignedConfiguration + +variable {α β G : Type*} [Group G] [Finite β] (f : α → G) + +theorem finite_table_subgroup_inputs_eventually (L : ℕ) + (K : Subgroup (BoundedRelationCover L f)) {T : Type*} [Group T] [Finite T] + (φ : T →* G) (hφ : ∀ s, φ s ∈ K.map (coverMap L f)) + (input : β → T) (v : β → FreeGroup α) + (hv : ∀ b, FreeGroup.lift f (v b) = φ (input b)) : + ∃ B : ℕ, ∃ hLB : L ≤ B, ∀ M : ℕ, ∀ hBM : B ≤ M, + ∃ ρ : T →* BoundedRelationCover M f, + (coverMap M f).comp ρ = φ ∧ + ρ.range ≤ K.map (coverTransition f (le_trans hLB hBM)) ∧ + ∀ b, ρ (input b) = PresentedGroup.mk (shortRelations M f) (v b) := by + choose y hy hyq using hφ + choose w hw using fun s => PresentedGroup.mk_surjective (shortRelations L f) (y s) + have hwp : ∀ s, FreeGroup.lift f (w s) = φ s := by + intro s + rw [← coverMap_mk L f,hw s,hyq s] + obtain ⟨B₁,hB₁⟩ := finite_table_lift_eventually f φ w hwp + obtain ⟨B₂,hB₂⟩ := finite_word_equalities_eventually f (fun b => w (input b)) v + (fun b => (hwp (input b)).trans (hv b).symm) + refine ⟨L+B₁+B₂,by omega,fun M hM => ?_⟩ + obtain ⟨ρ,hρ,hρw⟩ := hB₁ M (by omega) + refine ⟨ρ,hρ,?_,?_⟩ + · rintro z ⟨s,rfl⟩ + refine ⟨y s,hy s,?_⟩ + rw [← hw s,coverTransition_mk,hρw s] + · intro b + rw [hρw] + exact hB₂ M (by omega) b + +end FiniteAlignedConfiguration + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiveTrackGeneration.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiveTrackGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..f901cf124292fbd64cc232cdef44313842734b9b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FiveTrackGeneration.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.BooleanCoordinateGeneration +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ConditionalBooleanGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiveTrackGeneration + +noncomputable def fiveTrackHom {m : ℕ} (ι : Fin 5 ↪ Fin m) : + alternatingGroup (Fin 5) →* Equiv.Perm (Fin m) := + (Equiv.Perm.viaEmbeddingHom ι).comp (alternatingGroup (Fin 5)).subtype + +instance fiveTrackPerfect : Group.IsPerfect (alternatingGroup (Fin 5)) := + ⟨commutator_alternatingGroup_eq_top (by norm_num)⟩ + +theorem fiveTrack_sign {m : ℕ} (ι : Fin 5 ↪ Fin m) + (g : alternatingGroup (Fin 5)) : fiveTrackHom ι g ∈ alternatingGroup (Fin m) := by + classical + change Equiv.Perm.sign (g.val.viaEmbedding ι) = 1 + rw [Equiv.Perm.viaEmbedding,Equiv.Perm.sign_extendDomain] + exact g.property + +theorem fiveTrack_support {m : ℕ} (ι : Fin 5 ↪ Fin m) + (g : alternatingGroup (Fin 5)) : (fiveTrackHom ι g).support.card ≤ 5 := by + classical + have hsub : (fiveTrackHom ι g).support ⊆ Finset.univ.map ι := by + intro i hi + by_contra hn + have hn' : i ∉ Set.range ι := by simpa using hn + exact (Equiv.Perm.mem_support.mp hi) (Equiv.Perm.viaEmbedding_apply_of_notMem g.val ι i hn') + simpa using Finset.card_le_card hsub + +theorem fiveTrack_initial_generated (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) (j : Fin 5) : + ConditionalAvailable (fiveTrackHom ι) (sourceGenerated a r m) (initialTest a r j) := by + intro g + exact sourceGenerator_mem_generated a r m + (Sum.inl (j,⟨fiveTrackHom ι g,fiveTrack_sign ι g,fiveTrack_support ι g⟩)) + +theorem fiveTrack_whole_generated (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) : + ConditionalAvailable (fiveTrackHom ι) (sourceGenerated a r m) (wholePolygon a) := + fiveTrack_initial_generated a r m ι 0 + +noncomputable def alphabetTranslation {m : ℕ} (ι : Fin 5 ↪ Fin m) + (b : Fin m) (u : CutRing × CutRing) : Fin m → CutRing × CutRing := + ∑ j : Fin 5, (Pi.single (ι j) u - Pi.single b u) + +theorem alphabetTranslation_generated (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) (b : Fin (m+1)) (u : CutRing × CutRing) : + trackTranslation (a := a) (alphabetTranslation ι b u) ∈ sourceGenerated a r m := by + classical + unfold alphabetTranslation + induction (Finset.univ : Finset (Fin 5)) using Finset.induction_on with + | empty => simp + | @insert i s hi ih => + rw [Finset.sum_insert hi,trackTranslation_add] + exact (sourceGenerated a r m).mul_mem (balanced_difference_generated a r m b (ι i) u) ih + +theorem alphabetTranslation_apply {m : ℕ} (ι : Fin 5 ↪ Fin m) + (b : Fin m) (hb : b ∉ Set.range ι) (u : CutRing × CutRing) (j : Fin 5) : + alphabetTranslation ι b u (ι j) = u := by + classical + have hb' : ∀ k, ι k ≠ b := fun k h => hb ⟨k,h⟩ + simp [alphabetTranslation,Finset.sum_apply,Pi.single_apply,ι.injective.eq_iff,hb'] + +theorem conditional_translation_conjugate {a m : ℕ} (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) (d : Fin m → CutRing × CutRing) (u : CutRing × CutRing) + (hd : ∀ i, σ i ≠ i → d i = u) : + conditionalHom (⟨translate a (-u) ⁻¹' U.val, + polygon_preimage_translate (-u) U.property⟩ : polygonAlgebra a) σ = + trackTranslation d * conditionalHom U σ * (trackTranslation d)⁻¹ := by + classical + apply Subtype.ext + apply Equiv.ext + rintro ⟨i,p⟩ + change conditionalPerm (⟨_,_⟩ : polygonAlgebra a) σ (i,p) = + trackTranslationPerm d (conditionalPerm U σ ((trackTranslationPerm d).symm (i,p))) + by_cases hi : σ i = i + · simp [conditionalPerm,trackTranslationPerm,hi,← translate_add] + · have hi' : σ (σ i) ≠ σ i := fun h => hi (σ.injective h) + have hdi := hd i hi + have hdsi := hd (σ i) hi' + by_cases hp : translate a (-u) p ∈ U.val <;> + simp_all [conditionalPerm,trackTranslationPerm,← translate_add] + +theorem fiveTrack_translate_generated (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) (b : Fin (m+1)) (hb : b ∉ Set.range ι) + (U : polygonAlgebra a) + (hU : ConditionalAvailable (fiveTrackHom ι) (sourceGenerated a r m) U) + (u : CutRing × CutRing) : + ConditionalAvailable (fiveTrackHom ι) (sourceGenerated a r m) + ⟨translate a u ⁻¹' U.val,polygon_preimage_translate u U.property⟩ := by + intro g + let d := alphabetTranslation ι b (-u) + have hd : ∀ i, fiveTrackHom ι g i ≠ i → d i = -u := by + intro i hi + have hi' : i ∈ Set.range ι := by + by_contra hn + exact hi (Equiv.Perm.viaEmbedding_apply_of_notMem g.val ι i hn) + obtain ⟨j,rfl⟩ := hi' + exact alphabetTranslation_apply ι b hb (-u) j + have he := conditional_translation_conjugate U (fiveTrackHom ι g) d (-u) hd + simp only [neg_neg] at he + rw [he] + have ht := alphabetTranslation_generated a r m ι b (-u) + exact (sourceGenerated a r m).mul_mem ((sourceGenerated a r m).mul_mem ht (hU g)) + ((sourceGenerated a r m).inv_mem ht) + +noncomputable def fiveTrackBoolean (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) : BooleanSubalgebra (Set (GenericSquare a)) := + conditionalBoolean (fiveTrackHom ι) (sourceGenerated a r m) + (fiveTrack_whole_generated a r m ι) + +theorem fiveTrackBoolean_translate (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) (b : Fin (m+1)) (hb : b ∉ Set.range ι) + (u : CutRing × CutRing) {U : Set (GenericSquare a)} + (hU : U ∈ fiveTrackBoolean a r m ι) : + translate a u ⁻¹' U ∈ fiveTrackBoolean a r m ι := by + obtain ⟨hU,hU'⟩ := hU + exact ⟨polygon_preimage_translate u hU, + fiveTrack_translate_generated a r m ι b hb ⟨U,hU⟩ hU' u⟩ + +theorem fiveTrackBoolean_initial (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) (j : Fin 5) : + (initialTest a r j).val ∈ fiveTrackBoolean a r m ι := + ⟨(initialTest a r j).property,fiveTrack_initial_generated a r m ι j⟩ + +theorem fiveTrackBoolean_coordinate (a : ℕ) (r : CutRing) (m : ℕ) + (ι : Fin 5 ↪ Fin (m+1)) (b : Fin (m+1)) (hb : b ∉ Set.range ι) + (j : Fin 2) (z : CutRing) : + halfPlane a (Fin.castLE (by omega) j) z ∈ fiveTrackBoolean a r m ι := by + apply coordinate_cuts_generated _ j + (fun u _ hU => fiveTrackBoolean_translate a r m ι b hb u hU) + fin_cases j + · exact fiveTrackBoolean_initial a r m ι 1 + · exact fiveTrackBoolean_initial a r m ι 2 + +end FiveTrackGeneration + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FlagExchangeAction.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FlagExchangeAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcf7604e9e4ececd92a03af7a6954daf73685098 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FlagExchangeAction.lean @@ -0,0 +1,130 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagTranslation + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagExchangeAction +open Classical + +theorem flagMem_top {a : ℕ} {v : ℝ×ℝ} (z : SquareFlag a v) : + flagMem (⊤ : polygonAlgebra a) z := by + have h := flagMem_compl (⊥ : polygonAlgebra a) z + simpa using h.mpr (flagMem_bot z) + +theorem flagMem_inf {a : ℕ} {v : ℝ×ℝ} (U V : polygonAlgebra a) (z : SquareFlag a v) : + flagMem (U⊓V) z ↔ flagMem U z ∧ flagMem V z := by + have he : U⊓V=(Uᶜ⊔Vᶜ)ᶜ := by simp + rw [he,flagMem_compl,flagMem_sup,flagMem_compl,flagMem_compl] + tauto + +theorem flagMem_nonempty {a : ℕ} {v : ℝ×ℝ} {U : polygonAlgebra a} + {z : SquareFlag a v} (hz : flagMem U z) : U.val.Nonempty := by + obtain ⟨N,hN,hzN,h⟩ := flagMem_iff U z + obtain ⟨p,hp,hpv⟩ := squareSector_generic z hN hzN + exact ⟨p,(h p hp hpv).mpr hz⟩ + +abbrev FlagTrackPoint (a m : ℕ) (v : ℝ×ℝ) := Fin m × SquareFlag a v + +theorem flagChart_exists {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : + ∃ c : TableChart a m, c.Holds g.val ∧ z.1=c.source ∧ flagMem c.domain z.2 := by + obtain ⟨S,hS,hcover⟩ := g.property + obtain ⟨p,_,_,hp⟩ := flagValue_finite + (fun c : S => fun p : GenericSquare a => decide (p∈c.val.domain.val)) + (fun c => polygon_hasSquareArrangement c.val.domain.property) + z.2 isOpen_univ (Set.mem_univ _) + obtain ⟨c,hc,htrack,hcp⟩ := hcover (z.1,p) + refine ⟨c,hS c hc,htrack,?_⟩ + exact (hp ⟨c,hc⟩).symm.trans (decide_eq_true hcp) + +theorem flagChart_values_eq {a m : ℕ} {v : ℝ×ℝ} {f : TrackPoint a m → TrackPoint a m} + {c d : TableChart a m} (hc : c.Holds f) (hd : d.Holds f) + {z : FlagTrackPoint a m v} (hcs : z.1=c.source) (hds : z.1=d.source) + (hcz : flagMem c.domain z.2) (hdz : flagMem d.domain z.2) : + (c.target,flagTranslate c.shift z.2)=(d.target,flagTranslate d.shift z.2) := by + obtain ⟨p,hp⟩ := flagMem_nonempty ((flagMem_inf c.domain d.domain z.2).mpr ⟨hcz,hdz⟩) + have hev : (c.target,translate a c.shift p)=(d.target,translate a d.shift p) := by + have hsource : c.source=d.source := hcs.symm.trans hds + rw [← hc p hp.1,← hd p hp.2,hsource] + have ht := congrArg Prod.fst hev + have hu := orbitRepresentative_eq_of_translate_eq p (congrArg Prod.snd hev) + refine Prod.ext (show c.target=d.target from ht) ?_ + rw [flagTranslate_reduce c.shift,flagTranslate_reduce d.shift,hu] + +noncomputable def flagChart {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : TableChart a m := Classical.choose (flagChart_exists g z) + +theorem flagChart_spec {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : + (flagChart g z).Holds g.val ∧ z.1=(flagChart g z).source ∧ + flagMem (flagChart g z).domain z.2 := Classical.choose_spec (flagChart_exists g z) + +noncomputable def flagAction {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : FlagTrackPoint a m v := + ((flagChart g z).target,flagTranslate (flagChart g z).shift z.2) + +theorem flagAction_apply {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) (c : TableChart a m) (hc : c.Holds g.val) + (hcs : z.1=c.source) (hcz : flagMem c.domain z.2) : + flagAction g z=(c.target,flagTranslate c.shift z.2) := by + exact flagChart_values_eq (flagChart_spec g z).1 hc (flagChart_spec g z).2.1 hcs + (flagChart_spec g z).2.2 hcz + +@[simp] theorem flagAction_one {a m : ℕ} {v : ℝ×ℝ} (z : FlagTrackPoint a m v) : + flagAction (1 : polygonFullGroup a m) z=z := by + let c : TableChart a m := ⟨z.1,z.1,0,⊤⟩ + have hc : c.Holds (1 : polygonFullGroup a m).val := by + intro p _ + simp [c] + have h := flagAction_apply 1 z c hc rfl (flagMem_top z.2) + simpa only [c,flagTranslate_zero,Prod.eta] using h + +theorem flagAction_mul {a m : ℕ} {v : ℝ×ℝ} (f g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : flagAction (f*g) z=flagAction f (flagAction g z) := by + let d := flagChart g z + let c := flagChart f (flagAction g z) + have hd : d.Holds g.val ∧ z.1=d.source ∧ flagMem d.domain z.2 := flagChart_spec g z + have hc : c.Holds f.val ∧ (flagAction g z).1=c.source ∧ + flagMem c.domain (flagAction g z).2 := flagChart_spec f (flagAction g z) + have hcd : c.source=d.target := hc.2.1.symm + have hcomp : (c.comp d).Holds (f*g).val := by + exact TableChart.comp_holds (f := f.val) (g := g.val) hc.1 hd.1 hcd + have hcdom : flagMem (c.comp d).domain z.2 := by + change flagMem (d.domain⊓⟨translate a d.shift ⁻¹' c.domain.val, + polygon_preimage_translate d.shift c.domain.property⟩) z.2 + rw [flagMem_inf,flagMem_preimage_translate] + exact ⟨hd.2.2,hc.2.2⟩ + calc + flagAction (f*g) z = ((c.comp d).target,flagTranslate (c.comp d).shift z.2) := + flagAction_apply (f*g) z (c.comp d) hcomp hd.2.1 hcdom + _ = flagAction f (flagAction g z) := by + change (c.target,flagTranslate (c.shift+d.shift) z.2)= + (c.target,flagTranslate c.shift (flagTranslate d.shift z.2)) + rw [flagTranslate_add] + +noncomputable def flagPermutation {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) : + Equiv.Perm (FlagTrackPoint a m v) where + toFun := flagAction g + invFun := flagAction g⁻¹ + left_inv z := by rw [← flagAction_mul,inv_mul_cancel,flagAction_one] + right_inv z := by rw [← flagAction_mul,mul_inv_cancel,flagAction_one] + +noncomputable def flagRepresentation (a m : ℕ) (v : ℝ×ℝ) : + polygonFullGroup a m →* Equiv.Perm (FlagTrackPoint a m v) where + toFun := flagPermutation + map_one' := by apply Equiv.ext; intro z; exact flagAction_one z + map_mul' f g := by apply Equiv.ext; intro z; exact flagAction_mul f g z + +end FlagExchangeAction + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FormalSectorProjection.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FormalSectorProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce703b012fda4954a53c5d51befea3ceef5192d7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/FormalSectorProjection.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PairControl +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalSectorSubfamily +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalStarTables + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FormalSectorProjection +variable {α ι Ω H Q : Type*} [Fintype α] [DecidableEq α] [Group H] [Group Q] + +theorem alternating_function_center (hα : 4 ≤ Nat.card α) : + Subgroup.center (Ω → alternatingGroup α)=⊥ := by + rw [Subgroup.center_pi] + simp only [alternatingGroup.center_eq_bot hα,Subgroup.pi_bot] + +theorem assignmentPullback_surjective {X Y E : Type*} [Group E] (v : X → Y) + (hv : Function.Injective v) : Function.Surjective (assignmentPullback (E := E) v) := by + classical + intro f + refine ⟨Function.extend v f (fun _ => 1),?_⟩ + ext x + exact congrFun (Function.extend_comp hv f (fun _ => 1)) x + +namespace FormalStarTable +variable [Group.IsPerfect (alternatingGroup α)] [Finite ι] + {F : Option ι → TrackStar α →* H} (T : FormalStarTable F) + +theorem sector_projection (hα : 4 ≤ Nat.card α) + (q : H →* Q) (ρ : (Ω → alternatingGroup α) →* Q) (hρ : Function.Injective ρ) + (δ : ((ι → Bool) → alternatingGroup α) →* (Ω → alternatingGroup α)) + (hδ : Function.Surjective δ) + (hp : ∀ i, q.comp (F i)=ρ.comp (δ.comp + ((maskFamily (fun j : ι => {σ : ι → Bool | σ j=true}) i).comp (universalProjection _)))) + (V : Set (ι → Bool)) (s : TrackStar α) : + q (T.sector V s)=ρ (δ (sectorMask V (universalProjection _ s))) := by + let e := copyFamilyEval T.input + let v := δ.comp (formalAssignmentEval (universalProjection (alternatingGroup α))) + have hv : Function.Surjective v := hδ.comp (formalAssignmentEval_surjective + (universalProjection (alternatingGroup α)) (universalProjection_surjective _)) + have he : (q.comp T.carrier.subtype).comp e=ρ.comp v := by + rw [MonoidHom.comp_assoc,T.input_eval] + apply FreeGroup.ext_hom + rintro ⟨i,t⟩ + have hh := DFunLike.congr_fun (hp i) t + simpa only [MonoidHom.comp_apply,v,formalAssignmentEval,copySourceMap,FreeGroup.map.of, + assignmentEval,copyFamilyEval_of] using hh + have hk : ∀ w, e w=1 → v w=1 := by + intro w hw + apply hρ + have hh := DFunLike.congr_fun he w + change q ((e w).val)=ρ (v w) at hh + rw [hw,Subgroup.coe_one,map_one] at hh + simpa only [map_one] using hh.symm + let γ : T.carrier →* (Ω → alternatingGroup α) := + e.liftOfSurjective T.input_surjective ⟨v,hk⟩ + have hγe : γ.comp e=v := e.liftOfRightInverse_comp _ _ _ + have hγ : Function.Surjective γ := by + intro x + obtain ⟨w,rfl⟩ := hv x + exact ⟨e w,DFunLike.congr_fun hγe w⟩ + have hγp : q.comp T.carrier.subtype=ρ.comp γ := by + apply (MonoidHom.cancel_right T.input_surjective).mp + change (q.comp T.carrier.subtype).comp e=(ρ.comp γ).comp e + change (q.comp T.carrier.subtype).comp e=ρ.comp (γ.comp e) + rw [hγe] + exact he + have hγi (i : Option ι) : γ.comp (T.input i)=δ.comp + ((maskFamily (fun j : ι => {σ : ι → Bool | σ j=true}) i).comp (universalProjection _)) := by + apply MonoidHom.ext + intro t + have hh := DFunLike.congr_fun hγe (FreeGroup.of (i,t)) + simpa only [MonoidHom.comp_apply,e,v,copyFamilyEval_of,formalAssignmentEval, + copySourceMap,FreeGroup.map.of,assignmentEval] using hh + have hs := T.sector_forward γ hγ (alternating_function_center hα) δ hγi V s + have hh := DFunLike.congr_fun hγp (centralSector T.model V s) + simpa only [MonoidHom.comp_apply,sector,hs] using hh + +end FormalStarTable +end FormalSectorProjection + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/LabelTranslation.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/LabelTranslation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3606062e692333ed001ffaf0b73064cc16b52a0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/LabelTranslation.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.LabelledMonoidal + +namespace OAI + +open CategoryTheory MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled + +variable {a n : ℕ} (d : (Fin n → CutRing × CutRing) → CutRing × CutRing) +noncomputable def translateObj (U : Labelled a n) : Labelled a n where + polygon := shifted U.polygon (fun i => d (U.label i)) + label := U.label + reduced := U.reduced +noncomputable abbrev translateArrow (U : Labelled a n) : U.polygon ⟶ (translateObj d U).polygon := + shiftArrow U.polygon (fun i => d (U.label i)) +noncomputable def translateHom {U V : Labelled a n} (f : U ⟶ V) : translateObj d U ⟶ translateObj d V where + arrow := inv (translateArrow d U) ≫ f.arrow ≫ translateArrow d V + positional x := by + obtain ⟨y,rfl⟩ := (translateArrow d U).toEquiv.surjective x + simp only [arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] + change translate a (d (V.label (f.arrow.toEquiv y).val.1)) (f.arrow.toEquiv y).val.2 = + translate a (d (U.label y.val.1)) y.val.2 + rw [f.labelled,f.positional] + labelled x := by + obtain ⟨y,rfl⟩ := (translateArrow d U).toEquiv.surjective x + simp only [arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] + exact f.labelled y +noncomputable def translateFunctor : Labelled a n ⥤ Labelled a n where + obj := translateObj d + map := translateHom d + map_id U := by + apply Hom.ext + change inv _ ≫ 𝟙 _ ≫ _ = _ + simp + rfl + map_comp f g := by + apply Hom.ext + change inv _ ≫ (f.arrow ≫ g.arrow) ≫ _ = (inv _ ≫ f.arrow ≫ _) ≫ (inv _ ≫ g.arrow ≫ _) + simp only [Category.assoc,IsIso.hom_inv_id_assoc] +noncomputable def translationIso : forget (a:=a) (n:=n) ≅ translateFunctor d ⋙ forget := + NatIso.ofComponents (fun U => by + let e := asIso (translateArrow d U) + exact e) (by + intro U V f + change f.arrow ≫ translateArrow d V = translateArrow d U ≫ + (inv (translateArrow d U) ≫ f.arrow ≫ translateArrow d V) + simp) +noncomputable def translationCore : (translateFunctor (a:=a) d ⋙ forget).CoreMonoidal := + Functor.Monoidal.coreMonoidalTransport (translationIso d) +lemma translationCore_unit : (translationCore (a:=a) d).εIso.hom=translateArrow d (𝟙_ _) := by + exact Category.id_comp (translateArrow d (𝟙_ _)) +lemma translationCore_tensor (U V:Labelled a n) : + ((translationCore d).μIso U V).hom = + inv (sumArrow (translateArrow d U) (translateArrow d V)) ≫ translateArrow d (U⊗V) := by + change (inv (translateArrow d U) ⊗ₘ inv (translateArrow d V)) ≫ 𝟙 _ ≫ _ = _ + erw [Category.id_comp] + congr 1 + apply (cancel_epi (sumArrow (translateArrow d U) (translateArrow d V))).mp + change (_ ⊗ₘ _) ≫ (_ ⊗ₘ _) = _ + rw [tensorHom_comp_tensorHom] + simp + rfl +noncomputable def translationUnit : 𝟙_ (Labelled a n) ⟶ (translateFunctor d).obj (𝟙_ _) where + arrow := translateArrow d (𝟙_ _) + positional x := by change Point PolygonObject.empty at x; exact isEmptyElim x + labelled x := by change Point PolygonObject.empty at x; exact isEmptyElim x +noncomputable def translationTensor (U V:Labelled a n) : + (translateFunctor d).obj U ⊗ (translateFunctor d).obj V ⟶ (translateFunctor d).obj (U⊗V) where + arrow := inv (sumArrow (translateArrow d U) (translateArrow d V)) ≫ translateArrow d (U⊗V) + positional x := by + erw [arrow_comp_apply,inv_arrow_apply] + change ((translateArrow d (sum U V)).toEquiv + ((sumArrow (translateArrow d U) (translateArrow d V)).toEquiv.symm x)).val.2 = x.val.2 + obtain ⟨y,rfl⟩ := (sumArrow (translateArrow d U) (translateArrow d V)).toEquiv.surjective x + rw [Equiv.symm_apply_apply] + change translate a (d ((sum U V).label y.val.1)) y.val.2 = + ((sumArrow (translateArrow d U) (translateArrow d V)).toEquiv y).val.2 + obtain ⟨z,rfl⟩ := (sumPointEquiv U.polygon V.polygon).surjective y + cases z <;> (first | erw [sumArrow_inl] | erw [sumArrow_inr]) <;> + simp only [sumPointEquiv_inl,sumPointEquiv_inr, + translateArrow,Fin.addCases_left,Fin.addCases_right] + all_goals rfl + labelled x := by + erw [arrow_comp_apply,inv_arrow_apply] + change (sum U V).label ((translateArrow d (sum U V)).toEquiv + ((sumArrow (translateArrow d U) (translateArrow d V)).toEquiv.symm x)).val.1 = + (sum (translateObj d U) (translateObj d V)).label x.val.1 + obtain ⟨y,rfl⟩ := (sumArrow (translateArrow d U) (translateArrow d V)).toEquiv.surjective x + rw [Equiv.symm_apply_apply] + change (sum U V).label y.val.1 = + (sum (translateObj d U) (translateObj d V)).label + ((sumArrow (translateArrow d U) (translateArrow d V)).toEquiv y).val.1 + obtain ⟨z,rfl⟩ := (sumPointEquiv U.polygon V.polygon).surjective y + cases z <;> (first | erw [sumArrow_inl] | erw [sumArrow_inr]) <;> rfl +lemma translationTensor_arrow (U V : Labelled a n) : + (translationTensor d U V).arrow=((translationCore d).μIso U V).hom := by + rw [translationCore_tensor]; rfl +lemma translationUnit_arrow : (translationUnit (a:=a) d).arrow=(translationCore d).εIso.hom := by + rw [translationCore_unit]; rfl +noncomputable instance translationMonoidal : (translateFunctor (a:=a) d).Monoidal := + Functor.CoreMonoidal.toMonoidal { + εIso := asIso (translationUnit d) + μIso U V := asIso (translationTensor d U V) + μIso_hom_natural_left := by + intro U V f W + apply Hom.ext + change sumArrow (translateHom d f).arrow (𝟙 _) ≫ (translationTensor d V W).arrow = + (translationTensor d U W).arrow ≫ (translateHom d (f ▷ W)).arrow + rw [translationTensor_arrow,translationTensor_arrow] + exact (translationCore d).μIso_hom_natural_left f W + μIso_hom_natural_right := by + intro U V W f + apply Hom.ext + change sumArrow (𝟙 _) (translateHom d f).arrow ≫ (translationTensor d W V).arrow = + (translationTensor d W U).arrow ≫ (translateHom d (W ◁ f)).arrow + rw [translationTensor_arrow,translationTensor_arrow] + exact (translationCore d).μIso_hom_natural_right W f + associativity := by + intro U V W + apply Hom.ext + change sumArrow (translationTensor d U V).arrow (𝟙 _) ≫ + (translationTensor d (U⊗V) W).arrow ≫ (translateHom d (α_ U V W).hom).arrow = + sumAssoc _ _ _ ≫ sumArrow (𝟙 _) (translationTensor d V W).arrow ≫ + (translationTensor d U (V⊗W)).arrow + simp only [translationTensor_arrow] + exact (translationCore d).associativity U V W + left_unitality := by + intro U + apply Hom.ext + change leftUnit _ = sumArrow (translationUnit d).arrow (𝟙 _) ≫ + (translationTensor d (𝟙_ _) U).arrow ≫ (translateHom d (λ_ U).hom).arrow + rw [translationUnit_arrow,translationTensor_arrow] + exact (translationCore d).left_unitality U + right_unitality := by + intro U + apply Hom.ext + change rightUnit _ = sumArrow (𝟙 _) (translationUnit d).arrow ≫ + (translationTensor d U (𝟙_ _)).arrow ≫ (translateHom d (ρ_ U).hom).arrow + rw [translationUnit_arrow,translationTensor_arrow] + exact (translationCore d).right_unitality U } +noncomputable instance translationBraided : (translateFunctor (a:=a) d).Braided where + braided U V := by + apply Hom.ext + change (translationTensor d U V).arrow ≫ (translateHom d (β_ U V).hom).arrow = + sumSwap _ _ ≫ (translationTensor d V U).arrow + change (inv (sumArrow (translateArrow d U) (translateArrow d V)) ≫ translateArrow d (U⊗V)) ≫ + (inv (translateArrow d (U⊗V)) ≫ sumSwap _ _ ≫ translateArrow d (V⊗U)) = + sumSwap _ _ ≫ inv (sumArrow (translateArrow d V) (translateArrow d U)) ≫ translateArrow d (V⊗U) + simp only [Category.assoc,IsIso.hom_inv_id_assoc] + apply (cancel_epi (sumArrow (translateArrow d U) (translateArrow d V))).mp + simp only [IsIso.hom_inv_id_assoc] + have h := BraidedCategory.braiding_naturality (translateArrow d U) (translateArrow d V) + change sumArrow (translateArrow d U) (translateArrow d V) ≫ sumSwap _ _ = + sumSwap _ _ ≫ sumArrow (translateArrow d V) (translateArrow d U) at h + rw [←Category.assoc (sumArrow (translateArrow d U) (translateArrow d V)),h] + simp +end SimpleAmenable.PolygonObject.Labelled + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/LabelledStringEquiv.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/LabelledStringEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ee288bdc1ad7a26cf559e6df9a79c769ed42fa7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/LabelledStringEquiv.lean @@ -0,0 +1,150 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TrajectoryStages +import OAI.GroupTheory.SimpleAmenable.Simplicial.TripleBarMaps + +namespace OAI + +section + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled + +variable {a n : ℕ} +noncomputable def initialCore : (toStrings (a:=a) (n:=n) ⋙ stringEval).CoreMonoidal := + Functor.Monoidal.coreMonoidalTransport initialIso +lemma initialCore_unit : (initialCore (a:=a) (n:=n)).εIso.hom=initial (𝟙_ _) := by + change 𝟙 _ ≫ initial (𝟙_ _) = _ + exact Category.id_comp _ +lemma initialCore_tensor (U V : Labelled a n) : + (initialCore.μIso U V).hom=tensorInitial U V := by + change (inv (initial U) ⊗ₘ inv (initial V)) ≫ 𝟙 _ ≫ initial (U⊗V) = + inv (sumArrow (initial U) (initial V)) ≫ initial (U⊗V) + simp only [Category.id_comp] + congr 1 + apply (cancel_epi (sumArrow (initial U) (initial V))).mp + change (initial U ⊗ₘ initial V) ≫ (inv (initial U) ⊗ₘ inv (initial V)) = _ + rw [tensorHom_comp_tensorHom] + simp + rfl +noncomputable def stringsCore : (toStrings (a:=a) (n:=n)).CoreMonoidal where + εIso := @asIso (StringGroupoid a n) _ _ _ unitLadder + (IsIso.of_groupoid (C := StringGroupoid a n) _) + μIso U V := @asIso (StringGroupoid a n) _ _ _ (tensorLadder U V) + (IsIso.of_groupoid (C := StringGroupoid a n) _) + μIso_hom_natural_left := by + intro U V f W + apply (stringEval (a:=a) (n:=n)).map_injective + change sumArrow ((ladder f).hom.app 0) (𝟙 _) ≫ (tensorLadder V W).hom.app 0 = + (tensorLadder U W).hom.app 0 ≫ (ladder (f ▷ W)).hom.app 0 + rw [tensorLadder_zero,tensorLadder_zero,←initialCore_tensor,←initialCore_tensor] + exact initialCore.μIso_hom_natural_left f W + μIso_hom_natural_right := by + intro U V W f + apply (stringEval (a:=a) (n:=n)).map_injective + change sumArrow (𝟙 _) ((ladder f).hom.app 0) ≫ (tensorLadder W V).hom.app 0 = + (tensorLadder W U).hom.app 0 ≫ (ladder (W ◁ f)).hom.app 0 + rw [tensorLadder_zero,tensorLadder_zero,←initialCore_tensor,←initialCore_tensor] + exact initialCore.μIso_hom_natural_right W f + associativity := by + intro U V W + apply (stringEval (a:=a) (n:=n)).map_injective + change sumArrow ((tensorLadder U V).hom.app 0) (𝟙 _) ≫ + (tensorLadder (U⊗V) W).hom.app 0 ≫ (ladder (α_ U V W).hom).hom.app 0 = + sumAssoc _ _ _ ≫ sumArrow (𝟙 _) ((tensorLadder V W).hom.app 0) ≫ + (tensorLadder U (V⊗W)).hom.app 0 + simp only [tensorLadder_zero,←initialCore_tensor] + exact initialCore.associativity U V W + left_unitality := by + intro U + apply (stringEval (a:=a) (n:=n)).map_injective + change leftUnit _ = sumArrow (unitLadder.hom.app 0) (𝟙 _) ≫ + (tensorLadder (𝟙_ _) U).hom.app 0 ≫ (ladder (λ_ U).hom).hom.app 0 + rw [unitLadder_zero,tensorLadder_zero,←initialCore_unit,←initialCore_tensor] + exact initialCore.left_unitality U + right_unitality := by + intro U + apply (stringEval (a:=a) (n:=n)).map_injective + change rightUnit _ = sumArrow (𝟙 _) (unitLadder.hom.app 0) ≫ + (tensorLadder U (𝟙_ _)).hom.app 0 ≫ (ladder (ρ_ U).hom).hom.app 0 + rw [unitLadder_zero,tensorLadder_zero,←initialCore_unit,←initialCore_tensor] + exact initialCore.right_unitality U +noncomputable instance : (toStrings (a:=a) (n:=n)).Monoidal := stringsCore.toMonoidal +noncomputable instance : (toStrings (a:=a) (n:=n)).Braided where + braided U V := by + apply (stringEval (a:=a) (n:=n)).map_injective + change (tensorLadder U V).hom.app 0 ≫ (ladder (β_ U V).hom).hom.app 0 = + sumSwap _ _ ≫ (tensorLadder V U).hom.app 0 + rw [tensorLadder_zero,tensorLadder_zero,ladder_zero] + change (inv (sumArrow (initial U) (initial V)) ≫ initial (U⊗V)) ≫ + (inv (initial (U⊗V)) ≫ sumSwap _ _ ≫ initial (V⊗U)) = + sumSwap _ _ ≫ inv (sumArrow (initial V) (initial U)) ≫ initial (V⊗U) + simp only [Category.assoc,IsIso.hom_inv_id_assoc] + apply (cancel_epi (sumArrow (initial U) (initial V))).mp + simp only [IsIso.hom_inv_id_assoc] + have h := BraidedCategory.braiding_naturality (initial U) (initial V) + change sumArrow (initial U) (initial V) ≫ sumSwap _ _ = + sumSwap _ _ ≫ sumArrow (initial V) (initial U) at h + rw [←Category.assoc (sumArrow (initial U) (initial V)),h] + simp + +lemma tripleBar_homology_isIso (j : ℕ) : + IsIso (SSet.homologyMap (IntervalBar.Diagram.bar₃Map (toStrings (a:=a) (n:=n))) + DiagonalResolution.Z j) := + IntervalBar.Diagram.bar₃Map_homology_isIso toStrings j +end SimpleAmenable.PolygonObject.Labelled + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical +namespace SimpleAmenable.PolygonObject.LabelledStage + +variable {a n : ℕ} +variable {I : Type} [Category.{0} I] [Finite I] [∀i j:I,Finite (i ⟶ j)] + +theorem exists_common_stage (F : I ⥤ Labelled a n) : + ∃ (P : BooleanPartition a) (s : ℕ) (L : Fin s → Fin n → CutRing × CutRing), + (∀j i,orbitRepresentative (L j i)=L j i) ∧ Function.Injective L ∧ + ∃G : I ⥤ UniformObject P L, G ⋙ UniformObject.forget=F := by + let : Fintype I := Fintype.ofFinite I + let (i j : I) : Fintype (i ⟶ j) := Fintype.ofFinite (i ⟶ j) + let Ar := Σi:I,Σj:I,i ⟶ j + let u : Ar → I := fun t => t.1 + let v : Ar → I := fun t => t.2.1 + let f : ∀t:Ar,F.obj (u t) ⟶ F.obj (v t) := fun t => F.map t.2.2 + obtain ⟨P,hP,hf⟩ := Labelled.exists_uniform_partition F.obj u v f + let label : (Σi:I,Fin (F.obj i).polygon.tracks) → Fin n → CutRing × CutRing := + fun t => (F.obj t.1).label t.2 + let S := Set.range label + have : Fintype S := (Set.finite_range label).fintype + let L : Fin (Fintype.card S) → Fin n → CutRing × CutRing := + fun j => ((Fintype.equivFin S).symm j).val + have hL : ∀j i,orbitRepresentative (L j i)=L j i := by + intro j i + obtain ⟨⟨k,t⟩,hk⟩ := ((Fintype.equivFin S).symm j).property + change orbitRepresentative (((Fintype.equivFin S).symm j).val i)=(((Fintype.equivFin S).symm j).val i) + rw [←hk] + exact (F.obj k).reduced t i + have hLi : Function.Injective L := by + intro i j h + exact (Fintype.equivFin S).symm.injective (Subtype.ext h) + let obj (i : I) : UniformObject P L := { + obj := F.obj i + uniform := hP i + supported := fun j => ⟨Fintype.equivFin S ⟨label ⟨i,j⟩,⟨⟨i,j⟩,rfl⟩⟩,by + simp only [L,Equiv.symm_apply_apply]; rfl⟩ } + let G : I ⥤ UniformObject P L := { + obj := obj + map {i j} g := ⟨F.map g,hf ⟨i,j,g⟩⟩ + map_id i := UniformObject.Hom.ext _ _ (F.map_id i) + map_comp g h := UniformObject.Hom.ext _ _ (F.map_comp g h) } + refine ⟨P,Fintype.card S,L,hL,hLi,G,?_⟩ + rfl +end SimpleAmenable.PolygonObject.LabelledStage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PointFiberEvaluation.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PointFiberEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c45fc088d3848e17ffdb7e73cee58cedfa5ee72 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PointFiberEvaluation.lean @@ -0,0 +1,209 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.LabelledMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.FiniteSetMonoidal + +namespace OAI + +section +open CategoryTheory Classical Set MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled.PointFiber + +variable {a n : ℕ} +abbrev Fiber (U : Labelled a n) (b : GenericSquare a × (Fin n → CutRing × CutRing)) := + {x : U.polygon.Point // x.val.2=b.1 ∧ U.label x.val.1=b.2} + +noncomputable instance (U : Labelled a n) (b : GenericSquare a × (Fin n → CutRing × CutRing)) : Fintype (Fiber U b) := + Fintype.ofInjective (fun x : Fiber U b => x.val.val.1) (by + intro x y h + apply Subtype.ext + apply Subtype.ext + exact Prod.ext h (x.property.1.trans y.property.1.symm)) + +noncomputable def fiberMap {U V : Labelled a n} (f : U ⟶ V) (b : GenericSquare a × (Fin n → CutRing × CutRing)) : + Fiber U b ≃ Fiber V b where + toFun x := ⟨f.arrow.toEquiv x.val, + (f.positional x.val).trans x.property.1, + (f.labelled x.val).trans x.property.2⟩ + invFun y := ⟨f.arrow.toEquiv.symm y.val,by + have h := f.positional (f.arrow.toEquiv.symm y.val) + rw [Equiv.apply_symm_apply] at h + exact h.symm.trans y.property.1,by + have h := f.labelled (f.arrow.toEquiv.symm y.val) + rw [Equiv.apply_symm_apply] at h + exact h.symm.trans y.property.2⟩ + left_inv _ := Subtype.ext (Equiv.symm_apply_apply _ _) + right_inv _ := Subtype.ext (Equiv.apply_symm_apply _ _) + +noncomputable def evaluation : Labelled a n ⥤ (GenericSquare a × (Fin n → CutRing × CutRing) → FiniteSetGroupoid) where + obj U b := ⟨Fintype.card (Fiber U b)⟩ + map {U V} f b := (Fintype.equivFin (Fiber U b)).symm.trans + ((fiberMap f b).trans (Fintype.equivFin (Fiber V b))) + map_id U := by + funext b + apply Equiv.ext + intro j + change (Fintype.equivFin (Fiber U b)) ((fiberMap (𝟙 U) b) + ((Fintype.equivFin (Fiber U b)).symm j))=j + change (Fintype.equivFin (Fiber U b)) ((Fintype.equivFin (Fiber U b)).symm j)=j + exact Equiv.apply_symm_apply _ _ + map_comp {U V W} f g := by + funext b + apply Equiv.ext + intro j + change (Fintype.equivFin (Fiber W b)) ((fiberMap (f≫g) b) _)= + (Fintype.equivFin (Fiber W b)) ((fiberMap g b) + ((Fintype.equivFin (Fiber V b)).symm ((Fintype.equivFin (Fiber V b)) _))) + rw [Equiv.symm_apply_apply] + rfl + +end SimpleAmenable.PolygonObject.Labelled.PointFiber + +end + +section +open CategoryTheory Classical Set MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled.PointFiber + +variable {a n : ℕ} +variable (U V : Labelled a n) (b : GenericSquare a × (Fin n → CutRing × CutRing)) +noncomputable def fiberSumFun : Fiber U b ⊕ Fiber V b → Fiber (sum U V) b + | .inl x => ⟨sumPointEquiv U.polygon V.polygon (.inl x.val),by + simpa only [sumPointEquiv_inl] using x.property.1,by + simpa only [sum,sumPointEquiv_inl,Fin.addCases_left] using x.property.2⟩ + | .inr y => ⟨sumPointEquiv U.polygon V.polygon (.inr y.val),by + simpa only [sumPointEquiv_inr] using y.property.1,by + simpa only [sum,sumPointEquiv_inr,Fin.addCases_right] using y.property.2⟩ +noncomputable def fiberSum : Fiber U b ⊕ Fiber V b ≃ Fiber (sum U V) b := + Equiv.ofBijective (fiberSumFun U V b) ⟨by + intro x y h + have h' := congrArg Subtype.val h + cases x <;> cases y + · exact congrArg Sum.inl (Subtype.ext (Sum.inl.inj ((sumPointEquiv _ _).injective h'))) + · cases ((sumPointEquiv _ _).injective h') + · cases ((sumPointEquiv _ _).injective h') + · exact congrArg Sum.inr (Subtype.ext (Sum.inr.inj ((sumPointEquiv _ _).injective h'))),by + intro z + obtain ⟨x,hx⟩ := (sumPointEquiv U.polygon V.polygon).surjective z.val + cases x with + | inl x => + have hp : x.val.2=b.1 ∧ U.label x.val.1=b.2 := by + simpa only [←hx,sumPointEquiv_inl,sum,Fin.addCases_left] using z.property + exact ⟨.inl ⟨x,hp⟩,Subtype.ext hx⟩ + | inr x => + have hp : x.val.2=b.1 ∧ V.label x.val.1=b.2 := by + simpa only [←hx,sumPointEquiv_inr,sum,Fin.addCases_right] using z.property + exact ⟨.inr ⟨x,hp⟩,Subtype.ext hx⟩⟩ +@[simp] lemma fiberSum_inl (x : Fiber U b) : + (fiberSum U V b (.inl x)).val=sumPointEquiv U.polygon V.polygon (.inl x.val) := rfl +@[simp] lemma fiberSum_inr (x : Fiber V b) : + (fiberSum U V b (.inr x)).val=sumPointEquiv U.polygon V.polygon (.inr x.val) := rfl + +noncomputable abbrev E := evaluation (a:=a) (n:=n) +noncomputable def enumerate (U : Labelled a n) (b : GenericSquare a × (Fin n → CutRing × CutRing)) : Fiber U b ≃ Fin (E.obj U b).size := Fintype.equivFin (Fiber U b) +@[simp] lemma E_map_enum {U V : Labelled a n} (f : U ⟶ V) (b : GenericSquare a × (Fin n → CutRing × CutRing)) (x : Fiber U b) : + E.map f b (enumerate U b x)=enumerate V b (fiberMap f b x) := by + change enumerate V b (fiberMap f b ((enumerate U b).symm (enumerate U b x)))=_ + rw [Equiv.symm_apply_apply] +noncomputable def mu (U V : Labelled a n) : E.obj U ⊗ E.obj V ⟶ E.obj (U⊗V) := fun b => + (FiniteSetGroupoid.sumEquiv _ _).symm.trans + ((Equiv.sumCongr (enumerate U b).symm (enumerate V b).symm).trans + ((fiberSum U V b).trans (enumerate (sum U V) b))) +@[simp] lemma mu_inl (x : Fiber U b) : + mu U V b (FiniteSetGroupoid.sumEquiv _ _ (.inl (enumerate U b x)))= + enumerate (sum U V) b (fiberSum U V b (.inl x)) := by + change (enumerate (sum U V) b) ((fiberSum U V b) ((Equiv.sumCongr (enumerate U b).symm (enumerate V b).symm) + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)).symm + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)) _)))) = _ + rw [Equiv.symm_apply_apply] + simp only [Equiv.sumCongr_apply,Sum.map_inl,Equiv.symm_apply_apply] +@[simp] lemma mu_inr (x : Fiber V b) : + mu U V b (FiniteSetGroupoid.sumEquiv _ _ (.inr (enumerate V b x)))= + enumerate (sum U V) b (fiberSum U V b (.inr x)) := by + change (enumerate (sum U V) b) ((fiberSum U V b) ((Equiv.sumCongr (enumerate U b).symm (enumerate V b).symm) + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)).symm + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)) _)))) = _ + rw [Equiv.symm_apply_apply] + simp only [Equiv.sumCongr_apply,Sum.map_inr,Equiv.symm_apply_apply] +lemma fiberMap_sum_inl {U V W Z : Labelled a n} (f : U ⟶ W) (g : V ⟶ Z) + (b : GenericSquare a × (Fin n → CutRing × CutRing)) (x : Fiber U b) : + fiberMap (sumHom f g) b (fiberSum U V b (.inl x))= + fiberSum W Z b (.inl (fiberMap f b x)) := by + apply Subtype.ext + exact sumArrow_inl f.arrow g.arrow x.val +lemma fiberMap_sum_inr {U V W Z : Labelled a n} (f : U ⟶ W) (g : V ⟶ Z) + (b : GenericSquare a × (Fin n → CutRing × CutRing)) (x : Fiber V b) : + fiberMap (sumHom f g) b (fiberSum U V b (.inr x))= + fiberSum W Z b (.inr (fiberMap g b x)) := by + apply Subtype.ext + exact sumArrow_inr f.arrow g.arrow x.val +end SimpleAmenable.PolygonObject.Labelled.PointFiber + +end + +section +open CategoryTheory Classical Set MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled.PointFiber + +variable {a n : ℕ} +instance fiberEmpty (b : GenericSquare a × (Fin n → CutRing × CutRing)) : IsEmpty (Fiber (empty (a:=a) (n:=n)) b) := + ⟨fun x => isEmptyElim x.val⟩ +noncomputable def eps : 𝟙_ ((GenericSquare a × (Fin n → CutRing × CutRing) → FiniteSetGroupoid)) ⟶ E.obj (𝟙_ (Labelled a n)) := fun b => + (Equiv.equivOfIsEmpty (Fin 0) (Fiber empty b)).trans (enumerate empty b) +@[simp] lemma fiberMap_id (U : Labelled a n) (b : GenericSquare a × (Fin n → CutRing × CutRing)) (x : Fiber U b) : + fiberMap (𝟙 U) b x=x := rfl +lemma mu_natural {U V W Z : Labelled a n} (f : U ⟶ W) (g : V ⟶ Z) : + (E.map f ⊗ₘ E.map g) ≫ mu W Z = mu U V ≫ E.map (f⊗ₘg) := by + funext b + apply Equiv.ext + intro x + obtain ⟨x,rfl⟩ := (FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)).surjective x + cases x with + | inl x => + obtain ⟨x,rfl⟩ := (enumerate U b).surjective x + change mu W Z b (FiniteSetGroupoid.sumHom (E.map f b) (E.map g b) _) = E.map (sumHom f g) b _ + rw [FiniteSetGroupoid.sumHom_inl,E_map_enum,mu_inl,mu_inl,E_map_enum,fiberMap_sum_inl] + | inr x => + obtain ⟨x,rfl⟩ := (enumerate V b).surjective x + change mu W Z b (FiniteSetGroupoid.sumHom (E.map f b) (E.map g b) _) = E.map (sumHom f g) b _ + rw [FiniteSetGroupoid.sumHom_inr,E_map_enum,mu_inr,mu_inr,E_map_enum,fiberMap_sum_inr] + +variable (U V W : Labelled a n) (b : GenericSquare a × (Fin n → CutRing × CutRing)) +@[simp] lemma fiber_assoc_left (x : Fiber U b) : + fiberMap (assocHom U V W) b (fiberSum (sum U V) W b (.inl (fiberSum U V b (.inl x))))= + fiberSum U (sum V W) b (.inl x) := by + apply Subtype.ext + change sumAssocEquiv U.polygon V.polygon W.polygon _ = _ + exact sumAssocEquiv_left _ _ _ x.val +@[simp] lemma fiber_assoc_mid (x : Fiber V b) : + fiberMap (assocHom U V W) b (fiberSum (sum U V) W b (.inl (fiberSum U V b (.inr x))))= + fiberSum U (sum V W) b (.inr (fiberSum V W b (.inl x))) := by + apply Subtype.ext + change sumAssocEquiv U.polygon V.polygon W.polygon _ = _ + exact sumAssocEquiv_mid _ _ _ x.val +@[simp] lemma fiber_assoc_right (x : Fiber W b) : + fiberMap (assocHom U V W) b (fiberSum (sum U V) W b (.inr x))= + fiberSum U (sum V W) b (.inr (fiberSum V W b (.inr x))) := by + apply Subtype.ext + change sumAssocEquiv U.polygon V.polygon W.polygon _ = _ + exact sumAssocEquiv_right _ _ _ x.val +@[simp] lemma fiber_left (x : Fiber U b) : + fiberMap (leftHom U) b (fiberSum empty U b (.inr x))=x := by + apply Subtype.ext + exact leftUnitEquiv_apply _ x.val +@[simp] lemma fiber_right (x : Fiber U b) : + fiberMap (rightHom U) b (fiberSum U empty b (.inl x))=x := by + apply Subtype.ext + exact rightUnitEquiv_apply _ x.val +@[simp] lemma fiber_swap_left (x : Fiber U b) : + fiberMap (swapHom U V) b (fiberSum U V b (.inl x))=fiberSum V U b (.inr x) := by + apply Subtype.ext + exact sumSwapEquiv_inl _ _ x.val +@[simp] lemma fiber_swap_right (x : Fiber V b) : + fiberMap (swapHom U V) b (fiberSum U V b (.inr x))=fiberSum V U b (.inl x) := by + apply Subtype.ext + exact sumSwapEquiv_inr _ _ x.val +end SimpleAmenable.PolygonObject.Labelled.PointFiber + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PointwisePolygonTables.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PointwisePolygonTables.lean new file mode 100644 index 0000000000000000000000000000000000000000..1665fd542e5c785dac13754368ed8af42011eba5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PointwisePolygonTables.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TupleChartDomain + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PointwisePolygonTables + +variable {a m : ℕ} + +noncomputable def conditionalAlternatingHom (U : polygonAlgebra a) : + alternatingGroup (Fin m) →* polygonAlternatingGroup a m := + ((conditionalHom U).comp (alternatingGroup (Fin m)).subtype).codRestrict + (polygonAlternatingGroup a m) (fun s => conditionalHom_alternating_mem U s.property) + +theorem conditionalHom_disjoint_commute (U V : polygonAlgebra a) + (hUV : Disjoint U.val V.val) (σ ρ : Equiv.Perm (Fin m)) : + Commute (conditionalHom U σ) (conditionalHom V ρ) := by + change _ * _ = _ * _ + apply Subtype.ext + apply Equiv.ext + intro p + change conditionalPerm U σ (conditionalPerm V ρ p) = + conditionalPerm V ρ (conditionalPerm U σ p) + by_cases hu : p.2 ∈ U.val <;> by_cases hv : p.2 ∈ V.val + · exact False.elim (Set.disjoint_left.mp hUV hu hv) + all_goals simp [conditionalPerm, hu, hv] + +structure PolygonLabelling (a : ℕ) (Ω : Type*) where + label : GenericSquare a → Ω + fiber_mem : ∀ ω, {p | label p = ω} ∈ polygonAlgebra a + +noncomputable def PolygonLabelling.fiber {Ω : Type*} (v : PolygonLabelling a Ω) + (ω : Ω) : polygonAlgebra a := ⟨{p | v.label p = ω},v.fiber_mem ω⟩ + +theorem PolygonLabelling.fiber_disjoint {Ω : Type*} (v : PolygonLabelling a Ω) + {ω ν : Ω} (h : ω ≠ ν) : Disjoint (v.fiber ω).val (v.fiber ν).val := by + apply Set.disjoint_left.mpr + intro p hp hq + exact h (hp.symm.trans hq) + +noncomputable def PolygonLabelling.permutationHom {Ω : Type*} (v : PolygonLabelling a Ω) : + (Ω → alternatingGroup (Fin m)) →* Equiv.Perm (TrackPoint a m) where + toFun σ := { + toFun := fun p => ((σ (v.label p.2)).val p.1,p.2) + invFun := fun p => ((σ (v.label p.2)).val.symm p.1,p.2) + left_inv := by intro p; simp + right_inv := by intro p; simp } + map_one' := by apply Equiv.ext; intro p; rfl + map_mul' := by intro σ ρ; apply Equiv.ext; intro p; rfl + +@[simp] theorem PolygonLabelling.permutationHom_apply {Ω : Type*} + (v : PolygonLabelling a Ω) (σ : Ω → alternatingGroup (Fin m)) (p : TrackPoint a m) : + v.permutationHom σ p = ((σ (v.label p.2)).val p.1,p.2) := rfl + +noncomputable def PolygonLabelling.tableHom {Ω : Type*} [Fintype Ω] + (v : PolygonLabelling a Ω) : + (Ω → alternatingGroup (Fin m)) →* polygonAlternatingGroup a m := + MonoidHom.noncommPiCoprod (fun ω => conditionalAlternatingHom (v.fiber ω)) (by + intro ω ν h s t + change _ * _ = _ * _ + apply Subtype.ext + exact (conditionalHom_disjoint_commute (v.fiber ω) (v.fiber ν) + (v.fiber_disjoint h) s.val t.val).eq) + +@[simp] theorem PolygonLabelling.tableHom_single {Ω : Type*} [Fintype Ω] [DecidableEq Ω] + (v : PolygonLabelling a Ω) (ω : Ω) (s : alternatingGroup (Fin m)) : + v.tableHom (Pi.mulSingle ω s) = conditionalAlternatingHom (v.fiber ω) s := + MonoidHom.noncommPiCoprod_mulSingle _ _ _ + +theorem PolygonLabelling.tableHom_permutation {Ω : Type*} [Fintype Ω] + (v : PolygonLabelling a Ω) : + (polygonFullGroup a m).subtype.comp + ((polygonAlternatingGroup a m).subtype.comp v.tableHom) = v.permutationHom := by + classical + apply MonoidHom.pi_ext + intro ω s + simp only [MonoidHom.comp_apply, v.tableHom_single] + apply Equiv.ext + intro p + change conditionalPerm (v.fiber ω) s.val p = + (((Pi.mulSingle ω s : Ω → alternatingGroup (Fin m)) (v.label p.2)).val p.1,p.2) + by_cases hp : v.label p.2 = ω + · simp [conditionalPerm, PolygonLabelling.fiber, hp] + · simp [conditionalPerm, PolygonLabelling.fiber, hp] + +@[simp] theorem PolygonLabelling.tableHom_apply {Ω : Type*} [Fintype Ω] + (v : PolygonLabelling a Ω) (σ : Ω → alternatingGroup (Fin m)) (p : TrackPoint a m) : + (v.tableHom σ).val.val p = ((σ (v.label p.2)).val p.1,p.2) := by + have he := DFunLike.congr_fun v.tableHom_permutation σ + exact DFunLike.congr_fun he p + +theorem PolygonLabelling.tableHom_injective {Ω : Type*} [Fintype Ω] + (v : PolygonLabelling a Ω) (hv : Function.Surjective v.label) : + Function.Injective (v.tableHom (m := m)) := by + intro s t h + funext ω + apply Subtype.ext + apply Equiv.ext + intro i + obtain ⟨p,hp⟩ := hv ω + have he := congrArg (fun g : polygonAlternatingGroup a m => g.val.val (i,p)) h + simpa only [v.tableHom_apply, hp] using congrArg Prod.fst he + +noncomputable def polygonAssignment {ι : Type*} (U : ι → polygonAlgebra a) + (p : GenericSquare a) : ι → Bool := by + classical + exact fun i => decide (p ∈ (U i).val) + +theorem polygonAssignment_fiber_mem {ι : Type*} [Finite ι] + (U : ι → polygonAlgebra a) (ω : ι → Bool) : + {p | polygonAssignment U p = ω} ∈ polygonAlgebra a := by + classical + have he : {p | polygonAssignment U p = ω} = + ⋂ i, if ω i then (U i).val else (U i).valᶜ := by + ext p + simp only [Set.mem_ofPred_eq, Set.mem_iInter, funext_iff, polygonAssignment] + apply forall_congr' + intro i + cases ω i <;> simp + rw [he] + apply BooleanSubalgebra.iInf_mem + intro i + cases ω i + · exact BooleanSubalgebra.compl_mem (U i).property + · exact (U i).property + +noncomputable def actualPolygonLabelling {ι : Type*} [Finite ι] + (U : ι → polygonAlgebra a) : PolygonLabelling a (Set.range (polygonAssignment U)) where + label p := ⟨polygonAssignment U p,⟨p,rfl⟩⟩ + fiber_mem ω := by + have he : {p | (⟨polygonAssignment U p,⟨p,rfl⟩⟩ : Set.range (polygonAssignment U)) = ω} = + {p | polygonAssignment U p = ω.val} := by + ext p + exact Subtype.ext_iff + rw [he] + exact polygonAssignment_fiber_mem U ω.val + +theorem actualPolygonLabelling_surjective {ι : Type*} [Finite ι] + (U : ι → polygonAlgebra a) : Function.Surjective (actualPolygonLabelling U).label := by + rintro ⟨ω,p,rfl⟩ + exact ⟨p,rfl⟩ + +end PointwisePolygonTables + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingConfigurations.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingConfigurations.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b4536e1cdf540bf70acfc19c65ccd8b30c8867e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingConfigurations.lean @@ -0,0 +1,138 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TransitiveInduction +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonBankEmbedding + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonAlternatingConfigurations + +open Classical CategoryTheory Set +namespace PolygonPlacement +variable {a m n : ℕ} + +noncomputable def bankEmbedding (f : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) : + PolygonObject.BankEmbedding (PolygonObject.whole a n) m where + emb := ⟨fun x => bank f hf x.val,fun x y h => Subtype.ext ((bank f hf).injective h)⟩ + table := by + choose S hS hcov using fun i => (f i).charts + let c (i : Fin n) (k : Fin m × (CutRing×CutRing) × polygonAlgebra a) : + PolygonObject.Chart (a:=a) n m := ⟨i,k.1,k.2.1,k.2.2⟩ + refine ⟨Finset.univ.biUnion (fun i => (S i).image (c i)),?_,?_⟩ + · intro k hk + obtain ⟨i,_,hk⟩ := Finset.mem_biUnion.mp hk + obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hk + intro z hz + exact ⟨by trivial,hS i d hd z hz⟩ + · intro x + obtain ⟨d,hd,hz⟩ := hcov x.val.1 x.val.2 + exact ⟨c x.val.1 d,Finset.mem_biUnion.mpr ⟨x.val.1,Finset.mem_univ _, + Finset.mem_image.mpr ⟨d,hd,rfl⟩⟩,rfl,hz⟩ + +@[simp] theorem bankEmbedding_apply (f : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (x : (PolygonObject.whole a n).Point) : bankEmbedding f hf x=f x.val.1 x.val.2 := rfl + +theorem alternating_disjoint_configurations (f g : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hg : Pairwise (fun i j => Apart (g i) (g j))) + (hfg : ∀i j,Apart (f i) (g j)) (hm : 3*n+1 < m) : + ∃c : polygonAlternatingGroup a m,∀i x,c.val.val (f i x)=g i x := by + let S := Finset.univ.image f ∪ Finset.univ.image g + have hS : S.card≤2*n := by + calc + _≤(Finset.univ.image f).card+(Finset.univ.image g).card := Finset.card_union_le _ _ + _≤(Finset.univ : Finset (Fin n)).card+(Finset.univ : Finset (Fin n)).card := + Nat.add_le_add Finset.card_image_le Finset.card_image_le + _=2*n := by simp; omega + obtain ⟨w,hw,hws⟩ := exists_configuration_avoiding S n (by omega) + have hwf (i j : Fin n) : Apart (w i) (f j) := + hws i (f j) (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩)) + have hwg (i j : Fin n) : Apart (w i) (g j) := + hws i (g j) (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩)) + obtain ⟨c,hc,_⟩ := PolygonObject.BankEmbedding.cycle_three + (bankEmbedding f hf) (bankEmbedding g hg) (bankEmbedding w hw) + (fun p q => (apart_iff _ _).mp (hfg p.val.1 q.val.1) p.val.2 q.val.2) + (fun p q => (apart_iff _ _).mp (hwf q.val.1 p.val.1).symm p.val.2 q.val.2) + (fun p q => (apart_iff _ _).mp (hwg q.val.1 p.val.1).symm p.val.2 q.val.2) + exact ⟨c,fun i x => hc ⟨(i,x),by trivial⟩⟩ + +theorem alternating_configuration_transitive_sharp (f g : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hg : Pairwise (fun i j => Apart (g i) (g j))) (hm : 3*n+1 < m) : + ∃c : polygonAlternatingGroup a m,∀i,c.val • f i=g i := by + let S := Finset.univ.image f ∪ Finset.univ.image g + have hS : S.card≤2*n := by + calc + _≤(Finset.univ.image f).card+(Finset.univ.image g).card := Finset.card_union_le _ _ + _≤(Finset.univ : Finset (Fin n)).card+(Finset.univ : Finset (Fin n)).card := + Nat.add_le_add Finset.card_image_le Finset.card_image_le + _=2*n := by simp; omega + obtain ⟨w,hw,hws⟩ := exists_configuration_avoiding S n (by omega) + have hwf (i j : Fin n) : Apart (w i) (f j) := + hws i (f j) (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩)) + have hwg (i j : Fin n) : Apart (w i) (g j) := + hws i (g j) (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩)) + obtain ⟨u,hu⟩ := alternating_disjoint_configurations f w hf hw (fun i j => (hwf j i).symm) hm + obtain ⟨v,hv⟩ := alternating_disjoint_configurations w g hw hg hwg hm + refine ⟨v*u,fun i => ?_⟩ + apply PolygonPlacement.ext + intro x + change v.val.val (u.val.val (f i x))=g i x + rw [hu,hv] + +namespace Configuration + +theorem alternating_transitive {p : ℕ} (f g : Configuration a m p) (hm : 3*p+1 < m) : + ∃c : polygonAlternatingGroup a m,c.val • f=g := by + obtain ⟨c,hc⟩ := alternating_configuration_transitive_sharp f.val g.val f.property g.property hm + exact ⟨c,ext hc⟩ + +theorem alternating_stabilizer_standard (a p n : ℕ) : + MulAction.stabilizer (polygonAlternatingGroup a (p+n)) (standard a p n)= + (PolygonTracks.bankFixer a p n).comap (polygonAlternatingGroup a (p+n)).subtype := by + ext c + change c.val∈MulAction.stabilizer (polygonFullGroup a (p+n)) (standard a p n) ↔ + c.val∈PolygonTracks.bankFixer a p n + rw [stabilizer_standard] + +noncomputable def alternatingOrbitHomologyIso (a p n : ℕ) (hm : 3*p+1 < p+n) (q : ℕ) : + groupHomology (Rep.of (TransitiveInduction.permutationRep + (G:=polygonAlternatingGroup a (p+n)) (X:=Configuration a (p+n) p))) q ≅ + groupHomology (Rep.trivial ℤ (MulAction.stabilizer (polygonAlternatingGroup a (p+n)) + (standard a p n)) ℤ) q := + TransitiveInduction.homologyIso (standard a p n) (fun f => alternating_transitive _ f hm) q + +noncomputable def alternatingRepresentationIso (a m p : ℕ) : + Rep.of (TransitiveInduction.permutationRep + (G:=polygonAlternatingGroup a m) (X:=Configuration a m p)) ≅ + Rep.of ((configurationRepresentation a m p).comp (polygonAlternatingGroup a m).subtype) := + Rep.mkIso + { toLinearEquiv := chainEquiv a m p + isIntertwining' := fun g => chainEquiv_intertwines g.val } + +noncomputable def alternatingColumnHomologyIso (a p n : ℕ) (hm : 3*p+1 < p+n) (q : ℕ) : + groupHomology (Rep.of ((configurationRepresentation a (p+n) p).comp + (polygonAlternatingGroup a (p+n)).subtype)) q ≅ + groupHomology (Rep.trivial ℤ (MulAction.stabilizer (polygonAlternatingGroup a (p+n)) + (standard a p n)) ℤ) q := + (groupHomology.functor ℤ _ q).mapIso (alternatingRepresentationIso a (p+n) p).symm ≪≫ + alternatingOrbitHomologyIso a p n hm q + +end Configuration +end PolygonPlacement +end PolygonAlternatingConfigurations + +end SimpleAmenable + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingExtension.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..89f7f302ecd94e73786e9930331f91b1a4f92525 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingExtension.lean @@ -0,0 +1,76 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonBankEmbedding + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonAlternatingExtension + +open Classical Set +namespace PolygonObject +namespace BankEmbedding +variable {a m : ℕ} + +theorem alternating_extension (U B : Fin m → polygonAlgebra a) + (f : BankEmbedding (PolygonObject.mk m U) m) + (hU : ∀p : (PolygonObject.mk m U).Point,p.val.2∉(B p.val.1).val) + (hf : ∀p,(f p).2∉(B (f p).1).val) + (harea : 10*(∑i,PolygonArea.area (U i))<∑i,PolygonArea.area (B i)ᶜ) : + ∃c : polygonAlternatingGroup a m, + (∀p,c.val.val p.val=f p) ∧ + (∀y : TrackPoint a m,y.2∈(B y.1).val → c.val.val y=y) := by + let u := inclusion U + have hB : (∑i,PolygonArea.area (B i))≤(m:ENNReal) := by + calc + _≤∑_i : Fin m,(1:ENNReal) := Finset.sum_le_sum (fun i _ => PolygonArea.area_le_one (B i)) + _=_ := by simp + have hBn : (∑i,PolygonArea.area (B i))≠⊤ := ne_top_of_le_ne_top (by simp) hB + have htotal : (∑i,PolygonArea.area (B i))+(∑i,PolygonArea.area (B i)ᶜ)=m := by + rw [←Finset.sum_add_distrib] + simp only [PolygonArea.area_compl,Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul,mul_one] + have guard (r : ENNReal) (hr : r≤10) : + (∑i,PolygonArea.area (B i))+r*(∑i,PolygonArea.area (U i)) < m := by + rw [←htotal] + exact ENNReal.add_lt_add_left hBn ((mul_le_mul hr le_rfl (by positivity) (by positivity)).trans_lt harea) + obtain ⟨w₁,hw₁B,hw₁⟩ := exists_away U B ![u,f] (by apply guard; norm_num) + obtain ⟨w₂,hw₂B,hw₂⟩ := exists_away U B ![u,f,w₁] (by apply guard; norm_num) + obtain ⟨w₃,hw₃B,hw₃⟩ := exists_away U B ![u,f,w₁,w₂] (by apply guard; norm_num) + obtain ⟨c₁,hc₁,hout₁⟩ := cycle_three u w₁ w₂ + (fun p q he => hw₁ 0 q p he.symm) + (fun p q he => hw₂ 0 q p he.symm) + (fun p q he => hw₂ 2 q p he.symm) + obtain ⟨c₂,hc₂,hout₂⟩ := cycle_three w₁ f w₃ + (fun p q he => hw₁ 1 p q he) + (fun p q he => hw₃ 2 q p he.symm) + (fun p q he => hw₃ 1 q p he.symm) + refine ⟨c₂*c₁,?_,?_⟩ + · intro p + change c₂.val.val (c₁.val.val (u p))=f p + rw [hc₁,hc₂] + · intro y hy + have avoid (e : BankEmbedding (PolygonObject.mk m U) m) + (he : ∀p,(e p).2∉(B (e p).1).val) : ∀p,e p≠y := by + intro p hp + exact he p (by simpa only [hp] using hy) + have hu : ∀p,u p≠y := avoid u hU + have hf' : ∀p,f p≠y := avoid f hf + have hw₁' := avoid w₁ hw₁B + have hw₂' := avoid w₂ hw₂B + have hw₃' := avoid w₃ hw₃B + change c₂.val.val (c₁.val.val y)=y + rw [hout₁ y hu hw₁' hw₂',hout₂ y hw₁' hf' hw₃'] + +end BankEmbedding +end PolygonObject +end PolygonAlternatingExtension + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingStabilization.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingStabilization.lean new file mode 100644 index 0000000000000000000000000000000000000000..42605711a866865bddfd1b169668fb0dc4e29841 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonAlternatingStabilization.lean @@ -0,0 +1,86 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonPlacementAlternating + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonAlternatingStabilization +open Classical Set +namespace PolygonTracks +variable {a k n : ℕ} + +theorem stabilize_threeSlot {g : polygonFullGroup a n} (hg : IsThreeSlotCycle g) : + IsThreeSlotCycle (stabilize a k n g) := by + obtain ⟨U,s,hU,hs,hg,hfix⟩ := hg + let t : Fin 3 → Fin (k+n) × (CutRing × CutRing) := fun i => ((s i).1.natAdd k,(s i).2) + have ht (x : Fin 3 × U.val) : SlotMap a (k+n) U t x=rightIncl a k n (SlotMap a n U s x) := rfl + refine ⟨U,t,hU,?_,?_,?_⟩ + · intro x y hxy + apply hs + exact rightIncl_injective (by simpa only [ht] using hxy) + · intro i x + rw [ht,ht] + change (stabilize a k n g).val ((SlotMap a n U s (i,x)).1.natAdd k, + (SlotMap a n U s (i,x)).2)=_ + rw [stabilize_right,hg] + rfl + · intro p hp + obtain ⟨q,rfl⟩ := (join a k n).surjective p + cases q with + | inl q => exact stabilize_left g q + | inr q => + rw [join_inr,stabilize_right] + have hq : q∉Set.range (SlotMap a n U s) := by + rintro ⟨x,rfl⟩ + exact hp ⟨x,rfl⟩ + rw [hfix q hq] + +theorem stabilize_mem_alternating (g : polygonAlternatingGroup a n) : + stabilize a k n g.val∈polygonAlternatingGroup a (k+n) := by + have hl : polygonAlternatingGroup a n ≤ + (polygonAlternatingGroup a (k+n)).comap (stabilize a k n) := by + apply (Subgroup.closure_le _).mpr + intro f hf + exact Subgroup.subset_closure (stabilize_threeSlot hf) + exact hl g.property + +noncomputable def stabilizeAlternating (a k n : ℕ) : + polygonAlternatingGroup a n →* polygonAlternatingGroup a (k+n) := + (stabilize a k n).restrict (fun g hg => stabilize_mem_alternating ⟨g,hg⟩) + +@[simp] theorem stabilizeAlternating_val (g : polygonAlternatingGroup a n) : + (stabilizeAlternating a k n g).val=stabilize a k n g.val := rfl + +theorem stabilizeAlternating_injective : Function.Injective (stabilizeAlternating a k n) := by + intro g h he + apply Subtype.ext + exact stabilize_injective (congrArg Subtype.val he) + +theorem exists_alternating_agrees_right (f : polygonFullGroup a (k+n)) (hm : 6*n+7 PolygonPlacement.standard (i.natAdd k) + have he : Pairwise (fun i j => PolygonPlacement.Apart (e i) (e j)) := by + intro i j hij + exact PolygonPlacement.standard_apart (fun h => hij (Fin.ext (Nat.add_left_cancel + (congrArg Fin.val h)))) + have hf : Pairwise (fun i j => PolygonPlacement.Apart (f • e i) (f • e j)) := by + intro i j hij + exact (PolygonPlacement.apart_smul_iff f _ _).mpr (he hij) + obtain ⟨c,hc⟩ := PolygonPlacement.alternating_configuration_transitive e (fun i => f • e i) he hf hm + refine ⟨c,fun x => ?_⟩ + exact congrArg (fun z : PolygonPlacement a (k+n) => z x.2) (hc x.1) + +end PolygonTracks +end PolygonAlternatingStabilization + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonComponentStable.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonComponentStable.lean new file mode 100644 index 0000000000000000000000000000000000000000..956cff8eb513ee65f0b740cd35aa1229b9fc9148 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonComponentStable.lean @@ -0,0 +1,183 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonComponentCompletion +import OAI.GroupTheory.SimpleAmenable.Homology.PolygonStableHomology +import OAI.GroupTheory.SimpleAmenable.Homology.GroupoidComponentHomology +import OAI.GroupTheory.SimpleAmenable.Homology.ComponentStable + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable.PolygonTracks +open FreeChains ComponentTranslation GroupoidComponentHomology + +attribute [local instance 1200] Rep.hV2 +noncomputable abbrev componentGenerator (a:ℕ) := PolygonObject.component (PolygonObject.standard a 1) +lemma componentGenerator_cofinal (a:ℕ) : ∀p:Skeleton (PolygonObject a),∃q n,p*q=componentGenerator a^n := by + intro p + let U:=ComponentTranslation.repr p + refine ⟨PolygonObject.component (PolygonObject.complement U), U.tracks,?_⟩ + have h:=PolygonObject.component_complement U + rw [PolygonObject.component_standard_pow] at h + simpa only [U,PolygonObject.component,repr_component] using h +noncomputable def standardFiber (a n:ℕ) : Fiber (componentGenerator a^n) := + ⟨PolygonObject.standard a n,PolygonObject.component_standard_pow n⟩ +noncomputable def standardNerveInclusion (a n:ℕ) : + SingleObj (polygonFullGroup a n) ⥤ PolygonObject a := + (PolygonObject.standardAutEquiv a n).symm.toMonoidHom.toFunctor ⋙ + GroupoidComponentHomology.inclusion (PolygonObject.standard a n) +@[simp] lemma standardNerveInclusion_obj (a n:ℕ) (x:SingleObj (polygonFullGroup a n)) : + (standardNerveInclusion a n).obj x=PolygonObject.standard a n := rfl +@[simp] lemma standardNerveInclusion_map (a n:ℕ) {x y:SingleObj (polygonFullGroup a n)} (f:x⟶y) : + (standardNerveInclusion a n).map f=PolygonObject.fullGroupArrow f := rfl +noncomputable def standardFiberInclusion (a n:ℕ) : + SingleObj (polygonFullGroup a n) ⥤ Fiber (componentGenerator a^n) := + (property (componentGenerator a^n)).lift (standardNerveInclusion a n) + (fun _=>PolygonObject.component_standard_pow n) +noncomputable def standardHomologyIso (a n q:ℕ) : + groupHomology (Rep.trivial ℤ (polygonFullGroup a n) ℤ) q ≅ + (nerve (Fiber (componentGenerator a^n))).homology Z q := by + haveI:=TrivialHomology.isIso_equiv (PolygonObject.standardAutEquiv a n).symm q + exact asIso (TrivialHomology.map (PolygonObject.standardAutEquiv a n).symm.toMonoidHom q) ≪≫ + fiberIsoHomology (standardFiber a n) q +end SimpleAmenable.PolygonTracks +namespace SimpleAmenable.PolygonObject +open SimpleAmenable SimpleAmenable.PolygonTracks + +variable {a:ℕ} +lemma eqToHom_coord {U V:PolygonObject a} (h:U=V) (x:U.Point) : + (((eqToHom h:U⟶V).toEquiv x).val.1.val,((eqToHom h:U⟶V).toEquiv x).val.2)= + (x.val.1.val,x.val.2) := by subst V; rfl +lemma standardTensor_map (k n:ℕ) (f:polygonFullGroup a n) : + (tensorLeft (standard a k)).map (fullGroupArrow f) ≫ eqToHom (sum_standard k n) = + eqToHom (sum_standard k n) ≫ fullGroupArrow (stabilize a k n f) := by + apply Arrow.ext + apply Equiv.ext + intro x + apply Subtype.ext + apply Prod.ext + · apply Fin.ext + obtain ⟨y,rfl⟩ := (sumPointEquiv (standard a k) (standard a n)).surjective x + cases y with + | inl y => + have hx:=congrArg (fun z : ℕ × GenericSquare a => z.1) (eqToHom_coord (sum_standard k n) (sumPointEquiv (standard a k) (standard a n) (.inl y))) + simp only [arrow_comp_apply] + change ((eqToHom (sum_standard k n)).toEquiv + ((sumArrow (𝟙 _) (fullGroupArrow f)).toEquiv _)).val.1.val = _ + rw [sumArrow_inl,arrow_id_apply] + rw [show ((eqToHom (sum_standard k n)).toEquiv _).val.1.val = y.val.1.val from hx] + change _=((stabilize a k n f).val ((eqToHom (sum_standard k n)).toEquiv _).val).1.val + have hp : ((eqToHom (sum_standard k n)).toEquiv + (sumPointEquiv (standard a k) (standard a n) (.inl y))).val=(y.val.1.castAdd n,y.val.2) := by + apply Prod.ext + · apply Fin.ext; exact hx + · exact congrArg (fun z : ℕ × GenericSquare a => z.2) (eqToHom_coord (sum_standard k n) _) + erw [hp,stabilize_left] + rfl + | inr y => + have hp (z:(standard a n).Point) : ((eqToHom (sum_standard k n)).toEquiv + (sumPointEquiv (standard a k) (standard a n) (.inr z))).val=(z.val.1.natAdd k,z.val.2) := by + apply Prod.ext + · apply Fin.ext; exact congrArg (fun z : ℕ × GenericSquare a => z.1) (eqToHom_coord (sum_standard k n) _) + · exact congrArg (fun z : ℕ × GenericSquare a => z.2) (eqToHom_coord (sum_standard k n) _) + simp only [arrow_comp_apply] + change ((eqToHom (sum_standard k n)).toEquiv + ((sumArrow (𝟙 _) (fullGroupArrow f)).toEquiv _)).val.1.val = + ((stabilize a k n f).val ((eqToHom (sum_standard k n)).toEquiv _).val).1.val + erw [sumArrow_inr,hp,hp,stabilize_right] + rfl + · obtain ⟨y,rfl⟩ := (sumPointEquiv (standard a k) (standard a n)).surjective x + cases y with + | inl y => + have hp : ((eqToHom (sum_standard k n)).toEquiv + (sumPointEquiv (standard a k) (standard a n) (.inl y))).val=(y.val.1.castAdd n,y.val.2) := by + apply Prod.ext + · apply Fin.ext; exact congrArg (fun z : ℕ × GenericSquare a => z.1) (eqToHom_coord (sum_standard k n) _) + · exact congrArg (fun z : ℕ × GenericSquare a => z.2) (eqToHom_coord (sum_standard k n) _) + simp only [arrow_comp_apply] + change ((eqToHom (sum_standard k n)).toEquiv + ((sumArrow (𝟙 _) (fullGroupArrow f)).toEquiv _)).val.2 = + ((stabilize a k n f).val ((eqToHom (sum_standard k n)).toEquiv _).val).2 + erw [sumArrow_inl,arrow_id_apply,hp,stabilize_left] + | inr y => + have hp (z:(standard a n).Point) : ((eqToHom (sum_standard k n)).toEquiv + (sumPointEquiv (standard a k) (standard a n) (.inr z))).val=(z.val.1.natAdd k,z.val.2) := by + apply Prod.ext + · apply Fin.ext; exact congrArg (fun z : ℕ × GenericSquare a => z.1) (eqToHom_coord (sum_standard k n) _) + · exact congrArg (fun z : ℕ × GenericSquare a => z.2) (eqToHom_coord (sum_standard k n) _) + simp only [arrow_comp_apply] + change ((eqToHom (sum_standard k n)).toEquiv + ((sumArrow (𝟙 _) (fullGroupArrow f)).toEquiv _)).val.2 = + ((stabilize a k n f).val ((eqToHom (sum_standard k n)).toEquiv _).val).2 + erw [sumArrow_inr,hp,hp,stabilize_right] + rfl +noncomputable def standardTensorIso (k n:ℕ) : + standardNerveInclusion a n ⋙ tensorLeft (standard a k) ≅ + (stabilize a k n).toFunctor ⋙ standardNerveInclusion a (k+n) := + NatIso.ofComponents (fun _=>eqToIso (sum_standard k n)) (by + intro x y f + exact standardTensor_map k n f) +noncomputable def standardCastIso {m n:ℕ} (h:m=n) : standardNerveInclusion a m ≅ + (castFull a h).toMonoidHom.toFunctor ⋙ standardNerveInclusion a n := by + subst n + exact NatIso.ofComponents (fun _=>Iso.refl _) (by intro x y f; simp; rfl) +noncomputable def standardSuccessorIso (n:ℕ) : + standardNerveInclusion a n ⋙ tensorLeft (standard a 1) ≅ + (successorStabilize a n).toFunctor ⋙ standardNerveInclusion a (n+1) := + standardTensorIso 1 n ≪≫ + Functor.isoWhiskerLeft (stabilize a 1 n).toFunctor (standardCastIso (Nat.add_comm 1 n)) ≪≫ + (Functor.associator _ _ _).symm +end SimpleAmenable.PolygonObject +namespace SimpleAmenable.PolygonTracks +open FreeChains ComponentTranslation GroupoidComponentHomology + +instance standardFiberInclusion_faithful (a n:ℕ) : (standardFiberInclusion a n).Faithful where + map_injective h := PolygonObject.fullGroupArrow_injective + (congrArg (fun f : (standardFiberInclusion a n).obj _ ⟶ (standardFiberInclusion a n).obj _ => f.hom) h) +noncomputable instance standardFiberInclusion_full (a n:ℕ) : (standardFiberInclusion a n).Full where + map_surjective f := ⟨PolygonObject.fullGroupOfArrow f.hom,by + apply ObjectProperty.hom_ext + exact PolygonObject.arrow_fullGroup f.hom⟩ +instance standardFiberInclusion_essSurj (a n:ℕ) : (standardFiberInclusion a n).EssSurj where + mem_essImage V := ⟨SingleObj.star _,⟨fiberIso _ (standardFiber a n) V⟩⟩ +noncomputable instance standardFiberInclusion_isEquivalence (a n:ℕ) : + (standardFiberInclusion a n).IsEquivalence := ⟨inferInstance,inferInstance,inferInstance⟩ +noncomputable def representativeGeneratorIso (a:ℕ) : + repr (componentGenerator a) ≅ PolygonObject.standard a 1 := Skeleton.isoOfEq (repr_component _) +noncomputable def representativeSuccessorIso (a n:ℕ) : + standardNerveInclusion a n ⋙ tensorLeft (repr (componentGenerator a)) ≅ + (successorStabilize a n).toFunctor ⋙ standardNerveInclusion a (n+1) := + Functor.isoWhiskerLeft (standardNerveInclusion a n) + ((tensoringLeft (PolygonObject a)).mapIso (representativeGeneratorIso a)) ≪≫ + PolygonObject.standardSuccessorIso n +noncomputable def fiberSuccessorIso (a n:ℕ) : + standardFiberInclusion a n ⋙ + ComponentTranslation.translate (componentGenerator a) (componentGenerator a^n) (componentGenerator a^(n+1)) (pow_succ' _ _).symm ≅ + (successorStabilize a n).toFunctor ⋙ standardFiberInclusion a (n+1) := + NatIso.ofComponents (fun x=>ObjectProperty.isoMk _ ((representativeSuccessorIso a n).app x)) (by + intro x y f + apply ObjectProperty.hom_ext + exact (representativeSuccessorIso a n).hom.naturality f) +lemma component_successor_isIso (a n q:ℕ) [IsIso (TrivialHomology.map (successorStabilize a n) q)] : + IsIso (SSet.homologyMap (nerveMap + (ComponentTranslation.translate (componentGenerator a) (componentGenerator a^n) (componentGenerator a^(n+1)) (pow_succ' _ _).symm)) Z q) := by + have sourceInclusionIso := NerveHomotopy.homologyMap_isIso (standardFiberInclusion a n) Z q + have targetInclusionIso := NerveHomotopy.homologyMap_isIso (standardFiberInclusion a (n+1)) Z q + have hg:=GroupNerveCoordinates.homologyIso_natural (successorStabilize a n) q + have successorIso : IsIso (SSet.homologyMap (nerveMap (successorStabilize a n).toFunctor) Z q) := by + have successorCompositeIso : IsIso (SSet.homologyMap (nerveMap (successorStabilize a n).toFunctor) Z q ≫ + (GroupNerveCoordinates.homologyIso (polygonFullGroup a (n+1)) q).hom) := by rw [hg]; infer_instance + exact (isIso_comp_right_iff _ (GroupNerveCoordinates.homologyIso (polygonFullGroup a (n+1)) q).hom).mp inferInstance + have h:=(NerveHomotopy.ofNatTrans (fiberSuccessorIso a n).hom).congr_homologyMap Z q + rw [ComponentStable.map_comp,ComponentStable.map_comp] at h + have inclusionCompositeIso : IsIso (SSet.homologyMap (nerveMap (standardFiberInclusion a n)) Z q ≫ + SSet.homologyMap (nerveMap + (ComponentTranslation.translate (componentGenerator a) (componentGenerator a^n) (componentGenerator a^(n+1)) (pow_succ' _ _).symm)) Z q) := by + rw [h] + infer_instance + exact (isIso_comp_left_iff (SSet.homologyMap (nerveMap (standardFiberInclusion a n)) Z q) _).mp inferInstance +end SimpleAmenable.PolygonTracks + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonFixedReturn.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonFixedReturn.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ee4bb6c36b20f74b9ea4548f6bf68ea33436288 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonFixedReturn.lean @@ -0,0 +1,52 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.CofinalPowers +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonComponentStable +import OAI.GroupTheory.SimpleAmenable.Simplicial.FirstBarStableH1 + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable.PolygonTracks +open FreeChains ComponentTranslation GroupoidComponentHomology + +attribute [local instance 1200] Rep.hV2 +lemma component_sequence_succ (a n q:ℕ) : + (homologyDiagram (C:=PolygonObject a) q).map + ((CofinalPowers.sequence (componentGenerator a)).map (homOfLE (Nat.le_succ n))) = + SSet.homologyMap (nerveMap (ComponentTranslation.translate (componentGenerator a) + (componentGenerator a^n) (componentGenerator a^(n+1)) (pow_succ' _ _).symm)) Z q := by + change SSet.homologyMap (nerveMap (ComponentTranslation.translate + (componentGenerator a ^ (n+1-n)) _ _ _)) Z q = _ + simp only [Nat.add_sub_cancel_left,pow_one] + rfl +lemma finite_fullH1_iff_stable (a m:ℕ) (hm : 32 ≤ m) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 1) ↔ + Module.Finite ℤ (ComponentStable.object (C:=PolygonObject a) 1 : A) := by + refine (Module.Finite.equiv_iff (standardHomologyIso a m 1).toLinearEquiv).trans ?_ + apply CofinalPowers.finite_colimit_iff (componentGenerator a) (componentGenerator_cofinal a) + (homologyDiagram 1) 32 m hm + intro n hn + rw [component_sequence_succ] + have successorIso := successor_H1_isIso a n hn + exact component_successor_isIso a n 1 +lemma finite_fullH2_iff_stable (a m:ℕ) (hm : 34 ≤ m) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 2) ↔ + Module.Finite ℤ (ComponentStable.object (C:=PolygonObject a) 2 : A) := by + refine (Module.Finite.equiv_iff (standardHomologyIso a m 2).toLinearEquiv).trans ?_ + apply CofinalPowers.finite_colimit_iff (componentGenerator a) (componentGenerator_cofinal a) + (homologyDiagram 2) 34 m hm + intro n hn + rw [component_sequence_succ] + have successorIso := successor_H2_isIso a n hn + exact component_successor_isIso a n 2 +lemma fullH1_finite_of_bar (a m:ℕ) (hm : 32 ≤ m) + [Module.Finite ℤ ((IntervalBar.Diagram.bar (C:=PolygonObject a)).homology Z 1 : A)] + [Module.Finite ℤ ((IntervalBar.Diagram.bar (C:=PolygonObject a)).homology Z 2 : A)] : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 1) := + (finite_fullH1_iff_stable a m hm).mpr (MarkedH1.stableH1_finite (C:=PolygonObject a)) +end SimpleAmenable.PolygonTracks + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonFixedTrackProgress.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonFixedTrackProgress.lean new file mode 100644 index 0000000000000000000000000000000000000000..b08dff06d685be53d2c2504735d0ee3d63809f54 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonFixedTrackProgress.lean @@ -0,0 +1,183 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.WholeCoverCentrality +import OAI.GroupTheory.SimpleAmenable.Amenability.SubgroupTestReiter + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonFixedTrackProgress + +theorem source_radius_valid : 0 ?_⟩ + obtain ⟨n,rfl⟩ : ∃n,m=n+1 := ⟨m-1,by omega⟩ + obtain ⟨hinf,hsimple,hfol⟩ := polygon_infinite_simple_folner ha (by omega : 15≤n+1) + obtain ⟨L,hpres,hsur,hcent⟩ := polygon_central_cover (by omega : 2≤n) ha hm + source_radius_valid (by linarith : 8000 GenericSquare a → TrackPoint a m) := + ⟨fun f => f.toEmbedding⟩ + +@[ext] theorem ext {f g : PolygonPlacement a m} (h : ∀x,f x=g x) : f=g := by + cases f; cases g + congr + exact Function.Embedding.ext h + +noncomputable def standard (i : Fin m) : PolygonPlacement a m where + toEmbedding := ⟨fun x => (i,x),fun _ _ h => congrArg Prod.snd h⟩ + charts := by + refine ⟨{(i,0,⊤)},?_,?_⟩ + · intro c hc x _ + obtain rfl := Finset.mem_singleton.mp hc + change (i,x)=(i,translate a 0 x) + rw [translate_zero] + · intro x + exact ⟨(i,0,⊤),Finset.mem_singleton_self _,by trivial⟩ + +@[simp] theorem standard_apply (i : Fin m) (x : GenericSquare a) : + standard i x=(i,x) := rfl + +noncomputable def postcompose (g : polygonFullGroup a m) (f : PolygonPlacement a m) : + PolygonPlacement a m where + toEmbedding := ⟨fun x => g.val (f x),g.val.injective.comp f.toEmbedding.injective⟩ + charts := by + obtain ⟨s,hs,hcover⟩ := g.property + obtain ⟨t,ht,tcover⟩ := f.charts + let pairs := (s×ˢt).filter (fun cd => cd.1.source=cd.2.1) + let conv : TableChart a m × (Fin m × (CutRing×CutRing) × polygonAlgebra a) → + Fin m × (CutRing×CutRing) × polygonAlgebra a := fun cd => + (cd.1.target,cd.1.shift+cd.2.2.1, + ⟨cd.2.2.2.val ∩ translate a cd.2.2.1 ⁻¹' cd.1.domain.val, + BooleanSubalgebra.inf_mem cd.2.2.2.property + (polygon_preimage_translate cd.2.2.1 cd.1.domain.property)⟩) + refine ⟨pairs.image conv,?_,?_⟩ + · intro c hc + obtain ⟨⟨d,e⟩,hde,rfl⟩ := Finset.mem_image.mp hc + obtain ⟨hp,he⟩ := Finset.mem_filter.mp hde + obtain ⟨hd,he'⟩ := Finset.mem_product.mp hp + intro x hx + change g.val (f x)=(d.target,translate a (d.shift+e.2.1) x) + rw [ht e he' x hx.1,←he,hs d hd _ hx.2,translate_add] + · intro x + obtain ⟨e,he,hx⟩ := tcover x + obtain ⟨d,hd,hfx⟩ := hcover (f x) + have hf := ht e he x hx + have hmatch : d.source=e.1 := hfx.1.symm.trans (congrArg Prod.fst hf) + refine ⟨conv (d,e),Finset.mem_image.mpr ⟨(d,e),?_,rfl⟩,hx,?_⟩ + · exact Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨hd,he⟩,hmatch⟩ + · change translate a e.2.1 x∈d.domain.val + simpa only [hf] using hfx.2 + +@[simp] theorem postcompose_apply (g : polygonFullGroup a m) (f : PolygonPlacement a m) + (x : GenericSquare a) : postcompose g f x=g.val (f x) := rfl + +noncomputable instance : MulAction (polygonFullGroup a m) (PolygonPlacement a m) where + smul := postcompose + one_smul _ := by apply PolygonPlacement.ext; intro _; rfl + mul_smul _ _ _ := by apply PolygonPlacement.ext; intro _; rfl + +@[simp] theorem smul_apply (g : polygonFullGroup a m) (f : PolygonPlacement a m) + (x : GenericSquare a) : (g • f) x=g.val (f x) := rfl + +theorem range_fiber_polygon (f : PolygonPlacement a m) (i : Fin m) : + {x | (i,x)∈Set.range f}∈polygonAlgebra a := by + obtain ⟨s,hs,hcover⟩ := f.charts + have he : {x | (i,x)∈Set.range f}= + ⋃c∈s.filter (fun c => c.1=i),translation a c.2.1 '' c.2.2.val := by + ext y + constructor + · rintro ⟨x,hx⟩ + obtain ⟨c,hc,hxc⟩ := hcover x + have h := (hs c hc x hxc).symm.trans hx + exact Set.mem_iUnion.mpr ⟨c,Set.mem_iUnion.mpr ⟨ + Finset.mem_filter.mpr ⟨hc,congrArg Prod.fst h⟩, + ⟨x,hxc,congrArg Prod.snd h⟩⟩⟩ + · intro hy + obtain ⟨c,hc,hy⟩ := Set.mem_iUnion₂.mp hy + obtain ⟨x,hx,hxy⟩ := hy + refine ⟨x,?_⟩ + rw [hs c (Finset.mem_filter.mp hc).1 x hx,(Finset.mem_filter.mp hc).2] + exact Prod.ext rfl hxy + rw [he] + apply BooleanSubalgebra.biSup_mem (Finset.finite_toSet _) + intro chart _ + exact polygon_image_translation _ chart.2.2.property + +def Apart (f g : PolygonPlacement a m) : Prop := Disjoint (Set.range f) (Set.range g) + +theorem apart_symm {f g : PolygonPlacement a m} (h : Apart f g) : Apart g f := h.symm + +theorem apart_iff (f g : PolygonPlacement a m) : Apart f g ↔ ∀x y,f x≠g y := by + constructor + · intro h x y he + exact Set.disjoint_left.mp h ⟨x,rfl⟩ ⟨y,he.symm⟩ + · intro h + apply Set.disjoint_left.mpr + rintro _ ⟨x,rfl⟩ ⟨y,he⟩ + exact h x y he.symm + +theorem apart_smul_iff (h : polygonFullGroup a m) (f g : PolygonPlacement a m) : + Apart (h • f) (h • g) ↔ Apart f g := by + simp only [apart_iff,smul_apply,h.val.injective.ne_iff] + +theorem standard_apart {i j : Fin m} (hij : i≠j) : + Apart (standard (a:=a) i) (standard j) := by + rw [apart_iff] + intro _ _ equality + exact hij (congrArg Prod.fst equality) + +noncomputable def bank {n : ℕ} (f : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) : TrackPoint a n ↪ TrackPoint a m where + toFun x := f x.1 x.2 + inj' := by + rintro ⟨i,x⟩ ⟨j,y⟩ he + have hij : i=j := by + by_contra hn + exact (apart_iff _ _).mp (hf hn) x y he + subst j + exact Prod.ext rfl ((f i).toEmbedding.injective he) + +end PolygonPlacement +end PolygonConfigurations + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGrid.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGrid.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2a1fead8c33e52f39403172d3dbbd849f0a0f87 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGrid.lean @@ -0,0 +1,106 @@ +import Mathlib + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonGrid +open Classical Set MeasureTheory Metric +namespace PolygonGrid + +abbrev PlaneTracks := ℕ × ℝ × ℝ +abbrev Index (m N : ℕ) := Fin m × Fin N × Fin N +noncomputable def μ : Measure PlaneTracks := Measure.count.prod ((volume : Measure ℝ).prod volume) +noncomputable def interval (ε : ℝ) (i : ℕ) : Set ℝ := Ico (ε*i) (ε*(i+1)) +noncomputable def cell {m N : ℕ} (ε : ℝ) (i : Index m N) : Set PlaneTracks := + {i.1.val} ×ˢ interval ε i.2.1.val ×ˢ interval ε i.2.2.val +noncomputable def region (m : ℕ) : Set PlaneTracks := + {i : ℕ | i < m} ×ˢ Ico (0:ℝ) 1 ×ˢ Ico (0:ℝ) 1 + +@[simp] theorem measurable_cell {m N : ℕ} (ε : ℝ) (i : Index m N) : MeasurableSet (cell ε i) := + (measurableSet_singleton _).prod (measurableSet_Ico.prod measurableSet_Ico) + +@[simp] theorem volume_cell {m N : ℕ} (ε : ℝ) (i : Index m N) : + μ (cell ε i)=ENNReal.ofReal ε * ENNReal.ofReal ε := by + simp only [μ,cell,interval,Measure.prod_prod,Measure.count_singleton,one_mul,Real.volume_Ico] + congr 2 <;> ring + +theorem cells_disjoint {m N : ℕ} {ε : ℝ} (hε : 0 < ε) : + Pairwise (fun i j : Index m N => Disjoint (cell ε i) (cell ε j)) := by + intro i j hij + apply Set.disjoint_left.mpr + intro p hi hj + have ht : i.1=j.1 := Fin.ext (hi.1.symm.trans hj.1) + have coord {i j : ℕ} {x : ℝ} (hi : x∈interval ε i) (hj : x∈interval ε j) : i=j := by + rcases lt_trichotomy i j with h|h|h + · have h' : (i:ℝ)+1 ≤ j := by exact_mod_cast h + have := mul_le_mul_of_nonneg_left h' hε.le + change ε*i ≤ x ∧ x < ε*(i+1) at hi + change ε*j ≤ x ∧ x < ε*(j+1) at hj + linarith + · exact h + · have h' : (j:ℝ)+1 ≤ i := by exact_mod_cast h + have := mul_le_mul_of_nonneg_left h' hε.le + change ε*i ≤ x ∧ x < ε*(i+1) at hi + change ε*j ≤ x ∧ x < ε*(j+1) at hj + linarith + exact hij (Prod.ext ht (Prod.ext (Fin.ext (coord hi.2.1 hj.2.1)) (Fin.ext (coord hi.2.2 hj.2.2)))) + +theorem cell_dist {m N : ℕ} {ε : ℝ} (hε : 0 < ε) {i : Index m N} {p q : PlaneTracks} + (hp : p∈cell ε i) (hq : q∈cell ε i) : dist p q < ε := by + have coord {i : ℕ} {x y : ℝ} (hx : x∈interval ε i) (hy : y∈interval ε i) : dist x y < ε := by + rw [Real.dist_eq,abs_lt] + change ε*i ≤ x ∧ x < ε*(i+1) at hx + change ε*i ≤ y ∧ y < ε*(i+1) at hy + constructor <;> nlinarith + have ht : p.1=q.1 := hp.1.trans hq.1.symm + rw [Prod.dist_eq,Prod.dist_eq,ht,dist_self,max_lt_iff,max_lt_iff] + exact ⟨hε,coord hp.2.1 hq.2.1,coord hp.2.2 hq.2.2⟩ + +theorem region_covered {m N : ℕ} {ε : ℝ} (hε : 0 < ε) (hN : 1/ε < (N:ℝ)) : + region m⊆⋃i : Index m N,cell ε i := by + rintro ⟨t,x,y⟩ ⟨ht,hx,hy⟩ + have coord {x : ℝ} (hx : x∈Ico (0:ℝ) 1) : ∃i : Fin N,x∈interval ε i.val := by + have hnon : 0 ≤ x/ε := div_nonneg hx.1 hε.le + have hlt : x/ε < (N:ℝ) := (div_lt_div_of_pos_right hx.2 hε).trans hN + have hi : ⌊x/ε⌋₊ < N := by + exact_mod_cast lt_of_le_of_lt (Nat.floor_le hnon) hlt + refine ⟨⟨⌊x/ε⌋₊,hi⟩,?_,?_⟩ + · have h := (le_div_iff₀ hε).mp (Nat.floor_le hnon) + nlinarith + · have h := (div_lt_iff₀ hε).mp (Nat.lt_floor_add_one (x/ε)) + nlinarith + obtain ⟨i,hi⟩ := coord hx + obtain ⟨j,hj⟩ := coord hy + exact Set.mem_iUnion.mpr ⟨(⟨t,ht⟩,i,j),rfl,hi,hj⟩ + +theorem volume_cells {m N : ℕ} {ε : ℝ} (hε : 0 < ε) (I : Finset (Index m N)) : + μ (⋃i∈I,cell ε i)=I.card*(ENNReal.ofReal ε * ENNReal.ofReal ε) := by + rw [measure_biUnion_finset (fun i hi j hj hij => cells_disjoint hε hij) + (fun i _ => measurable_cell ε i)] + simp only [volume_cell,Finset.sum_const, nsmul_eq_mul] + +theorem matching_of_volume {m N : ℕ} {ε : ℝ} (hε : 0 < ε) + (I J : Finset (Index m N)) + (hμ : μ (⋃i∈I,cell ε i) < μ (⋃j∈J,cell ε j)) : Nonempty (I ↪ J) := by + have hc : I.card ≤ J.card := by + by_contra hn + have hnat : J.card ≤ I.card := by omega + have hcast : (J.card : ENNReal) ≤ I.card := by exact_mod_cast hnat + rw [volume_cells hε,volume_cells hε] at hμ + exact not_lt_of_ge (mul_le_mul hcast le_rfl (by positivity) (by positivity)) hμ + have hf : Fintype.card I ≤ Fintype.card J := by simpa using hc + exact Function.Embedding.nonempty_of_card_le hf + +end PolygonGrid +end PolygonGrid + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGroupoid.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGroupoid.lean new file mode 100644 index 0000000000000000000000000000000000000000..00b211076a97b1276e0b54032f6e98889d6a54e9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGroupoid.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TrackPoint + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open Classical Set CategoryTheory + +structure PolygonObject (a : ℕ) where + tracks : ℕ + cell : Fin tracks → polygonAlgebra a + +namespace PolygonObject +variable {a : ℕ} + +abbrev Point (U : PolygonObject a) := {x : TrackPoint a U.tracks // x.2 ∈ (U.cell x.1).val} + +structure Chart (m n : ℕ) where + source : Fin m + target : Fin n + shift : CutRing × CutRing + domain : polygonAlgebra a + +namespace Chart +variable {U V W : PolygonObject a} + +def Holds (c : Chart (a:=a) U.tracks V.tracks) (f : U.Point → V.Point) : Prop := + ∀ x∈c.domain.val, ∃hx : x∈(U.cell c.source).val, + (f ⟨(c.source,x),hx⟩).val=(c.target,translate a c.shift x) + +def Contains (c : Chart (a:=a) U.tracks V.tracks) (x : U.Point) : Prop := + x.val.1=c.source ∧ x.val.2∈c.domain.val + +noncomputable def comp (c : Chart (a:=a) V.tracks W.tracks) + (d : Chart (a:=a) U.tracks V.tracks) : Chart (a:=a) U.tracks W.tracks := + ⟨d.source,c.target,c.shift+d.shift, + ⟨d.domain.val ∩ translate a d.shift ⁻¹' c.domain.val, + BooleanSubalgebra.inf_mem d.domain.property (polygon_preimage_translate d.shift c.domain.property)⟩⟩ + +theorem comp_holds {c : Chart (a:=a) V.tracks W.tracks} + {d : Chart (a:=a) U.tracks V.tracks} {f : V.Point → W.Point} {g : U.Point → V.Point} + (hc : c.Holds f) (hd : d.Holds g) (hmatch : c.source=d.target) : + (c.comp d).Holds (f ∘ g) := by + rintro x ⟨hx,hcx⟩ + obtain ⟨hu,he⟩ := hd x hx + obtain ⟨hv,hf⟩ := hc (translate a d.shift x) hcx + refine ⟨hu,?_⟩ + have hp : g ⟨(d.source,x),hu⟩=⟨(c.source,translate a d.shift x),hv⟩ := by + apply Subtype.ext + simpa only [hmatch] using he + change (f (g ⟨(d.source,x),hu⟩)).val=(c.target,translate a (c.shift+d.shift) x) + rw [hp,hf,translate_add] + +noncomputable def inverse (c : Chart (a:=a) U.tracks V.tracks) : + Chart (a:=a) V.tracks U.tracks := + ⟨c.target,c.source,-c.shift, + ⟨translation a c.shift '' c.domain.val,polygon_image_translation _ c.domain.property⟩⟩ + +theorem inverse_holds (f : U.Point ≃ V.Point) {c : Chart (a:=a) U.tracks V.tracks} + (hc : c.Holds f) : c.inverse.Holds f.symm := by + rintro y ⟨x,hx,rfl⟩ + obtain ⟨hu,he⟩ := hc x hx + have hv : translate a c.shift x∈(V.cell c.target).val := by + have h := (f ⟨(c.source,x),hu⟩).property + rw [he] at h + exact h + refine ⟨hv,?_⟩ + have hp : (⟨(c.target,translate a c.shift x),hv⟩ : V.Point)=f ⟨(c.source,x),hu⟩ := + Subtype.ext he.symm + change (f.symm ⟨(c.target,translate a c.shift x),hv⟩).val = + (c.source,translate a (-c.shift) (translate a c.shift x)) + rw [hp,f.symm_apply_apply,←translate_add,neg_add_cancel,translate_zero] + +end Chart + +def HasTable {U V : PolygonObject a} (f : U.Point → V.Point) : Prop := + ∃s : Finset (Chart (a:=a) U.tracks V.tracks), + (∀c∈s,c.Holds f) ∧ ∀x,∃c∈s,c.Contains x + +theorem identity_hasTable (U : PolygonObject a) : HasTable (id : U.Point → U.Point) := by + let c : Fin U.tracks → Chart (a:=a) U.tracks U.tracks := fun i => ⟨i,i,0,U.cell i⟩ + refine ⟨Finset.univ.image c,?_,?_⟩ + · intro d hd + obtain ⟨i,-,rfl⟩ := Finset.mem_image.mp hd + intro x hx + exact ⟨hx,by change (i,x)=(i,translate a 0 x); rw [translate_zero]⟩ + · intro x + exact ⟨c x.val.1,Finset.mem_image.mpr ⟨_,Finset.mem_univ _,rfl⟩,rfl,x.property⟩ + +theorem comp_hasTable {U V W : PolygonObject a} {f : V.Point → W.Point} {g : U.Point → V.Point} + (hf : HasTable f) (hg : HasTable g) : HasTable (f ∘ g) := by + obtain ⟨s,hs,hcover⟩ := hf + obtain ⟨t,ht,tcover⟩ := hg + let pairs := (s×ˢt).filter (fun cd => cd.1.source=cd.2.target) + refine ⟨pairs.image (fun cd => cd.1.comp cd.2),?_,?_⟩ + · intro e he + obtain ⟨⟨c,d⟩,hcd,rfl⟩ := Finset.mem_image.mp he + obtain ⟨hmem,hmatch⟩ := Finset.mem_filter.mp hcd + obtain ⟨hc,hd⟩ := Finset.mem_product.mp hmem + exact Chart.comp_holds (hs c hc) (ht d hd) hmatch + · intro x + obtain ⟨d,hd,hx⟩ := tcover x + obtain ⟨c,hc,hgx⟩ := hcover (g x) + obtain ⟨hu,he⟩ := ht d hd x.val.2 hx.2 + have hxval : (⟨(d.source,x.val.2),hu⟩ : U.Point)=x := by + apply Subtype.ext + exact Prod.ext hx.1.symm rfl + rw [hxval] at he + have hmatch : c.source=d.target := by + change (g x).val.1=c.source ∧ (g x).val.2∈c.domain.val at hgx + rw [he] at hgx + exact hgx.1.symm + refine ⟨c.comp d,Finset.mem_image.mpr ⟨(c,d),?_,rfl⟩,hx.1,hx.2,?_⟩ + · exact Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨hc,hd⟩,hmatch⟩ + · change translate a d.shift x.val.2∈c.domain.val + simpa only [he] using hgx.2 + +theorem inverse_hasTable {U V : PolygonObject a} (f : U.Point ≃ V.Point) + (hf : HasTable f) : HasTable f.symm := by + obtain ⟨s,hs,hcover⟩ := hf + refine ⟨s.image Chart.inverse,?_,?_⟩ + · intro c hc + obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + exact Chart.inverse_holds f (hs d hd) + · intro y + obtain ⟨c,hc,hx⟩ := hcover (f.symm y) + obtain ⟨hu,he⟩ := hs c hc (f.symm y).val.2 hx.2 + have hp : (⟨(c.source,(f.symm y).val.2),hu⟩ : U.Point)=f.symm y := by + apply Subtype.ext + exact Prod.ext hx.1.symm rfl + rw [hp,f.apply_symm_apply] at he + refine ⟨c.inverse,Finset.mem_image.mpr ⟨c,hc,rfl⟩,?_,?_⟩ + · exact congrArg Prod.fst he + · exact ⟨(f.symm y).val.2,hx.2,(congrArg Prod.snd he).symm⟩ + +structure Arrow (U V : PolygonObject a) where + toEquiv : U.Point ≃ V.Point + hasTable : HasTable toEquiv + +@[ext] theorem Arrow.ext {U V : PolygonObject a} {f g : Arrow U V} + (h : f.toEquiv=g.toEquiv) : f=g := by + cases f; cases g; cases h; rfl + +noncomputable instance : Groupoid (PolygonObject a) where + Hom := Arrow + id U := ⟨Equiv.refl _,identity_hasTable U⟩ + comp f g := ⟨f.toEquiv.trans g.toEquiv,comp_hasTable (f:=g.toEquiv) (g:=f.toEquiv) g.hasTable f.hasTable⟩ + id_comp f := Arrow.ext rfl + comp_id f := Arrow.ext rfl + assoc f g h := Arrow.ext rfl + inv f := ⟨f.toEquiv.symm,inverse_hasTable f.toEquiv f.hasTable⟩ + inv_comp f := by apply Arrow.ext; exact Equiv.symm_trans_self _ + comp_inv f := by apply Arrow.ext; exact Equiv.self_trans_symm _ + +def Positional {U V : PolygonObject a} (f : U ⟶ V) : Prop := + ∀x,(f.toEquiv x).val.2=x.val.2 + +noncomputable def positionalSubgroupoid (a : ℕ) : Subgroupoid (PolygonObject a) where + arrows U V := {f | Positional f} + inv := by + intro U V f hf y + change (f.toEquiv.symm y).val.2=y.val.2 + have h := hf (f.toEquiv.symm y) + simpa using h.symm + mul := by + intro U V W f hf g hg x + exact (hg (f.toEquiv x)).trans (hf x) + +theorem identity_positional (U : PolygonObject a) : Positional (𝟙 U) := fun _ => rfl + +end PolygonObject + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGroupoidTracks.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGroupoidTracks.lean new file mode 100644 index 0000000000000000000000000000000000000000..53f83b02b2ecd7896259893c47b3993621e8bb0a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonGroupoidTracks.lean @@ -0,0 +1,94 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonGroupoid + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonGroupoidTracks +open Classical CategoryTheory +namespace PolygonObject +variable {a : ℕ} + +noncomputable def standard (a m : ℕ) : PolygonObject a := ⟨m,fun _ => ⊤⟩ + +noncomputable def standardPointEquiv (a m : ℕ) : (standard a m).Point ≃ TrackPoint a m where + toFun := Subtype.val + invFun x := ⟨x,by trivial⟩ + left_inv _ := rfl + right_inv _ := rfl + +noncomputable def fullGroupArrow {m : ℕ} (g : polygonFullGroup a m) : standard a m ⟶ standard a m where + toEquiv := (standardPointEquiv a m).trans (g.val.trans (standardPointEquiv a m).symm) + hasTable := by + obtain ⟨s,hs,hcover⟩ := g.property + let conv : TableChart a m → Chart (a:=a) m m := fun c => ⟨c.source,c.target,c.shift,c.domain⟩ + refine ⟨s.image conv,?_,?_⟩ + · intro c hc + obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + intro x hx + refine ⟨by trivial,?_⟩ + exact hs d hd x hx + · intro x + obtain ⟨c,hc,hx⟩ := hcover x.val + exact ⟨conv c,Finset.mem_image.mpr ⟨c,hc,rfl⟩,hx⟩ + +noncomputable def fullGroupOfArrow {m : ℕ} (g : standard a m ⟶ standard a m) : polygonFullGroup a m := + ⟨(standardPointEquiv a m).symm.trans (g.toEquiv.trans (standardPointEquiv a m)),by + obtain ⟨s,hs,hcover⟩ := g.hasTable + let conv : Chart (a:=a) m m → TableChart a m := fun c => ⟨c.source,c.target,c.shift,c.domain⟩ + refine ⟨s.image conv,?_,?_⟩ + · intro c hc + obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + intro x hx + obtain ⟨hu,he⟩ := hs d hd x hx + exact he + · intro x + obtain ⟨c,hc,hx⟩ := hcover ((standardPointEquiv _ _).symm x) + exact ⟨conv c,Finset.mem_image.mpr ⟨c,hc,rfl⟩,hx⟩⟩ + +@[simp] theorem arrow_fullGroup {m : ℕ} (g : standard a m ⟶ standard a m) : + fullGroupArrow (fullGroupOfArrow g)=g := by + apply Arrow.ext + apply Equiv.ext + intro x + rfl + +@[simp] theorem fullGroup_arrow {m : ℕ} (g : polygonFullGroup a m) : + fullGroupOfArrow (fullGroupArrow g)=g := by + apply Subtype.ext + apply Equiv.ext + intro x + rfl + +theorem fullGroupArrow_injective {m : ℕ} : Function.Injective (@fullGroupArrow a m) := by + intro g h he + simpa using congrArg fullGroupOfArrow he + +theorem fullGroupOfArrow_injective {m : ℕ} : Function.Injective (@fullGroupOfArrow a m) := by + intro g h he + simpa using congrArg fullGroupArrow he + +noncomputable def standardAutEquiv (a m : ℕ) : Aut (standard a m) ≃* polygonFullGroup a m where + toFun g := fullGroupOfArrow g.hom + invFun g := asIso (fullGroupArrow g) + left_inv g := by apply Iso.ext; exact arrow_fullGroup g.hom + right_inv g := fullGroup_arrow g + map_mul' g h := by + apply Subtype.ext + apply Equiv.ext + intro x + rfl + +end PolygonObject +end PolygonGroupoidTracks + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementAlternating.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementAlternating.lean new file mode 100644 index 0000000000000000000000000000000000000000..402beed72b2a07db52dcdd19d8b07c82650b77e2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementAlternating.lean @@ -0,0 +1,225 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonTrackStabilizer +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonPlacementPermutation + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonPlacementAlternating + +open Classical Set +namespace PolygonPlacement +variable {a m n : ℕ} + +theorem permHom_mem_alternating (f : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) (hm : 3*n+1 < m) + {σ : Equiv.Perm (Fin n)} (hσ : σ∈alternatingGroup (Fin n)) : + permHom f hf σ∈polygonAlternatingGroup a m := by + let ι : Fin n ↪ Fin m := Fin.castLEEmb (by omega) + let s : Fin n → PolygonPlacement a m := fun i => standard (ι i) + have hs : Pairwise (fun i j => Apart (s i) (s j)) := + fun _ _ hij => standard_apart (ι.injective.ne hij) + obtain ⟨g,hg⟩ := configuration_transitive s f hs hf hm + have hgs (i : Fin n) (x : GenericSquare a) : g.val (ι i,x)=f i x := + congrArg (fun e : PolygonPlacement a m => e x) (hg i) + let slots : Fin n → Fin m × (CutRing×CutRing) := fun i => (ι i,0) + have hinj : Function.Injective (SlotMap a m ⊤ slots) := + slots_injective_of_tracks ⊤ slots ι.injective + have hslot (i : Fin n) (x : (⊤ : polygonAlgebra a).val) : + SlotMap a m ⊤ slots (i,x)=(ι i,x.val) := by + change (ι i,translate a 0 x.val)=(ι i,x.val) + rw [translate_zero] + have he : g*slotHom ⊤ slots hinj σ*g⁻¹=permHom f hf σ := by + apply Subtype.ext; apply Equiv.ext + intro p + obtain ⟨q,rfl⟩ := g.val.surjective p + change g.val (slotPerm ⊤ slots hinj σ (g.val.symm (g.val q)))=perm f hf σ (g.val q) + rw [g.val.symm_apply_apply] + by_cases hq : q∈Set.range (SlotMap a m ⊤ slots) + · obtain ⟨⟨i,x⟩,rfl⟩ := hq + rw [slotPerm_apply,hslot,hslot,hgs,hgs,perm_apply] + · rw [slotPerm_apply_of_notMem _ _ _ _ hq] + symm + apply perm_fixed + intro i hmem + obtain ⟨x,hx⟩ := hmem + have hp : q=(ι i,x) := g.val.injective (hx.symm.trans (hgs i x).symm) + exact hq ⟨(i,⟨x,by trivial⟩),(hslot i ⟨x,by trivial⟩).trans hp.symm⟩ + rw [←he] + exact (polygonAlternatingGroup_normal a m).conj_mem _ (slotHom_alternating_mem _ _ _ hσ) g + +end PolygonPlacement +end PolygonPlacementAlternating + +section PolygonAlternatingTransitive + +open Classical Set +namespace PolygonPlacement +variable {a m n : ℕ} + +theorem familyPerm_mem_alternating {ι : Type*} [Fintype ι] [DecidableEq ι] + (f : ι → PolygonPlacement a m) (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hm : 3*Fintype.card ι+1 < m) {σ : Equiv.Perm ι} + (hσ : σ∈alternatingGroup ι) : familyPerm f hf σ∈polygonAlternatingGroup a m := by + apply permHom_mem_alternating _ _ hm + change Equiv.Perm.sign (((Fintype.equivFin ι).symm.trans σ).trans (Fintype.equivFin ι))=1 + rw [Equiv.Perm.sign_symm_trans_trans] + exact hσ + +theorem alternating_move_to_bank (f : Fin n → PolygonPlacement a m) + (w : Fin (n+2) → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hw : Pairwise (fun i j => Apart (w i) (w j))) + (hfw : ∀i j,Apart (f i) (w j)) (hm : 6*n+7 < m) : + ∃h : polygonAlternatingGroup a m,∀i x,h.val.val (f i x)=w (i.castAdd 2) x := by + let e : Fin n ⊕ Fin (n+2) → PolygonPlacement a m := Sum.elim f w + have he : Pairwise (fun i j => Apart (e i) (e j)) := by + intro i j hij + cases i with + | inl i => + cases j with + | inl j => exact hf (fun hh => hij (congrArg Sum.inl hh)) + | inr j => exact hfw i j + | inr i => + cases j with + | inl j => exact (hfw j i).symm + | inr j => exact hw (fun hh => hij (congrArg Sum.inr hh)) + let s : Fin n ↪ Fin n ⊕ Fin (n+2) := ⟨Sum.inl,Sum.inl_injective⟩ + let t : Fin n ↪ Fin n ⊕ Fin (n+2) := + ⟨fun i => Sum.inr (i.castAdd 2),by + intro i j h + have hc : i.castAdd 2=j.castAdd 2 := Sum.inr_injective h + have hv := congrArg (fun x : Fin (n+2) => x.val) hc + exact Fin.ext hv⟩ + obtain ⟨σ,hσ⟩ := even_move_embedding (s:=s) (t:=t) (by simp [Nat.card_eq_fintype_card]) + have hb : 3*Fintype.card (Fin n ⊕ Fin (n+2))+1 < m := by + simp only [Fintype.card_sum,Fintype.card_fin] + omega + refine ⟨⟨familyPerm e he σ.val,familyPerm_mem_alternating e he hb σ.property⟩,?_⟩ + intro i x + have hh := familyPerm_apply e he σ.val (s i) x + rw [hσ] at hh + exact hh + +theorem alternating_configuration_transitive (f g : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hg : Pairwise (fun i j => Apart (g i) (g j))) (hm : 6*n+7 < m) : + ∃h : polygonAlternatingGroup a m,∀i,h.val • f i=g i := by + let S := Finset.univ.image f ∪ Finset.univ.image g + have hS : S.card≤2*n := by + calc + _≤(Finset.univ.image f).card+(Finset.univ.image g).card := Finset.card_union_le _ _ + _≤(Finset.univ : Finset (Fin n)).card+(Finset.univ : Finset (Fin n)).card := + Nat.add_le_add (Finset.card_image_le) (Finset.card_image_le) + _=2*n := by simp; omega + obtain ⟨w,hw,hws⟩ := exists_configuration_avoiding S (n+2) (by omega) + have hfw (i : Fin n) (j : Fin (n+2)) : Apart (f i) (w j) := + (hws j (f i) (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨i,Finset.mem_univ _,rfl⟩))).symm + have hgw (i : Fin n) (j : Fin (n+2)) : Apart (g i) (w j) := + (hws j (g i) (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨i,Finset.mem_univ _,rfl⟩))).symm + obtain ⟨u,hu⟩ := alternating_move_to_bank f w hf hw hfw hm + obtain ⟨v,hv⟩ := alternating_move_to_bank g w hg hw hgw hm + refine ⟨v⁻¹*u,fun i => ?_⟩ + apply PolygonPlacement.ext + intro x + change v.val.val.symm (u.val.val (f i x))=g i x + rw [hu] + exact v.val.val.symm_apply_eq.mpr (hv i x).symm + +end PolygonPlacement +end PolygonAlternatingTransitive + +section PolygonConfigurationOrbit +open Classical Set +namespace PolygonPlacement + +def Configuration (a m p : ℕ) := + {f : Fin p → PolygonPlacement a m // Pairwise (fun i j => Apart (f i) (f j))} + +namespace Configuration +variable {a m p : ℕ} +instance : CoeFun (Configuration a m p) (fun _ => Fin p → PolygonPlacement a m) := ⟨Subtype.val⟩ + +@[ext] theorem ext {f g : Configuration a m p} (h : ∀i,f i=g i) : f=g := + Subtype.ext (funext h) + +noncomputable instance : MulAction (polygonFullGroup a m) (Configuration a m p) where + smul g f := ⟨fun i => g • f i,fun i j hij => (apart_smul_iff g _ _).mpr (f.property hij)⟩ + one_smul f := by apply ext; intro i; exact one_smul _ _ + mul_smul g h f := by apply ext; intro i; exact mul_smul g h _ + +@[simp] theorem smul_apply (g : polygonFullGroup a m) (f : Configuration a m p) (i : Fin p) : + (g • f) i=g • f i := rfl + +noncomputable def standard (a p n : ℕ) : Configuration a (p+n) p := + ⟨fun i => PolygonPlacement.standard (i.castAdd n),fun i j hij => standard_apart (by + intro hh + apply hij + have hv := congrArg (fun x : Fin (p+n) => x.val) hh + exact Fin.ext hv)⟩ + +@[simp] theorem standard_apply (i : Fin p) (x : GenericSquare a) (n : ℕ) : + standard a p n i x=(i.castAdd n,x) := rfl + +theorem stabilizer_standard (a p n : ℕ) : + MulAction.stabilizer (polygonFullGroup a (p+n)) (standard a p n)= + PolygonTracks.bankFixer a p n := by + ext g + change g • standard a p n=standard a p n ↔ _ + constructor + · intro he x + exact congrArg (fun f : Configuration a (p+n) p => f x.1 x.2) he + · intro he + apply ext + intro i + apply PolygonPlacement.ext + intro x + exact he (i,x) + +theorem transitive (f g : Configuration a m p) (hm : 3*p+1 < m) : + ∃u : polygonFullGroup a m,u • f=g := by + obtain ⟨u,hu⟩ := configuration_transitive f.val g.val f.property g.property hm + exact ⟨u,ext hu⟩ + +noncomputable def quotientStabilizerEquiv (a p n : ℕ) (hm : 3*p+1 < p+n) : + (polygonFullGroup a (p+n) ⧸ MulAction.stabilizer (polygonFullGroup a (p+n)) + (standard a p n)) ≃ Configuration a (p+n) p := + Equiv.ofBijective (MulAction.ofQuotientStabilizer (polygonFullGroup a (p+n)) (standard a p n)) + ⟨MulAction.injective_ofQuotientStabilizer _ _,by + intro f + obtain ⟨g,hg⟩ := transitive (standard a p n) f hm + exact ⟨g,hg⟩⟩ + +@[simp] theorem quotientStabilizerEquiv_apply (a p n : ℕ) (hm : 3*p+1 < p+n) + (g : polygonFullGroup a (p+n)) : + quotientStabilizerEquiv a p n hm g=g • standard a p n := rfl + +noncomputable def quotientBankEquiv (a p n : ℕ) (hm : 3*p+1 < p+n) : + (polygonFullGroup a (p+n) ⧸ PolygonTracks.bankFixer a p n) ≃ Configuration a (p+n) p := + (Subgroup.quotientEquivOfEq (stabilizer_standard a p n).symm).trans + (quotientStabilizerEquiv a p n hm) + +@[simp] theorem quotientBankEquiv_apply (a p n : ℕ) (hm : 3*p+1 < p+n) + (g : polygonFullGroup a (p+n)) : + quotientBankEquiv a p n hm g=g • standard a p n := rfl + +theorem quotientBankEquiv_smul (a p n : ℕ) (hm : 3*p+1 < p+n) + (g : polygonFullGroup a (p+n)) (x : polygonFullGroup a (p+n) ⧸ PolygonTracks.bankFixer a p n) : + quotientBankEquiv a p n hm (g • x)=g • quotientBankEquiv a p n hm x := by + induction x using Quotient.inductionOn' with + | h h => exact mul_smul g h _ + +end Configuration +end PolygonPlacement +end PolygonConfigurationOrbit + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementArea.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementArea.lean new file mode 100644 index 0000000000000000000000000000000000000000..e38c3cc27bdbb1a5de5f0284ffe0c1424904afc0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementArea.lean @@ -0,0 +1,169 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ConfigurationResolution +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonGridEmbedding +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonAreaAlgebra + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonPlacementArea + +open Classical Set +namespace PolygonArea + +@[simp] theorem val_finset_sup {a : ℕ} {ι : Type*} (s : Finset ι) (f : ι → polygonAlgebra a) : + (s.sup f).val=⋃i∈s,(f i).val := by + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => simp [Finset.sup_insert,BooleanSubalgebra.val_sup,ih] + +end PolygonArea +namespace PolygonPlacement + +noncomputable def imageBank {a m : ℕ} (f : PolygonPlacement a m) (i : Fin m) : polygonAlgebra a := + ⟨{x | (i,x)∈Set.range f},range_fiber_polygon f i⟩ + +theorem imageBank_area_le {a m : ℕ} (f : PolygonPlacement a m) : + (∑i,PolygonArea.area (imageBank f i))≤1 := by + obtain ⟨s,hs,hcover⟩ := f.charts + let D : s → polygonAlgebra a := fun c => c.val.2.2 + obtain ⟨P,hP,hSup,hdisP⟩ := Fintype.exists_disjointed_le D + have hcoverP : (⊤ : polygonAlgebra a).val=⋃c,(P c).val := by + have hv := congrArg (fun A : polygonAlgebra a => A.val) hSup + simp only [PolygonArea.val_finset_sup,Finset.mem_univ,Set.iUnion_true] at hv + rw [hv] + ext x + simp only [BooleanSubalgebra.val_top,Set.top_eq_univ,Set.mem_univ,true_iff,Set.mem_iUnion] + obtain ⟨c,hc,hx⟩ := hcover x + exact ⟨⟨c,hc⟩,hx⟩ + have hsumP : (∑c,PolygonArea.area (P c))=1 := by + rw [←PolygonArea.area_top a] + symm + apply PolygonArea.area_eq_sum _ P hcoverP + intro i j hij + have h : Disjoint (P i) (P j) := hdisP hij + rw [disjoint_iff] at h + exact Set.disjoint_iff_inter_eq_empty.mpr (congrArg (fun A : polygonAlgebra a => A.val) h) + let Q (i : Fin m) (c : s) : polygonAlgebra a := + if c.val.1=i then translatedPolygon c.val.2.1 (P c) else ⊥ + have hbank (i : Fin m) : imageBank f i≤Finset.univ.sup (Q i) := by + intro y hy + obtain ⟨x,hxy⟩ := hy + have hx : x∈⋃c,(P c).val := by rw [←hcoverP]; trivial + obtain ⟨c,hc⟩ := Set.mem_iUnion.mp hx + have he := (hs c.val c.property x (hP c hc)).symm.trans hxy + have ht : c.val.1=i := congrArg Prod.fst he + rw [PolygonArea.val_finset_sup] + refine Set.mem_iUnion₂.mpr ⟨c,Finset.mem_univ _,?_⟩ + simp only [Q,ht,ite_true] + exact ⟨x,hc,congrArg Prod.snd he⟩ + calc + (∑i,PolygonArea.area (imageBank f i))≤∑i,∑c,PolygonArea.area (Q i c) := by + apply Finset.sum_le_sum + intro i _ + exact (PolygonArea.area_mono (hbank i)).trans (PolygonArea.area_finset_sup_le _ _) + _=∑c,PolygonArea.area (P c) := by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro c _ + simp only [Q,apply_ite,PolygonArea.area_bot,PolygonArea.area_translation] + simp + _=1 := hsumP + +end PolygonPlacement +end PolygonPlacementArea + +section PolygonCommonNeighbor + +open Classical Set +namespace PolygonPlacement + +theorem placement_in_bank {a m : ℕ} (hm : 0 < m) (V : Fin m → polygonAlgebra a) + (hV : 1 < ∑i,PolygonArea.area (V i)) : + ∃ e : PolygonPlacement a m,∀x,(e x).2∈(V (e x).1).val := by + let i₀ : Fin m := ⟨0,hm⟩ + let U : Fin m → polygonAlgebra a := fun i => if i=i₀ then ⊤ else ⊥ + have hU : (∑i,PolygonArea.area (U i))=1 := by + simp [U,apply_ite,PolygonArea.area_bot,PolygonArea.area_top] + obtain ⟨f,hf⟩ := PolygonGrid.strict_comparison U V (by rwa [hU]) + let PU : PolygonObject a := ⟨m,U⟩ + let PV : PolygonObject a := ⟨m,V⟩ + let src (x : GenericSquare a) : PU.Point := ⟨(i₀,x),by simp [PU,U]⟩ + let ef : GenericSquare a ↪ TrackPoint a m := + ⟨fun x => (f (src x)).val,fun x y he => + congrArg (fun p : PU.Point => p.val.2) (f.injective (Subtype.ext he))⟩ + have hetab : ∃s : Finset (Fin m × (CutRing×CutRing) × polygonAlgebra a), + (∀c∈s,∀x∈c.2.2.val,ef x=(c.1,translate a c.2.1 x)) ∧ + ∀x,∃c∈s,x∈c.2.2.val := by + obtain ⟨s,hs,hcover⟩ := hf + let t := s.filter (fun c => c.source=i₀) + let conv : PolygonObject.Chart (a:=a) m m → Fin m × (CutRing×CutRing) × polygonAlgebra a := + fun c => (c.target,c.shift,c.domain) + refine ⟨t.image conv,?_,?_⟩ + · intro c hc + obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + obtain ⟨hds,hdsrc⟩ := Finset.mem_filter.mp hd + intro x hx + obtain ⟨hu,he⟩ := hs d hds x hx + change (f (src x)).val=(d.target,translate a d.shift x) + simpa only [src,hdsrc] using he + · intro x + obtain ⟨c,hc,hx⟩ := hcover (src x) + refine ⟨conv c,Finset.mem_image.mpr ⟨c,?_,rfl⟩,hx.2⟩ + exact Finset.mem_filter.mpr ⟨hc,hx.1.symm⟩ + exact ⟨⟨ef,hetab⟩,fun x => (f (src x)).property⟩ + +theorem common_neighbor {a m : ℕ} (S : Finset (PolygonPlacement a m)) + (hm : S.card+1 < m) : ∃e : PolygonPlacement a m,∀f∈S,Apart e f := by + let B (i : Fin m) : polygonAlgebra a := S.sup (fun f => imageBank f i) + let V (i : Fin m) : polygonAlgebra a := (B i)ᶜ + have hB : (∑i,PolygonArea.area (B i))≤S.card := by + calc + _≤∑i,∑f∈S,PolygonArea.area (imageBank f i) := + Finset.sum_le_sum (fun i _ => PolygonArea.area_finset_sup_le S _) + _=∑f∈S,∑i,PolygonArea.area (imageBank f i) := Finset.sum_comm + _≤∑_∈S,(1:ENNReal) := Finset.sum_le_sum (fun f _ => imageBank_area_le f) + _=S.card := by simp + have hsum : (∑i,PolygonArea.area (B i))+(∑i,PolygonArea.area (V i))=m := by + rw [←Finset.sum_add_distrib] + simp only [V,PolygonArea.area_compl,Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul,mul_one] + have hV : 1 < ∑i,PolygonArea.area (V i) := by + by_contra hn + have hh : (m:ENNReal)≤S.card+1 := + hsum.symm.trans_le (add_le_add hB (le_of_not_gt hn)) + have hml : (S.card:ENNReal)+1 < m := by exact_mod_cast hm + exact (not_le_of_gt hml) hh + obtain ⟨e,he⟩ := placement_in_bank (by omega : 0 < m) V hV + refine ⟨e,fun f hf => ?_⟩ + rw [apart_iff] + intro x y hxy + have hn := he x + change (e x).2∉(B (e x).1).val at hn + apply hn + have hin : (imageBank f (e x).1).val⊆(B (e x).1).val := by + change imageBank f (e x).1 ≤ S.sup (fun g => imageBank g (e x).1) + exact Finset.le_sup (f := fun g : PolygonPlacement a m => imageBank g (e x).1) hf + apply hin + refine ⟨y,?_⟩ + exact hxy.symm + +theorem configuration_lowDegree_exact {a m n : ℕ} (hm : 33 ≤ m) (hn : n ≤ 2) : + Function.Exact (ConfigurationChains.degreeBoundary (@Apart a m) (n+1)) + (ConfigurationChains.degreeBoundary (@Apart a m) n) := by + apply ConfigurationChains.lowDegree_exact _ hn + intro S hS + exact common_neighbor S (by omega) + +end PolygonPlacement +end PolygonCommonNeighbor + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementPermutation.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementPermutation.lean new file mode 100644 index 0000000000000000000000000000000000000000..25856a61d4bdac20e0a96cd1b82cf9b15826a2e4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonPlacementPermutation.lean @@ -0,0 +1,201 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonPlacementArea + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonPlacementPermutation + +open Classical Set +namespace PolygonPlacement +variable {a m n : ℕ} (f : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + +noncomputable def perm (σ : Equiv.Perm (Fin n)) : Equiv.Perm (TrackPoint a m) := + Equiv.Perm.viaEmbedding (Equiv.prodCongr σ (Equiv.refl _)) (bank f hf) + +@[simp] theorem perm_apply (σ : Equiv.Perm (Fin n)) (i : Fin n) (x : GenericSquare a) : + perm f hf σ (f i x)=f (σ i) x := + Equiv.Perm.viaEmbedding_apply _ _ (i,x) + +theorem perm_fixed (σ : Equiv.Perm (Fin n)) (p : TrackPoint a m) + (hp : ∀i,p∉Set.range (f i)) : perm f hf σ p=p := by + apply Equiv.Perm.viaEmbedding_apply_of_notMem + rintro ⟨⟨i,x⟩,hi⟩ + exact hp i ⟨x,hi⟩ + +theorem perm_hasTable (σ : Equiv.Perm (Fin n)) : HasTranslationTable (perm f hf σ) := by + let s (i : Fin n) := (f i).charts.choose + have hs (i : Fin n) := (f i).charts.choose_spec.1 + have hc (i : Fin n) := (f i).charts.choose_spec.2 + let J := Σi : Fin n, {c // c∈s i} × {d // d∈s (σ i)} + let chart (j : J) : TableChart a m := + ⟨j.2.1.val.1,j.2.2.val.1,j.2.2.val.2.1-j.2.1.val.2.1, + translatedPolygon j.2.1.val.2.1 (j.2.1.val.2.2 ⊓ j.2.2.val.2.2)⟩ + let V (i : Fin m) : polygonAlgebra a := (Finset.univ.sup (fun j => imageBank (f j) i))ᶜ + have hV (p : TrackPoint a m) : p.2∈(V p.1).val ↔ ∀i,p∉Set.range (f i) := by + simp only [V,BooleanSubalgebra.val_compl,PolygonArea.val_finset_sup, + Set.mem_compl_iff,Set.mem_iUnion,Finset.mem_univ,not_exists,true_implies] + rfl + let void (i : Fin m) : TableChart a m := ⟨i,i,0,V i⟩ + refine ⟨Finset.univ.image chart ∪ Finset.univ.image void,?_,?_⟩ + · intro c hc' + rcases Finset.mem_union.mp hc' with hc'|hc' + · obtain ⟨j,-,rfl⟩ := Finset.mem_image.mp hc' + intro y hy + obtain ⟨x,⟨hx,hd⟩,rfl⟩ := hy + have hcval := hs j.1 j.2.1.val j.2.1.property x hx + have hdval := hs (σ j.1) j.2.2.val j.2.2.property x hd + change perm f hf σ (j.2.1.val.1,translate a j.2.1.val.2.1 x)= + (j.2.2.val.1,translate a (j.2.2.val.2.1-j.2.1.val.2.1) (translate a j.2.1.val.2.1 x)) + rw [←hcval,perm_apply,hdval,←translate_add,sub_add_cancel] + · obtain ⟨i,-,rfl⟩ := Finset.mem_image.mp hc' + intro x hx + change perm f hf σ (i,x)=(i,translate a 0 x) + rw [translate_zero] + exact perm_fixed f hf σ (i,x) ((hV (i,x)).mp hx) + · intro p + by_cases hp : ∃i,p∈Set.range (f i) + · obtain ⟨i,x,rfl⟩ := hp + obtain ⟨c,hcs,hcx⟩ := hc i x + obtain ⟨d,hds,hdx⟩ := hc (σ i) x + let j : J := ⟨i,⟨c,hcs⟩,⟨d,hds⟩⟩ + refine ⟨chart j,Finset.mem_union_left _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩),?_,?_⟩ + · exact congrArg Prod.fst (hs i c hcs x hcx) + · refine ⟨x,⟨hcx,hdx⟩,?_⟩ + exact (congrArg Prod.snd (hs i c hcs x hcx)).symm + · exact ⟨void p.1,Finset.mem_union_right _ (Finset.mem_image.mpr ⟨p.1,Finset.mem_univ _,rfl⟩), + rfl,(hV p).mpr (by simpa only [not_exists] using hp)⟩ + +noncomputable def permHom : Equiv.Perm (Fin n) →* polygonFullGroup a m where + toFun σ := ⟨perm f hf σ,perm_hasTable f hf σ⟩ + map_one' := by + apply Subtype.ext; apply Equiv.ext + intro p + by_cases hp : ∃i,p∈Set.range (f i) + · obtain ⟨i,x,rfl⟩ := hp + exact perm_apply f hf 1 i x + · exact perm_fixed f hf 1 p (by simpa only [not_exists] using hp) + map_mul' σ ρ := by + apply Subtype.ext; apply Equiv.ext + intro p + change perm f hf (σ*ρ) p=perm f hf σ (perm f hf ρ p) + by_cases hp : ∃i,p∈Set.range (f i) + · obtain ⟨i,x,rfl⟩ := hp + simp only [perm_apply,Equiv.Perm.mul_apply] + · have h : ∀i,p∉Set.range (f i) := by simpa only [not_exists] using hp + rw [perm_fixed f hf _ p h,perm_fixed f hf _ p h,perm_fixed f hf _ p h] + +@[simp] theorem permHom_apply (σ : Equiv.Perm (Fin n)) (i : Fin n) (x : GenericSquare a) : + (permHom f hf σ).val (f i x)=f (σ i) x := perm_apply f hf σ i x + +end PolygonPlacement +end PolygonPlacementPermutation + +section PolygonConfigurationTransitive + +open Classical Set +namespace PolygonPlacement +variable {a m n : ℕ} + +noncomputable def familyPerm {ι : Type*} [Fintype ι] (f : ι → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) (σ : Equiv.Perm ι) : polygonFullGroup a m := + let e := Fintype.equivFin ι + permHom (fun i => f (e.symm i)) + (fun _ _ h => hf (fun he => h (e.symm.injective he))) + (e.symm.trans (σ.trans e)) + +@[simp] theorem familyPerm_apply {ι : Type*} [Fintype ι] (f : ι → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) (σ : Equiv.Perm ι) + (i : ι) (x : GenericSquare a) : (familyPerm f hf σ).val (f i x)=f (σ i) x := by + let e := Fintype.equivFin ι + have h := permHom_apply (fun j => f (e.symm j)) + (fun _ _ h => hf (fun he => h (e.symm.injective he))) + (e.symm.trans (σ.trans e)) (e i) x + simpa only [familyPerm,e,Equiv.symm_apply_apply,Equiv.trans_apply,Equiv.apply_symm_apply] using h + +theorem exists_configuration_avoiding (S : Finset (PolygonPlacement a m)) (n : ℕ) + (hm : S.card+n+1 < m) : + ∃w : Fin n → PolygonPlacement a m, + Pairwise (fun i j => Apart (w i) (w j)) ∧ ∀i f,f∈S → Apart (w i) f := by + induction n generalizing S with + | zero => exact ⟨Fin.elim0,by intro i; exact i.elim0,by intro i; exact i.elim0⟩ + | succ n ih => + obtain ⟨v,hv⟩ := common_neighbor S (by omega) + obtain ⟨w,hw,hws⟩ := ih (insert v S) (by + have hh := Finset.card_insert_le v S + omega) + refine ⟨Fin.cons v w,?_,?_⟩ + · intro i j hij + induction i using Fin.cases with + | zero => + induction j using Fin.cases with + | zero => exact (hij rfl).elim + | succ j => exact (hws j v (Finset.mem_insert_self _ _)).symm + | succ i => + induction j using Fin.cases with + | zero => exact hws i v (Finset.mem_insert_self _ _) + | succ j => exact hw (fun he => hij (congrArg Fin.succ he)) + · intro i f hf + induction i using Fin.cases with + | zero => exact hv f hf + | succ i => exact hws i f (Finset.mem_insert_of_mem hf) + +theorem swap_configurations (f g : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hg : Pairwise (fun i j => Apart (g i) (g j))) + (hfg : ∀i j,Apart (f i) (g j)) : + ∃h : polygonFullGroup a m,∀i x,h.val (f i x)=g i x := by + let e : Fin n ⊕ Fin n → PolygonPlacement a m := Sum.elim f g + have he : Pairwise (fun i j => Apart (e i) (e j)) := by + intro i j hij + cases i with + | inl i => + cases j with + | inl j => exact hf (fun h => hij (congrArg Sum.inl h)) + | inr j => exact hfg i j + | inr i => + cases j with + | inl j => exact (hfg j i).symm + | inr j => exact hg (fun h => hij (congrArg Sum.inr h)) + refine ⟨familyPerm e he (Equiv.sumComm _ _),?_⟩ + intro i x + exact familyPerm_apply e he (Equiv.sumComm _ _) (.inl i) x + +theorem configuration_transitive (f g : Fin n → PolygonPlacement a m) + (hf : Pairwise (fun i j => Apart (f i) (f j))) + (hg : Pairwise (fun i j => Apart (g i) (g j))) (hm : 3*n+1 < m) : + ∃h : polygonFullGroup a m,∀i,h • f i=g i := by + let S := Finset.univ.image f ∪ Finset.univ.image g + have hS : S.card≤2*n := by + calc + _≤(Finset.univ.image f).card+(Finset.univ.image g).card := Finset.card_union_le _ _ + _≤(Finset.univ : Finset (Fin n)).card+(Finset.univ : Finset (Fin n)).card := + Nat.add_le_add (Finset.card_image_le) (Finset.card_image_le) + _=2*n := by simp; omega + obtain ⟨w,hw,hws⟩ := exists_configuration_avoiding S n (by omega) + have hwf (i j : Fin n) : Apart (w i) (f j) := + hws i (f j) (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩)) + have hwg (i j : Fin n) : Apart (w i) (g j) := + hws i (g j) (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩)) + obtain ⟨u,hu⟩ := swap_configurations f w hf hw (fun i j => (hwf j i).symm) + obtain ⟨v,hv⟩ := swap_configurations w g hw hg hwg + refine ⟨v*u,fun i => ?_⟩ + apply PolygonPlacement.ext + intro x + change v.val (u.val (f i x))=g i x + rw [hu,hv] + +end PolygonPlacement +end PolygonConfigurationTransitive + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStrandReconstruction.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStrandReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d5ab5cf45f2d33bc64da7c817f2772c78be9058 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStrandReconstruction.lean @@ -0,0 +1,122 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonStringNormalization + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonStrandReconstruction + +open Classical CategoryTheory +namespace PolygonObject +variable {a n : ℕ} + +theorem representative_sub (u v : CutRing × CutRing) : + orbitRepresentative (u-v)=orbitRepresentative u-orbitRepresentative v := by + simp [orbitRepresentative,sub_mul] + +theorem trajectoryShift_translationString (U : PolygonObject a) + (d : Fin (n+1) → Fin U.tracks → CutRing × CutRing) (x : U.Point) (i : Fin (n+1)) : + trajectoryShift (translationString U d) ((shiftArrow U (d 0)).toEquiv x) i= + orbitRepresentative (d i x.val.1-d 0 x.val.1) := by + apply pointShift_unique + change ((CategoryTheory.inv (shiftArrow U (d 0)) ≫ shiftArrow U (d i)).toEquiv + ((shiftArrow U (d 0)).toEquiv x)).val.2 = _ + simp only [arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] + simp only [shiftArrow_apply] + rw [←translate_add,sub_add_cancel] + +theorem increments_translationString (U : PolygonObject a) + (d : Fin (n+1) → Fin U.tracks → CutRing × CutRing) (x : U.Point) (i : Fin n) : + increments (translationString U d) ((shiftArrow U (d 0)).toEquiv x) i= + orbitRepresentative (d i.succ x.val.1-d i.castSucc x.val.1) := by + unfold increments + rw [trajectoryShift_translationString,trajectoryShift_translationString,←representative_sub] + congr 1 + abel + +noncomputable def incrementString (U : PolygonObject a) + (γ : Fin U.tracks → Fin n → CutRing × CutRing) : RawString a n := + translationString U (fun i j => Fin.partialSum (γ j) i) + +noncomputable def incrementInitial (U : PolygonObject a) + (γ : Fin U.tracks → Fin n → CutRing × CutRing) : U ⟶ (incrementString U γ).obj 0 := + shiftArrow U (fun j => Fin.partialSum (γ j) 0) + +theorem incrementInitial_positional (U : PolygonObject a) + (γ : Fin U.tracks → Fin n → CutRing × CutRing) : Positional (incrementInitial U γ) := by + intro x + change translate a (Fin.partialSum (γ x.val.1) 0) x.val.2=x.val.2 + rw [Fin.partialSum_zero,translate_zero] + +theorem incrementString_spec (U : PolygonObject a) + (γ : Fin U.tracks → Fin n → CutRing × CutRing) (x : U.Point) (i : Fin n) : + increments (incrementString U γ) ((incrementInitial U γ).toEquiv x) i= + orbitRepresentative (γ x.val.1 i) := by + change increments (translationString U (fun i j => Fin.partialSum (γ j) i)) + ((shiftArrow U (fun j => Fin.partialSum (γ j) 0)).toEquiv x) i=_ + rw [increments_translationString,Fin.partialSum_succ] + congr 1 + abel + +theorem incrementString_spec_reduced (U : PolygonObject a) + (γ : Fin U.tracks → Fin n → CutRing × CutRing) + (hγ : ∀j i,orbitRepresentative (γ j i)=γ j i) (x : U.Point) : + increments (incrementString U γ) ((incrementInitial U γ).toEquiv x)=γ x.val.1 := by + funext i + rw [incrementString_spec,hγ] + +end PolygonObject +end PolygonStrandReconstruction + +section PolygonIncrementFibers + +open Classical CategoryTheory +namespace PolygonObject +variable {a n : ℕ} + +theorem partialSum_increments (F : RawString a n) (x : (F.obj 0).Point) (i : Fin (n+1)) : + Fin.partialSum (increments F x) i=trajectoryShift F x i := by + induction i using Fin.induction with + | zero => simp + | succ i hi => + rw [Fin.partialSum_succ,hi] + unfold increments + abel + +theorem trajectory_eq_of_increments {F G : RawString a n} (h : F.obj 0 ⟶ G.obj 0) + (hp : Positional h) (he : ∀x,increments G (h.toEquiv x)=increments F x) + (x : (F.obj 0).Point) : trajectory G (h.toEquiv x)=trajectory F x := by + funext i + unfold trajectory + rw [pointShift_spec (baseArrow G i),pointShift_spec (baseArrow F i)] + change translate a (trajectoryShift G (h.toEquiv x) i) (h.toEquiv x).val.2= + translate a (trajectoryShift F x i) x.val.2 + rw [hp x,←partialSum_increments,←partialSum_increments,he x] + +theorem extendLadder_positional_of_increments {F G : RawString a n} (h : F.obj 0 ⟶ G.obj 0) + (hp : Positional h) (he : ∀x,increments G (h.toEquiv x)=increments F x) : + (ladderProperty a n) (extendLadder h) := + extendLadder_positional h (trajectory_eq_of_increments h hp he) + +noncomputable def incrementLadderEquiv (F G : StringGroupoid a n) : + (F ⟶ G) ≃ {h : F.obj.obj 0 ⟶ G.obj.obj 0 // + Positional h ∧ ∀x,increments G.obj (h.toEquiv x)=increments F.obj x} where + toFun h := ⟨h.hom.app 0,h.property 0,ladder_preserves_increments h⟩ + invFun h := ⟨extendLadder h.val, + extendLadder_positional_of_increments h.val h.property.1 h.property.2⟩ + left_inv h := by apply WideSubcategory.hom_ext; exact extendLadder_app_zero h.hom + right_inv h := by apply Subtype.ext; exact extendLadder_zero h.val + +end PolygonObject +end PolygonIncrementFibers + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStringGroupoid.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStringGroupoid.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3a4543debcf80e33b23cd760f4b572c17ecdb19 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStringGroupoid.lean @@ -0,0 +1,186 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.PolygonPositionalMonoidal + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section PolygonStringGroupoid + +open Classical CategoryTheory +open scoped MonoidalCategory +namespace PolygonObject +variable {a : ℕ} + +abbrev RawString (a n : ℕ) := Fin (n+1) ⥤ PolygonObject a + +def ladderProperty (a n : ℕ) : MorphismProperty (RawString a n) := + (positionalProperty a).functorCategory (Fin (n+1)) + +instance ladderProperty_multiplicative (n : ℕ) : (ladderProperty a n).IsMultiplicative where + id_mem F i := identity_positional (F.obj i) + comp_mem _ _ hf hg i := positional_comp (hf i) (hg i) + +instance ladderProperty_monoidal (n : ℕ) : (ladderProperty a n).IsMonoidalStable where + whiskerLeft F _ _ _ hg i := sumArrow_positional (identity_positional (F.obj i)) (hg i) + whiskerRight _ hf G i := sumArrow_positional (hf i) (identity_positional (G.obj i)) + associator_hom_mem F G H i := sumAssoc_positional (F.obj i) (G.obj i) (H.obj i) + associator_inv_mem F G H i := positional_inv (sumAssoc_positional (F.obj i) (G.obj i) (H.obj i)) + leftUnitor_hom_mem F i := leftUnit_positional (F.obj i) + leftUnitor_inv_mem F i := positional_inv (leftUnit_positional (F.obj i)) + rightUnitor_hom_mem F i := rightUnit_positional (F.obj i) + rightUnitor_inv_mem F i := positional_inv (rightUnit_positional (F.obj i)) + +instance ladderProperty_braided (n : ℕ) : (ladderProperty a n).IsStableUnderBraiding where + braiding_hom_mem F G i := sumSwap_positional (F.obj i) (G.obj i) + braiding_inv_mem F G i := positional_inv (sumSwap_positional (F.obj i) (G.obj i)) + +abbrev StringGroupoid (a n : ℕ) := WideSubcategory (ladderProperty a n) + +noncomputable instance stringGroupoid_isIso {n : ℕ} (F G : StringGroupoid a n) (f : F ⟶ G) : IsIso f := by + let : IsIso f.hom := NatIso.isIso_of_isIso_app f.hom + refine ⟨⟨⟨CategoryTheory.inv f.hom,?_⟩,?_,?_⟩⟩ + · intro i + rw [NatIso.isIso_inv_app] + exact positional_inv (f.property i) + · apply WideSubcategory.hom_ext + exact IsIso.hom_inv_id f.hom + · apply WideSubcategory.hom_ext + exact IsIso.inv_hom_id f.hom + +noncomputable instance stringGroupoid (n : ℕ) : Groupoid (StringGroupoid a n) := + Groupoid.ofIsIso (fun _ => inferInstance) + +noncomputable def stringReindex {n m : ℕ} (u : Fin (n+1) ⥤ Fin (m+1)) : + StringGroupoid a m ⥤ StringGroupoid a n where + obj F := ⟨u ⋙ F.obj⟩ + map f := ⟨CategoryTheory.Functor.whiskerLeft u f.hom,fun i => f.property (u.obj i)⟩ + map_id F := by apply WideSubcategory.hom_ext; rfl + map_comp f g := by apply WideSubcategory.hom_ext; rfl + +@[simp] theorem stringReindex_id (n : ℕ) : stringReindex (a:=a) (𝟭 (Fin (n+1)))=𝟭 _ := by + apply CategoryTheory.Functor.ext + · intro F G f; rfl + · intro F; cases F; rfl + +@[simp] theorem stringReindex_comp {n m k : ℕ} + (u : Fin (n+1) ⥤ Fin (m+1)) (v : Fin (m+1) ⥤ Fin (k+1)) : + stringReindex (a:=a) (u⋙v)=stringReindex v ⋙ stringReindex u := by + apply CategoryTheory.Functor.ext + · intro F G f; rfl + · intro F; rfl + +noncomputable instance stringReindex_monoidal {n m : ℕ} (u : Fin (n+1) ⥤ Fin (m+1)) : + (stringReindex (a:=a) u).Monoidal := + Functor.CoreMonoidal.toMonoidal { + εIso := Iso.refl _ + μIso := fun _ _ => Iso.refl _ + μIso_hom_natural_left := by intros; simp; apply WideSubcategory.hom_ext; rfl + μIso_hom_natural_right := by intros; simp; apply WideSubcategory.hom_ext; rfl + associativity := by + intro first second third + apply WideSubcategory.hom_ext + apply NatTrans.ext + funext point + change (𝟙 _ ▷ _ ≫ 𝟙 _ ≫ (α_ _ _ _).hom) = + ((α_ _ _ _).hom ≫ _ ◁ 𝟙 _ ≫ 𝟙 _) + simp + left_unitality := by + intro object + apply WideSubcategory.hom_ext + apply NatTrans.ext + funext point + change (λ_ _).hom = 𝟙 _ ▷ _ ≫ 𝟙 _ ≫ (λ_ _).hom + simp + right_unitality := by + intro object + apply WideSubcategory.hom_ext + apply NatTrans.ext + funext point + change (ρ_ _).hom = _ ◁ 𝟙 _ ≫ 𝟙 _ ≫ (ρ_ _).hom + simp } + +end PolygonObject +end PolygonStringGroupoid + +open Classical CategoryTheory +namespace PolygonObject +variable {a n : ℕ} + +def baseArrow (F : RawString a n) (i : Fin (n+1)) : F.obj 0 ⟶ F.obj i := + F.map (homOfLE (Fin.zero_le i)) + +@[simp] theorem baseArrow_zero (F : RawString a n) : baseArrow F 0=𝟙 _ := by + unfold baseArrow + exact (congrArg F.map (show homOfLE (Fin.zero_le (0 : Fin (n+1)))=𝟙 (0 : Fin (n+1)) + from Subsingleton.elim _ _)).trans (F.map_id _) + +@[simp, reassoc] theorem baseArrow_comp (F : RawString a n) {i j : Fin (n+1)} + (f : i ⟶ j) : baseArrow F i ≫ F.map f=baseArrow F j := by + rw [baseArrow,←F.map_comp] + congr 1 + +noncomputable def extendLadder {F G : RawString a n} (h : F.obj 0 ⟶ G.obj 0) : F ⟶ G where + app i := CategoryTheory.inv (baseArrow F i) ≫ h ≫ baseArrow G i + naturality i j f := by + have he : F.map f ≫ CategoryTheory.inv (baseArrow F j)=CategoryTheory.inv (baseArrow F i) := by + apply (cancel_epi (baseArrow F i)).mp + rw [←Category.assoc,baseArrow_comp] + simp + simp only [←Category.assoc,he] + simp only [Category.assoc,baseArrow_comp] + +@[simp] theorem extendLadder_zero {F G : RawString a n} (h : F.obj 0 ⟶ G.obj 0) : + (extendLadder h).app 0=h := by + simp [extendLadder] + +theorem ladder_ext {F G : RawString a n} {h k : F ⟶ G} + (h0 : h.app 0=k.app 0) : h=k := by + apply NatTrans.ext + funext i + apply (cancel_epi (baseArrow F i)).mp + rw [show baseArrow F i=F.map (homOfLE (Fin.zero_le i)) from rfl, + h.naturality,k.naturality,h0] + +@[simp] theorem extendLadder_app_zero {F G : RawString a n} (h : F ⟶ G) : + extendLadder (h.app 0)=h := ladder_ext (extendLadder_zero _) + +def trajectory (F : RawString a n) (x : (F.obj 0).Point) (i : Fin (n+1)) := + ((baseArrow F i).toEquiv x).val.2 + +theorem ladder_preserves_trajectory {F G : StringGroupoid a n} (h : F ⟶ G) + (x : (F.obj.obj 0).Point) : + trajectory G.obj ((h.hom.app 0).toEquiv x)=trajectory F.obj x := by + funext i + have he := congrArg (fun k : F.obj.obj 0 ⟶ G.obj.obj i => k.toEquiv x) + (h.hom.naturality (homOfLE (Fin.zero_le i))) + change (h.hom.app i).toEquiv ((baseArrow F.obj i).toEquiv x) = + (baseArrow G.obj i).toEquiv ((h.hom.app 0).toEquiv x) at he + unfold trajectory + rw [←he] + exact h.property i _ + +theorem extendLadder_positional {F G : RawString a n} (h : F.obj 0 ⟶ G.obj 0) + (he : ∀x,trajectory G (h.toEquiv x)=trajectory F x) : + (ladderProperty a n) (extendLadder h) := by + intro i y + let x := (baseArrow F i).toEquiv.symm y + have hi := congrFun (he x) i + change ((baseArrow G i).toEquiv (h.toEquiv x)).val.2= + ((baseArrow F i).toEquiv x).val.2 at hi + simpa only [extendLadder,arrow_comp_apply,inv_arrow_apply,x,Equiv.apply_symm_apply] using hi + +noncomputable def ladderEquiv (F G : StringGroupoid a n) : + (F ⟶ G) ≃ {h : F.obj.obj 0 ⟶ G.obj.obj 0 // + ∀x,trajectory G.obj (h.toEquiv x)=trajectory F.obj x} where + toFun h := ⟨h.hom.app 0,ladder_preserves_trajectory h⟩ + invFun h := ⟨extendLadder h.val,extendLadder_positional h.val h.property⟩ + left_inv h := by apply WideSubcategory.hom_ext; exact extendLadder_app_zero h.hom + right_inv h := by apply Subtype.ext; exact extendLadder_zero h.val + +end PolygonObject + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStringNormalization.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStringNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..dfa3c8fa45836601be2d6311c5f0bd4eb0542c55 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonStringNormalization.lean @@ -0,0 +1,204 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonTrajectoryStrata +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonObjectRefinement + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section PolygonStringNormalization + +open Classical CategoryTheory Set +namespace PolygonObject +variable {a n : ℕ} + +abbrev TrajectoryLabel (F : RawString a n) := Set.range (trajectoryShift F) +noncomputable instance trajectoryLabel_fintype (F : RawString a n) : Fintype (TrajectoryLabel F) := + (trajectoryShift_finite_range F).fintype + +noncomputable def trajectoryLabel (F : RawString a n) (x : (F.obj 0).Point) : TrajectoryLabel F := + ⟨trajectoryShift F x,⟨x,rfl⟩⟩ + +theorem trajectoryLabel_fiber_polygon (F : RawString a n) (j : Fin (F.obj 0).tracks) + (u : TrajectoryLabel F) : + {z | ∃hz : z∈((F.obj 0).cell j).val,trajectoryLabel F ⟨(j,z),hz⟩=u}∈polygonAlgebra a := by + simpa only [Subtype.ext_iff,trajectoryLabel] using trajectoryShift_fiber_polygon F j u.val + +noncomputable def strandObject (F : RawString a n) : PolygonObject a := + refinement (F.obj 0) (trajectoryLabel F) (trajectoryLabel_fiber_polygon F) + +noncomputable def strandDrop (F : RawString a n) : strandObject F ⟶ F.obj 0 := + refinementArrow (F.obj 0) (trajectoryLabel F) (trajectoryLabel_fiber_polygon F) + +noncomputable def strandOffsets (F : RawString a n) (i : Fin (n+1)) + (j : Fin (strandObject F).tracks) : CutRing × CutRing := + ((Fintype.equivFin (Fin (F.obj 0).tracks × TrajectoryLabel F)).symm j).2.val i + +theorem strandOffsets_spec (F : RawString a n) (i : Fin (n+1)) (x : (strandObject F).Point) : + pointShift (baseArrow F i) ((strandDrop F).toEquiv x)=strandOffsets F i x.val.1 := + congrArg (fun (k : TrajectoryLabel F) => k.val i) + (refinementArrow_label (F.obj 0) (trajectoryLabel F) (trajectoryLabel_fiber_polygon F) x) + +noncomputable def translationString (U : PolygonObject a) + (d : Fin (n+1) → Fin U.tracks → CutRing × CutRing) : RawString a n where + obj i := shifted U (d i) + map {i j} _ := CategoryTheory.inv (shiftArrow U (d i)) ≫ shiftArrow U (d j) + map_id i := by simp + map_comp f g := by simp [Category.assoc] + +noncomputable def normalizedString (F : RawString a n) : RawString a n := + translationString (strandObject F) (strandOffsets F) +noncomputable def normalizationLadder (F : RawString a n) : normalizedString F ⟶ F where + app i := by + change shifted (strandObject F) (strandOffsets F i) ⟶ F.obj i + exact CategoryTheory.inv (shiftArrow (strandObject F) (strandOffsets F i)) ≫ + strandDrop F ≫ baseArrow F i + naturality i j f := by + change (CategoryTheory.inv (shiftArrow (strandObject F) (strandOffsets F i)) ≫ + shiftArrow (strandObject F) (strandOffsets F j)) ≫ + (CategoryTheory.inv (shiftArrow (strandObject F) (strandOffsets F j)) ≫ + strandDrop F ≫ baseArrow F j) = + (CategoryTheory.inv (shiftArrow (strandObject F) (strandOffsets F i)) ≫ + strandDrop F ≫ baseArrow F i) ≫ F.map f + simp [Category.assoc] + +theorem normalizationLadder_positional (F : RawString a n) : + (ladderProperty a n) (normalizationLadder F) := by + intro i y + obtain ⟨x,rfl⟩ := (shiftArrow (strandObject F) (strandOffsets F i)).toEquiv.surjective y + change ((CategoryTheory.inv (shiftArrow (strandObject F) (strandOffsets F i)) ≫ + strandDrop F ≫ baseArrow F i).toEquiv + ((shiftArrow (strandObject F) (strandOffsets F i)).toEquiv x)).val.2 = _ + simp only [arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] + rw [pointShift_spec,strandOffsets_spec] + rfl + +noncomputable def normalizationIso (F : RawString a n) : + (⟨normalizedString F⟩ : StringGroupoid a n) ≅ ⟨F⟩ := + asIso ⟨normalizationLadder F,normalizationLadder_positional F⟩ + +theorem exists_finite_strand_normalization (F : RawString a n) : + ∃ (U : PolygonObject a) (d : Fin (n+1) → Fin U.tracks → CutRing × CutRing), + Nonempty ((⟨translationString U d⟩ : StringGroupoid a n) ≅ ⟨F⟩) := + ⟨strandObject F,strandOffsets F,⟨normalizationIso F⟩⟩ + +end PolygonObject +end PolygonStringNormalization + +open Classical CategoryTheory Set +namespace PolygonObject +variable {a n m : ℕ} + +@[simp] theorem trajectoryShift_zero (F : RawString a n) (x : (F.obj 0).Point) : + trajectoryShift F x 0=0 := by + change pointShift (baseArrow F 0) x=0 + rw [baseArrow_zero,pointShift_id] + +theorem trajectoryShift_reindex (F : RawString a m) + (u : Fin (n+1) ⥤ Fin (m+1)) (x : (F.obj 0).Point) (i : Fin (n+1)) : + trajectoryShift (u⋙F) ((baseArrow F (u.obj 0)).toEquiv x) i = + trajectoryShift F x (u.obj i)-trajectoryShift F x (u.obj 0) := by + have he := pointShift_comp (baseArrow F (u.obj 0)) + (F.map (u.map (homOfLE (Fin.zero_le i)))) x + rw [baseArrow_comp] at he + exact eq_sub_iff_add_eq.mpr he.symm + +noncomputable def increments (F : RawString a n) (x : (F.obj 0).Point) : + Fin n → CutRing × CutRing := fun i => + trajectoryShift F x i.succ - trajectoryShift F x i.castSucc + +theorem trajectory_successor (F : RawString a n) (x : (F.obj 0).Point) (i : Fin n) : + trajectory F x i.succ=translate a (increments F x i) (trajectory F x i.castSucc) := by + change ((baseArrow F i.succ).toEquiv x).val.2=_ + rw [pointShift_spec] + change translate a (trajectoryShift F x i.succ) x.val.2 = + translate a (trajectoryShift F x i.succ-trajectoryShift F x i.castSucc) + ((baseArrow F i.castSucc).toEquiv x).val.2 + rw [pointShift_spec,←translate_add] + simp only [trajectoryShift,sub_add_cancel] + +theorem increments_reindex (F : RawString a m) + (u : Fin (n+1) ⥤ Fin (m+1)) (x : (F.obj 0).Point) (i : Fin n) : + increments (u⋙F) ((baseArrow F (u.obj 0)).toEquiv x) i = + trajectoryShift F x (u.obj i.succ)-trajectoryShift F x (u.obj i.castSucc) := by + unfold increments + rw [trajectoryShift_reindex,trajectoryShift_reindex] + abel + +theorem increments_reindex_unchanged (F : RawString a m) + (u : Fin (n+1) ⥤ Fin (m+1)) (x : (F.obj 0).Point) (i : Fin n) (j : Fin m) + (hleft : u.obj i.castSucc=j.castSucc) (hright : u.obj i.succ=j.succ) : + increments (u⋙F) ((baseArrow F (u.obj 0)).toEquiv x) i=increments F x j := by + rw [increments_reindex,hleft,hright] + rfl + +theorem increments_reindex_compose (F : RawString a m) + (u : Fin (n+1) ⥤ Fin (m+1)) (x : (F.obj 0).Point) (i : Fin n) (j k : Fin m) + (hleft : u.obj i.castSucc=j.castSucc) (hmid : j.succ=k.castSucc) + (hright : u.obj i.succ=k.succ) : + increments (u⋙F) ((baseArrow F (u.obj 0)).toEquiv x) i= + increments F x j+increments F x k := by + rw [increments_reindex,hleft,hright] + unfold increments + rw [hmid] + abel + +theorem increments_reindex_duplicate (F : RawString a m) + (u : Fin (n+1) ⥤ Fin (m+1)) (x : (F.obj 0).Point) (i : Fin n) + (hi : u.obj i.succ=u.obj i.castSucc) : + increments (u⋙F) ((baseArrow F (u.obj 0)).toEquiv x) i=0 := by + rw [increments_reindex,hi,sub_self] + +theorem reindex_initial_position (F : RawString a m) + (u : Fin (n+1) ⥤ Fin (m+1)) (x : (F.obj 0).Point) : + ((baseArrow F (u.obj 0)).toEquiv x).val.2= + translate a (trajectoryShift F x (u.obj 0)) x.val.2 := pointShift_spec _ _ + +theorem increments_finite_range (F : RawString a n) : (Set.range (increments F)).Finite := by + exact (trajectoryShift_finite_range F).image (fun t i => t i.succ-t i.castSucc) |>.subset + (by rintro _ ⟨x,rfl⟩; exact ⟨trajectoryShift F x,⟨x,rfl⟩,rfl⟩) + +theorem increments_fiber_polygon (F : RawString a n) (j : Fin (F.obj 0).tracks) + (u : Fin n → CutRing × CutRing) : + {z | ∃hz : z∈((F.obj 0).cell j).val,increments F ⟨(j,z),hz⟩=u}∈polygonAlgebra a := by + let s := (trajectoryShift_finite_range F).toFinset + have he : {z | ∃hz : z∈((F.obj 0).cell j).val,increments F ⟨(j,z),hz⟩=u} = + ⋃t∈s.filter (fun t => (fun i : Fin n => t i.succ-t i.castSucc)=u), + {z | ∃hz : z∈((F.obj 0).cell j).val,trajectoryShift F ⟨(j,z),hz⟩=t} := by + ext z + constructor + · rintro ⟨hz,hu⟩ + refine Set.mem_iUnion₂.mpr ⟨trajectoryShift F ⟨(j,z),hz⟩, + Finset.mem_filter.mpr ⟨?_,hu⟩,hz,rfl⟩ + exact (Set.Finite.mem_toFinset _).mpr ⟨_,rfl⟩ + · intro hz + obtain ⟨t,ht,hzt⟩ := Set.mem_iUnion₂.mp hz + obtain ⟨hz',heq⟩ := hzt + refine ⟨hz',?_⟩ + change (fun i : Fin n => trajectoryShift F ⟨(j,z),hz'⟩ i.succ- + trajectoryShift F ⟨(j,z),hz'⟩ i.castSucc)=u + rw [heq] + exact (Finset.mem_filter.mp ht).2 + rw [he] + apply BooleanSubalgebra.biSup_mem (Finset.finite_toSet _) + intro t _ + exact trajectoryShift_fiber_polygon F j t + +theorem ladder_preserves_increments {F G : StringGroupoid a n} (h : F ⟶ G) + (x : (F.obj.obj 0).Point) : + increments G.obj ((h.hom.app 0).toEquiv x)=increments F.obj x := by + unfold increments + rw [ladder_preserves_trajectoryShift] + +def deleteVertex (j : Fin (n+2)) : Fin (n+1) ⥤ Fin (n+2) := + (Fin.succAboveOrderEmb j).monotone.functor + +noncomputable def stringFace (j : Fin (n+2)) : StringGroupoid a (n+1) ⥤ StringGroupoid a n := + stringReindex (deleteVertex j) + +end PolygonObject + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrackArea.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrackArea.lean new file mode 100644 index 0000000000000000000000000000000000000000..27dfda42746c1470917f6e6d913cc3dbe350f2e7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrackArea.lean @@ -0,0 +1,110 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonArea +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonGridComparison + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonTrackArea +open Classical Set MeasureTheory +namespace PolygonGrid + +noncomputable def trackUnion {m : ℕ} (S : Fin m → Set (ℝ×ℝ)) : Set PlaneTracks := + ⋃i, {i.val} ×ˢ S i + +@[simp] theorem mem_trackUnion {m : ℕ} (S : Fin m → Set (ℝ×ℝ)) (i : Fin m) (x : ℝ×ℝ) : + (i.val,x)∈trackUnion S ↔ x∈S i := by + constructor + · intro h + obtain ⟨j,hj,hx⟩ := Set.mem_iUnion.mp h + have he : i=j := Fin.ext hj + simpa only [←he] using hx + · intro hx + exact Set.mem_iUnion.mpr ⟨i,rfl,hx⟩ + +theorem trackUnion_mono {m : ℕ} {S T : Fin m → Set (ℝ×ℝ)} (h : ∀i,S i⊆T i) : + trackUnion S⊆trackUnion T := by + intro p hp + obtain ⟨i,hi,hp⟩ := Set.mem_iUnion.mp hp + exact Set.mem_iUnion.mpr ⟨i,hi,h i hp⟩ + +theorem trackUnion_region {m : ℕ} {S : Fin m → Set (ℝ×ℝ)} + (h : ∀i,S i⊆PolygonArea.square) : trackUnion S⊆region m := by + intro p hp + obtain ⟨i,hi,hp⟩ := Set.mem_iUnion.mp hp + exact ⟨hi ▸ i.isLt,h i hp⟩ + +@[simp] theorem volume_trackUnion {m : ℕ} (S : Fin m → Set (ℝ×ℝ)) + (hS : ∀i,MeasurableSet (S i)) : μ (trackUnion S)=∑i,volume (S i) := by + have hdis : Pairwise (fun i j : Fin m => Disjoint ({i.val}×ˢ S i) ({j.val}×ˢ S j)) := by + intro i j hij + apply Set.disjoint_left.mpr + rintro p ⟨hi,-⟩ ⟨hj,-⟩ + exact hij (Fin.ext (hi.symm.trans hj)) + rw [trackUnion,measure_iUnion hdis (fun i => (measurableSet_singleton _).prod (hS i))] + simp only [μ,Measure.prod_prod,Measure.count_singleton,one_mul,tsum_fintype] + rfl + +theorem bank_representative {a m : ℕ} (U : Fin m → polygonAlgebra a) : + ∃ S : Set PlaneTracks, S⊆region m ∧ + (∀i : Fin m,∀x : GenericSquare a,(i.val,x.val)∈S ↔ x∈(U i).val) ∧ + μ (closure S)=∑i,PolygonArea.area (U i) ∧ + μ (interior S)=∑i,PolygonArea.area (U i) := by + choose R hR hm hn he using fun i => PolygonArea.representative (U i).property + have hmR : ∀i,MeasurableSet (R i) := hm + have harea (i : Fin m) : volume (R i)=PolygonArea.area (U i) := + (PolygonArea.area_eq_rep (U i) (hR i) (he i)).symm + have hvol : μ (trackUnion R)=∑i,PolygonArea.area (U i) := by + rw [volume_trackUnion R hmR] + exact Finset.sum_congr rfl (fun i _ => harea i) + have hclosure : closure (trackUnion R)⊆trackUnion (fun i => closure (R i)) := by + apply (isClosed_iUnion_of_finite (fun i => isClosed_singleton.prod isClosed_closure)).closure_subset_iff.mpr + exact trackUnion_mono (fun _ => subset_closure) + have hinterior : trackUnion (fun i => interior (R i))⊆interior (trackUnion R) := by + apply interior_maximal (trackUnion_mono (fun _ => interior_subset)) + exact isOpen_iUnion (fun i => (isOpen_discrete _).prod isOpen_interior) + have hvclosure : μ (trackUnion (fun i => closure (R i)))=∑i,PolygonArea.area (U i) := by + rw [volume_trackUnion _ (fun _ => isClosed_closure.measurableSet)] + apply Finset.sum_congr rfl + intro i _ + rw [measure_congr (PolygonArea.closure_ae_eq (hn i)),harea] + have hvinterior : μ (trackUnion (fun i => interior (R i)))=∑i,PolygonArea.area (U i) := by + rw [volume_trackUnion _ (fun _ => isOpen_interior.measurableSet)] + apply Finset.sum_congr rfl + intro i _ + rw [measure_congr (PolygonArea.interior_ae_eq (hn i)),harea] + refine ⟨trackUnion R,trackUnion_region hR,?_,?_,?_⟩ + · intro i x + exact (mem_trackUnion R i x.val).trans (he i x).symm + · exact le_antisymm ((measure_mono hclosure).trans_eq hvclosure) + (hvol.symm.trans_le (measure_mono subset_closure)) + · exact le_antisymm ((measure_mono interior_subset).trans_eq hvol) + (hvinterior.symm.trans_le (measure_mono hinterior)) + +theorem polygon_grid_comparison {a m : ℕ} (U V : Fin m → polygonAlgebra a) + (h : (∑i,PolygonArea.area (U i)) < ∑i,PolygonArea.area (V i)) : + ∃ (S T : Set PlaneTracks) (δ : ℝ), 0 < δ ∧ + (∀i : Fin m,∀x : GenericSquare a,(i.val,x.val)∈S ↔ x∈(U i).val) ∧ + (∀i : Fin m,∀x : GenericSquare a,(i.val,x.val)∈T ↔ x∈(V i).val) ∧ + ∀ε : ℝ, 0 < ε → ε < δ → + ∃ (N : ℕ) (I J : Finset (Index m N)), Nonempty (I ↪ J) ∧ + S⊆⋃i∈I,cell ε i ∧ ∀j∈J,cell ε j⊆T := by + obtain ⟨S,hS,heS,hcS,hiS⟩ := bank_representative U + obtain ⟨T,hT,heT,hcT,hiT⟩ := bank_representative V + have hh : μ (closure S)<μ (interior T) := by rwa [hcS,hiT] + obtain ⟨δ,hδ,hmatch⟩ := strict_grid_comparison hS hT hh + exact ⟨S,T,δ,hδ,heS,heT,hmatch⟩ + +end PolygonGrid +end PolygonTrackArea + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrackStabilizer.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrackStabilizer.lean new file mode 100644 index 0000000000000000000000000000000000000000..775f06e8572e2f8f9db62958cc534cb62c5464d5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrackStabilizer.lean @@ -0,0 +1,227 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TrackPoint + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonTrackStabilizer +open Classical Set + +namespace PolygonTracks +variable {a k n : ℕ} +noncomputable def join (a k n : ℕ) : + TrackPoint a k ⊕ TrackPoint a n ≃ TrackPoint a (k+n) := + (Equiv.sumProdDistrib (Fin k) (Fin n) (GenericSquare a)).symm.trans + (Equiv.prodCongr finSumFinEquiv (Equiv.refl _)) + +@[simp] theorem join_inl (x : TrackPoint a k) : join a k n (.inl x)=(x.1.castAdd n,x.2) := rfl +@[simp] theorem join_inr (x : TrackPoint a n) : join a k n (.inr x)=(x.1.natAdd k,x.2) := rfl +@[simp] theorem join_symm_left (x : TrackPoint a k) : + (join a k n).symm (x.1.castAdd n,x.2)=.inl x := (join a k n).symm_apply_apply (.inl x) +@[simp] theorem join_symm_right (x : TrackPoint a n) : + (join a k n).symm (x.1.natAdd k,x.2)=.inr x := (join a k n).symm_apply_apply (.inr x) + +noncomputable def blockPerm (k : ℕ) (f : Equiv.Perm (TrackPoint a n)) : + Equiv.Perm (TrackPoint a (k+n)) := + (join a k n).symm.trans (((Equiv.refl _).sumCongr f).trans (join a k n)) + +@[simp] theorem blockPerm_left (f : Equiv.Perm (TrackPoint a n)) (x : TrackPoint a k) : + blockPerm k f (x.1.castAdd n,x.2)=(x.1.castAdd n,x.2) := by + simp [blockPerm] + +@[simp] theorem blockPerm_right (f : Equiv.Perm (TrackPoint a n)) (x : TrackPoint a n) : + blockPerm k f (x.1.natAdd k,x.2)=((f x).1.natAdd k,(f x).2) := by + simp [blockPerm] + +theorem blockPerm_hasTable (f : polygonFullGroup a n) : HasTranslationTable (blockPerm k f.val) := by + obtain ⟨s,hs,hcover⟩ := f.property + let leftChart : Fin k → TableChart a (k+n) := fun i => ⟨i.castAdd n,i.castAdd n,0,⊤⟩ + let rightChart : TableChart a n → TableChart a (k+n) := fun c => + ⟨c.source.natAdd k,c.target.natAdd k,c.shift,c.domain⟩ + refine ⟨Finset.univ.image leftChart ∪ s.image rightChart,?_,?_⟩ + · intro c hc + rcases Finset.mem_union.mp hc with hc|hc + · obtain ⟨i,-,rfl⟩ := Finset.mem_image.mp hc + intro x hx + change blockPerm k f.val (i.castAdd n,x)=(i.castAdd n,translate a 0 x) + rw [blockPerm_left (x:=(i,x)),translate_zero] + · obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + intro x hx + change blockPerm k f.val (d.source.natAdd k,x)=(d.target.natAdd k,translate a d.shift x) + rw [blockPerm_right (x:=(d.source,x)),hs d hd x hx] + · rintro ⟨i,x⟩ + induction i using Fin.addCases with + | left i => + exact ⟨leftChart i,Finset.mem_union_left _ (Finset.mem_image.mpr ⟨i,Finset.mem_univ _,rfl⟩),rfl,by trivial⟩ + | right i => + obtain ⟨c,hc,hx⟩ := hcover (i,x) + refine ⟨rightChart c,Finset.mem_union_right _ (Finset.mem_image.mpr ⟨c,hc,rfl⟩),?_,hx.2⟩ + exact congrArg (Fin.natAdd k) hx.1 + +noncomputable def stabilize (a k n : ℕ) : polygonFullGroup a n →* polygonFullGroup a (k+n) where + toFun f := ⟨blockPerm k f.val,blockPerm_hasTable f⟩ + map_one' := by + apply Subtype.ext; apply Equiv.ext + intro x + obtain ⟨y,rfl⟩ := (join a k n).surjective x + cases y <;> simp [blockPerm] + map_mul' f g := by + apply Subtype.ext; apply Equiv.ext + intro x + obtain ⟨y,rfl⟩ := (join a k n).surjective x + cases y <;> simp [blockPerm,Equiv.Perm.mul_apply] + +@[simp] theorem stabilize_left (f : polygonFullGroup a n) (x : TrackPoint a k) : + (stabilize a k n f).val (x.1.castAdd n,x.2)=(x.1.castAdd n,x.2) := blockPerm_left f.val x +@[simp] theorem stabilize_right (f : polygonFullGroup a n) (x : TrackPoint a n) : + (stabilize a k n f).val (x.1.natAdd k,x.2)=((f.val x).1.natAdd k,(f.val x).2) := blockPerm_right f.val x + +theorem stabilize_injective : Function.Injective (stabilize a k n) := by + intro f g he + apply Subtype.ext; apply Equiv.ext + intro x + have h := congrArg (fun p : polygonFullGroup a (k+n) => p.val (x.1.natAdd k,x.2)) he + simp only [stabilize_right] at h + apply Prod.ext + · apply Fin.ext + exact Nat.add_left_cancel (congrArg (fun p : TrackPoint a (k+n) => p.1.val) h) + · exact congrArg (fun p : TrackPoint a (k+n) => p.2) h + +def bankFixer (a k n : ℕ) : Subgroup (polygonFullGroup a (k+n)) where + carrier := {g | ∀x : TrackPoint a k,g.val (x.1.castAdd n,x.2)=(x.1.castAdd n,x.2)} + one_mem' := fun _ => rfl + mul_mem' := by + intro f g hf hg x + change f.val (g.val (x.1.castAdd n,x.2))=_ + rw [hg x,hf x] + inv_mem' := by + intro g hg x + exact g.val.symm_apply_eq.mpr (hg x).symm + +@[simp] theorem mem_bankFixer (g : polygonFullGroup a (k+n)) : + g∈bankFixer a k n ↔ ∀x : TrackPoint a k,g.val (x.1.castAdd n,x.2)=(x.1.castAdd n,x.2) := Iff.rfl + +theorem stabilize_mem_bankFixer (g : polygonFullGroup a n) : + stabilize a k n g∈bankFixer a k n := stabilize_left g + +end PolygonTracks +end PolygonTrackStabilizer + +section PolygonTrackRestriction +open Classical Set +namespace PolygonTracks +variable {a k n : ℕ} + +def rightIncl (a k n : ℕ) (x : TrackPoint a n) : TrackPoint a (k+n) := + (x.1.natAdd k,x.2) + +theorem rightIncl_injective : Function.Injective (rightIncl a k n) := by + intro x y he + apply Prod.ext + · apply Fin.ext + exact Nat.add_left_cancel (congrArg (fun p : TrackPoint a (k+n) => p.1.val) he) + · exact congrArg (fun p : TrackPoint a (k+n) => p.2) he + +theorem bankFixer_preserves_right (g : bankFixer a k n) (x : TrackPoint a n) : + ∃y : TrackPoint a n,g.val.val (rightIncl a k n x)=rightIncl a k n y := by + obtain ⟨z,hz⟩ := (join a k n).surjective (g.val.val (rightIncl a k n x)) + cases z with + | inl z => + have he : rightIncl a k n x=(z.1.castAdd n,z.2) := + g.val.val.injective (hz.symm.trans (g.property z).symm) + have hf := congrArg (fun p : TrackPoint a (k+n) => p.1.val) he + have := z.1.isLt + change k+x.1.val=z.1.val at hf + omega + | inr y => exact ⟨y,hz.symm⟩ + +noncomputable def rightValue (g : bankFixer a k n) (x : TrackPoint a n) : TrackPoint a n := + (bankFixer_preserves_right g x).choose + +@[simp] theorem rightValue_spec (g : bankFixer a k n) (x : TrackPoint a n) : + rightIncl a k n (rightValue g x)=g.val.val (rightIncl a k n x) := + (bankFixer_preserves_right g x).choose_spec.symm + +noncomputable def restrictPerm (g : bankFixer a k n) : Equiv.Perm (TrackPoint a n) where + toFun := rightValue g + invFun := rightValue g⁻¹ + left_inv x := by + apply rightIncl_injective (a:=a) (k:=k) + rw [rightValue_spec,rightValue_spec] + exact g.val.val.symm_apply_apply _ + right_inv x := by + apply rightIncl_injective (a:=a) (k:=k) + rw [rightValue_spec,rightValue_spec] + exact g.val.val.apply_symm_apply _ + +@[simp] theorem restrictPerm_spec (g : bankFixer a k n) (x : TrackPoint a n) : + rightIncl a k n (restrictPerm g x)=g.val.val (rightIncl a k n x) := rightValue_spec g x + +theorem restrictPerm_hasTable (g : bankFixer a k n) : HasTranslationTable (restrictPerm g) := by + obtain ⟨s,hs,hcover⟩ := g.val.property + let admissible : Fin n × Fin n × TableChart a (k+n) → Prop := fun t => + t.2.2.source=t.1.natAdd k ∧ t.2.2.target=t.2.1.natAdd k + let conv : Fin n × Fin n × TableChart a (k+n) → TableChart a n := fun t => + ⟨t.1,t.2.1,t.2.2.shift,t.2.2.domain⟩ + let ts := ((Finset.univ : Finset (Fin n)).product ((Finset.univ : Finset (Fin n)).product s)).filter admissible + refine ⟨ts.image conv,?_,?_⟩ + · intro c hc + obtain ⟨⟨i,j,d⟩,hd,rfl⟩ := Finset.mem_image.mp hc + obtain ⟨hmem,hsource,htarget⟩ := Finset.mem_filter.mp hd + have hdmem : d∈s := (Finset.mem_product.mp (Finset.mem_product.mp hmem).2).2 + intro x hx + apply rightIncl_injective (a:=a) (k:=k) + rw [restrictPerm_spec] + change g.val.val (i.natAdd k,x)=(j.natAdd k,translate a d.shift x) + change d.source=i.natAdd k at hsource + change d.target=j.natAdd k at htarget + rw [← hsource,← htarget] + exact hs d hdmem x hx + · intro x + obtain ⟨d,hd,hsource,hx⟩ := hcover (rightIncl a k n x) + have he := hs d hd x.2 hx + have htarget : d.target=(restrictPerm g x).1.natAdd k := by + have hp := congrArg Prod.fst (restrictPerm_spec g x) + change x.1.natAdd k=d.source at hsource + rw [← hsource] at he + exact (congrArg Prod.fst he).symm.trans hp.symm + refine ⟨conv (x.1,(restrictPerm g x).1,d),Finset.mem_image.mpr ⟨_,?_,rfl⟩,rfl,hx⟩ + exact Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨Finset.mem_univ _, + Finset.mem_product.mpr ⟨Finset.mem_univ _,hd⟩⟩,hsource.symm,htarget⟩ + +noncomputable def restrict (g : bankFixer a k n) : polygonFullGroup a n := + ⟨restrictPerm g,restrictPerm_hasTable g⟩ + +@[simp] theorem stabilize_restrict (g : bankFixer a k n) : stabilize a k n (restrict g)=g.val := by + apply Subtype.ext; apply Equiv.ext + intro x + obtain ⟨z,rfl⟩ := (join a k n).surjective x + cases z with + | inl y => exact (stabilize_left _ y).trans (g.property y).symm + | inr y => exact (stabilize_right _ y).trans (restrictPerm_spec g y) + +@[simp] theorem restrict_stabilize (g : polygonFullGroup a n) : + restrict ⟨stabilize a k n g,stabilize_mem_bankFixer g⟩=g := by + apply stabilize_injective (k:=k) + exact stabilize_restrict _ + +noncomputable def stabilizerEquiv (a k n : ℕ) : polygonFullGroup a n ≃* bankFixer a k n where + toFun g := ⟨stabilize a k n g,stabilize_mem_bankFixer g⟩ + invFun := restrict + left_inv := restrict_stabilize + right_inv g := Subtype.ext (stabilize_restrict g) + map_mul' g h := Subtype.ext ((stabilize a k n).map_mul g h) + +end PolygonTracks +end PolygonTrackRestriction + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrajectoryStrata.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrajectoryStrata.lean new file mode 100644 index 0000000000000000000000000000000000000000..11594e56c327bb5f0d58d72baeeb32e360d8f2f9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonTrajectoryStrata.lean @@ -0,0 +1,167 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PeriodicSlotStars +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonStringGroupoid + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonTrajectoryStrata + +open Classical CategoryTheory Set +namespace PolygonObject +variable {a n : ℕ} + +theorem representative_add (u v : CutRing × CutRing) : + orbitRepresentative (u+v)=orbitRepresentative u+orbitRepresentative v := by + simp [orbitRepresentative,add_mul] + +@[simp] theorem representative_idem (u : CutRing × CutRing) : + orbitRepresentative (orbitRepresentative u)=orbitRepresentative u := by + simp [orbitRepresentative,cutTau] + +theorem arrow_displacement_exists {U V : PolygonObject a} (f : U ⟶ V) (x : U.Point) : + ∃u,(f.toEquiv x).val.2=translate a u x.val.2 := by + obtain ⟨s,hs,hcover⟩ := f.hasTable + obtain ⟨c,hc,ht,hx⟩ := hcover x + obtain ⟨hu,he⟩ := hs c hc x.val.2 hx + have hpoint : (⟨(c.source,x.val.2),hu⟩ : U.Point)=x := + Subtype.ext (Prod.ext ht.symm rfl) + rw [hpoint] at he + exact ⟨c.shift,congrArg Prod.snd he⟩ + +noncomputable def pointShift {U V : PolygonObject a} (f : U ⟶ V) (x : U.Point) : + CutRing × CutRing := orbitRepresentative (arrow_displacement_exists f x).choose + +theorem pointShift_spec {U V : PolygonObject a} (f : U ⟶ V) (x : U.Point) : + (f.toEquiv x).val.2=translate a (pointShift f x) x.val.2 := + (arrow_displacement_exists f x).choose_spec.trans (translate_orbitRepresentative _ _ _) + +theorem pointShift_unique {U V : PolygonObject a} (f : U ⟶ V) (x : U.Point) + (u : CutRing × CutRing) (he : (f.toEquiv x).val.2=translate a u x.val.2) : + pointShift f x=orbitRepresentative u := + orbitRepresentative_eq_of_translate_eq x.val.2 + ((arrow_displacement_exists f x).choose_spec.symm.trans he) + +@[simp] theorem pointShift_reduced {U V : PolygonObject a} (f : U ⟶ V) (x : U.Point) : + orbitRepresentative (pointShift f x)=pointShift f x := representative_idem _ + +@[simp] theorem pointShift_id (U : PolygonObject a) (x : U.Point) : pointShift (𝟙 U) x=0 := by + change pointShift (𝟙 U) x=(0,0) + simpa [orbitRepresentative] using pointShift_unique (𝟙 U) x 0 (by simp [arrow_id_apply]) + +theorem pointShift_comp {U V W : PolygonObject a} (f : U ⟶ V) (g : V ⟶ W) (x : U.Point) : + pointShift (f≫g) x=pointShift g (f.toEquiv x)+pointShift f x := by + have he := pointShift_unique (f≫g) x (pointShift g (f.toEquiv x)+pointShift f x) (by + rw [arrow_comp_apply,pointShift_spec g,pointShift_spec f,translate_add]) + simpa only [representative_add,pointShift_reduced] using he + +theorem chart_pointShift {U V : PolygonObject a} (f : U ⟶ V) + (c : Chart (a:=a) U.tracks V.tracks) (hc : c.Holds f.toEquiv) (x : U.Point) + (hx : c.Contains x) : pointShift f x=orbitRepresentative c.shift := by + obtain ⟨hu,he⟩ := hc x.val.2 hx.2 + have hpoint : (⟨(c.source,x.val.2),hu⟩ : U.Point)=x := + Subtype.ext (Prod.ext hx.1.symm rfl) + rw [hpoint] at he + exact pointShift_unique f x _ (congrArg Prod.snd he) + +theorem pointShift_finite_range {U V : PolygonObject a} (f : U ⟶ V) : + (Set.range (pointShift f)).Finite := by + obtain ⟨s,hs,hcover⟩ := f.hasTable + apply (s.finite_toSet.image (fun c => orbitRepresentative c.shift)).subset + rintro _ ⟨x,rfl⟩ + obtain ⟨c,hc,hx⟩ := hcover x + exact ⟨c,hc,(chart_pointShift f c (hs c hc) x hx).symm⟩ + +theorem pointShift_fiber_polygon {U V : PolygonObject a} (f : U ⟶ V) + (i : Fin U.tracks) (u : CutRing × CutRing) : + {z | ∃hz : z∈(U.cell i).val, pointShift f ⟨(i,z),hz⟩=u}∈polygonAlgebra a := by + obtain ⟨s,hs,hcover⟩ := f.hasTable + have he : {z | ∃hz : z∈(U.cell i).val, pointShift f ⟨(i,z),hz⟩=u} = + ⋃c∈s.filter (fun c => c.source=i ∧ orbitRepresentative c.shift=u),c.domain.val := by + ext z + constructor + · rintro ⟨hz,hu⟩ + obtain ⟨c,hc,hz'⟩ := hcover ⟨(i,z),hz⟩ + exact Set.mem_iUnion₂.mpr ⟨c,Finset.mem_filter.mpr ⟨hc,hz'.1.symm, + (chart_pointShift f c (hs c hc) ⟨(i,z),hz⟩ hz').symm.trans hu⟩,hz'.2⟩ + · intro hz + obtain ⟨c,hcf,hcz⟩ := Set.mem_iUnion₂.mp hz + obtain ⟨hcs,hci,hcu⟩ := Finset.mem_filter.mp hcf + obtain ⟨hz',hf⟩ := hs c hcs z hcz + subst i + refine ⟨hz',?_⟩ + exact (chart_pointShift f c (hs c hcs) ⟨(c.source,z),hz'⟩ ⟨rfl,hcz⟩).trans hcu + rw [he] + apply BooleanSubalgebra.biSup_mem (Finset.finite_toSet _) + intro c _ + exact c.domain.property + +noncomputable def trajectoryShift (F : RawString a n) (x : (F.obj 0).Point) : + Fin (n+1) → CutRing × CutRing := fun i => pointShift (baseArrow F i) x + +theorem trajectoryShift_fiber_polygon (F : RawString a n) (j : Fin (F.obj 0).tracks) + (u : Fin (n+1) → CutRing × CutRing) : + {z | ∃hz : z∈((F.obj 0).cell j).val, trajectoryShift F ⟨(j,z),hz⟩=u}∈polygonAlgebra a := by + have he : {z | ∃hz : z∈((F.obj 0).cell j).val, trajectoryShift F ⟨(j,z),hz⟩=u} = + ⋂i : Fin (n+1),{z | ∃hz : z∈((F.obj 0).cell j).val, + pointShift (baseArrow F i) ⟨(j,z),hz⟩=u i} := by + ext z + constructor + · rintro ⟨hz,hu⟩ + exact Set.mem_iInter.mpr (fun i => ⟨hz,congrFun hu i⟩) + · intro hz + have h := Set.mem_iInter.mp hz + obtain ⟨hz',_⟩ := h 0 + refine ⟨hz',?_⟩ + funext i + exact (h i).choose_spec + rw [he] + exact BooleanSubalgebra.iInf_mem (fun i => pointShift_fiber_polygon (baseArrow F i) j (u i)) + +theorem trajectoryShift_finite_range (F : RawString a n) : + (Set.range (trajectoryShift F)).Finite := by + let S (i : Fin (n+1)) := Set.range (pointShift (baseArrow F i)) + let : ∀ index, Finite (S index) := fun index => + (pointShift_finite_range (baseArrow F index)).to_subtype + let val : (∀i,S i) → (Fin (n+1) → CutRing × CutRing) := fun t i => (t i).val + apply (Set.finite_range val).subset + rintro _ ⟨x,rfl⟩ + exact ⟨fun i => ⟨pointShift (baseArrow F i) x,⟨x,rfl⟩⟩,rfl⟩ + +theorem ladder_preserves_trajectoryShift {F G : StringGroupoid a n} (h : F ⟶ G) + (x : (F.obj.obj 0).Point) : + trajectoryShift G.obj ((h.hom.app 0).toEquiv x)=trajectoryShift F.obj x := by + funext i + have he : translate a (pointShift (baseArrow G.obj i) ((h.hom.app 0).toEquiv x)) x.val.2 = + translate a (pointShift (baseArrow F.obj i) x) x.val.2 := by + calc + _ = translate a (pointShift (baseArrow G.obj i) ((h.hom.app 0).toEquiv x)) + ((h.hom.app 0).toEquiv x).val.2 := congrArg _ (h.property 0 x).symm + _ = trajectory G.obj ((h.hom.app 0).toEquiv x) i := (pointShift_spec _ _).symm + _ = trajectory F.obj x i := congrFun (ladder_preserves_trajectory h x) i + _ = _ := pointShift_spec _ _ + exact (pointShift_reduced _ _).symm.trans + ((orbitRepresentative_eq_of_translate_eq x.val.2 he).trans (pointShift_reduced _ _)) + +theorem trajectory_stratification (F : RawString a n) : + ∃s : Finset (Fin (n+1) → CutRing × CutRing), + (∀x,trajectoryShift F x∈s) ∧ + (∀j u,{z | ∃hz : z∈((F.obj 0).cell j).val, + trajectoryShift F ⟨(j,z),hz⟩=u}∈polygonAlgebra a) := by + refine ⟨(trajectoryShift_finite_range F).toFinset,?_,trajectoryShift_fiber_polygon F⟩ + intro x + exact (Set.Finite.mem_toFinset _).mpr ⟨x,rfl⟩ + +end PolygonObject +end PolygonTrajectoryStrata + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonVerticalStrings.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonVerticalStrings.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb5ce3abb1585300148029a7fc3ea9ad749ccdfc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/PolygonVerticalStrings.lean @@ -0,0 +1,77 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonStringGroupoid + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonVerticalStrings + +open Classical CategoryTheory +namespace PolygonObject +variable {a n m : ℕ} + +def verticalStringProperty (a n : ℕ) : ObjectProperty (RawString a n) := + fun F => ∀ (i j : Fin (n+1)) (f : i ⟶ j), Positional (F.map f) + +abbrev VerticalString (a n : ℕ) := (verticalStringProperty a n).FullSubcategory + +noncomputable def verticalEvaluation (a n : ℕ) : VerticalString a n ⥤ PolygonObject a where + obj F := F.obj.obj 0 + map f := f.hom.app 0 + +noncomputable def verticalConstant (a n : ℕ) : PolygonObject a ⥤ VerticalString a n where + obj U := ⟨(Functor.const (Fin (n+1))).obj U,fun _ _ _ => identity_positional U⟩ + map f := ObjectProperty.homMk ((Functor.const (Fin (n+1))).map f) + +noncomputable instance verticalEvaluation_full : (verticalEvaluation a n).Full where + map_surjective h := ⟨ObjectProperty.homMk (extendLadder h),extendLadder_zero h⟩ + +instance verticalEvaluation_faithful : (verticalEvaluation a n).Faithful where + map_injective h := by + apply ObjectProperty.hom_ext + exact ladder_ext h + +instance verticalEvaluation_essSurj : (verticalEvaluation a n).EssSurj where + mem_essImage U := ⟨(verticalConstant a n).obj U,⟨Iso.refl U⟩⟩ + +instance verticalEvaluation_isEquivalence : (verticalEvaluation a n).IsEquivalence where + +noncomputable def verticalEquivalence (a n : ℕ) : VerticalString a n ≌ PolygonObject a := + (verticalEvaluation a n).asEquivalence + +noncomputable def verticalReindex (u : Fin (n+1) ⥤ Fin (m+1)) : + VerticalString a m ⥤ VerticalString a n where + obj F := ⟨u⋙F.obj,fun i j f => F.property (u.obj i) (u.obj j) (u.map f)⟩ + map f := ObjectProperty.homMk (Functor.whiskerLeft u f.hom) + map_id F := by apply ObjectProperty.hom_ext; rfl + map_comp f g := by apply ObjectProperty.hom_ext; rfl + +@[simp] theorem verticalConstant_evaluation (a n : ℕ) : + verticalConstant a n ⋙ verticalEvaluation a n=𝟭 (PolygonObject a) := rfl + +instance verticalConstant_isEquivalence : (verticalConstant a n).IsEquivalence := by + have : (verticalConstant a n ⋙ verticalEvaluation a n).IsEquivalence := by + rw [verticalConstant_evaluation] + infer_instance + exact CategoryTheory.Functor.isEquivalence_of_comp_right + (verticalConstant a n) (verticalEvaluation a n) + +theorem verticalConstant_reindex (u : Fin (n+1) ⥤ Fin (m+1)) : + verticalConstant a m ⋙ verticalReindex u=verticalConstant a n := by + apply CategoryTheory.Functor.ext + · intro U V f; rfl + · intro U; rfl + +end PolygonObject +end PolygonVerticalStrings + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/Rectangles.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/Rectangles.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef6257e2b66c388b491a5747c01ea9bbf9668c28 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/Rectangles.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FiniteNestedLaw + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section OldRectangles + +structure LabelledRectangle (n : ℕ) where + length : Fin 2 → ℕ + length_le : ∀ j, length j ≤ n + start : Fin 2 → ℤ + lower : Fin 2 → CutRing + upper : Fin 2 → CutRing + ordered : ∀ j, ordinary (lower j) ≤ ordinary (upper j) + lower_label : ∀ j, start j ≤ endpointLabel (lower j) ∧ endpointLabel (lower j) < start j+length j + upper_label : ∀ j, start j ≤ endpointLabel (upper j) ∧ endpointLabel (upper j) < start j+length j + +namespace LabelledRectangle +variable {n : ℕ} (R : LabelledRectangle n) + +noncomputable def polygon (a : ℕ) : polygonAlgebra a := coordinateRectangle a R.lower R.upper + +theorem resolved (a : ℕ) (r : CutRing) : + ResolvedBy (fun i => (InitialCoverSystem.primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n R.start) i).val) (R.polygon a).val := by + have hl (j : Fin 2) : R.start j ≤ endpointLabel (R.lower j) ∧ endpointLabel (R.lower j) < R.start j+n := by + have hh := R.lower_label j; have hh' := R.length_le j; omega + have hv (j : Fin 2) : R.start j ≤ endpointLabel (R.upper j) ∧ endpointLabel (R.upper j) < R.start j+n := by + have hh := R.upper_label j; have hh' := R.length_le j; omega + intro x y he + exact and_congr (coordinateLabelWindow_resolved n R.start 0 _ _ (hl 0) (hv 0) x y he) + (coordinateLabelWindow_resolved n R.start 1 _ _ (hl 1) (hv 1) x y he) + +structure ChartFit (s : CutRing) (z : CutRing × CutRing) where + window : Fin 2 → ℤ + source_start : ∀ j, window j ≤ R.start j + source_end : ∀ j, R.start j+R.length j ≤ window j+n + chart_start : ∀ j, window j ≤ pointLabel z j+symmetricWindowStart s j + chart_end : ∀ j, pointLabel z j+symmetricWindowStart s j+symmetricWindowLength s ≤ window j+n + +theorem chartFit_of_near_labels (s : CutRing) (z : CutRing × CutRing) + (v : Fin 2 → ℤ) (d : Fin 2 → ℕ) + (hv : ∀ j, R.start j ≤ v j ∧ v j < R.start j+R.length j) + (hz : ∀ j, (pointLabel z j-v j).natAbs ≤ d j) + (hsize : ∀ j, R.length j+2*d j+2*(endpointLabel s).natAbs+2 ≤ n) : + Nonempty (R.ChartFit s z) := by + have hh (j : Fin 2) := source_chart_containing_window n (R.length j) (R.start j) + (pointLabel z j) (v j) (endpointLabel s).natAbs (d j) (hv j) (hz j) (hsize j) + refine ⟨⟨fun j => R.start j ⊓ (pointLabel z j-((endpointLabel s).natAbs:ℤ)), + fun j => (hh j).1,fun j => (hh j).2.1,?_,?_⟩⟩ + · intro j + simpa only [symmetricWindowStart,sub_eq_add_neg] using (hh j).2.2.1 + · intro j + simpa only [symmetricWindowStart,symmetricWindowLength,sub_eq_add_neg] using (hh j).2.2.2 + +end LabelledRectangle + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +noncomputable def rectangleCopy (hlarge : 15 < m+1) {n : ℕ} + (g : B.CoordinateWindowLaw n) (R : LabelledRectangle n) : + TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm) := + B.windowSector hlarge n g R.start (R.polygon a) + +theorem rectangleCopy_supported (hlarge : 15 < m+1) {n : ℕ} + (g : B.CoordinateWindowLaw n) (R : LabelledRectangle n) : + B.AlignedSmallSupported (B.rectangleCopy hlarge g R) := + B.fullGeometricSector_supported hlarge _ _ _ (R.resolved a r) + +theorem rectangleCopy_axes_control (hlarge : 15 < m+1) {n : ℕ} + (g : B.CoordinateWindowLaw n) (R : LabelledRectangle n) (j : Fin 2) : + SmallControlled B.c (B.rectangleCopy hlarge g R) + (B.axisSector hlarge n g j (R.length j) (R.length_le j) (R.start j) + (coordinateInterval a j (R.lower j) (R.upper j))) := by + rw [B.axisSector_in_window hlarge n g j _ (R.length_le j) _ R.start le_rfl + (by have hh := R.length_le j; omega) _ + (axisInterval_resolved j _ _ _ _ (R.lower_label j) (R.upper_label j))] + apply B.fullGeometricSector_small_control + fin_cases j + · exact inf_le_left + · exact inf_le_right + +theorem rectangleCopy_quadrant_control (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (s u : CutRing) (hs : 0 < ordinary s ∧ ordinary s < ordinary r) + (h : B.TangentChartLaws (symmetricWindowLength s) (symmetricWindowStart s) u) + {n : ℕ} (g : B.CoordinateWindowLaw n) (R : LabelledRectangle n) + (d : Fin 2) (z : CutRing × CutRing) (positive : Bool) (fit : R.ChartFit s z) + (hlo : ∀ j, ordinary (signQuadrantLower s d positive j)+ordinary (pointCoordinate z j) ≤ ordinary (R.lower j)) + (hup : ∀ j, ordinary (R.upper j) ≤ ordinary (signQuadrantUpper s d positive j)+ordinary (pointCoordinate z j)) : + SmallControlled B.c (B.rectangleCopy (by omega) g R) + (B.tangentSign (by omega) (symmetricWindowLength s) (symmetricWindowStart s) u h d z positive) := + B.tangentSign_quadrant_control hlarge hr s u hs h n g R.length R.length_le R.start + fit.window fit.source_start fit.source_end d z positive fit.chart_start fit.chart_end + R.lower R.upper R.ordered R.lower_label R.upper_label hlo hup _ + (B.rectangleCopy_supported (by omega) g R) (B.rectangleCopy_axes_control (by omega) g R) + +end InitialCoverSystem +end OldRectangles + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/RepeatedTrackRouting.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/RepeatedTrackRouting.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac98ff50245267adccb9c69d3f74409d29f103d7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/RepeatedTrackRouting.lean @@ -0,0 +1,210 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.TemplateRelators +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PrivateBankWord + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement + +structure PrivateRoutingBank {m : ℕ} (i : Fin 5 → Fin m) where + row : Fin 5 → Fin 5 ↪ Fin m + source : ∀ j, row j 0=i j + fresh : ∀ j k, k≠0 → ∀ l, row j k≠i l + separate : ∀ j k j' k', k≠0 → k'≠0 → row j k=row j' k' → j=j' ∧ k=k' + +namespace PrivateRoutingBank +variable {m : ℕ} {i : Fin 5 → Fin m} (P : PrivateRoutingBank i) + +def target : Fin 5 ↪ Fin m := + ⟨fun j => P.row j 1,fun _ _ he => (P.separate _ _ _ _ (by decide) (by decide) he).1⟩ + +noncomputable def alphabet : Finset (Fin m) := + Finset.univ.image (fun p : Fin 5 × Fin 5 => P.row p.1 p.2) + +theorem alphabet_card : P.alphabet.card ≤ 25 := by + classical + exact (Finset.card_image_le).trans (by simp) + +theorem row_subset (j : Fin 5) : orderedTrackAlphabet (P.row j) ⊆ P.alphabet := by + classical + intro t ht + obtain ⟨k,_,rfl⟩ := Finset.mem_map.mp ht + exact Finset.mem_image.mpr ⟨(j,k),Finset.mem_univ _,rfl⟩ + +theorem source_mem (j : Fin 5) : i j ∈ P.alphabet := by + rw [← P.source j] + exact P.row_subset j (orderedTrackAlphabet_mem _ _) + +theorem target_other_notmem (j l : Fin 5) (hjl : j≠l) : + P.target l ∉ orderedTrackAlphabet (P.row j) := by + intro ht + obtain ⟨k,_,he⟩ := Finset.mem_map.mp ht + by_cases hk : k=0 + · subst k + rw [P.source j] at he + exact P.fresh l 1 (by decide) j he.symm + · exact hjl (P.separate j k l 1 hk (by decide) he).1 + +theorem source_other_frame_notmem {a : ℕ} (V : polygonAlgebra a) + (u : Fin 5 → CutRing × CutRing) + (hinj : Function.Injective (SlotMap a m V (fun j => (i j,u j)))) + (j l : Fin 5) (hjl : j≠l) (x : V.val) : + (i l,translate a (u l) x.val) ∉ + frameDomain (orderedTrackAlphabet (P.row j)) (fun _ => u j) V := by + rintro ⟨t,ht,y,hy,he⟩ + obtain ⟨k,_,rfl⟩ := Finset.mem_map.mp ht + have ht := congrArg Prod.fst he + by_cases hk : k=0 + · subst k + rw [P.source j] at he + have hh : SlotMap a m V (fun j => (i j,u j)) (j,⟨y,hy⟩) = + SlotMap a m V (fun j => (i j,u j)) (l,x) := he.symm + exact hjl (congrArg Prod.fst (hinj hh)) + · exact P.fresh j k hk l ht.symm + +end PrivateRoutingBank + +theorem exists_privateRoutingBank {m : ℕ} (i : Fin 5 → Fin m) (J : Finset (Fin m)) + (hreserve : 20 ≤ ((Finset.univ : Finset (Fin m)) \ + (J ∪ Finset.univ.image i)).card) : + ∃ P : PrivateRoutingBank i, ∀ j k, k≠0 → P.row j k ∉ J := by + classical + let R := (Finset.univ : Finset (Fin m)) \ (J ∪ Finset.univ.image i) + have hc : Fintype.card (Fin 5 × {k : Fin 5 // k≠0}) ≤ Fintype.card R := by + have hfour : Fintype.card {k : Fin 5 // k≠0}=4 := by decide + rw [Fintype.card_prod,Fintype.card_fin,hfour,Fintype.card_coe] + exact hreserve + obtain ⟨p⟩ := Function.Embedding.nonempty_of_card_le hc + let f : Fin 5 → Fin 5 → Fin m := fun j k => + if hk : k=0 then i j else (p (j,⟨k,hk⟩)).val + have hfresh : ∀ j k hk l, (p (j,⟨k,hk⟩)).val ≠ i l := by + intro j k hk l he + exact (Finset.mem_sdiff.mp (p (j,⟨k,hk⟩)).property).2 + (Finset.mem_union_right _ (he.symm ▸ Finset.mem_image.mpr ⟨l,Finset.mem_univ _,rfl⟩)) + have hinj : ∀ j, Function.Injective (f j) := by + intro j k l he + by_cases hk : k=0 <;> by_cases hl : l=0 + · exact hk.trans hl.symm + · subst k + have hh : i j=(p (j,⟨l,hl⟩)).val := by simpa [f,hl] using he + exact (hfresh j l hl j hh.symm).elim + · subst l + have hh : (p (j,⟨k,hk⟩)).val=i j := by simpa [f,hk] using he + exact (hfresh j k hk j hh).elim + · have he' : p (j,⟨k,hk⟩)=p (j,⟨l,hl⟩) := + Subtype.ext (by simpa only [f,dite_eq_right hk,dite_eq_right hl] using he) + have hh := p.injective he' + exact congrArg (fun q : Fin 5 × {k : Fin 5 // k≠0} => q.2.val) hh + let P : PrivateRoutingBank i := { + row := fun j => ⟨f j,hinj j⟩ + source := by intro j; simp [f] + fresh := by + intro j k hk l + exact (show f j k≠i l from by simpa [f,hk] using hfresh j k hk l) + separate := by + intro j k j' k' hk hk' he + change f j k=f j' k' at he + have he' : p (j,⟨k,hk⟩)=p (j',⟨k',hk'⟩) := + Subtype.ext (by simpa only [f,dite_eq_right hk,dite_eq_right hk'] using he) + have hh := p.injective he' + exact ⟨congrArg Prod.fst hh,congrArg (fun q : Fin 5 × {k : Fin 5 // k≠0} => q.2.val) hh⟩ } + refine ⟨P,?_⟩ + intro j k hk hJ + have hh : (p (j,⟨k,hk⟩)).val ∈ J := by simpa [P,f,hk] using hJ + exact (Finset.mem_sdiff.mp (p (j,⟨k,hk⟩)).property).2 (Finset.mem_union_left _ hh) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 u j) + (balancedOffsetFrame a r m hm (orderedTrackAlphabet (P.row j)) b + (fun ht => hb (P.row_subset j ht)) (fun _ => u j)) V privateCycleStar + +noncomputable def privateRoutingWord (i : Fin 5 → Fin (m+1)) + (u : Fin 5 → CutRing × CutRing) (P : PrivateRoutingBank i) + (b : Fin (m+1)) (hb : b ∉ P.alphabet) (V : polygonAlgebra a) : + BoundedRelationCover M (alternatingGenerator a r m hm) := + ((List.finRange 5).map (B.privateRoutingFactor hlarge h hr i u P b hb V)).prod + +theorem privateRoutingWord_properties (i : Fin 5 → Fin (m+1)) (u : Fin 5 → CutRing × CutRing) + (P : PrivateRoutingBank i) (b : Fin (m+1)) (hb : b ∉ P.alphabet) + (V : polygonAlgebra a) + (hinj : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) : + B.privateRoutingWord hlarge h hr i u P b hb V ∈ ⨆ W : polygonAlgebra a, (B.polygonStar hlarge h hr W).range ∧ + B.privateRoutingWord hlarge h hr i u P b hb V ∈ sourceAlignedGroup a r m hm M B.t P.alphabet ∧ + ∀ (j : Fin 5) (x : V.val), + (coverMap M (alternatingGenerator a r m hm) (B.privateRoutingWord hlarge h hr i u P b hb V)).val.val (i j,translate a (u j) x.val) = + (P.target j,translate a (u j) x.val) := by + classical + have hbrow (j : Fin 5) : b ∉ orderedTrackAlphabet (P.row j) := + fun ht => hb (P.row_subset j ht) + let F (j : Fin 5) := balancedOffsetFrame a r m hm (orderedTrackAlphabet (P.row j)) + b (hbrow j) (fun _ => u j) + let g : Fin 5 → BoundedRelationCover M (alternatingGenerator a r m hm) := fun j => + B.distinctSlotStar hlarge h hr (P.row j) (fun _ => u j) (F j) V privateCycleStar + let l := List.finRange 5 + let w := (l.map g).prod + change w ∈ _ ∧ w ∈ _ ∧ _ + refine ⟨?_,?_,?_⟩ + · apply Subgroup.list_prod_mem + intro t ht + obtain ⟨j,hj,rfl⟩ := List.mem_map.mp ht + exact B.distinctSlotStar_uniform_mem hlarge h hr (P.row j) b (hbrow j) + (fun _ => u j) (F j) (u j) (fun _ => rfl) V privateCycleStar + · apply Subgroup.list_prod_mem + intro t ht + obtain ⟨j,hj,rfl⟩ := List.mem_map.mp ht + exact sourceAlignedGroup_mono B.t (P.row_subset j) + (B.frameStar_alphabet_mem hlarge h hr (orderedTrackAlphabet (P.row j)) + (by simp [orderedTrackAlphabet]) b (hbrow j) (fun _ => u j) (F j) V + (universalMap (orderedTrackHom (P.row j)) privateCycleStar)) + · intro j x + let q : BoundedRelationCover M (alternatingGenerator a r m hm) →* Equiv.Perm (TrackPoint a (m+1)) := + (polygonFullGroup a (m+1)).subtype.comp + ((polygonAlternatingGroup a (m+1)).subtype.comp (coverMap M (alternatingGenerator a r m hm))) + change q w (i j,translate a (u j) x.val) = _ + change q ((l.map g).prod) _ = _ + rw [map_list_prod,List.map_map] + apply perm_list_prod_transport l (List.nodup_finRange 5) (fun k => q (g k)) j (by simp [l]) + · have he := B.distinctSlotStar_apply hlarge h hr (P.row j) (fun _ => u j) + (F j) V privateCycleStar 0 x + rw [privateCycleStar_projection,privateCycle_apply_zero,P.source j] at he + exact he + · intro k hk hkj + constructor + · exact B.frameStar_supported hlarge h hr _ (fun _ => u k) (F k) V + (universalMap (orderedTrackHom (P.row k)) privateCycleStar) _ + (P.source_other_frame_notmem V u hinj k j hkj x) + · apply B.frameStar_supported hlarge h hr _ (fun _ => u k) (F k) V + (universalMap (orderedTrackHom (P.row k)) privateCycleStar) + rintro ⟨t,ht,y,hy,he⟩ + have hte : P.target j=t := congrArg Prod.fst he + exact P.target_other_notmem k j hkj (hte.symm ▸ ht) + +theorem repeated_bank_routing (i : Fin 5 → Fin (m+1)) (u : Fin 5 → CutRing × CutRing) + (P : PrivateRoutingBank i) (b : Fin (m+1)) (hb : b ∉ P.alphabet) + (V : polygonAlgebra a) + (hinj : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) : + ∃ w : BoundedRelationCover M (alternatingGenerator a r m hm), + w ∈ ⨆ W : polygonAlgebra a, (B.polygonStar hlarge h hr W).range ∧ + w ∈ sourceAlignedGroup a r m hm M B.t P.alphabet ∧ + ∀ (j : Fin 5) (x : V.val), + (coverMap M (alternatingGenerator a r m hm) w).val.val (i j,translate a (u j) x.val) = + (P.target j,translate a (u j) x.val) := + ⟨B.privateRoutingWord hlarge h hr i u P b hb V, + B.privateRoutingWord_properties hlarge h hr i u P b hb V hinj⟩ + +end InitialCoverSystem + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ReserveAtom.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ReserveAtom.lean new file mode 100644 index 0000000000000000000000000000000000000000..a20396bd00070708eec3f97e31256acadf033fe1 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/ReserveAtom.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AtomConjugation + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ReserveAtomSupport + +variable {I : Type*} [Fintype I] [DecidableEq I] + +noncomputable def subtypeAlternatingHom (S : Finset I) : + alternatingGroup S →* alternatingGroup I := + { toFun := fun g => ⟨Equiv.Perm.ofSubtype g.val, by + rw [Equiv.Perm.mem_alternatingGroup, Equiv.Perm.sign_ofSubtype] + exact g.property⟩ + map_one' := Subtype.ext (map_one Equiv.Perm.ofSubtype) + map_mul' := fun x y => Subtype.ext (map_mul Equiv.Perm.ofSubtype x.val y.val) } + +theorem swapLabel_subtype (S : Finset I) (a : SwapLabel I) (ha : a.val.support ⊆ S) : + ∃ b : SwapLabel S, Equiv.Perm.ofSubtype b.val = a.val := by + obtain ⟨i,j,hij,heq⟩ := a.property + have hi : i ∈ S := ha (by rw [heq, Equiv.Perm.support_swap hij]; simp) + have hj : j ∈ S := ha (by rw [heq, Equiv.Perm.support_swap hij]; simp) + let b : SwapLabel S := ⟨Equiv.swap ⟨i,hi⟩ ⟨j,hj⟩, + ⟨i,hi⟩,⟨j,hj⟩,fun h => hij (congrArg Subtype.val h), rfl⟩ + exact ⟨b,by simp only [b, Equiv.Perm.ofSubtype_swap_eq,heq]⟩ + +theorem supported_reserveAtoms_generate (S : Finset I) (a : SwapLabel I) + (ha : a.val.support ⊆ S) (g : alternatingGroup I) (hg : g.val.support ⊆ S) : + g ∈ Subgroup.closure {h : alternatingGroup I | ∃ t : SwapLabel I, + t.val.support ⊆ S ∧ h = reserveAtom a t} := by + classical + let K := Subgroup.closure {h : alternatingGroup I | ∃ t : SwapLabel I, + t.val.support ⊆ S ∧ h = reserveAtom a t} + obtain ⟨aS,haS⟩ := swapLabel_subtype S a ha + obtain ⟨gS,hgS⟩ := Equiv.Perm.mem_range_ofSubtype_iff.mpr hg + have hgS' : gS ∈ alternatingGroup S := by + rw [Equiv.Perm.mem_alternatingGroup, ← Equiv.Perm.sign_ofSubtype, hgS] + exact g.property + have hle : Subgroup.closure (Set.range (reserveAtom aS)) ≤ + K.comap (subtypeAlternatingHom S) := by + apply (Subgroup.closure_le _).mpr + rintro _ ⟨t,rfl⟩ + let t' : SwapLabel I := ⟨Equiv.Perm.ofSubtype t.val,t.property.of_subtype_isSwap⟩ + apply Subgroup.subset_closure + refine ⟨t',?_,?_⟩ + · exact Equiv.Perm.mem_range_ofSubtype_iff.mp ⟨t.val,rfl⟩ + · apply Subtype.ext + change Equiv.Perm.ofSubtype (aS.val * t.val) = a.val * Equiv.Perm.ofSubtype t.val + rw [map_mul,haS] + have hm := hle (reserveAtoms_generate aS ▸ + Subgroup.mem_top (⟨gS,hgS'⟩ : alternatingGroup S)) + change subtypeAlternatingHom S ⟨gS,hgS'⟩ ∈ K at hm + have heq : subtypeAlternatingHom S ⟨gS,hgS'⟩ = g := Subtype.ext hgS + rwa [heq] at hm + +end ReserveAtomSupport + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SlotInputGeneration.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SlotInputGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6ee1f49ca904b35927fbc37cce0a6a3c96bfc8e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SlotInputGeneration.lean @@ -0,0 +1,143 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.LatticeTranslationTransport +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GenerationUpstairs + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SlotInputGeneration + +noncomputable def orderedTrackEquiv {m : ℕ} (ι : Fin 5 ↪ Fin m) : + Fin 5 ≃ orderedTrackAlphabet ι := + Equiv.ofBijective (fun j => ⟨ι j,orderedTrackAlphabet_mem ι j⟩) + ⟨fun j k he => ι.injective (congrArg Subtype.val he),by + intro x + obtain ⟨j,_,hj⟩ := Finset.mem_map.mp x.property + exact ⟨j,Subtype.ext hj⟩⟩ + +theorem orderedTrackHom_bijective {m : ℕ} (ι : Fin 5 ↪ Fin m) : + Function.Bijective (orderedTrackHom ι) := by + have hi : Function.Injective (orderedTrackHom ι) := by + intro s t he + apply Subtype.ext + apply Equiv.Perm.viaEmbeddingHom_injective ι + have hh := congrArg (subtypeAlternatingHom (orderedTrackAlphabet ι)) he + rw [← MonoidHom.comp_apply,← MonoidHom.comp_apply,orderedTrackHom_comp] at hh + exact congrArg Subtype.val hh + let e := (orderedTrackEquiv ι).altCongrHom + have hs := Finite.surjective_of_injective (e.symm.injective.comp hi) + refine ⟨hi,fun y => ?_⟩ + obtain ⟨x,hx⟩ := hs (e.symm y) + exact ⟨x,e.symm.injective hx⟩ + +theorem smallPermutation_fiveRepresentation {m : ℕ} (hm : 5 ≤ m) + (s : alternatingGroup (Fin m)) (hs : s.val.support.card≤5) : + ∃ (ι : Fin 5 ↪ Fin m) (t : alternatingGroup (Fin 5)), fiveAlternatingHom ι t=s := by + classical + obtain ⟨I,hSI,_,hI⟩ := Finset.exists_subsuperset_card_eq + (Finset.subset_univ s.val.support) hs (by simpa using hm : 5≤(Finset.univ : Finset (Fin m)).card) + let e : Fin 5 ≃ I := (Fintype.equivFinOfCardEq (by simpa using hI : Fintype.card I=5)).symm + let ι : Fin 5 ↪ Fin m := e.toEmbedding.trans (Function.Embedding.subtype _) + have hsub : s.val.support ⊆ orderedTrackAlphabet ι := by + intro x hx + exact Finset.mem_map.mpr ⟨e.symm ⟨x,hSI hx⟩,Finset.mem_univ _, + congrArg Subtype.val (e.apply_symm_apply _)⟩ + obtain ⟨v,hv⟩ := (subtypeAlternatingHom_mem_range (orderedTrackAlphabet ι) s).mpr hsub + obtain ⟨t,ht⟩ := (orderedTrackHom_bijective ι).2 v + refine ⟨ι,t,?_⟩ + rw [← DFunLike.congr_fun (orderedTrackHom_comp ι) t,MonoidHom.comp_apply,ht,hv] + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (j,0) + have hp : primitiveTests (a := a) (r := r) P ()=initialTest a r j := by + simp only [primitiveTests,primitiveFamilyTests,P,spatialTranslate_zero] + rw [← hp,B.polygonStar_eq hlarge h hr P _ (resolved_test _ ())] + rw [B.fullGeometricSector_small_input hlarge P (fun J _ b hb => h Unit P J b hb) P () () rfl I] + change (B.primitiveCopy I.val _ _ (j,0)).comp _ = _ + rw [B.primitiveCopy_zero] + +variable (R : alternatingGroup (Fin (m+1)) → + Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (hR : ∀ s k, B.c s * B.t k * (B.c s)⁻¹ = B.t (R s k)) + (hwide : 100 ≤ m+1) + +noncomputable def slotGroup : Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm)) := + Subgroup.closure {z | ∃ (V : polygonAlgebra a) (i : Fin 5 → Fin (m+1)) + (u : Fin 5 → CutRing × CutRing) + (hi : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) + (s : UniversalExtension (alternatingGroup (Fin 5))), z=B.slotStar hlarge h hr hwide V i u hi s} + +theorem slotGroup_mem (V : polygonAlgebra a) (i : Fin 5 → Fin (m+1)) + (u : Fin 5 → CutRing × CutRing) + (hi : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) + (s : UniversalExtension (alternatingGroup (Fin 5))) : + B.slotStar hlarge h hr hwide V i u hi s ∈ B.slotGroup hlarge h hr hwide := + Subgroup.subset_closure ⟨V,i,u,hi,s,rfl⟩ + +include R hR + +theorem translated_initial_mem_slotGroup (b : SmallConditional m) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) : + B.t k*PresentedGroup.of (Sum.inl b)*(B.t k)⁻¹ ∈ B.slotGroup hlarge h hr hwide := by + obtain ⟨ι,s,hs⟩ := smallPermutation_fiveRepresentation (by omega : 5 ≤ m+1) + (⟨b.2.val,b.2.property.1⟩ : alternatingGroup (Fin (m+1))) b.2.property.2 + obtain ⟨t,ht⟩ := universalProjection_surjective (alternatingGroup (Fin 5)) s + let I : FiveAlphabet (Fin (m+1)) := ⟨orderedTrackAlphabet ι,Finset.subset_univ _,by + simp [orderedTrackAlphabet]⟩ + let d := sourceLatticeOffsets m (Multiplicative.toAdd k) + let F : OffsetFrame a r m hm (orderedTrackAlphabet ι) d := { + k := k + d := d + projection := sourceLatticeFullMap_offsets a r m hm (Multiplicative.toAdd k) + prescribed := fun _ _ => rfl } + have he : B.distinctSlotStar hlarge h hr ι d F (initialTest a r b.1) t = + B.t k*PresentedGroup.of (Sum.inl b)*(B.t k)⁻¹ := by + change B.t k * B.polygonStar hlarge h hr (initialTest a r b.1) + (universalMap (subtypeAlternatingHom I.val) (universalMap (orderedTrackHom ι) t)) * (B.t k)⁻¹ = _ + rw [show B.polygonStar hlarge h hr (initialTest a r b.1) + (universalMap (subtypeAlternatingHom I.val) (universalMap (orderedTrackHom ι) t)) = + B.initialAlphabet I.val b.1 (universalProjection _ (universalMap (orderedTrackHom ι) t)) from + DFunLike.congr_fun (B.polygonStar_initial_alphabet hlarge h hr b.1 I) _] + rw [show universalProjection _ (universalMap (orderedTrackHom ι) t)=orderedTrackHom ι s from + (DFunLike.congr_fun (universalMap_spec (orderedTrackHom ι)) t).trans (by rw [MonoidHom.comp_apply,ht])] + change B.t k*B.initialConditional b.1 (subtypeAlternatingHom (orderedTrackAlphabet ι) (orderedTrackHom ι s))*(B.t k)⁻¹=_ + have hh := DFunLike.congr_fun (orderedTrackHom_comp ι) s + change subtypeAlternatingHom (orderedTrackAlphabet ι) (orderedTrackHom ι s) = fiveAlternatingHom ι s at hh + rw [hh,hs,B.initialConditional_input _ _ b.2.property.2] + rfl + rw [← he,← DFunLike.congr_fun (B.slotStar_distinct hlarge h hr R hR hwide + (initialTest a r b.1) ι d F (slots_injective_of_tracks _ _ ι.injective)) t] + exact B.slotGroup_mem hlarge h hr hwide _ _ _ _ t + +theorem slotGroup_eq_top : B.slotGroup hlarge h hr hwide=⊤ := by + apply top_unique + rw [← B.sourceAlignedGroup_univ_eq_top] + change alignedGroup B.t (fun b : SmallConditional m => PresentedGroup.of (Sum.inl b)) + (fun b => b.2.val.support ⊆ Finset.univ) ≤ _ + apply (Subgroup.closure_le _).mpr + rintro z ⟨b,_,k,rfl⟩ + exact B.translated_initial_mem_slotGroup hlarge h hr R hR hwide b k + +end InitialCoverSystem +end SlotInputGeneration + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StabilizationComposition.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StabilizationComposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0d549f074b1cfeaa79b3a26163e8c5a0c677d7b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StabilizationComposition.lean @@ -0,0 +1,98 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PolygonCommutingRepresentatives +import OAI.GroupTheory.SimpleAmenable.Homology.FullGroupStability + +namespace OAI + +section + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable + +namespace PolygonTracks +variable {a m n : ℕ} + +noncomputable def castFull (a : ℕ) {m n : ℕ} (h : m=n) : + polygonFullGroup a m ≃* polygonFullGroup a n := h ▸ MulEquiv.refl _ + +@[simp] lemma castFull_apply (h : m=n) (f : polygonFullGroup a m) (x : TrackPoint a m) : + (castFull a h f).val (Fin.cast h x.1,x.2)= + (Fin.cast h (f.val x).1,(f.val x).2) := by subst n; rfl + +lemma stabilize_add (a k l n : ℕ) : stabilize a (k+l) n = + (castFull a (Nat.add_assoc k l n).symm).toMonoidHom.comp + ((stabilize a k (l+n)).comp (stabilize a l n)) := by + let h : k+(l+n)=(k+l)+n := (Nat.add_assoc k l n).symm + apply MonoidHom.ext + intro f + apply Subtype.ext + apply Equiv.ext + intro x + obtain ⟨i,hi⟩ := (finCongr h).surjective x.1 + change (stabilize a (k+l) n f).val x = + (castFull a h (stabilize a k (l+n) (stabilize a l n f))).val x + have hx : x=(Fin.cast h i,x.2) := Prod.ext hi.symm rfl + rw [hx, castFull_apply (x:=(i,x.2))] + induction i using Fin.addCases with + | left i => + have he : Fin.cast h (i.castAdd (l+n))=(i.castAdd l).castAdd n := Fin.ext rfl + rw [he, stabilize_left (x:=((i.castAdd l),x.2)), stabilize_left (x:=(i,x.2))] + exact Prod.ext he.symm rfl + | right i => + rw [stabilize_right (x:=(i,x.2))] + induction i using Fin.addCases with + | left i => + have he : Fin.cast h ((i.castAdd n).natAdd k)=(i.natAdd k).castAdd n := Fin.ext rfl + rw [he, stabilize_left (x:=(i.natAdd k,x.2)), stabilize_left (x:=(i,x.2))] + exact Prod.ext he.symm rfl + | right i => + have he : Fin.cast h ((i.natAdd l).natAdd k)=i.natAdd (k+l) := by + apply Fin.ext + simp only [Fin.val_cast,Fin.val_natAdd] + omega + rw [he, stabilize_right (x:=(i,x.2)), stabilize_right (x:=(i,x.2))] + apply Prod.ext + · apply Fin.ext + simp only [Fin.val_cast,Fin.val_natAdd] + omega + · rfl + +lemma stabilize_zero_bijective (a n : ℕ) : Function.Bijective (stabilize a 0 n) := by + refine ⟨stabilize_injective,?_⟩ + intro f + let g : bankFixer a 0 n := ⟨f,fun x => Fin.elim0 x.1⟩ + exact ⟨restrict g,stabilize_restrict g⟩ + +lemma stabilize_H1_isIso (a k n : ℕ) (hn : 32 ≤ n) : + IsIso (TrivialHomology.map (stabilize a k n) 1) := by + induction k with + | zero => + exact TrivialHomology.isIso_equiv + (MulEquiv.ofBijective (stabilize a 0 n) (stabilize_zero_bijective a n)) 1 + | succ k ih => + have he : IsIso (TrivialHomology.map (stabilize a (1+k) n) 1) := by + rw [stabilize_add, TrivialHomology.map_comp, TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (castFull a (Nat.add_assoc 1 k n).symm) 1 + have := PolygonPlacement.Configuration.stabilize_H1_isIso a (k+n) (by omega) + have := ih + infer_instance + rw [show k+1=1+k by omega] + exact he + +lemma stabilize_alternating_comap (a k n : ℕ) (hn : 32 ≤ n) : + (polygonAlternatingGroup a (k+n)).comap (stabilize a k n)=polygonAlternatingGroup a n := by + have := stabilize_H1_isIso a k n hn + rw [← polygonFullGroup_commutator_eq a n (by omega), + ← polygonFullGroup_commutator_eq a (k+n) (by omega)] + exact TrivialHomology.commutator_comap_of_mono (stabilize a k n) + +end PolygonTracks +end SimpleAmenable + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageBinary.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageBinary.lean new file mode 100644 index 0000000000000000000000000000000000000000..f28b88753a19b03f35283664ad30c5a37835be0d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageBinary.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonFixedReturn +import OAI.GroupTheory.SimpleAmenable.Homology.ReducedNatural +import OAI.GroupTheory.SimpleAmenable.Homology.BinaryPullback + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace GroupNerveCoordinates +variable (G:Type) [Monoid G] +instance zero_subsingleton : Subsingleton ((nerve (SingleObj G)).obj (op ⦋0⦌)) := + ⟨fun _ _=>nerveEquiv.injective (Subsingleton.elim _ _)⟩ +instance connected : (nerve (SingleObj G)).IsConnected where + nonempty:=⟨nerveEquiv.symm (SingleObj.star G)⟩ + allEq x y:=by + obtain ⟨x,rfl⟩:=SSet.π₀.mk_surjective x + obtain ⟨y,rfl⟩:=SSet.π₀.mk_surjective y + congr 1 + exact Subsingleton.elim _ _ +end GroupNerveCoordinates +namespace SimpleAmenable.PolygonTracks +open FreeChains ComponentTranslation ComponentStable + +attribute [local instance 1200] Rep.hV2 Submodule.module +noncomputable def stageTranslate (a m:ℕ) (hm:32 ≤ m) : + Fiber (componentGenerator a^32) ⥤ Fiber (componentGenerator a^m) := + ComponentTranslation.translate (componentGenerator a^(m-32)) _ _ + (by rw [←pow_add,Nat.sub_add_cancel hm]) +lemma stageTranslate_H1_iso (a m:ℕ) (hm:32 ≤ m) : + IsIso (SSet.homologyMap (nerveMap (stageTranslate a m hm)) Z 1) := by + let F:=CofinalPowers.sequence (componentGenerator a) ⋙ homologyDiagram (C:=PolygonObject a) 1 + have h: F.IsEventuallyConstantFrom 32 := Functor.isEventuallyConstantFrom_of_succ F 32 (by + intro n hn + change IsIso ((homologyDiagram (C:=PolygonObject a) 1).map + ((CofinalPowers.sequence (componentGenerator a)).map (homOfLE (Nat.le_succ n)))) + rw [component_sequence_succ] + have successorIso := successor_H1_isIso a n hn + exact component_successor_isIso a n 1) + exact h (homOfLE hm) +noncomputable def fixedToStage (a m:ℕ) (hm:32 ≤ m) : + SingleObj (polygonFullGroup a 32) ⥤ SingleObj (polygonFullGroup a m) := + standardFiberInclusion a 32 ⋙ stageTranslate a m hm ⋙ (standardFiberInclusion a m).asEquivalence.inverse +lemma fixedToStage_H1_iso (a m:ℕ) (hm:32 ≤ m) : + IsIso (SSet.homologyMap (nerveMap (fixedToStage a m hm)) Z 1) := by + have sourceInclusionIso := NerveHomotopy.homologyMap_isIso (standardFiberInclusion a 32) Z 1 + have targetInverseIso := NerveHomotopy.homologyMap_isIso (standardFiberInclusion a m).asEquivalence.inverse Z 1 + have translationIso := stageTranslate_H1_iso a m hm + change IsIso (SSet.homologyMap + (nerveMap (standardFiberInclusion a 32) ≫ nerveMap (stageTranslate a m hm) ≫ + nerveMap (standardFiberInclusion a m).asEquivalence.inverse) Z 1) + simp only [SSet.homologyMap_comp] + infer_instance +noncomputable def fixedToStageGlobal (a m:ℕ) (hm:32 ≤ m) : + fixedToStage a m hm ⋙ standardNerveInclusion a m ≅ + standardNerveInclusion a 32 ⋙ tensorLeft (repr (componentGenerator a^(m-32))) := by + let e := (standardFiberInclusion a m).asEquivalence + let α := Functor.isoWhiskerLeft (standardFiberInclusion a 32 ⋙ stageTranslate a m hm) e.counitIso + exact Functor.isoWhiskerRight α (property (componentGenerator a^m)).ι +lemma stage_pullD (a n m:ℕ) (hn:32 ≤ n) (hm:32 ≤ m) : + SSet.homologyMap (nerveMap (fixedToStage a n hn)⊗ₘnerveMap (fixedToStage a m hm)) Z 2 ≫ + pullD (nerveMap (standardNerveInclusion a n)) (nerveMap (standardNerveInclusion a m)) 2 = + pullD (nerveMap (standardNerveInclusion a 32)) (nerveMap (standardNerveInclusion a 32)) 2 := by + rw [pullD_comp] + change pullD (nerveMap (fixedToStage a n hn ⋙ standardNerveInclusion a n)) + (nerveMap (fixedToStage a m hm ⋙ standardNerveInclusion a m)) 2 = _ + rw [pullD_congr (fixedToStageGlobal a n hn) (fixedToStageGlobal a m hm)] + change pullD (nerveMap (standardNerveInclusion a 32) ≫ nerveMap (tensorLeft _)) + (nerveMap (standardNerveInclusion a 32) ≫ nerveMap (tensorLeft _)) 2 = _ + rw [pullD_left,pullD_right] +noncomputable def mixedImage (a:ℕ) : Submodule ℤ (object (C:=PolygonObject a) 2) := + LinearMap.range ((pullD (nerveMap (standardNerveInclusion a 32)) + (nerveMap (standardNerveInclusion a 32)) 2).hom.comp + (LinearMap.ker (ConnectedProduct.projection (nerve (SingleObj (polygonFullGroup a 32))) + (nerve (SingleObj (polygonFullGroup a 32))) 2).hom).subtype) +lemma stage_value_mem (a n m:ℕ) (hn:32 ≤ n) (hm:32 ≤ m) + (z:((nerve (SingleObj (polygonFullGroup a n))⊗nerve (SingleObj (polygonFullGroup a m))).homology Z 2:A)) : + pullD (nerveMap (standardNerveInclusion a n)) (nerveMap (standardNerveInclusion a m)) 2 z ∈ mixedImage a := by + obtain ⟨w,hw,he⟩:=pullD_kernel_value (nerveMap (standardNerveInclusion a n)) + (nerveMap (standardNerveInclusion a m)) (nerveEquiv.symm (SingleObj.star _)) + (nerveEquiv.symm (SingleObj.star _)) 2 (by decide) z + have leftStageIso := fixedToStage_H1_iso a n hn + have rightStageIso := fixedToStage_H1_iso a m hm + obtain ⟨v,hv,hve⟩:=ConnectedProduct.kernel_map_surjective + (nerveMap (fixedToStage a n hn)) (nerveMap (fixedToStage a m hm)) w hw + refine ⟨⟨v,hv⟩,?_⟩ + have h:=congrArg (fun f=>f v) (stage_pullD a n m hn hm) + change pullD (nerveMap (standardNerveInclusion a n)) (nerveMap (standardNerveInclusion a m)) 2 + (SSet.homologyMap (nerveMap (fixedToStage a n hn)⊗ₘnerveMap (fixedToStage a m hm)) Z 2 v)=_ at h + rw [hve] at h + exact h.symm.trans he +end SimpleAmenable.PolygonTracks + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageDiagramCoverage.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageDiagramCoverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3863f4393682d741f9440cc8b83bdf81ac077a5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageDiagramCoverage.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.StageOrder + +namespace OAI + +section + +section +open CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open IntervalBar IntervalBar.Diagram + +variable {a n : ℕ} {I : Type} [Preorder I] [Fintype I] +private abbrev Interval := {t : I×I // t.1≤t.2} +private abbrev Triple := {t : I×I×I // t.1≤t.2.1 ∧ t.2.1≤t.2.2} + +lemma exists_lift_diagram (A : Diagram (Labelled a n) I) : + ∃S : Stage a n, ∃B : Diagram S.Obj I,(Diagram.map S.forget).obj B=A := by + let κ := Interval (I:=I) ⊕ (Unit ⊕ Triple (I:=I)) + let τ := I ⊕ Triple (I:=I) + let U : κ → Labelled a n := Sum.elim + (fun q => A.obj q.val.1 q.val.2 q.property) + (Sum.elim (fun _ => 𝟙_ (Labelled a n)) + (fun q => A.obj q.val.1 q.val.2.1 q.property.1 ⊗ A.obj q.val.2.1 q.val.2.2 q.property.2)) + let src : τ → κ := Sum.elim (fun i => .inl ⟨(i,i),le_rfl⟩) (fun t => .inr (.inr t)) + let dst : τ → κ := Sum.elim (fun _ => .inr (.inl ())) + (fun t => .inl ⟨(t.val.1,t.val.2.2),t.property.1.trans t.property.2⟩) + let f : ∀t,U (src t) ⟶ U (dst t) := Sum.rec (fun i => (A.unit i).hom) + (fun q => (A.cut q.val.1 q.val.2.1 q.val.2.2 q.property.1 q.property.2).hom) + obtain ⟨S,hP,hL,hf⟩ := exists_lift_family U src dst f + let hP' := fun i j h => hP (.inl ⟨(i,j),h⟩) + let hL' := fun i j h => hL (.inl ⟨(i,j),h⟩) + let hU := fun i => hf (.inl i) + let hC := fun i j k hij hjk => hf (.inr ⟨(i,j,k),hij,hjk⟩) + exact ⟨S,liftDiagram S A hP' hL' hU hC,liftDiagram_map S A hP' hL' hU hC⟩ + +noncomputable def liftDiagramHom (S : Stage a n) {A B : Diagram (Labelled a n) I} + (hPA : ∀i j h,Labelled.ObjectUniform S.partition (A.obj i j h)) + (hLA : ∀i j h t,∃l,S.L l=(A.obj i j h).label t) + (hUA : ∀i,Labelled.ArrowUniform S.partition (A.unit i).hom) + (hCA : ∀i j k hij hjk,Labelled.ArrowUniform S.partition (A.cut i j k hij hjk).hom) + (hPB : ∀i j h,Labelled.ObjectUniform S.partition (B.obj i j h)) + (hLB : ∀i j h t,∃l,S.L l=(B.obj i j h).label t) + (hUB : ∀i,Labelled.ArrowUniform S.partition (B.unit i).hom) + (hCB : ∀i j k hij hjk,Labelled.ArrowUniform S.partition (B.cut i j k hij hjk).hom) + (f : A ⟶ B) (hf : ∀i j h,Labelled.ArrowUniform S.partition (f.app i j h)) : + liftDiagram S A hPA hLA hUA hCA ⟶ liftDiagram S B hPB hLB hUB hCB where + app i j h := ⟨f.app i j h,hf i j h⟩ + unit i := UniformObject.Hom.ext _ _ (f.unit i) + cut i j k hij hjk := UniformObject.Hom.ext _ _ (f.cut i j k hij hjk) + +theorem exists_lift_diagram_family {K : Type} [Category.{0} K] [Fintype K] + [∀i j:K,Fintype (i ⟶ j)] (F : K ⥤ Diagram (Labelled a n) I) : + ∃S : Stage a n,∃G : K ⥤ Diagram S.Obj I,G ⋙ Diagram.map S.forget=F := by + let V := K × (Interval (I:=I) ⊕ (Unit ⊕ Triple (I:=I))) + let Arr := (K × (I ⊕ Triple (I:=I))) ⊕ ((Σk:K,Σl:K,k ⟶ l) × Interval (I:=I)) + let U : V → Labelled a n := fun v => Sum.elim + (fun q => (F.obj v.1).obj q.val.1 q.val.2 q.property) + (Sum.elim (fun _ => 𝟙_ (Labelled a n)) + (fun q => (F.obj v.1).obj q.val.1 q.val.2.1 q.property.1 ⊗ + (F.obj v.1).obj q.val.2.1 q.val.2.2 q.property.2)) v.2 + let src : Arr → V := Sum.elim + (fun v => (v.1,Sum.elim (fun i => .inl ⟨(i,i),le_rfl⟩) (fun t => .inr (.inr t)) v.2)) + (fun v => (v.1.1,.inl v.2)) + let dst : Arr → V := Sum.elim + (fun v => (v.1,Sum.elim (fun _ => .inr (.inl ())) + (fun t => .inl ⟨(t.val.1,t.val.2.2),t.property.1.trans t.property.2⟩) v.2)) + (fun v => (v.1.2.1,.inl v.2)) + let f : ∀t,U (src t) ⟶ U (dst t) := by + intro t + rcases t with ⟨k,i|q⟩ | v + · exact ((F.obj k).unit i).hom + · exact ((F.obj k).cut q.val.1 q.val.2.1 q.val.2.2 q.property.1 q.property.2).hom + · exact (F.map v.1.2.2).app v.2.val.1 v.2.val.2 v.2.property + obtain ⟨S,hP,hL,hf⟩ := exists_lift_family U src dst f + let p := fun k i j h => hP (k,.inl ⟨(i,j),h⟩) + let l := fun k i j h => hL (k,.inl ⟨(i,j),h⟩) + let u := fun k i => hf (.inl (k,.inl i)) + let c := fun k i j z hij hjz => hf (.inl (k,.inr ⟨(i,j,z),hij,hjz⟩)) + let G : K ⥤ Diagram S.Obj I := { + obj k := liftDiagram S (F.obj k) (p k) (l k) (u k) (c k) + map {k z} g := liftDiagramHom S (p k) (l k) (u k) (c k) (p z) (l z) (u z) (c z) + (F.map g) (fun i j h => hf (.inr (⟨k,z,g⟩,⟨(i,j),h⟩))) + map_id k := by + apply Hom.ext; intro i j h + apply UniformObject.Hom.ext + change (F.map (𝟙 k)).app i j h=𝟙 _ + rw [F.map_id]; rfl + map_comp g h := by + apply Hom.ext; intro i j hij + apply UniformObject.Hom.ext + change (F.map (g≫h)).app i j hij=(F.map g).app i j hij≫(F.map h).app i j hij + rw [F.map_comp]; rfl } + refine ⟨S,G,?_⟩ + refine CategoryTheory.Functor.ext (fun k => liftDiagram_map S (F.obj k) (p k) (l k) (u k) (c k)) ?_ + intro k z g + apply Hom.ext; intro i j h + simp only [Functor.comp_map, comp_app, Diagram.eqToHom_app] + change (F.map g).app i j h = 𝟙 _ ≫ (F.map g).app i j h ≫ 𝟙 _ + simp +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageEvaluationEquiv.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageEvaluationEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..a38354608351475b50d8454704b1acadb928b550 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageEvaluationEquiv.lean @@ -0,0 +1,64 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.StageRealization +import OAI.GroupTheory.SimpleAmenable.Configurations.StageFiberSum + +namespace OAI + +section + +section +open CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage + +variable {a n s : ℕ} (P : BooleanPartition a) (L : Fin s → Fin n → CutRing × CutRing) + (hL : ∀ j i, orbitRepresentative (L j i)=L j i) (hLi : Function.Injective L) +open UniformObject +lemma fiberMap_realize {U V : Obj P (s:=s)} (f : U ⟶ V) (b : Fin P.size × Fin s) + (x : Fin (U b).size) : + fiberMap ((realize P L hL).map f) b (fiberPoint P L hL U b x)=fiberPoint P L hL V b (f b x) := by + apply Subtype.ext + apply Subtype.ext + apply Prod.ext + · change indexMap P L hL f (index P U ⟨b,x⟩)=index P V ⟨b,f b x⟩ + change (index P V) ((trackMap P f) ((index P U).symm ((index P U) ⟨b,x⟩)))=_ + rw [Equiv.symm_apply_apply] + rfl + · rfl +noncomputable def evaluationRealize : 𝟭 (Obj P (s:=s)) ≅ realize P L hL ⋙ evaluation := by + refine NatIso.ofComponents (fun U => asIso (show U ⟶ E.obj ((realize P L hL).obj U) from + fun b => (fiberEquiv P L hL hLi U b).trans (enumerate ((realize P L hL).obj U) b))) ?_ + intro U V f + funext b + apply Equiv.ext + intro x + change enumerate ((realize P L hL).obj V) b (fiberPoint P L hL V b (f b x))= + E.map ((realize P L hL).map f) b (enumerate ((realize P L hL).obj U) b (fiberPoint P L hL U b x)) + exact ((E_map_enum ((realize P L hL).map f) b (fiberPoint P L hL U b x)).trans + (congrArg (enumerate ((realize P L hL).obj V) b) (fiberMap_realize P L hL f b x))).symm + +include hL hLi + +theorem evaluationEssSurj : (evaluation (P:=P) (L:=L)).EssSurj := { + mem_essImage U := ⟨(realize P L hL).obj U,⟨(evaluationRealize P L hL hLi).app U |>.symm⟩⟩ } + +theorem evaluationFull : (evaluation (P:=P) (L:=L)).Full := by + let R := realize P L hL + have : R.EssSurj := realize_essSurj P L hL hLi + have : (R ⋙ evaluation (P:=P) (L:=L)).IsEquivalence := + Functor.isEquivalence_of_iso (evaluationRealize P L hL hLi) + apply Functor.full_of_comp_essSurj (evaluation (P:=P) (L:=L)) R + intro X Y φ + refine ⟨R.map ((R ⋙ evaluation).preimage φ), ?_⟩ + exact (R ⋙ evaluation).map_preimage φ + +theorem evaluationIsEquivalence : (evaluation (P:=P) (L:=L)).IsEquivalence := { + faithful := inferInstance + full := evaluationFull P L hL hLi + essSurj := evaluationEssSurj P L hL hLi } +end SimpleAmenable.PolygonObject.LabelledStage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageFiberSum.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageFiberSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5d60d73f851471bd90204fedf0cafcdc6a698cc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageFiberSum.lean @@ -0,0 +1,157 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.UniformMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.FiniteSetMonoidal + +namespace OAI + +section + +section +open CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage.UniformObject + +variable {a n s : ℕ} {P : BooleanPartition a} {L : Fin s → Fin n → CutRing × CutRing} +variable (U V : UniformObject P L) (b : Fin P.size × Fin s) +noncomputable def fiberSumFun : Fiber U b ⊕ Fiber V b → Fiber (sum U V) b + | .inl x => ⟨sumPointEquiv U.obj.polygon V.obj.polygon (.inl x.val),by + simpa only [sumPointEquiv_inl] using x.property.1,by + simpa only [sum,Labelled.sum,sumPointEquiv_inl,Fin.addCases_left] using x.property.2⟩ + | .inr y => ⟨sumPointEquiv U.obj.polygon V.obj.polygon (.inr y.val),by + simpa only [sumPointEquiv_inr] using y.property.1,by + simpa only [sum,Labelled.sum,sumPointEquiv_inr,Fin.addCases_right] using y.property.2⟩ +noncomputable def fiberSum : Fiber U b ⊕ Fiber V b ≃ Fiber (sum U V) b := + Equiv.ofBijective (fiberSumFun U V b) ⟨by + intro x y h + have h' := congrArg Subtype.val h + cases x <;> cases y + · exact congrArg Sum.inl (Subtype.ext (Sum.inl.inj ((sumPointEquiv _ _).injective h'))) + · cases ((sumPointEquiv _ _).injective h') + · cases ((sumPointEquiv _ _).injective h') + · exact congrArg Sum.inr (Subtype.ext (Sum.inr.inj ((sumPointEquiv _ _).injective h'))),by + intro z + obtain ⟨x,hx⟩ := (sumPointEquiv U.obj.polygon V.obj.polygon).surjective z.val + cases x with + | inl x => + have hp : x.val.2=P.point b.1 ∧ U.obj.label x.val.1=L b.2 := by + simpa only [←hx,sumPointEquiv_inl,sum,Labelled.sum,Fin.addCases_left] using z.property + exact ⟨.inl ⟨x,hp⟩,Subtype.ext hx⟩ + | inr x => + have hp : x.val.2=P.point b.1 ∧ V.obj.label x.val.1=L b.2 := by + simpa only [←hx,sumPointEquiv_inr,sum,Labelled.sum,Fin.addCases_right] using z.property + exact ⟨.inr ⟨x,hp⟩,Subtype.ext hx⟩⟩ +@[simp] lemma fiberSum_inl (x : Fiber U b) : + (fiberSum U V b (.inl x)).val=sumPointEquiv U.obj.polygon V.obj.polygon (.inl x.val) := rfl +@[simp] lemma fiberSum_inr (x : Fiber V b) : + (fiberSum U V b (.inr x)).val=sumPointEquiv U.obj.polygon V.obj.polygon (.inr x.val) := rfl + +noncomputable abbrev E := evaluation (P:=P) (L:=L) +noncomputable def enumerate (U : UniformObject P L) (b : Fin P.size × Fin s) : Fiber U b ≃ Fin (E.obj U b).size := Fintype.equivFin (Fiber U b) +@[simp] lemma E_map_enum {U V : UniformObject P L} (f : U ⟶ V) (b : Fin P.size × Fin s) (x : Fiber U b) : + E.map f b (enumerate U b x)=enumerate V b (fiberMap f b x) := by + change enumerate V b (fiberMap f b ((enumerate U b).symm (enumerate U b x)))=_ + rw [Equiv.symm_apply_apply] +noncomputable def mu (U V : UniformObject P L) : E.obj U ⊗ E.obj V ⟶ E.obj (U⊗V) := fun b => + (FiniteSetGroupoid.sumEquiv _ _).symm.trans + ((Equiv.sumCongr (enumerate U b).symm (enumerate V b).symm).trans + ((fiberSum U V b).trans (enumerate (sum U V) b))) +@[simp] lemma mu_inl (x : Fiber U b) : + mu U V b (FiniteSetGroupoid.sumEquiv _ _ (.inl (enumerate U b x)))= + enumerate (sum U V) b (fiberSum U V b (.inl x)) := by + change (enumerate (sum U V) b) ((fiberSum U V b) ((Equiv.sumCongr (enumerate U b).symm (enumerate V b).symm) + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)).symm + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)) _)))) = _ + rw [Equiv.symm_apply_apply] + simp only [Equiv.sumCongr_apply,Sum.map_inl,Equiv.symm_apply_apply] +@[simp] lemma mu_inr (x : Fiber V b) : + mu U V b (FiniteSetGroupoid.sumEquiv _ _ (.inr (enumerate V b x)))= + enumerate (sum U V) b (fiberSum U V b (.inr x)) := by + change (enumerate (sum U V) b) ((fiberSum U V b) ((Equiv.sumCongr (enumerate U b).symm (enumerate V b).symm) + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)).symm + ((FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)) _)))) = _ + rw [Equiv.symm_apply_apply] + simp only [Equiv.sumCongr_apply,Sum.map_inr,Equiv.symm_apply_apply] +lemma fiberMap_sum_inl {U V W Z : UniformObject P L} (f : U ⟶ W) (g : V ⟶ Z) + (b : Fin P.size × Fin s) (x : Fiber U b) : + fiberMap (sumHom f g) b (fiberSum U V b (.inl x))= + fiberSum W Z b (.inl (fiberMap f b x)) := by + apply Subtype.ext + exact sumArrow_inl f.arrow.arrow g.arrow.arrow x.val +lemma fiberMap_sum_inr {U V W Z : UniformObject P L} (f : U ⟶ W) (g : V ⟶ Z) + (b : Fin P.size × Fin s) (x : Fiber V b) : + fiberMap (sumHom f g) b (fiberSum U V b (.inr x))= + fiberSum W Z b (.inr (fiberMap g b x)) := by + apply Subtype.ext + exact sumArrow_inr f.arrow.arrow g.arrow.arrow x.val +end SimpleAmenable.PolygonObject.LabelledStage.UniformObject + +end + +section +open CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage.UniformObject + +variable {a n s : ℕ} {P : BooleanPartition a} {L : Fin s → Fin n → CutRing × CutRing} +instance fiberEmpty (b : Fin P.size × Fin s) : IsEmpty (Fiber (empty (P:=P) (L:=L)) b) := + ⟨fun x => isEmptyElim x.val⟩ +noncomputable def eps : 𝟙_ (Obj P (s:=s)) ⟶ E.obj (𝟙_ (UniformObject P L)) := fun b => + (Equiv.equivOfIsEmpty (Fin 0) (Fiber empty b)).trans (enumerate empty b) +@[simp] lemma fiberMap_id (U : UniformObject P L) (b : Fin P.size × Fin s) (x : Fiber U b) : + fiberMap (𝟙 U) b x=x := rfl +lemma mu_natural {U V W Z : UniformObject P L} (f : U ⟶ W) (g : V ⟶ Z) : + (E.map f ⊗ₘ E.map g) ≫ mu W Z = mu U V ≫ E.map (f⊗ₘg) := by + funext b + apply Equiv.ext + intro x + obtain ⟨x,rfl⟩ := (FiniteSetGroupoid.sumEquiv (E.obj U b) (E.obj V b)).surjective x + cases x with + | inl x => + obtain ⟨x,rfl⟩ := (enumerate U b).surjective x + change mu W Z b (FiniteSetGroupoid.sumHom (E.map f b) (E.map g b) _) = E.map (sumHom f g) b _ + rw [FiniteSetGroupoid.sumHom_inl,E_map_enum,mu_inl,mu_inl,E_map_enum,fiberMap_sum_inl] + | inr x => + obtain ⟨x,rfl⟩ := (enumerate V b).surjective x + change mu W Z b (FiniteSetGroupoid.sumHom (E.map f b) (E.map g b) _) = E.map (sumHom f g) b _ + rw [FiniteSetGroupoid.sumHom_inr,E_map_enum,mu_inr,mu_inr,E_map_enum,fiberMap_sum_inr] + +variable (U V W : UniformObject P L) (b : Fin P.size × Fin s) +@[simp] lemma fiber_assoc_left (x : Fiber U b) : + fiberMap (assocHom U V W) b (fiberSum (sum U V) W b (.inl (fiberSum U V b (.inl x))))= + fiberSum U (sum V W) b (.inl x) := by + apply Subtype.ext + change sumAssocEquiv U.obj.polygon V.obj.polygon W.obj.polygon _ = _ + exact sumAssocEquiv_left _ _ _ x.val +@[simp] lemma fiber_assoc_mid (x : Fiber V b) : + fiberMap (assocHom U V W) b (fiberSum (sum U V) W b (.inl (fiberSum U V b (.inr x))))= + fiberSum U (sum V W) b (.inr (fiberSum V W b (.inl x))) := by + apply Subtype.ext + change sumAssocEquiv U.obj.polygon V.obj.polygon W.obj.polygon _ = _ + exact sumAssocEquiv_mid _ _ _ x.val +@[simp] lemma fiber_assoc_right (x : Fiber W b) : + fiberMap (assocHom U V W) b (fiberSum (sum U V) W b (.inr x))= + fiberSum U (sum V W) b (.inr (fiberSum V W b (.inr x))) := by + apply Subtype.ext + change sumAssocEquiv U.obj.polygon V.obj.polygon W.obj.polygon _ = _ + exact sumAssocEquiv_right _ _ _ x.val +@[simp] lemma fiber_left (x : Fiber U b) : + fiberMap (leftHom U) b (fiberSum empty U b (.inr x))=x := by + apply Subtype.ext + exact leftUnitEquiv_apply _ x.val +@[simp] lemma fiber_right (x : Fiber U b) : + fiberMap (rightHom U) b (fiberSum U empty b (.inl x))=x := by + apply Subtype.ext + exact rightUnitEquiv_apply _ x.val +@[simp] lemma fiber_swap_left (x : Fiber U b) : + fiberMap (swapHom U V) b (fiberSum U V b (.inl x))=fiberSum V U b (.inr x) := by + apply Subtype.ext + exact sumSwapEquiv_inl _ _ x.val +@[simp] lemma fiber_swap_right (x : Fiber V b) : + fiberMap (swapHom U V) b (fiberSum U V b (.inr x))=fiberSum V U b (.inl x) := by + apply Subtype.ext + exact sumSwapEquiv_inr _ _ x.val +end SimpleAmenable.PolygonObject.LabelledStage.UniformObject + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageIteratedMaps2.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageIteratedMaps2.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5b1930ddc37a1c2fc642104af3473eb134168a3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageIteratedMaps2.lean @@ -0,0 +1,137 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.IntervalPullback +import OAI.GroupTheory.SimpleAmenable.Simplicial.StageNerveColimit + +namespace OAI + +section + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open IntervalBar IntervalBar.Diagram + +variable {a n : ℕ} {I J K : Type} [Preorder I] [Preorder J] [Preorder K] +lemma map₂_inclusion_id (S : Stage a n) : + Diagram.map (I:=J) (Diagram.map (I:=I) (inclusion (le_refl S)))=𝟭 _ := by + have he (X : Diagram S.Obj I) : mapObj (inclusion (le_refl S)) X=X := + congrArg (fun F => F.obj X) (map_inclusion_id S) + refine CategoryTheory.Functor.ext (fun A => ?_) ?_ + · refine ext_heq ?_ ?_ ?_ + · funext i j h; exact he _ + · apply hfunext; intro i + apply iso_hext (he _) rfl + apply hom_hext (he _) rfl + intro j k h + apply heq_of_eq + change (inclusion (le_refl S)).map ((A.unit i).hom.app j k h) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) (inclusion (le_refl S)))).app j k h = + (A.unit i).hom.app j k h + rw [map_η_app,inclusion_η] + apply UniformObject.Hom.ext + exact Category.comp_id _ + · apply hfunext; intro i + apply hfunext; intro j + apply hfunext; intro k + apply hfunext; intro hij + apply hfunext; intro hjk + apply iso_hext (congrArg₂ (fun X Y => X ⊗ Y) (he _) (he _)) (he _) + apply hom_hext (congrArg₂ (fun X Y => X ⊗ Y) (he _) (he _)) (he _) + intro l m h + simp [mapObj]; rfl + · intro A B f + apply Hom.ext; intro i j h + apply Hom.ext; intro k l hkl + simp only [comp_app,Diagram.eqToHom_app] + change (f.app i j h).app k l hkl = 𝟙 _ ≫ (f.app i j h).app k l hkl ≫ 𝟙 _ + simp +lemma map₂_inclusion_comp_obj {S T U : Stage a n} (h : S≤T) (k : T≤U) + (A : Diagram (Diagram S.Obj I) J) : + mapObj (Diagram.map (I:=I) (inclusion (h.trans k))) A = + mapObj (Diagram.map (inclusion k)) (mapObj (Diagram.map (inclusion h)) A) := by + have he (X : Diagram S.Obj I) : mapObj (inclusion (h.trans k)) X= + mapObj (inclusion k) (mapObj (inclusion h) X) := + congrArg (fun F => F.obj X) (map_inclusion_comp h k) + refine ext_heq ?_ ?_ ?_ + · funext i j h; exact he _ + · apply hfunext; intro i + apply iso_hext (he _) rfl + apply hom_hext (he _) rfl + intro first last ordered + apply heq_of_eq + change (inclusion (h.trans k)).map ((A.unit i).hom.app first last ordered) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) (inclusion (h.trans k)))).app first last ordered = + (inclusion k).map ((inclusion h).map ((A.unit i).hom.app first last ordered) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) (inclusion h))).app first last ordered) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) (inclusion k))).app first last ordered + simp only [map_η_app,inclusion_η] + rfl + · apply hfunext; intro i + apply hfunext; intro j + apply hfunext; intro k + apply hfunext; intro hij + apply hfunext; intro hjk + apply iso_hext (congrArg₂ (fun X Y => X ⊗ Y) (he _) (he _)) (he _) + apply hom_hext (congrArg₂ (fun X Y => X ⊗ Y) (he _) (he _)) (he _) + intro l m h + simp [mapObj]; rfl +lemma map₂_inclusion_comp {S T U : Stage a n} (h : S≤T) (k : T≤U) : + Diagram.map (I:=J) (Diagram.map (I:=I) (inclusion (h.trans k)))= + Diagram.map (Diagram.map (inclusion h)) ⋙ Diagram.map (Diagram.map (inclusion k)) := by + refine CategoryTheory.Functor.hext (map₂_inclusion_comp_obj h k) ?_ + intro A B f + apply hom_hext (map₂_inclusion_comp_obj h k A) (map₂_inclusion_comp_obj h k B) + intro i j hij + apply hom_hext + (congrArg (fun F => F.obj (A.obj i j hij)) (map_inclusion_comp h k)) + (congrArg (fun F => F.obj (B.obj i j hij)) (map_inclusion_comp h k)) + intro l m hlm + rfl +lemma map₂_inclusion_forget_obj {S T : Stage a n} (h : S≤T) + (A : Diagram (Diagram S.Obj I) J) : + mapObj (Diagram.map T.forget) (mapObj (Diagram.map (I:=I) (inclusion h)) A)= + mapObj (Diagram.map S.forget) A := by + have he (X : Diagram S.Obj I) : mapObj T.forget (mapObj (inclusion h) X)=mapObj S.forget X := + congrArg (fun F => F.obj X) (map_inclusion_forget h) + refine ext_heq ?_ ?_ ?_ + · funext i j h; exact he _ + · apply hfunext; intro i + apply iso_hext (he _) rfl + apply hom_hext (he _) rfl + intro first last ordered + apply heq_of_eq + change T.forget.map ((inclusion h).map ((A.unit i).hom.app first last ordered) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) (inclusion h))).app first last ordered) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) T.forget)).app first last ordered = + S.forget.map ((A.unit i).hom.app first last ordered) ≫ + (Functor.OplaxMonoidal.η (Diagram.map (I:=I) S.forget)).app first last ordered + simp only [map_η_app,inclusion_η,forget_η] + rfl + · apply hfunext; intro i + apply hfunext; intro j + apply hfunext; intro k + apply hfunext; intro hij + apply hfunext; intro hjk + apply iso_hext (congrArg₂ (fun X Y => X ⊗ Y) (he _) (he _)) (he _) + apply hom_hext (congrArg₂ (fun X Y => X ⊗ Y) (he _) (he _)) (he _) + intro l m h + simp [mapObj]; rfl +lemma map₂_inclusion_forget {S T : Stage a n} (h : S≤T) : + Diagram.map (I:=J) (Diagram.map (I:=I) (inclusion h)) ⋙ + Diagram.map (Diagram.map T.forget)=Diagram.map (Diagram.map S.forget) := by + refine CategoryTheory.Functor.hext (map₂_inclusion_forget_obj h) ?_ + intro A B f + apply hom_hext (map₂_inclusion_forget_obj h A) (map₂_inclusion_forget_obj h B) + intro i j hij + apply hom_hext + (congrArg (fun F => F.obj (A.obj i j hij)) (map_inclusion_forget h)) + (congrArg (fun F => F.obj (B.obj i j hij)) (map_inclusion_forget h)) + intro l m hlm + rfl +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageOrder.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageOrder.lean new file mode 100644 index 0000000000000000000000000000000000000000..1fbfa1467e3d4fe28959ee8c7bb76b84a87a932b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageOrder.lean @@ -0,0 +1,184 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.IntervalFunctor +import OAI.GroupTheory.SimpleAmenable.Configurations.TrajectoryStages +import OAI.GroupTheory.SimpleAmenable.Simplicial.UniformMonoidal + +namespace OAI + +section + +section +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +namespace BooleanPartition +variable {a : ℕ} +def Refines (P Q : BooleanPartition a) : Prop := + ∀x y,Q.color x=Q.color y → P.color x=P.color y +lemma refines_refl (P : BooleanPartition a) : Refines P P := fun _ _ h => h +lemma refines_trans {P Q T : BooleanPartition a} (h : Refines P Q) (k : Refines Q T) : + Refines P T := fun x y e => h x y (k x y e) +noncomputable def join (P Q : BooleanPartition a) : BooleanPartition a := + generated (Sum.elim P.cell Q.cell) +lemma le_join_left (P Q : BooleanPartition a) : Refines P (join P Q) := by + intro x y h + have e := generated_constant (Sum.elim P.cell Q.cell) h (Sum.inl (P.color x)) + exact ((e.mp rfl).symm) +lemma le_join_right (P Q : BooleanPartition a) : Refines Q (join P Q) := by + intro x y h + have e := generated_constant (Sum.elim P.cell Q.cell) h (Sum.inr (Q.color x)) + exact ((e.mp rfl).symm) +end BooleanPartition +namespace LabelledStage +abbrev ReducedLabel (n : ℕ) := {l : Fin n → CutRing × CutRing // ∀i,orbitRepresentative (l i)=l i} +structure Stage (a n : ℕ) where + partition : BooleanPartition a + support : Finset (ReducedLabel n) +namespace Stage +variable {a n : ℕ} +noncomputable def empty : Stage a n := ⟨BooleanPartition.generated (fun x : Fin 0 => Fin.elim0 x),∅⟩ +instance : Nonempty (Stage a n) := ⟨empty⟩ +noncomputable instance : Preorder (Stage a n) where + le S T := S.partition.Refines T.partition ∧ S.support ⊆ T.support + le_refl S := ⟨BooleanPartition.refines_refl _,Subset.rfl⟩ + le_trans S T U h k := ⟨BooleanPartition.refines_trans h.1 k.1,Subset.trans h.2 k.2⟩ +noncomputable def sup (S T : Stage a n) : Stage a n := + ⟨S.partition.join T.partition,S.support ∪ T.support⟩ +lemma le_sup_left (S T : Stage a n) : S ≤ sup S T := + ⟨BooleanPartition.le_join_left _ _,Finset.subset_union_left⟩ +lemma le_sup_right (S T : Stage a n) : T ≤ sup S T := + ⟨BooleanPartition.le_join_right _ _,Finset.subset_union_right⟩ +noncomputable instance : IsDirectedOrder (Stage a n) where + directed S T := ⟨sup S T,le_sup_left S T,le_sup_right S T⟩ +noncomputable instance : IsFiltered (Stage a n) := inferInstance +noncomputable abbrev L (S : Stage a n) : Fin S.support.card → Fin n → CutRing × CutRing := + fun i => ((Fintype.equivFin S.support).symm (Fin.cast (by simp) i)).val.val +lemma L_reduced (S : Stage a n) : ∀j i,orbitRepresentative (S.L j i)=S.L j i := + fun j => ((Fintype.equivFin S.support).symm (Fin.cast (by simp) j)).val.property +lemma L_injective (S : Stage a n) : Function.Injective S.L := by + intro i j h + have h' := (Fintype.equivFin S.support).symm.injective (Subtype.ext (Subtype.ext h)) + exact Fin.ext (show i.val=j.val from congrArg (fun x : Fin (Fintype.card S.support) => x.val) h') +lemma label_mem (S : Stage a n) (l : Fin n → CutRing × CutRing) (hl : ∀i,orbitRepresentative (l i)=l i) : + (∃j,S.L j=l) ↔ (⟨l,hl⟩ : ReducedLabel n)∈S.support := by + constructor + · rintro ⟨j,hj⟩ + have hm := ((Fintype.equivFin S.support).symm (Fin.cast (by simp) j)).property + convert hm using 1 + exact Subtype.ext hj.symm + · intro h + refine ⟨Fin.cast (by simp) (Fintype.equivFin S.support ⟨⟨l,hl⟩,h⟩),?_⟩ + simp [L] +noncomputable abbrev Obj (S : Stage a n) := UniformObject S.partition S.L +noncomputable def inclusion {S T : Stage a n} (h : S≤T) : S.Obj ⥤ T.Obj where + obj U := { + obj := U.obj + uniform := fun j x y hxy => U.uniform j x y (h.1 x y hxy) + supported := fun j => (label_mem T _ (U.obj.reduced j)).mpr + (h.2 ((label_mem S _ (U.obj.reduced j)).mp (U.supported j))) } + map f := ⟨f.arrow,fun x y hxy hP => f.uniform x y hxy (h.1 _ _ hP)⟩ + map_id _ := rfl + map_comp _ _ := rfl +lemma inclusion_id (S : Stage a n) : inclusion (le_refl S)=𝟭 S.Obj := by + refine CategoryTheory.Functor.ext (fun U => ?_) ?_ + · cases U; rfl + · intro X Y f; rfl +lemma inclusion_comp {S T U : Stage a n} (h : S≤T) (k : T≤U) : + inclusion (h.trans k)=inclusion h ⋙ inclusion k := by + refine CategoryTheory.Functor.ext (fun X => ?_) ?_ + · cases X; rfl + · intro X Y f; rfl +noncomputable def diagram : Stage a n ⥤ Cat.{0,0} where + obj S := Cat.of S.Obj + map h := (inclusion (leOfHom h)).toCatHom + map_id S := by apply Cat.ext; exact inclusion_id S + map_comp h k := by apply Cat.ext; exact inclusion_comp (leOfHom h) (leOfHom k) +end Stage +end LabelledStage +end SimpleAmenable.PolygonObject + +end + +section +open CategoryTheory Classical Set MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage + +namespace Stage +variable {a n : ℕ} +noncomputable abbrev forget (S : Stage a n) : S.Obj ⥤ Labelled a n := UniformObject.forget +@[simp] lemma forget_ε (S : Stage a n) : Functor.LaxMonoidal.ε S.forget=𝟙 _ := rfl +@[simp] lemma forget_η (S : Stage a n) : Functor.OplaxMonoidal.η S.forget=𝟙 _ := rfl +@[simp] lemma forget_μ (S : Stage a n) (U V : S.Obj) : Functor.LaxMonoidal.μ S.forget U V=𝟙 _ := rfl +lemma forget_injective (S : Stage a n) : Function.Injective S.forget.obj := by + intro U V h; cases U; cases V; cases h; rfl +lemma inclusion_forget {S T : Stage a n} (h : S≤T) : inclusion h ⋙ T.forget=S.forget := rfl +noncomputable def cocone : CategoryTheory.Limits.Cocone (diagram (a:=a) (n:=n)) where + pt := Cat.of (Labelled a n) + ι := { + app S := S.forget.toCatHom + naturality S T h := by apply Cat.ext; exact inclusion_forget (leOfHom h) } + +theorem exists_lift_family {κ τ : Type} [Fintype κ] [Fintype τ] + (U : κ → Labelled a n) (src dst : τ → κ) (f : ∀t,U (src t) ⟶ U (dst t)) : + ∃S : Stage a n, (∀k,Labelled.ObjectUniform S.partition (U k)) ∧ + (∀k j,∃l,S.L l=(U k).label j) ∧ (∀t,Labelled.ArrowUniform S.partition (f t)) := by + obtain ⟨P,hP,hf⟩ := Labelled.exists_uniform_partition U src dst f + let lab : (Σk,Fin (U k).polygon.tracks) → ReducedLabel n := fun kj => + ⟨(U kj.1).label kj.2,(U kj.1).reduced kj.2⟩ + let S : Stage a n := ⟨P,Finset.univ.image lab⟩ + refine ⟨S,hP,?_,hf⟩ + intro k j + apply (label_mem S _ ((U k).reduced j)).mpr + exact Finset.mem_image.mpr ⟨⟨k,j⟩,Finset.mem_univ _,rfl⟩ + +theorem exists_lift {I : Type} [Category.{0} I] [Finite I] [∀i j:I,Finite (i ⟶ j)] + (F : I ⥤ Labelled a n) : ∃S : Stage a n, ∃G : I ⥤ S.Obj,G ⋙ S.forget=F := by + let : Fintype I := Fintype.ofFinite I + let (i j : I) : Fintype (i ⟶ j) := Fintype.ofFinite (i ⟶ j) + let Ar := Σi:I,Σj:I,i ⟶ j + let u : Ar → I := fun t => t.1 + let v : Ar → I := fun t => t.2.1 + let f : ∀t:Ar,F.obj (u t) ⟶ F.obj (v t) := fun t => F.map t.2.2 + obtain ⟨S,hP,hL,hf⟩ := exists_lift_family F.obj u v f + let G : I ⥤ S.Obj := { + obj i := ⟨F.obj i,hP i,hL i⟩ + map g := ⟨F.map g,hf ⟨_,_,g⟩⟩ + map_id i := UniformObject.Hom.ext _ _ (F.map_id i) + map_comp g h := UniformObject.Hom.ext _ _ (F.map_comp g h) } + exact ⟨S,G,rfl⟩ + +open IntervalBar IntervalBar.Diagram +variable {I : Type} [Preorder I] (S : Stage a n) (A : Diagram (Labelled a n) I) +variable (hP : ∀i j h,Labelled.ObjectUniform S.partition (A.obj i j h)) + (hL : ∀i j h t,∃l,S.L l=(A.obj i j h).label t) + (hU : ∀i,Labelled.ArrowUniform S.partition (A.unit i).hom) + (hC : ∀i j k hij hjk,Labelled.ArrowUniform S.partition (A.cut i j k hij hjk).hom) +noncomputable def liftDiagram : Diagram S.Obj I where + obj i j h := ⟨A.obj i j h,hP i j h,hL i j h⟩ + unit i := asIso (show (⟨A.obj i i le_rfl,hP i i _,hL i i _⟩ : S.Obj) ⟶ 𝟙_ S.Obj from + ⟨(A.unit i).hom,hU i⟩) + cut i j k hij hjk := asIso (show + (⟨A.obj i j hij,hP i j hij,hL i j hij⟩ : S.Obj) ⊗ ⟨A.obj j k hjk,hP j k hjk,hL j k hjk⟩ ⟶ + ⟨A.obj i k (hij.trans hjk),hP i k _,hL i k _⟩ from ⟨(A.cut i j k hij hjk).hom,hC i j k hij hjk⟩) + left_unit i j h := UniformObject.Hom.ext _ _ (A.left_unit i j h) + right_unit i j h := UniformObject.Hom.ext _ _ (A.right_unit i j h) + associativity i j k l hij hjk hkl := UniformObject.Hom.ext _ _ (A.associativity i j k l hij hjk hkl) +lemma liftDiagram_map : + (Diagram.map S.forget).obj (liftDiagram S A hP hL hU hC)=A := by + refine ext_heq rfl ?_ ?_ + · apply heq_of_eq; funext i + apply Iso.ext + simp [liftDiagram] + rfl + · apply heq_of_eq; funext i j k hij hjk + apply Iso.ext + simp [liftDiagram] + rfl +end Stage +end SimpleAmenable.PolygonObject.LabelledStage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageRealization.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..f446de6678a1704ef9f386bd17697022206ef74a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageRealization.lean @@ -0,0 +1,269 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TrajectoryStages + +namespace OAI + +section + +section + +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +namespace LabelledStage +variable {a n s : ℕ} (P : BooleanPartition a) + (L : Fin s → Fin n → CutRing × CutRing) + (hL : ∀ j i, orbitRepresentative (L j i)=L j i) + +noncomputable def realizeObject (U : Obj P (s:=s)) : UniformObject P L where + obj := object P L hL U + uniform j x y h := by + change (P.color x=_) ↔ (P.color y=_) + rw [h] + supported j := ⟨_,rfl⟩ + +noncomputable def realize : Obj P (s:=s) ⥤ UniformObject P L where + obj := realizeObject P L hL + map f := ⟨arrow P L hL f,fun _ _ h _ => congrArg (indexMap P L hL f) h⟩ + map_id U := UniformObject.Hom.ext _ _ ((functor P L hL).map_id U) + map_comp f g := UniformObject.Hom.ext _ _ ((functor P L hL).map_comp f g) + +namespace UniformObject +variable {P L} +noncomputable def labelIndex (U : UniformObject P L) (j : Fin U.obj.polygon.tracks) : Fin s := + (U.supported j).choose +lemma labelIndex_spec (U : UniformObject P L) (j : Fin U.obj.polygon.tracks) : + L (labelIndex U j)=U.obj.label j := (U.supported j).choose_spec + +variable (hLi : Function.Injective L) +include hLi in +lemma labelIndex_fiber (U : UniformObject P L) {b : Fin P.size × Fin s} (y : Fiber U b) : + labelIndex U y.val.val.1=b.2 := hLi ((labelIndex_spec U _).trans y.property.2) + +noncomputable abbrev evaluated (U : UniformObject P L) := (evaluation (P:=P) (L:=L)).obj U + +noncomputable def fiberIndex (U : UniformObject P L) : + Fin (Fintype.card (Track P (evaluated U))) ≃ Σ b : Fin P.size × Fin s,Fiber U b := + (index P (evaluated U)).symm.trans + (Equiv.sigmaCongrRight (fun b => (Fintype.equivFin (Fiber U b)).symm)) + +noncomputable abbrev trackFiber (U : UniformObject P L) + (j : Fin (Fintype.card (Track P (evaluated U)))) := (fiberIndex U j).2 + +noncomputable def sourceAtom (U : UniformObject P L) (x : U.obj.polygon.Point) : Fin P.size × Fin s := + (P.color x.val.2,labelIndex U x.val.1) + +noncomputable def sample (U : UniformObject P L) (x : U.obj.polygon.Point) : Fiber U (sourceAtom U x) := + ⟨⟨(x.val.1,P.point (P.color x.val.2)), + (U.uniform x.val.1 x.val.2 (P.point (P.color x.val.2)) (by simp)).mp x.property⟩, + rfl,(labelIndex_spec U _).symm⟩ + +noncomputable def sourceIndex (U : UniformObject P L) (x : U.obj.polygon.Point) : + Fin (Fintype.card (Track P (evaluated U))) := + (fiberIndex U).symm ⟨sourceAtom U x,sample U x⟩ + +@[simp] lemma sourceIndex_atom (U : UniformObject P L) (x : U.obj.polygon.Point) : + ((index P (evaluated U)).symm (sourceIndex U x)).1=sourceAtom U x := by + change (fiberIndex U ((fiberIndex U).symm ⟨sourceAtom U x,sample U x⟩)).1=_ + rw [Equiv.apply_symm_apply] + +@[simp] lemma sourceIndex_track (U : UniformObject P L) (x : U.obj.polygon.Point) : + (trackFiber U (sourceIndex U x)).val.val.1=x.val.1 := by + change (fiberIndex U ((fiberIndex U).symm ⟨sourceAtom U x,sample U x⟩)).2.val.val.1=_ + rw [Equiv.apply_symm_apply] + rfl + +variable (P L) +noncomputable def reconstructMap (U : UniformObject P L) + (x : (object P L hL (evaluated U)).polygon.Point) : U.obj.polygon.Point := + ⟨((trackFiber U x.val.1).val.val.1,x.val.2),by + have h := (trackFiber U x.val.1).val.property + have hc : P.color (trackFiber U x.val.1).val.val.2=P.color x.val.2 := by + rw [(trackFiber U x.val.1).property.1,BooleanPartition.color_point] + exact x.property.symm + exact (U.uniform _ _ _ hc).mp h⟩ + +noncomputable def reconstructInverse (U : UniformObject P L) (x : U.obj.polygon.Point) : + (object P L hL (evaluated U)).polygon.Point := + ⟨(sourceIndex U x,x.val.2),by + change P.color x.val.2=((index P (evaluated U)).symm (sourceIndex U x)).1.1 + rw [sourceIndex_atom] + rfl⟩ + +lemma reconstruct_right (U : UniformObject P L) (x : U.obj.polygon.Point) : + reconstructMap P L hL U (reconstructInverse P L hL U x)=x := by + apply Subtype.ext + apply Prod.ext + · exact sourceIndex_track U x + · rfl + +include hLi in +lemma reconstruct_left (U : UniformObject P L) + (x : (object P L hL (evaluated U)).polygon.Point) : + reconstructInverse P L hL U (reconstructMap P L hL U x)=x := by + apply Subtype.ext + apply Prod.ext + · change sourceIndex U (reconstructMap P L hL U x)=x.val.1 + apply (fiberIndex U).injective + change fiberIndex U ((fiberIndex U).symm _) = _ + rw [Equiv.apply_symm_apply] + have hb : sourceAtom U (reconstructMap P L hL U x)=(fiberIndex U x.val.1).1 := by + apply Prod.ext + · exact x.property + · exact labelIndex_fiber hLi U (trackFiber U x.val.1) + apply Sigma.ext hb + apply (Subtype.heq_iff_coe_eq (by intro y; dsimp only; rw [hb])).mpr + apply Subtype.ext + apply Prod.ext + · rfl + · change P.point (P.color x.val.2)=(trackFiber U x.val.1).val.val.2 + rw [show P.color x.val.2=(fiberIndex U x.val.1).1.1 from x.property] + exact (trackFiber U x.val.1).property.1.symm + + · rfl + +noncomputable def reconstructEquiv (U : UniformObject P L) : + (object P L hL (evaluated U)).polygon.Point ≃ U.obj.polygon.Point where + toFun := reconstructMap P L hL U + invFun := reconstructInverse P L hL U + left_inv := reconstruct_left P L hL hLi U + right_inv := reconstruct_right P L hL U + +end UniformObject +end LabelledStage +end SimpleAmenable.PolygonObject + +end + +section + +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +namespace LabelledStage +variable {a n s : ℕ} (P : BooleanPartition a) + (L : Fin s → Fin n → CutRing × CutRing) + (hL : ∀ j i, orbitRepresentative (L j i)=L j i) + (hLi : Function.Injective L) + +namespace UniformObject +noncomputable def reconstruct (U : UniformObject P L) : + (realize P L hL).obj (evaluated U) ⟶ U where + arrow := { + arrow := relabelArrow (reconstructEquiv P L hL hLi U) + (fun j => (trackFiber U j).val.val.1) (fun _ => rfl) + positional := fun _ => rfl + labelled := fun x => (trackFiber U x.val.1).property.2 } + uniform := fun _ _ h _ => congrArg (fun j => (trackFiber U j).val.val.1) h +end UniformObject + +open UniformObject +include hLi in +theorem realize_essSurj : (realize P L hL).EssSurj := { + mem_essImage U := ⟨evaluated U,⟨asIso (reconstruct P L hL hLi U)⟩⟩ } + +instance realize_faithful : (realize P L hL).Faithful where + map_injective equality := (functor P L hL).map_injective (congrArg Hom.arrow equality) + +noncomputable def fiberPoint (U : Obj P (s:=s)) (b : Fin P.size × Fin s) (k : Fin (U b).size) : + Fiber (realizeObject P L hL U) b := + ⟨⟨(index P U ⟨b,k⟩,P.point b.1),by + change P.color (P.point b.1)=((index P U).symm ((index P U) ⟨b,k⟩)).1.1 + rw [Equiv.symm_apply_apply,BooleanPartition.color_point]⟩,rfl,by + change L (((index P U).symm ((index P U) ⟨b,k⟩)).1.2)=L b.2 + rw [Equiv.symm_apply_apply]⟩ + +include hLi in +lemma fiber_base (U : Obj P (s:=s)) (b : Fin P.size × Fin s) + (y : Fiber (realizeObject P L hL U) b) : + ((index P U).symm y.val.val.1).1=b := by + apply Prod.ext + · have hp := y.val.property + change P.color y.val.val.2=((index P U).symm y.val.val.1).1.1 at hp + rw [y.property.1,BooleanPartition.color_point] at hp + exact hp.symm + · apply hLi + exact y.property.2 + +noncomputable def fiberFin (U : Obj P (s:=s)) (b : Fin P.size × Fin s) + (y : Fiber (realizeObject P L hL U) b) : Fin (U b).size := + (fiber_base P L hL hLi U b y) ▸ ((index P U).symm y.val.val.1).2 + +lemma fiberFin_spec (U : Obj P (s:=s)) (b : Fin P.size × Fin s) + (y : Fiber (realizeObject P L hL U) b) : + (⟨b,fiberFin P L hL hLi U b y⟩ : Track P U)=((index P U).symm y.val.val.1) := by + apply Sigma.ext (fiber_base P L hL hLi U b y).symm + dsimp only [fiberFin] + exact eqRec_heq (φ:=fun b => Fin (U b).size) _ _ + +noncomputable def fiberEquiv (U : Obj P (s:=s)) (b : Fin P.size × Fin s) : + Fin (U b).size ≃ Fiber (realizeObject P L hL U) b where + toFun := fiberPoint P L hL U b + invFun := fiberFin P L hL hLi U b + left_inv k := by + have h := fiberFin_spec P L hL hLi U b (fiberPoint P L hL U b k) + change (⟨b,_⟩ : Track P U)=(index P U).symm ((index P U) ⟨b,k⟩) at h + rw [Equiv.symm_apply_apply] at h + exact eq_of_heq (Sigma.mk.inj_iff.mp h).2 + right_inv y := by + apply Subtype.ext + apply Subtype.ext + apply Prod.ext + · change index P U ⟨b,fiberFin P L hL hLi U b y⟩=y.val.val.1 + rw [fiberFin_spec] + exact Equiv.apply_symm_apply (index P U) y.val.val.1 + · exact y.property.1.symm + +noncomputable def fromUniform {U V : Obj P (s:=s)} + (f : (realize P L hL).obj U ⟶ (realize P L hL).obj V) : ∀b,Fin (U b).size ≃ Fin (V b).size := + fun b => (fiberEquiv P L hL hLi U b).trans + ((fiberMap f b).trans (fiberEquiv P L hL hLi V b).symm) + +lemma fromUniform_spec {U V : Obj P (s:=s)} + (f : (realize P L hL).obj U ⟶ (realize P L hL).obj V) + (b : Fin P.size × Fin s) (k : Fin (U b).size) : + index P V ⟨b,fromUniform P L hL hLi f b k⟩ = + (f.arrow.arrow.toEquiv (fiberPoint P L hL U b k).val).val.1 := by + change (index P V) ⟨b,fiberFin P L hL hLi V b ((fiberMap f b) (fiberPoint P L hL U b k))⟩=_ + exact (congrArg (index P V) + (fiberFin_spec P L hL hLi V b ((fiberMap f b) (fiberPoint P L hL U b k)))).trans + ((index P V).apply_symm_apply _) + +include hLi in +theorem realize_full : (realize P L hL).Full := { + map_surjective {U V} f := ⟨fromUniform P L hL hLi f,by + apply Hom.ext + apply Labelled.Hom.ext + apply Arrow.ext + apply Equiv.ext + intro x + apply Subtype.ext + apply Prod.ext + · change indexMap P L hL (fromUniform P L hL hLi f) x.val.1=(f.arrow.arrow.toEquiv x).val.1 + let t := (index P U).symm x.val.1 + have h := fromUniform_spec P L hL hLi f t.1 t.2 + change (index P V) ⟨t.1,fromUniform P L hL hLi f t.1 t.2⟩=(f.arrow.arrow.toEquiv x).val.1 + rw [h] + apply f.uniform + · change (index P U) ((index P U).symm x.val.1)=x.val.1 + exact Equiv.apply_symm_apply _ _ + · change P.color (P.point t.1.1)=P.color x.val.2 + rw [BooleanPartition.color_point] + exact x.property.symm + · exact (f.arrow.positional x).symm⟩ } + +noncomputable def equivalence : Obj P (s:=s) ≌ UniformObject P L := by + letI := (inferInstance : (realize P L hL).Faithful) + letI := (realize_full P L hL hLi) + letI := (realize_essSurj P L hL hLi) + letI : (realize P L hL).IsEquivalence := {} + exact (realize P L hL).asEquivalence + +end LabelledStage +end SimpleAmenable.PolygonObject + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageRefinement.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageRefinement.lean new file mode 100644 index 0000000000000000000000000000000000000000..da00ea9bfc3e3905c51967f93e6d8b0aeb8ba4f7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/StageRefinement.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.StageFiberSum +import OAI.GroupTheory.SimpleAmenable.Simplicial.TripleComposition + +namespace OAI + +section + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open UniformObject + +variable {a n : ℕ} {S T : Stage a n} (h : S≤T) +variable (b : Fin S.partition.size × Fin S.support.card) + (c : Fin T.partition.size × Fin T.support.card) + (hp : S.partition.color (T.partition.point c.1)=b.1) + (hl : S.L b.2=T.L c.2) + +noncomputable def refineFiber (U : S.Obj) : Fiber U b ≃ Fiber ((inclusion h).obj U) c where + toFun x := ⟨⟨(x.val.val.1,T.partition.point c.1), + (U.uniform x.val.val.1 x.val.val.2 (T.partition.point c.1) (by + rw [x.property.1,S.partition.color_point,hp])).mp x.val.property⟩,rfl, + x.property.2.trans hl⟩ + invFun y := ⟨⟨(y.val.val.1,S.partition.point b.1), + (U.uniform y.val.val.1 y.val.val.2 (S.partition.point b.1) (by + rw [y.property.1,hp,S.partition.color_point])).mp y.val.property⟩,rfl, + y.property.2.trans hl.symm⟩ + left_inv x := by apply Subtype.ext; apply Subtype.ext; exact Prod.ext rfl x.property.1.symm + right_inv y := by apply Subtype.ext; apply Subtype.ext; exact Prod.ext rfl y.property.1.symm + +lemma refineFiber_natural {U V : S.Obj} (f : U ⟶ V) (x : Fiber U b) : + refineFiber h b c hp hl V (fiberMap f b x)= + fiberMap ((inclusion h).map f) c (refineFiber h b c hp hl U x) := by + apply Subtype.ext + apply Subtype.ext + apply Prod.ext + · exact f.uniform x.val (refineFiber h b c hp hl U x).val rfl (by + change S.partition.color x.val.val.2=S.partition.color (T.partition.point c.1) + rw [x.property.1,S.partition.color_point,hp]) + · exact (f.arrow.positional (refineFiber h b c hp hl U x).val).symm + +noncomputable def refineEvaluationIso : + evaluation (P:=S.partition) (L:=S.L) ⋙ BarFinitePower.project _ b ≅ + inclusion h ⋙ evaluation (P:=T.partition) (L:=T.L) ⋙ BarFinitePower.project _ c := + NatIso.ofComponents (fun U => asIso (C := FiniteSetGroupoid) + (X := E.obj U b) (Y := E.obj ((inclusion h).obj U) c) + (show (E.obj U b) ⟶ (E.obj ((inclusion h).obj U) c) from + ((enumerate U b).symm.trans ((refineFiber h b c hp hl U).trans (enumerate ((inclusion h).obj U) c))))) + (by + intro U V f + apply Equiv.ext + intro x + obtain ⟨x,rfl⟩ := (enumerate U b).surjective x + dsimp only [Functor.comp_map,Pi.eval,BarFinitePower.project,asIso_hom,Equiv.trans_apply,Equiv.symm_apply_apply] + change enumerate ((inclusion h).obj V) c (refineFiber h b c hp hl V + ((enumerate V b).symm (E.map f b (enumerate U b x)))) = + E.map ((inclusion h).map f) c (enumerate ((inclusion h).obj U) c + (refineFiber h b c hp hl U ((enumerate U b).symm (enumerate U b x)))) + rw [E_map_enum,Equiv.symm_apply_apply,Equiv.symm_apply_apply,E_map_enum,refineFiber_natural]) + +lemma fiber_empty_of_new_label (hc : ∀j,S.L j ≠ T.L c.2) (U : S.Obj) : + IsEmpty (Fiber ((inclusion h).obj U) c) := ⟨by + intro x + obtain ⟨j,hj⟩ := U.supported x.val.val.1 + exact hc j (hj.trans x.property.2)⟩ + +lemma new_label_size (hc : ∀j,S.L j ≠ T.L c.2) (U : S.Obj) : + (evaluation.obj ((inclusion h).obj U) c).size=0 := by + have := fiber_empty_of_new_label h c hc U + exact Fintype.card_eq_zero +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricCharts.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef1eaa6b325e519e4fda08a859cc11a7b360b6af --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricCharts.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TangentWalkCenters + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SymmetricCharts + +@[simp] theorem endpointLabel_neg (z : CutRing) : endpointLabel (-z) = -endpointLabel z := rfl + +def symmetricWindowStart (s : CutRing) : Fin 2 → ℤ := fun _ => -(endpointLabel s).natAbs + +def symmetricWindowLength (s : CutRing) : ℕ := 2*(endpointLabel s).natAbs+2 + +theorem symmetricWindow_labels (s : CutRing) (j : Fin 2) : + (symmetricWindowStart s j ≤ endpointLabel (-s) ∧ + endpointLabel (-s) < symmetricWindowStart s j+symmetricWindowLength s) ∧ + (symmetricWindowStart s j ≤ endpointLabel 0 ∧ + endpointLabel 0 < symmetricWindowStart s j+symmetricWindowLength s) ∧ + (symmetricWindowStart s j ≤ endpointLabel s ∧ + endpointLabel s < symmetricWindowStart s j+symmetricWindowLength s) := by + have h₀ := Int.le_natAbs (a := endpointLabel s) + have h₁ : -(endpointLabel s) ≤ ((endpointLabel s).natAbs:ℤ) := by + simpa using (Int.le_natAbs (a := -endpointLabel s)) + simp only [symmetricWindowStart,symmetricWindowLength,endpointLabel_neg,Nat.cast_add,Nat.cast_mul,Nat.cast_ofNat] + change _ ∧ (_ ≤ (0:ℤ) ∧ (0:ℤ) < _) ∧ _ + omega + +theorem signedShortSteps_bound (u : CutRing) (e : Fin 5) : + |ordinary (signedShortSteps u e)| ≤ |ordinary u|+|ordinary (cutTau*u)| := by + have h₀ := abs_nonneg (ordinary u) + have h₁ := abs_nonneg (ordinary (cutTau*u)) + fin_cases e + · change |ordinary 0| ≤ _ + rw [map_zero,abs_zero] + linarith + · exact le_add_of_nonneg_right h₁ + · change |ordinary (-u)| ≤ _ + rw [map_neg,abs_neg] + exact le_add_of_nonneg_right h₁ + · exact le_add_of_nonneg_left h₀ + · change |ordinary (-(cutTau*u))| ≤ _ + rw [map_neg,abs_neg] + exact le_add_of_nonneg_left h₀ + +theorem exists_symmetric_short_chart (a : ℕ) (r : CutRing) (hr : 0 < ordinary r) : + ∃ s u v : CutRing, 0 < ordinary s ∧ ordinary s < ordinary r/2 ∧ u*v=1 ∧ + (1+|ordinary (cutTau^a)|)*(|ordinary u|+|ordinary (cutTau*u)|) < ordinary s/4 := by + obtain ⟨s,hs,hs'⟩ := exists_cut_between (by linarith : (0:ℝ) < ordinary r/2) + obtain ⟨u,v,huv,hshort⟩ := exists_short_tangent_basis (cutTau^a) (by linarith : 0 < ordinary s/4) + exact ⟨s,u,v,hs,hs',huv,hshort⟩ + +theorem symmetric_chart_overlap_boxes (a : ℕ) (r s u : CutRing) + (hs : 0 < ordinary s) (hsr : ordinary s < ordinary r/2) + (hshort : (1+|ordinary (cutTau^a)|)*(|ordinary u|+|ordinary (cutTau*u)|) < ordinary s/4) + (d : Fin 2) (e : Fin 5) (j : Fin 2) : + (-ordinary r < ordinary (-s) ∧ ordinary s < ordinary r) ∧ + (-ordinary r < ordinary (-s)-ordinary (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) ∧ + ordinary s-ordinary (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) < ordinary r) := by + have hh := (tangentOffset_ordinary_bound a d (signedShortSteps u e) j).trans + (mul_le_mul_of_nonneg_left (signedShortSteps_bound u e) (by positivity : 0 ≤ 1+|ordinary (cutTau^a)|)) + have hh' := lt_of_le_of_lt hh hshort + have hlim := abs_lt.mp hh' + rw [map_neg] + exact ⟨⟨by linarith,by linarith⟩,⟨by linarith,by linarith⟩⟩ + +end SymmetricCharts + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricComponents.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricComponents.lean new file mode 100644 index 0000000000000000000000000000000000000000..dfaf27a95542d8db184036ea5afbb2debf6bc716 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricComponents.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.SymmetricStable +import OAI.GroupTheory.SimpleAmenable.Configurations.CofinalPowers +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonComponentStable +import OAI.GroupTheory.SimpleAmenable.Simplicial.FirstBarForwardLow + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable.SymmetricConfiguration +open FreeChains ComponentTranslation GroupoidComponentHomology PolygonObject + +attribute [local instance 1200] Rep.hV2 +noncomputable abbrev generator : Skeleton FiniteSetGroupoid := toSkeleton ⟨1⟩ +lemma component_pow (n:ℕ) : toSkeleton (⟨n⟩:FiniteSetGroupoid)=generator^n := by + induction n with + | zero => rfl + | succ n ih => + rw [pow_succ,←ih] + exact Skeleton.toSkeleton_tensorObj (⟨n⟩:FiniteSetGroupoid) ⟨1⟩ +lemma generator_surjective : Function.Surjective (fun n:ℕ=>generator^n) := by + intro p + exact ⟨(repr p).size,(component_pow _).symm.trans (repr_component p)⟩ +lemma generator_cofinal : ∀p:Skeleton FiniteSetGroupoid,∃q n,p*q=generator^n := by + intro p + obtain ⟨n,rfl⟩:=generator_surjective p + exact ⟨1,n,mul_one _⟩ +noncomputable def standardNerveInclusion (n:ℕ) : SingleObj (G n) ⥤ FiniteSetGroupoid where + obj _ := ⟨n⟩ + map f := f + map_id _ := rfl + map_comp _ _ := rfl +noncomputable def standardFiberInclusion (n:ℕ) : SingleObj (G n) ⥤ Fiber (generator^n) := + (property (generator^n)).lift (standardNerveInclusion n) (fun _=>component_pow n) +instance standardFiberInclusion_faithful (n:ℕ) : (standardFiberInclusion n).Faithful where + map_injective h := congrArg (fun f : (standardFiberInclusion n).obj _ ⟶ (standardFiberInclusion n).obj _=>f.hom) h +noncomputable instance standardFiberInclusion_full (n:ℕ) : (standardFiberInclusion n).Full where + map_surjective f := ⟨f.hom,rfl⟩ +instance standardFiberInclusion_essSurj (n:ℕ) : (standardFiberInclusion n).EssSurj where + mem_essImage V := ⟨SingleObj.star _,⟨fiberIso _ ((standardFiberInclusion n).obj (SingleObj.star _)) V⟩⟩ +noncomputable instance standardFiberInclusion_isEquivalence (n:ℕ) : (standardFiberInclusion n).IsEquivalence := + ⟨inferInstance,inferInstance,inferInstance⟩ +noncomputable def standardHomologyIso (n q:ℕ) : + groupHomology (Rep.trivial ℤ (G n) ℤ) q ≅ (nerve (Fiber (generator^n))).homology Z q := by + haveI:=NerveHomotopy.homologyMap_isIso (standardFiberInclusion n) Z q + exact (GroupNerveCoordinates.homologyIso (G n) q).symm ≪≫ + asIso (SSet.homologyMap (nerveMap (standardFiberInclusion n)) Z q) +lemma tensor_stabilize (k n:ℕ) (f:G n) : + (tensorLeft (⟨k⟩:FiniteSetGroupoid)).map (show (⟨n⟩:FiniteSetGroupoid) ⟶ ⟨n⟩ from f)= + (show (⟨k+n⟩:FiniteSetGroupoid) ⟶ ⟨k+n⟩ from stabilize k n f) := by + apply Equiv.ext + intro x + obtain ⟨y,rfl⟩:=finSumFinEquiv.surjective x + cases y with + | inl i => + change FiniteSetGroupoid.sumHom (Equiv.refl (Fin k)) f (FiniteSetGroupoid.sumEquiv ⟨k⟩ ⟨n⟩ (.inl i))=stabilize k n f (Fin.castAdd n i) + rw [FiniteSetGroupoid.sumHom_inl,stabilize_apply_head] + rfl + | inr i => + change FiniteSetGroupoid.sumHom (Equiv.refl (Fin k)) f (FiniteSetGroupoid.sumEquiv ⟨k⟩ ⟨n⟩ (.inr i))=stabilize k n f (Fin.natAdd k i) + rw [FiniteSetGroupoid.sumHom_inr,stabilize_apply_tail] + rfl +noncomputable def standardTensorIso (k n:ℕ) : + standardNerveInclusion n ⋙ tensorLeft (⟨k⟩:FiniteSetGroupoid) ≅ + (stabilize k n).toFunctor ⋙ standardNerveInclusion (k+n) := + NatIso.ofComponents (fun _=>Iso.refl _) (by + intro X Y f + change FiniteSetGroupoid.sumHom (Equiv.refl (Fin k)) f = stabilize k n f + exact tensor_stabilize k n f) +noncomputable def standardCastIso {m n:ℕ} (h:m=n) : standardNerveInclusion m ≅ + (castGroup h).toMonoidHom.toFunctor ⋙ standardNerveInclusion n := by + subst n + exact Iso.refl _ +noncomputable def standardSuccessorIso (n:ℕ) : + standardNerveInclusion n ⋙ tensorLeft (⟨1⟩:FiniteSetGroupoid) ≅ + (successorStabilize n).toFunctor ⋙ standardNerveInclusion (n+1) := + standardTensorIso 1 n ≪≫ + Functor.isoWhiskerLeft (stabilize 1 n).toFunctor (standardCastIso (Nat.add_comm 1 n)) ≪≫ + (Functor.associator _ _ _).symm +end SimpleAmenable.SymmetricConfiguration + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable.SymmetricConfiguration +open FreeChains ComponentTranslation GroupoidComponentHomology PolygonObject + +attribute [local instance 1200] Rep.hV2 +noncomputable def representativeGeneratorIso : repr generator ≅ (⟨1⟩:FiniteSetGroupoid) := + Skeleton.isoOfEq (repr_component _) +noncomputable def representativeSuccessorIso (n:ℕ) : + standardNerveInclusion n ⋙ tensorLeft (repr generator) ≅ + (successorStabilize n).toFunctor ⋙ standardNerveInclusion (n+1) := + Functor.isoWhiskerLeft (standardNerveInclusion n) + ((tensoringLeft FiniteSetGroupoid).mapIso representativeGeneratorIso) ≪≫ standardSuccessorIso n +noncomputable def fiberSuccessorIso (n:ℕ) : + standardFiberInclusion n ⋙ + ComponentTranslation.translate generator (generator^n) (generator^(n+1)) (pow_succ' _ _).symm ≅ + (successorStabilize n).toFunctor ⋙ standardFiberInclusion (n+1) := + NatIso.ofComponents (fun x=>ObjectProperty.isoMk _ ((representativeSuccessorIso n).app x)) (by + intro x y f + apply ObjectProperty.hom_ext + exact (representativeSuccessorIso n).hom.naturality f) +lemma component_successor_isIso (n q:ℕ) [IsIso (TrivialHomology.map (successorStabilize n) q)] : + IsIso (SSet.homologyMap (nerveMap + (ComponentTranslation.translate generator (generator^n) (generator^(n+1)) (pow_succ' _ _).symm)) Z q) := by + have := NerveHomotopy.homologyMap_isIso (standardFiberInclusion n) Z q + have := NerveHomotopy.homologyMap_isIso (standardFiberInclusion (n+1)) Z q + have hg:=GroupNerveCoordinates.homologyIso_natural (successorStabilize n) q + have : IsIso (SSet.homologyMap (nerveMap (successorStabilize n).toFunctor) Z q) := by + have : IsIso (SSet.homologyMap (nerveMap (successorStabilize n).toFunctor) Z q ≫ + (GroupNerveCoordinates.homologyIso (G (n+1)) q).hom) := by rw [hg]; infer_instance + exact (isIso_comp_right_iff _ (GroupNerveCoordinates.homologyIso (G (n+1)) q).hom).mp inferInstance + have h:=(NerveHomotopy.ofNatTrans (fiberSuccessorIso n).hom).congr_homologyMap Z q + rw [ComponentStable.map_comp,ComponentStable.map_comp] at h + have : IsIso (SSet.homologyMap (nerveMap (standardFiberInclusion n)) Z q ≫ + SSet.homologyMap (nerveMap + (ComponentTranslation.translate generator (generator^n) (generator^(n+1)) (pow_succ' _ _).symm)) Z q) := by + rw [h] + infer_instance + exact (isIso_comp_left_iff (SSet.homologyMap (nerveMap (standardFiberInclusion n)) Z q) _).mp inferInstance +lemma component_sequence_succ (n q:ℕ) : + (homologyDiagram (C:=FiniteSetGroupoid) q).map + ((CofinalPowers.sequence generator).map (homOfLE (Nat.le_succ n))) = + SSet.homologyMap (nerveMap (ComponentTranslation.translate generator + (generator^n) (generator^(n+1)) (pow_succ' _ _).symm)) Z q := by + change SSet.homologyMap (nerveMap (ComponentTranslation.translate + (generator ^ (n+1-n)) _ _ _)) Z q = _ + simp only [Nat.add_sub_cancel_left,pow_one] + rfl +lemma componentStable_finite (q:ℕ) (N:ℕ) + (h:∀n,N≤n → IsIso (TrivialHomology.map (successorStabilize n) q)) : + Module.Finite ℤ (ComponentStable.object (C:=FiniteSetGroupoid) q:A) := by + have := FiniteGroupHomology.finite (Rep.trivial ℤ (G N) ℤ) q + have : Module.Finite ℤ ((nerve (Fiber (generator^N))).homology Z q:A) := + Module.Finite.equiv (standardHomologyIso N q).toLinearEquiv + apply (CofinalPowers.finite_colimit_iff generator generator_cofinal (homologyDiagram q) N N le_rfl ?_).mp + (inferInstanceAs (Module.Finite ℤ ((nerve (Fiber (generator^N))).homology Z q:A))) + intro n hn + rw [component_sequence_succ] + have := h n hn + exact component_successor_isIso n q +lemma componentStableH1_finite : Module.Finite ℤ (ComponentStable.object (C:=FiniteSetGroupoid) 1:A) := + componentStable_finite 1 32 successor_H1_isIso +lemma componentStableH2_finite : Module.Finite ℤ (ComponentStable.object (C:=FiniteSetGroupoid) 2:A) := + componentStable_finite 2 34 successor_H2_isIso +lemma component_fg : Monoid.FG (Skeleton FiniteSetGroupoid) := + Monoid.fg_of_surjective (powersHom (Skeleton FiniteSetGroupoid) generator) (by + intro p + obtain ⟨n,hn⟩:=generator_surjective p + exact ⟨Multiplicative.ofAdd n,hn⟩) +lemma component_homology_finite (n:ℕ) : + Module.Finite ℤ ((nerve (SingleObj (Skeleton FiniteSetGroupoid))).homology Z n:A) := by + have := component_fg + have : Group.FG (TranslationFiltered.Q (Skeleton FiniteSetGroupoid)) := Group.fg_iff_monoid_fg.mpr inferInstance + have := AbelianHomologyFinite.finite (TranslationFiltered.Q (Skeleton FiniteSetGroupoid)) n + exact Module.Finite.equiv (TranslationNerve.completionHomologyIso (Skeleton FiniteSetGroupoid) n).symm.toLinearEquiv +lemma triple_homology_finite (n:ℕ) (hn:n≤5) : + Module.Finite ℤ ((IntervalBar.Diagram.bar₃ (C:=FiniteSetGroupoid)).homology Z n:A) := by + have := componentStableH1_finite + have := componentStableH2_finite + exact IntervalBar.Diagram.triple_finite_of_bar + (IntervalBar.Diagram.bar_low_finite component_homology_finite) n hn +end SimpleAmenable.SymmetricConfiguration + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricConfiguration.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricConfiguration.lean new file mode 100644 index 0000000000000000000000000000000000000000..f383f03577d54cdb71574928a77c08ac000b8734 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricConfiguration.lean @@ -0,0 +1,149 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.HomologyAdditive + +namespace OAI + +section +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.SymmetricConfiguration + +attribute [local instance 1200] Rep.hV2 +abbrev G (m:ℕ) := Equiv.Perm (Fin m) +def Configuration (m p:ℕ) := {f:Fin p → Fin m // Function.Injective f} +variable {m p:ℕ} +instance : CoeFun (Configuration m p) (fun _=>Fin p → Fin m) := ⟨Subtype.val⟩ +@[ext] theorem ext {f g:Configuration m p} (h:∀i,f i=g i) : f=g := Subtype.ext (funext h) +noncomputable instance : MulAction (G m) (Configuration m p) where + smul g f := ⟨fun i=>g (f i), g.injective.comp f.property⟩ + one_smul f := by apply ext; intro i; rfl + mul_smul g h f := by apply ext; intro i; rfl +@[simp] theorem smul_apply (g:G m) (f:Configuration m p) (i:Fin p) : (g • f) i=g (f i) := rfl +noncomputable def standard (p n:ℕ) : Configuration (p+n) p := ⟨Fin.castAdd n,Fin.castAdd_injective p n⟩ +noncomputable def standardLE (m p:ℕ) (hp:p ≤ m) : Configuration m p := ⟨Fin.castLE hp,Fin.castLE_injective hp⟩ +theorem transitive (f g:Configuration m p) : ∃u:G m,u • f=g := by + obtain ⟨u,hu⟩ := Equiv.Perm.exists_extending_pair f.val g.val f.property g.property + exact ⟨u,ext hu⟩ +lemma ne_smul (g:G m) (v w:Fin m) (h:v ≠ w) : g • v ≠ g • w := fun hh=>h (g.injective hh) +noncomputable def configurationRepresentation (m p:ℕ) : Representation ℤ (G m) (ConfigurationChains.degree (Ne:Fin m → Fin m → Prop) p) := + ConfigurationChains.representation ne_smul p +lemma commonNeighbor (hm:32 ≤ m) (S:Finset (Fin m)) (hS:S.card ≤ 31) : ∃v,∀w ∈ S,v ≠ w := by + obtain ⟨v,hv⟩ := Finset.exists_mem_notMem_of_card_lt_card (s:=S) (t:=Finset.univ) (by simpa using (show S.card < m by omega)) + exact ⟨v,by intro w hw he; exact hv.2 (he ▸ hw)⟩ +lemma lowDegree_exact (hm:32 ≤ m) {n:ℕ} (hn:n ≤ 2) : + Function.Exact (ConfigurationChains.degreeBoundary (Ne:Fin m → Fin m → Prop) (n+1)) + (ConfigurationChains.degreeBoundary (Ne:Fin m → Fin m → Prop) n) := + ConfigurationChains.lowDegree_exact (commonNeighbor hm) hn +noncomputable def listEquiv (m p : ℕ) : Configuration m p ≃ + {l : List (Fin m) // l.Pairwise Ne ∧ l.length=p} where + toFun f := ⟨List.ofFn f.val,List.pairwise_ofFn.mpr (fun _ _ h => fun hh => (ne_of_lt h) (f.property hh)),List.length_ofFn⟩ + invFun l := ⟨fun i => l.val.get ⟨i.val,by rw [l.property.2];exact i.isLt⟩,by + intro i j hij + by_contra hne + rcases lt_or_gt_of_ne hne with h|h + · exact l.property.1.rel_get_of_lt h hij + · exact l.property.1.rel_get_of_lt h hij.symm⟩ + left_inv f := by apply ext; intro i; simp + right_inv l := by + apply Subtype.ext + apply List.ext_getElem + · simp [l.property.2] + · intro i hi hj + simp + +@[simp] theorem listEquiv_apply_val (f : Configuration m p) : + (listEquiv m p f).val=List.ofFn f.val := rfl + +noncomputable def chainEquiv (m p : ℕ) : + (Configuration m p →₀ ℤ) ≃ₗ[ℤ] ConfigurationChains.degree ((Ne:Fin m → Fin m → Prop)) p := + (Finsupp.domLCongr (listEquiv m p)).trans (ConfigurationChains.simplexModuleEquiv _ p).symm + +@[simp] theorem chainEquiv_single_val (f : Configuration m p) (z : ℤ) : + (chainEquiv m p (Finsupp.single f z)).val=Finsupp.single (List.ofFn f.val) z := by + unfold chainEquiv + rw [LinearEquiv.trans_apply,Finsupp.domLCongr_single] + simp [ConfigurationChains.simplexModuleEquiv] + exact Finsupp.supportedEquivFinsupp_symm_single _ _ _ + +theorem chainEquiv_intertwines (g : G m) : + (chainEquiv m p).toLinearMap.comp (TransitiveInduction.permutationRep + (G:=G m) (X:=Configuration m p) g)= + (configurationRepresentation m p g).comp (chainEquiv m p).toLinearMap := by + apply Finsupp.lhom_ext + intro f z + apply Subtype.ext + change (chainEquiv m p (TransitiveInduction.permutationRep g (Finsupp.single f z))).val= + ConfigurationChains.push (fun v => g • v) (chainEquiv m p (Finsupp.single f z)).val + rw [TransitiveInduction.permutationRep_single,chainEquiv_single_val,chainEquiv_single_val, + ConfigurationChains.push_single] + congr 1 + simp [List.map_ofFn] + rfl + +noncomputable def representationIso (m p : ℕ) : + Rep.of (TransitiveInduction.permutationRep (G:=G m) (X:=Configuration m p)) ≅ + Rep.of (configurationRepresentation m p) := + Rep.mkIso {toLinearEquiv:=chainEquiv m p,isIntertwining':=chainEquiv_intertwines} + +noncomputable abbrev column (m p : ℕ) := + Rep.of (TransitiveInduction.permutationRep + (G:=G m) (X:=Configuration m p)) + +noncomputable def face (i : Fin (p+1)) (f : Configuration m (p+1)) : + Configuration m p := + ⟨fun j => f (i.succAbove j),f.property.comp Fin.succAbove_right_injective⟩ + +@[simp] lemma face_apply (i : Fin (p+1)) (f : Configuration m (p+1)) (j : Fin p) : + face i f j=f (i.succAbove j) := rfl + +@[simp] lemma face_smul (i : Fin (p+1)) (g : G m) + (f : Configuration m (p+1)) : face i (g • f)=g • face i f := rfl + +noncomputable def faceHom (m p : ℕ) (i : Fin (p+1)) : + column m (p+1) ⟶ column m p := + TransitiveInduction.equivariantMap (face i) (face_smul i) + +noncomputable def boundary (m p : ℕ) : column m (p+1) ⟶ column m p := + (representationIso m (p+1)).hom ≫ + ConfigurationChains.boundaryRep ne_smul p ≫ + (representationIso m p).inv + +lemma boundary_chain (c : Configuration m (p+1) →₀ ℤ) : + chainEquiv m p ((boundary m p).hom c) = + ConfigurationChains.degreeBoundary ((Ne:Fin m → Fin m → Prop)) p (chainEquiv m (p+1) c) := by + change chainEquiv m p ((chainEquiv m p).symm _) = _ + exact (chainEquiv m p).apply_symm_apply _ + +lemma boundary_sum (m p : ℕ) : boundary m p = + ∑i : Fin (p+1), ((-1:ℤ)^i.val) • faceHom m p i := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply Finsupp.lhom_ext + intro c z + apply (chainEquiv m p).injective + change (chainEquiv m p) ((boundary m p).hom (Finsupp.single c z)) = _ + rw [boundary_chain] + apply Subtype.ext + change ConfigurationChains.boundary (chainEquiv m (p+1) (Finsupp.single c z)).val = _ + rw [chainEquiv_single_val, ConfigurationChains.boundary_single, + ConfigurationChains.faceSum_ofFn] + simp only [Finset.smul_sum] + change _ = (chainEquiv m p + ((∑i : Fin (p+1), ((-1:ℤ)^i.val) • faceHom m p i).hom (Finsupp.single c z))).val + simp only [Rep.sum_hom, Rep.smul_hom, Representation.IntertwiningMap.sum_apply, + Representation.IntertwiningMap.smul_apply, map_sum, map_smul, Submodule.coe_sum, + Submodule.coe_smul] + apply Finset.sum_congr rfl + intro i hi + change z • Finsupp.single _ ((-1:ℤ)^i.val) = + ((-1:ℤ)^i.val) • ((chainEquiv m p) + ((faceHom m p i).hom (Finsupp.single c z))).val + dsimp only [faceHom] + rw [TransitiveInduction.equivariantMap_single] + rw [chainEquiv_single_val] + simp [Finsupp.smul_single, mul_comm, face] + +end SimpleAmenable.SymmetricConfiguration + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricFaces.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricFaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..56bdc5f0429b02f63d745ffa2232da2092a99b6c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricFaces.lean @@ -0,0 +1,171 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FullGroupStability +import OAI.GroupTheory.SimpleAmenable.Configurations.SymmetricConfiguration + +namespace OAI + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.SymmetricConfiguration + +section + +attribute [local instance 1200] Rep.hV2 +variable {m p:ℕ} +noncomputable def facePermutation (i j : Fin (p+1)) : Equiv.Perm (Fin (p+1)) := + (finSuccEquiv' i).trans (finSuccEquiv' j).symm +@[simp] lemma facePermutation_apply (i j : Fin (p+1)) (k : Fin p) : + facePermutation i j (i.succAbove k)=j.succAbove k := by simp [facePermutation] +noncomputable def permHom (f:Configuration m p) (σ:Equiv.Perm (Fin p)) : G m := + σ.viaFintypeEmbedding ⟨f.val,f.property⟩ +lemma permHom_apply (f:Configuration m p) (σ:Equiv.Perm (Fin p)) (i:Fin p) : permHom f σ (f i)=f (σ i) := + Equiv.Perm.viaFintypeEmbedding_apply_image _ _ _ +lemma permHom_fixed (f:Configuration m p) (σ:Equiv.Perm (Fin p)) (x:Fin m) (hx:x∉Set.range f.val) : permHom f σ x=x := + Equiv.Perm.viaFintypeEmbedding_apply_notMem_range _ _ hx +lemma permHom_centralizes (f:Configuration m p) (σ:Equiv.Perm (Fin p)) + (h:MulAction.stabilizer (G m) f) : permHom f σ * h.val = h.val * permHom f σ := by + have hh (i:Fin p) : h.val (f i)=f i := congrArg (fun t:Configuration m p=>t i) h.property + exact (supported_fixer_commute (f:=h.val) (g:=permHom f σ) (U:=Set.range f.val) + (by rintro x ⟨i,rfl⟩; exact hh i) (permHom_fixed f σ)).symm.eq +lemma permHom_face (f:Configuration m (p+1)) (i j:Fin (p+1)) : + permHom f (facePermutation i j) • face i f=face j f := by + apply ext; intro k + change permHom f _ (f (i.succAbove k))=f (j.succAbove k) + rw [permHom_apply,facePermutation_apply] +lemma homology_face_eq (m p:ℕ) (hm:p+1 ≤ m) (q:ℕ) (i j:Fin (p+1)) : + (groupHomology.functor ℤ (G m) q).map (faceHom m p i)= + (groupHomology.functor ℤ (G m) q).map (faceHom m p j) := by + let f := standardLE m (p+1) hm + exact TransitiveInduction.map_equivariant_eq_of_centralizer (face j) (face i) + (face_smul j) (face_smul i) f (fun h=>transitive f h) + (permHom f (facePermutation j i)) (permHom_centralizes f _) (permHom_face f j i) q +lemma boundary_two (m : ℕ) : boundary m 1 = faceHom m 1 0 - faceHom m 1 1 := by + rw [boundary_sum, Fin.sum_univ_two] + simp [sub_eq_add_neg] + +lemma boundary_three (m : ℕ) : boundary m 2 = + faceHom m 2 0 - faceHom m 2 1 + faceHom m 2 2 := by + rw [boundary_sum, Fin.sum_univ_succ, Fin.sum_univ_two] + norm_num + abel + +lemma homology_boundary_two_zero (m : ℕ) (hm : 7 < m) (q : ℕ) : + (groupHomology.functor ℤ (G m) q).map (boundary m 1)=0 := by + rw [boundary_two, Functor.map_sub, homology_face_eq m 1 (by omega) q 1 0, sub_self] + +lemma homology_boundary_three (m : ℕ) (hm : 10 < m) (q : ℕ) : + (groupHomology.functor ℤ (G m) q).map (boundary m 2)= + (groupHomology.functor ℤ (G m) q).map (faceHom m 2 0) := by + rw [boundary_three, Functor.map_add, Functor.map_sub, + homology_face_eq m 2 (by omega) q 1 0, homology_face_eq m 2 (by omega) q 2 0, sub_self, zero_add] + +lemma boundary_square (m p : ℕ) : boundary m (p+1) ≫ boundary m p=0 := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply LinearMap.ext + intro c + apply (chainEquiv m p).injective + change chainEquiv m p ((boundary m p).hom ((boundary m (p+1)).hom c)) = + chainEquiv m p 0 + rw [boundary_chain, boundary_chain, ConfigurationChains.degreeBoundary_square, map_zero] + +lemma boundary_exact (m p : ℕ) (hm : 32 ≤ m) (hp : p ≤ 2) : + (ShortComplex.mk (boundary m (p+1)) (boundary m p) (boundary_square m p)).Exact := by + apply (ShortComplex.exact_map_iff_of_faithful _ (forget₂ (Rep.{0} ℤ (G m)) + (ModuleCat.{0} ℤ))).mp + rw [ShortComplex.moduleCat_exact_iff] + intro x hx + change (boundary m p).hom x=0 at hx + have hc : ConfigurationChains.degreeBoundary ((Ne:Fin m→Fin m→Prop)) p (chainEquiv m (p+1) x)=0 := by + rw [← boundary_chain, hx, map_zero] + obtain ⟨y,hy⟩ := (lowDegree_exact hm hp _).mp hc + refine ⟨(chainEquiv m (p+2)).symm y,?_⟩ + apply (chainEquiv m (p+1)).injective + change chainEquiv m (p+1) ((boundary m (p+1)).hom _) = _ + rw [boundary_chain, LinearEquiv.apply_symm_apply, hy] + +lemma boundary_zero_eq_face (m : ℕ) : boundary m 0=faceHom m 0 0 := by + rw [boundary_sum] + simp + +lemma boundary_zero_epi (m : ℕ) (hm : 0 < m) : Epi (boundary m 0) := by + rw [boundary_zero_eq_face, Rep.epi_iff_surjective] + change Function.Surjective (Finsupp.mapDomain (face (0:Fin 1))) + apply Finsupp.mapDomain_surjective + intro f + refine ⟨standardLE m 1 (by omega),?_⟩ + apply ext + intro i + exact Fin.elim0 i + +lemma face_H0_isIso (m p : ℕ) (hm : 3*(p+1)+1 < m) (i : Fin (p+1)) : + IsIso ((groupHomology.functor ℤ (G m) 0).map (faceHom m p i)) := by + let f := standardLE m (p+1) (by omega : p+1 ≤ m) + exact TransitiveInduction.isIso_map_equivariant_H0 (face i) (face_smul i) f + (fun h => transitive f h) (fun h => transitive _ h) + +lemma boundary_two_H0_isIso (m : ℕ) (hm : 10 < m) : + IsIso ((groupHomology.functor ℤ (G m) 0).map (boundary m 2)) := by + rw [homology_boundary_three m hm 0] + exact face_H0_isIso m 2 hm 0 +lemma boundary_zero_H1_isIso (m : ℕ) (hm : 32 ≤ m) : + IsIso ((groupHomology.functor ℤ (G m) 1).map (boundary m 0)) := by + let boundaryEpi := boundary_zero_epi m (by omega) + let boundaryIso : IsIso (BoundedHomologyEdge.Hmap 0 (boundary m 2)) := + boundary_two_H0_isIso m (by omega) + exact BoundedHomologyEdge.chain_H1_isIso (boundary m 0) (boundary m 1) + (boundary m 2) (boundary_square m 0) (boundary_square m 1) + (boundary_exact m 0 hm (by omega)) (boundary_exact m 1 hm (by omega)) + (homology_boundary_two_zero m (by omega) 1) + +end + +attribute [local instance 1200] Rep.hV2 +variable {m p:ℕ} +instance empty_subsingleton (m : ℕ) : Subsingleton (Configuration m 0) := + ⟨fun _ _ => ext (fun i => Fin.elim0 i)⟩ + +noncomputable def empty (m : ℕ) : Configuration m 0 := standardLE m 0 (by omega) + +noncomputable def emptyIso (m : ℕ) : column m 0 ≅ Rep.trivial ℤ (G m) ℤ := + Rep.mkIso (Representation.Equiv.mk (Finsupp.uniqueLinearEquiv ℤ ℤ (empty m)) (by + intro g + apply Finsupp.lhom_ext + intro x z + change (TransitiveInduction.permutationRep g (single x z)) (empty m)= + (single x z) (empty m) + rw [TransitiveInduction.permutationRep_single] + congr 2 + exact Subsingleton.elim _ _)) + +@[simp] lemma emptyIso_single (m : ℕ) (x : Configuration m 0) (z : ℤ) : + (emptyIso m).hom.hom (single x z)=z := by + change (single x z) (empty m)=z + simp [Subsingleton.elim (empty m) x] +lemma augmentation_pointMap (f : Configuration m 1) (q : ℕ) : + groupHomology.map (MulAction.stabilizer (G m) f).subtype + (TransitiveInduction.pointMap f) q ≫ + (groupHomology.functor ℤ (G m) q).map (boundary m 0) ≫ + (groupHomology.functor ℤ (G m) q).map (emptyIso m).hom = + TrivialHomology.map (MulAction.stabilizer (G m) f).subtype q := by + erw [← Functor.map_comp] + erw [groupHomology.functor_map, ← groupHomology.map_comp] + apply groupHomology.map_congr + · rfl + · apply LinearMap.ext + intro z + change (emptyIso m).hom.hom ((boundary m 0).hom (single f z))=z + rw [boundary_zero_eq_face] + dsimp only [faceHom] + rw [TransitiveInduction.equivariantMap_single, emptyIso_single] +lemma stabilizer_H1_isIso (m : ℕ) (hm : 33 ≤ m) (f : Configuration m 1) : + IsIso (TrivialHomology.map (MulAction.stabilizer (G m) f).subtype 1) := by + have pointIso := TransitiveInduction.isIso_map_pointMap f (fun g => transitive f g) 1 + have boundaryIso := boundary_zero_H1_isIso m (by omega) + erw [← augmentation_pointMap f 1] + have lastIso : IsIso ((groupHomology.functor ℤ (G m) 1).map (emptyIso m).hom) := inferInstance + have tailIso := IsIso.comp_isIso' boundaryIso lastIso + exact IsIso.comp_isIso' pointIso tailIso + +end SimpleAmenable.SymmetricConfiguration + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricStabilizer.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricStabilizer.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ba985d5d1599ad6b000beb5835ec6854d156d17 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricStabilizer.lean @@ -0,0 +1,76 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.SymmetricFaces + +namespace OAI + +section +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.SymmetricConfiguration + +attribute [local instance 1200] Rep.hV2 +noncomputable def tailEquiv (p n:ℕ) : Fin n ≃ {x:Fin (p+n) // p≤x.val} where + toFun i := ⟨Fin.natAdd p i,by simp⟩ + invFun x := ⟨x.val.val-p,by omega⟩ + left_inv _ := by apply Fin.ext; simp + right_inv _ := by apply Subtype.ext; apply Fin.ext; dsimp; omega +noncomputable def stabilize (p n:ℕ) : G n →* G (p+n) := + Equiv.Perm.ofSubtype.comp (Equiv.permCongrHom (tailEquiv p n)).toMonoidHom +lemma stabilize_apply_tail (p n:ℕ) (g:G n) (i:Fin n) : + stabilize p n g (Fin.natAdd p i)=Fin.natAdd p (g i) := by + change Equiv.Perm.ofSubtype ((Equiv.permCongrHom (tailEquiv p n)) g) _ = _ + rw [Equiv.Perm.ofSubtype_apply_of_mem _ (by simp)] + change ((tailEquiv p n) (g ((tailEquiv p n).symm ((tailEquiv p n) i)))).val = _ + rw [Equiv.symm_apply_apply] + rfl +lemma stabilize_apply_head (p n:ℕ) (g:G n) (i:Fin p) : + stabilize p n g (Fin.castAdd n i)=Fin.castAdd n i := by + apply Equiv.Perm.ofSubtype_apply_of_not_mem + exact not_le.mpr i.isLt +lemma stabilize_injective (p n:ℕ) : Function.Injective (stabilize p n) := by + intro _ _ gh + apply Equiv.ext + intro i + have hi := congrArg (fun g:G (p+n)=>g (Fin.natAdd p i)) gh + simpa only [stabilize_apply_tail,Fin.natAdd_inj] using hi +lemma stabilize_range (p n:ℕ) : (stabilize p n).range = + MulAction.stabilizer (G (p+n)) (standard p n) := by + ext g + constructor + · rintro ⟨h,rfl⟩ + apply ext + intro i + exact stabilize_apply_head p n h i + · intro hg + have hfix (i:Fin p) : g (Fin.castAdd n i)=Fin.castAdd n i := + congrArg (fun f:Configuration (p+n) p=>f i) hg + have hr : g ∈ (Equiv.Perm.ofSubtype : Equiv.Perm {x:Fin (p+n)//p≤x.val} →* G (p+n)).range := by + rw [Equiv.Perm.mem_range_ofSubtype_iff] + intro x hx + change p≤x.val + by_contra hp + have he := hfix ⟨x.val,by omega⟩ + exact (Equiv.Perm.mem_support.mp hx) he + obtain ⟨h,hh⟩ := hr + refine ⟨(Equiv.permCongrHom (tailEquiv p n)).symm h,?_⟩ + change Equiv.Perm.ofSubtype ((Equiv.permCongrHom (tailEquiv p n)) ((Equiv.permCongrHom (tailEquiv p n)).symm h))=g + rw [MulEquiv.apply_symm_apply] + exact hh +noncomputable def standardStabilizerEquiv (p n:ℕ) : G n ≃* + MulAction.stabilizer (G (p+n)) (standard p n) := + (MulEquiv.ofBijective (stabilize p n).rangeRestrict ⟨fun _ _ h=>stabilize_injective p n (congrArg Subtype.val h), + fun x=>by obtain ⟨g,hg⟩:=x.property; exact ⟨g,Subtype.ext hg⟩⟩).trans + (MulEquiv.subgroupCongr (stabilize_range p n)) +lemma standardStabilizerEquiv_subtype (p n:ℕ) : + (MulAction.stabilizer (G (p+n)) (standard p n)).subtype.comp + (standardStabilizerEquiv p n).toMonoidHom = stabilize p n := rfl +lemma stabilize_one_H1_isIso (n:ℕ) (hn:32≤n) : + IsIso (TrivialHomology.map (stabilize 1 n) 1) := by + rw [← standardStabilizerEquiv_subtype,TrivialHomology.map_comp] + have equivalenceIso := TrivialHomology.isIso_equiv (standardStabilizerEquiv 1 n) 1 + have stabilizerIso := stabilizer_H1_isIso (1+n) (by omega) (standard 1 n) + infer_instance +end SimpleAmenable.SymmetricConfiguration + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricStable.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricStable.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0c9f72a8b94e8d8a4e63c3f22d423b812c9c7a2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/SymmetricStable.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.SymmetricH1 +import OAI.GroupTheory.SimpleAmenable.Homology.FiniteGroupHomology + +namespace OAI + +open _root_.CategoryTheory _root_.OAI.CategoryTheory CategoryTheory.Limits Representation Rep +namespace SimpleAmenable.SymmetricConfiguration + +attribute [local instance 1200] Rep.hV2 + +noncomputable def successorStabilize (n : ℕ) : + G n →* G (n+1) := + (castGroup (Nat.add_comm 1 n)).toMonoidHom.comp (stabilize 1 n) + +noncomputable def fullHomologySequence (j : ℕ) : ℕ ⥤ ModuleCat ℤ := + Functor.ofSequence (fun n => TrivialHomology.map (successorStabilize n) j) + +lemma successor_H1_isIso (n : ℕ) (hn : 32 ≤ n) : + IsIso (TrivialHomology.map (successorStabilize n) 1) := by + unfold successorStabilize + rw [TrivialHomology.map_comp] + have := stabilize_one_H1_isIso n hn + have := TrivialHomology.isIso_equiv (castGroup (Nat.add_comm 1 n)) 1 + infer_instance + +lemma successor_H2_isIso (n : ℕ) (hn : 34 ≤ n) : + IsIso (TrivialHomology.map (successorStabilize n) 2) := by + unfold successorStabilize + rw [TrivialHomology.map_comp] + have := stabilize_one_H2_isIso n hn + have := TrivialHomology.isIso_equiv (castGroup (Nat.add_comm 1 n)) 2 + infer_instance +lemma fullH1_eventuallyConstant : + (fullHomologySequence 1).IsEventuallyConstantFrom 32 := by + apply Functor.isEventuallyConstantFrom_of_succ + intro n hn + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H1_isIso n hn +lemma fullH2_eventuallyConstant : + (fullHomologySequence 2).IsEventuallyConstantFrom 34 := by + apply Functor.isEventuallyConstantFrom_of_succ + intro n hn + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H2_isIso n hn + +lemma fullH1_colimit_ι_isIso (m : ℕ) (hm : 32 ≤ m) : + IsIso (colimit.ι (fullHomologySequence 1) m) := + (fullH1_eventuallyConstant).isIso_ι_of_isColimit' + (colimit.isColimit _) m (homOfLE hm) + +lemma fullH2_colimit_ι_isIso (m : ℕ) (hm : 34 ≤ m) : + IsIso (colimit.ι (fullHomologySequence 2) m) := + (fullH2_eventuallyConstant).isIso_ι_of_isColimit' + (colimit.isColimit _) m (homOfLE hm) +noncomputable def fullH1_colimitIso (m : ℕ) (hm : 32 ≤ m) : + groupHomology (Rep.trivial ℤ (G m) ℤ) 1 ≅ + colimit (fullHomologySequence 1) := by + have := fullH1_colimit_ι_isIso m hm + let e := asIso (colimit.ι (fullHomologySequence 1) m) + exact e +noncomputable def fullH2_colimitIso (m : ℕ) (hm : 34 ≤ m) : + groupHomology (Rep.trivial ℤ (G m) ℤ) 2 ≅ + colimit (fullHomologySequence 2) := by + have := fullH2_colimit_ι_isIso m hm + let e := asIso (colimit.ι (fullHomologySequence 2) m) + exact e +lemma finite_fullH1_iff_colimit (m : ℕ) (hm : 32 ≤ m) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (G m) ℤ) 1) ↔ + Module.Finite ℤ (colimit (fullHomologySequence 1) : ModuleCat ℤ) := by + have h := FixedStageReturn.finite_stage_iff_colimit (fullHomologySequence 1) 32 m + (fun n hn => by + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H1_isIso n hn) hm + exact h +lemma finite_fullH2_iff_colimit (m : ℕ) (hm : 34 ≤ m) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (G m) ℤ) 2) ↔ + Module.Finite ℤ (colimit (fullHomologySequence 2) : ModuleCat ℤ) := by + have h := FixedStageReturn.finite_stage_iff_colimit (fullHomologySequence 2) 34 m + (fun n hn => by + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H2_isIso n hn) hm + exact h +lemma stableH1_finite : Module.Finite ℤ (colimit (fullHomologySequence 1) : ModuleCat ℤ) := by + have := FiniteGroupHomology.finite (Rep.trivial ℤ (G 32) ℤ) 1 + exact Module.Finite.equiv (fullH1_colimitIso 32 (by omega)).toLinearEquiv +lemma stableH2_finite : Module.Finite ℤ (colimit (fullHomologySequence 2) : ModuleCat ℤ) := by + have := FiniteGroupHomology.finite (Rep.trivial ℤ (G 34) ℤ) 2 + exact Module.Finite.equiv (fullH2_colimitIso 34 (by omega)).toLinearEquiv +end SimpleAmenable.SymmetricConfiguration + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrackPoint.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrackPoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee94655218f05b99d8a3b6b37f4e2024f8b00bdc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrackPoint.lean @@ -0,0 +1,441 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonAction + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +section PolygonFullGroup + +attribute [local instance] Classical.propDecidable + +abbrev TrackPoint (a m : ℕ) := Fin m × GenericSquare a + +structure TableChart (a m : ℕ) where + source : Fin m + target : Fin m + shift : CutRing × CutRing + domain : polygonAlgebra a + +def TableChart.Holds {a m : ℕ} (c : TableChart a m) (f : TrackPoint a m → TrackPoint a m) : Prop := + ∀ x ∈ c.domain.val, f (c.source, x) = (c.target, translate a c.shift x) + +def TableChart.Contains {a m : ℕ} (c : TableChart a m) (p : TrackPoint a m) : Prop := + p.1 = c.source ∧ p.2 ∈ c.domain.val + +def HasTranslationTable {a m : ℕ} (f : TrackPoint a m → TrackPoint a m) : Prop := + ∃ s : Finset (TableChart a m), + (∀ c ∈ s, c.Holds f) ∧ (∀ p, ∃ c ∈ s, c.Contains p) + +private def identityChart (a m : ℕ) (i : Fin m) : TableChart a m := + ⟨i, i, 0, ⟨Set.univ, BooleanSubalgebra.top_mem⟩⟩ + +theorem identity_hasTable (a m : ℕ) : HasTranslationTable (id : TrackPoint a m → TrackPoint a m) := by + classical + refine ⟨Finset.univ.image (identityChart a m), ?_, ?_⟩ + · intro c hc + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hc + intro x _ + simp [identityChart] + · intro p + exact ⟨identityChart a m p.1, Finset.mem_image.mpr ⟨p.1, Finset.mem_univ _, rfl⟩, + rfl, Set.mem_univ _⟩ + +noncomputable def TableChart.comp {a m : ℕ} (c d : TableChart a m) : TableChart a m := + ⟨d.source, c.target, c.shift + d.shift, + ⟨d.domain.val ∩ translate a d.shift ⁻¹' c.domain.val, + BooleanSubalgebra.inf_mem d.domain.property (polygon_preimage_translate _ c.domain.property)⟩⟩ + +theorem TableChart.comp_holds {a m : ℕ} {c d : TableChart a m} + {f g : TrackPoint a m → TrackPoint a m} + (hc : c.Holds f) (hd : d.Holds g) (hcd : c.source = d.target) : + (c.comp d).Holds (f ∘ g) := by + intro x hx + change f (g (d.source, x)) = (c.target, translate a (c.shift + d.shift) x) + rw [hd x hx.1, ← hcd, hc _ hx.2, translate_add] + +theorem comp_hasTable {a m : ℕ} {f g : TrackPoint a m → TrackPoint a m} + (hf : HasTranslationTable f) (hg : HasTranslationTable g) : HasTranslationTable (f ∘ g) := by + classical + obtain ⟨s, hs, hscover⟩ := hf + obtain ⟨t, ht, htcover⟩ := hg + let pairs := (s ×ˢ t).filter (fun cd => cd.1.source = cd.2.target) + refine ⟨pairs.image (fun cd => cd.1.comp cd.2), ?_, ?_⟩ + · intro e he + obtain ⟨⟨c, d⟩, hcd, rfl⟩ := Finset.mem_image.mp he + obtain ⟨hmem, hmatch⟩ := Finset.mem_filter.mp hcd + obtain ⟨hc, hd⟩ := Finset.mem_product.mp hmem + exact TableChart.comp_holds (hs c hc) (ht d hd) hmatch + · intro p + obtain ⟨d, hd, hp⟩ := htcover p + obtain ⟨c, hc, hgp⟩ := hscover (g p) + have hdvalue : g p = (d.target, translate a d.shift p.2) := by + convert ht d hd p.2 hp.2 using 1 + exact congrArg g (Prod.ext hp.1 rfl : p = (d.source, p.2)) + have hmatch : c.source = d.target := by + rw [hdvalue] at hgp + exact hgp.1.symm + refine ⟨c.comp d, Finset.mem_image.mpr ⟨(c,d), ?_, rfl⟩, hp.1, hp.2, ?_⟩ + · exact Finset.mem_filter.mpr ⟨Finset.mem_product.mpr ⟨hc,hd⟩, hmatch⟩ + · change translate a d.shift p.2 ∈ c.domain.val + simpa only [hdvalue] using hgp.2 + +noncomputable def TableChart.inverse {a m : ℕ} (c : TableChart a m) : TableChart a m := + ⟨c.target, c.source, -c.shift, + ⟨translation a c.shift '' c.domain.val, polygon_image_translation _ c.domain.property⟩⟩ + +theorem inverse_hasTable {a m : ℕ} (f : Equiv.Perm (TrackPoint a m)) + (hf : HasTranslationTable f) : HasTranslationTable f.symm := by + classical + obtain ⟨s, hs, hcover⟩ := hf + refine ⟨s.image TableChart.inverse, ?_, ?_⟩ + · intro c hc + obtain ⟨d, hd, rfl⟩ := Finset.mem_image.mp hc + intro y hy + obtain ⟨x, hx, rfl⟩ := hy + change f.symm (d.target, translate a d.shift x) = + (d.source, translate a (-d.shift) (translate a d.shift x)) + rw [← hs d hd x hx, f.symm_apply_apply, ← translate_add, neg_add_cancel, translate_zero] + · intro p + obtain ⟨c, hc, hp⟩ := hcover (f.symm p) + have hvalue : f (c.source, (f.symm p).2) = + (c.target, translate a c.shift (f.symm p).2) := hs c hc _ hp.2 + have hpair : (c.source, (f.symm p).2) = f.symm p := Prod.ext hp.1.symm rfl + rw [hpair, f.apply_symm_apply] at hvalue + refine ⟨c.inverse, Finset.mem_image.mpr ⟨c,hc,rfl⟩, ?_, ?_⟩ + · exact congrArg Prod.fst hvalue + · exact ⟨(f.symm p).2, hp.2, (congrArg Prod.snd hvalue).symm⟩ + +noncomputable def polygonFullGroup (a m : ℕ) : Subgroup (Equiv.Perm (TrackPoint a m)) where + carrier := {f | HasTranslationTable f} + one_mem' := identity_hasTable a m + mul_mem' := comp_hasTable + inv_mem' := fun {f} h => inverse_hasTable f h + +noncomputable def SlotMap (a m : ℕ) (U : polygonAlgebra a) {n : ℕ} + (slots : Fin n → Fin m × (CutRing × CutRing)) : + Fin n × U.val → TrackPoint a m := + fun ix => ((slots ix.1).1, translate a (slots ix.1).2 ix.2.val) + +def IsThreeSlotCycle {a m : ℕ} (g : polygonFullGroup a m) : Prop := + ∃ (U : polygonAlgebra a) (slots : Fin 3 → Fin m × (CutRing × CutRing)), + U.val.Nonempty ∧ Function.Injective (SlotMap a m U slots) ∧ + (∀ (i : Fin 3) (x : U.val), + g.val (SlotMap a m U slots (i,x)) = SlotMap a m U slots (i+1,x)) ∧ + (∀ p ∉ Set.range (SlotMap a m U slots), g.val p = p) + +noncomputable def polygonAlternatingGroup (a m : ℕ) : Subgroup (polygonFullGroup a m) := + Subgroup.closure {g | IsThreeSlotCycle g} + +noncomputable def conditionalPerm {a m : ℕ} (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) : Equiv.Perm (TrackPoint a m) := by + classical + exact { + toFun := fun p => (if p.2 ∈ U.val then σ p.1 else p.1, p.2) + invFun := fun p => (if p.2 ∈ U.val then σ.symm p.1 else p.1, p.2) + left_inv := by intro p; by_cases h : p.2 ∈ U.val <;> simp [h] + right_inv := by intro p; by_cases h : p.2 ∈ U.val <;> simp [h] } + +@[simp] theorem conditionalPerm_apply {a m : ℕ} (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) (p : TrackPoint a m) : + conditionalPerm U σ p = (if p.2 ∈ U.val then σ p.1 else p.1, p.2) := by + classical + rfl + +private noncomputable def conditionalChart {a m : ℕ} (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) (b : Bool) (i : Fin m) : TableChart a m := + ⟨i, if b then σ i else i, 0, + if b then U else ⟨U.valᶜ, BooleanSubalgebra.compl_mem U.property⟩⟩ + +theorem conditional_hasTable {a m : ℕ} (U : polygonAlgebra a) + (σ : Equiv.Perm (Fin m)) : HasTranslationTable (conditionalPerm U σ) := by + classical + refine ⟨Finset.univ.image (fun bi : Bool × Fin m => conditionalChart U σ bi.1 bi.2), ?_, ?_⟩ + · intro c hc + obtain ⟨⟨b,i⟩, _, rfl⟩ := Finset.mem_image.mp hc + cases b <;> intro x hx + · change x ∉ U.val at hx + simp [conditionalChart, hx] + · change x ∈ U.val at hx + simp [conditionalChart, hx] + · intro p + by_cases hp : p.2 ∈ U.val + · refine ⟨conditionalChart U σ true p.1, ?_, ?_⟩ + · exact Finset.mem_image.mpr ⟨(true,p.1), Finset.mem_univ _,rfl⟩ + · exact ⟨rfl,hp⟩ + · refine ⟨conditionalChart U σ false p.1, ?_, ?_⟩ + · exact Finset.mem_image.mpr ⟨(false,p.1), Finset.mem_univ _,rfl⟩ + · exact ⟨rfl,hp⟩ + +noncomputable def conditionalHom {a m : ℕ} (U : polygonAlgebra a) : + Equiv.Perm (Fin m) →* polygonFullGroup a m where + toFun σ := ⟨conditionalPerm U σ, conditional_hasTable U σ⟩ + map_one' := by + apply Subtype.ext + apply Equiv.ext + intro p + change conditionalPerm U 1 p = p + simp + map_mul' σ ρ := by + apply Subtype.ext + apply Equiv.ext + intro p + change conditionalPerm U (σ * ρ) p = conditionalPerm U σ (conditionalPerm U ρ p) + by_cases hp : p.2 ∈ U.val <;> simp [hp] + +noncomputable def slotPerm {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hinj : Function.Injective (SlotMap a m U slots)) + (σ : Equiv.Perm (Fin n)) : Equiv.Perm (TrackPoint a m) := + Equiv.Perm.viaEmbedding (Equiv.prodCongr σ (Equiv.refl U.val)) ⟨SlotMap a m U slots, hinj⟩ + +theorem slotPerm_apply {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hinj : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) + (i : Fin n) (x : U.val) : + slotPerm U slots hinj σ (SlotMap a m U slots (i,x)) = + SlotMap a m U slots (σ i,x) := + Equiv.Perm.viaEmbedding_apply _ _ _ + +theorem slotPerm_apply_of_notMem {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hinj : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) + {p : TrackPoint a m} (hp : p ∉ Set.range (SlotMap a m U slots)) : + slotPerm U slots hinj σ p = p := + Equiv.Perm.viaEmbedding_apply_of_notMem _ _ _ hp + +private noncomputable def slotChart {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) (σ : Equiv.Perm (Fin n)) + (i : Fin n) : TableChart a m := + ⟨(slots i).1, (slots (σ i)).1, (slots (σ i)).2 - (slots i).2, + ⟨translate a (slots i).2 '' U.val, polygon_image_translation _ U.property⟩⟩ + +private def slotVoid {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) (i : Fin m) : + Set (GenericSquare a) := + (⋃ j : Fin n, ⋃ (_ : (slots j).1 = i), translate a (slots j).2 '' U.val)ᶜ + +private theorem slotVoid_mem {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) (i : Fin m) : + slotVoid U slots i ∈ polygonAlgebra a := by + apply BooleanSubalgebra.compl_mem + apply BooleanSubalgebra.iSup_mem + intro j + apply BooleanSubalgebra.iSup_mem + intro _ + exact polygon_image_translation _ U.property + +private theorem mem_slotVoid {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) (p : TrackPoint a m) : + p.2 ∈ slotVoid U slots p.1 ↔ p ∉ Set.range (SlotMap a m U slots) := by + simp only [slotVoid, Set.mem_compl_iff, Set.mem_iUnion, Set.mem_image, Set.mem_range] + constructor + · rintro h ⟨⟨i,x⟩, he⟩ + apply h + exact ⟨i, congrArg Prod.fst he, x.val, x.property, congrArg Prod.snd he⟩ + · rintro h ⟨i, hi, x, hx, he⟩ + apply h + exact ⟨(i,⟨x,hx⟩), Prod.ext hi he⟩ + +private noncomputable def slotVoidChart {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) (i : Fin m) : TableChart a m := + ⟨i,i,0,⟨slotVoid U slots i, slotVoid_mem U slots i⟩⟩ + +theorem slotPerm_hasTable {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hinj : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) : + HasTranslationTable (slotPerm U slots hinj σ) := by + classical + refine ⟨(Finset.univ.image (slotChart U slots σ)) ∪ + (Finset.univ.image (slotVoidChart U slots)), ?_, ?_⟩ + · intro c hc + rcases Finset.mem_union.mp hc with hc | hc + · obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hc + intro x hx + obtain ⟨y, hy, rfl⟩ := hx + change slotPerm U slots hinj σ (SlotMap a m U slots (i,⟨y,hy⟩)) = _ + rw [slotPerm_apply] + change ((slots (σ i)).1, translate a (slots (σ i)).2 y) = + ((slots (σ i)).1, translate a ((slots (σ i)).2 - (slots i).2) + (translate a (slots i).2 y)) + rw [← translate_add] + simp + · obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hc + intro x hx + change slotPerm U slots hinj σ (i,x) = (i,translate a 0 x) + rw [translate_zero] + exact slotPerm_apply_of_notMem U slots hinj σ ((mem_slotVoid U slots (i,x)).mp hx) + · intro p + by_cases hp : p ∈ Set.range (SlotMap a m U slots) + · obtain ⟨⟨i,x⟩, rfl⟩ := hp + refine ⟨slotChart U slots σ i, Finset.mem_union_left _ ?_, rfl, ?_⟩ + · exact Finset.mem_image.mpr ⟨i, Finset.mem_univ _, rfl⟩ + · exact ⟨x.val, x.property, rfl⟩ + · refine ⟨slotVoidChart U slots p.1, Finset.mem_union_right _ ?_, rfl, ?_⟩ + · exact Finset.mem_image.mpr ⟨p.1, Finset.mem_univ _, rfl⟩ + · exact (mem_slotVoid U slots p).mpr hp + +noncomputable def slotHom {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hinj : Function.Injective (SlotMap a m U slots)) : + Equiv.Perm (Fin n) →* polygonFullGroup a m where + toFun σ := ⟨slotPerm U slots hinj σ, slotPerm_hasTable U slots hinj σ⟩ + map_one' := by + apply Subtype.ext + apply Equiv.ext + intro p + by_cases hp : p ∈ Set.range (SlotMap a m U slots) + · obtain ⟨⟨i,x⟩, rfl⟩ := hp + exact slotPerm_apply U slots hinj 1 i x + · exact slotPerm_apply_of_notMem U slots hinj 1 hp + map_mul' σ ρ := by + apply Subtype.ext + apply Equiv.ext + intro p + change slotPerm U slots hinj (σ * ρ) p = + slotPerm U slots hinj σ (slotPerm U slots hinj ρ p) + by_cases hp : p ∈ Set.range (SlotMap a m U slots) + · obtain ⟨⟨i,x⟩, rfl⟩ := hp + simp only [slotPerm_apply, Equiv.Perm.mul_apply] + · simp only [slotPerm_apply_of_notMem U slots hinj _ hp] + +theorem SlotMap_injective_mono {a m n : ℕ} {U V : polygonAlgebra a} + (slots : Fin n → Fin m × (CutRing × CutRing)) (hVU : V.val ⊆ U.val) + (hU : Function.Injective (SlotMap a m U slots)) : + Function.Injective (SlotMap a m V slots) := by + rintro ⟨i,x⟩ ⟨j,y⟩ he + have ht := hU (show SlotMap a m U slots (i,⟨x.val,hVU x.property⟩) = + SlotMap a m U slots (j,⟨y.val,hVU y.property⟩) from he) + exact Prod.ext (congrArg (fun p : Fin n × U.val => p.1) ht) + (Subtype.ext (congrArg (fun p => p.2.val) ht)) + +private noncomputable def polygonInter {a : ℕ} (U V : polygonAlgebra a) : polygonAlgebra a := + ⟨U.val ∩ V.val, BooleanSubalgebra.inf_mem U.property V.property⟩ + +private noncomputable def polygonDiff {a : ℕ} (U V : polygonAlgebra a) : polygonAlgebra a := + ⟨U.val \ V.val, BooleanSubalgebra.inf_mem U.property (BooleanSubalgebra.compl_mem V.property)⟩ + +private theorem slotPerm_restrict_apply {a m n : ℕ} {U V : polygonAlgebra a} + (slots : Fin n → Fin m × (CutRing × CutRing)) (hVU : V.val ⊆ U.val) + (hU : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) + (i : Fin n) (x : U.val) : + slotPerm V slots (SlotMap_injective_mono slots hVU hU) σ (SlotMap a m U slots (i,x)) = + if x.val ∈ V.val then SlotMap a m U slots (σ i,x) else SlotMap a m U slots (i,x) := by + classical + split_ifs with hx + · exact slotPerm_apply V slots _ σ i ⟨x.val,hx⟩ + · apply slotPerm_apply_of_notMem + rintro ⟨⟨j,y⟩,he⟩ + have ht := hU (show SlotMap a m U slots (j,⟨y.val,hVU y.property⟩) = + SlotMap a m U slots (i,x) from he) + have hyx : y.val = x.val := congrArg (fun p => p.2.val) ht + exact hx (hyx ▸ y.property) + +theorem slotHom_split {a m n : ℕ} (U V : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hU : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) : + slotHom U slots hU σ = + slotHom (polygonInter U V) slots (SlotMap_injective_mono slots (fun _ h => h.1) hU) σ * + slotHom (polygonDiff U V) slots (SlotMap_injective_mono slots (fun _ h => h.1) hU) σ := by + classical + apply Subtype.ext + apply Equiv.ext + intro p + change slotPerm U slots hU σ p = + slotPerm (polygonInter U V) slots _ σ (slotPerm (polygonDiff U V) slots _ σ p) + by_cases hp : p ∈ Set.range (SlotMap a m U slots) + · obtain ⟨⟨i,x⟩,rfl⟩ := hp + rw [slotPerm_apply, slotPerm_restrict_apply slots (V := polygonDiff U V) (fun _ h => h.1) hU σ] + by_cases hx : x.val ∈ V.val + · simp only [polygonDiff, Set.mem_sdiff, x.property, hx, not_true_eq_false, and_false, + ↓reduceIte] + rw [slotPerm_restrict_apply slots (V := polygonInter U V) (fun _ h => h.1) hU σ] + simp [polygonInter, x.property, hx] + · simp only [polygonDiff, Set.mem_sdiff, x.property, hx, not_false_eq_true, and_self, + ↓reduceIte] + rw [slotPerm_restrict_apply slots (V := polygonInter U V) (fun _ h => h.1) hU σ] + simp [polygonInter, x.property, hx] + · have hout (W : polygonAlgebra a) (hW : W.val ⊆ U.val) : p ∉ Set.range (SlotMap a m W slots) := by + rintro ⟨⟨i,x⟩,he⟩ + exact hp ⟨(i,⟨x.val,hW x.property⟩),he⟩ + rw [slotPerm_apply_of_notMem _ _ _ _ hp, + slotPerm_apply_of_notMem _ _ _ _ (hout (polygonDiff U V) (fun _ h => h.1)), + slotPerm_apply_of_notMem _ _ _ _ (hout (polygonInter U V) (fun _ h => h.1))] + +theorem slotHom_empty {a m n : ℕ} (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hU : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) + (h_empty : U.val = ∅) : slotHom U slots hU σ = 1 := by + apply Subtype.ext + apply Equiv.ext + intro p + apply slotPerm_apply_of_notMem + rintro ⟨⟨i,x⟩,_⟩ + simpa [h_empty] using x.property + +theorem slotHom_of_finite_cover {a m n : ℕ} {β : Type*} + (s : Finset β) (cover : β → polygonAlgebra a) (U : polygonAlgebra a) + (slots : Fin n → Fin m × (CutRing × CutRing)) + (hU : Function.Injective (SlotMap a m U slots)) (σ : Equiv.Perm (Fin n)) + (N : Subgroup (polygonFullGroup a m)) + (hcover : ∀ x ∈ U.val, ∃ b ∈ s, x ∈ (cover b).val) + (hlocal : ∀ b ∈ s, ∀ V : polygonAlgebra a, ∀ hV : V.val ⊆ U.val, + V.val ⊆ (cover b).val → + slotHom V slots (SlotMap_injective_mono slots hV hU) σ ∈ N) : + slotHom U slots hU σ ∈ N := by + classical + induction s using Finset.induction_on generalizing U with + | empty => + have hu : U.val = ∅ := Set.eq_empty_iff_forall_notMem.mpr (by + intro x hx + obtain ⟨b,hb,_⟩ := hcover x hx + simp at hb) + rw [slotHom_empty U slots hU σ hu] + exact N.one_mem + | @insert b s hb ih => + rw [slotHom_split U (cover b) slots hU σ] + apply N.mul_mem + · exact hlocal b (Finset.mem_insert_self ..) (polygonInter U (cover b)) (fun _ h => h.1) (fun _ h => h.2) + · apply ih + · intro x hx + obtain ⟨c,hc,hxc⟩ := hcover x hx.1 + rcases Finset.mem_insert.mp hc with rfl | hc + · exact (hx.2 hxc).elim + · exact ⟨c,hc,hxc⟩ + · intro c hc V hV hVc + exact hlocal c (Finset.mem_insert_of_mem hc) V (fun x hx => (hV hx).1) hVc + +theorem slotHom_conjugate {a m n : ℕ} (U : polygonAlgebra a) + (slots targets : Fin n → Fin m × (CutRing × CutRing)) + (hU : Function.Injective (SlotMap a m U slots)) + (hT : Function.Injective (SlotMap a m U targets)) + (g : polygonFullGroup a m) + (htransport : ∀ (i : Fin n) (x : U.val), + g.val (SlotMap a m U slots (i,x)) = SlotMap a m U targets (i,x)) + (σ : Equiv.Perm (Fin n)) : + g * slotHom U slots hU σ * g⁻¹ = slotHom U targets hT σ := by + apply Subtype.ext + apply Equiv.ext + intro y + obtain ⟨p,rfl⟩ := g.val.surjective y + change g.val (slotPerm U slots hU σ (g.val.symm (g.val p))) = + slotPerm U targets hT σ (g.val p) + rw [g.val.symm_apply_apply] + by_cases hp : p ∈ Set.range (SlotMap a m U slots) + · obtain ⟨⟨i,x⟩,rfl⟩ := hp + rw [slotPerm_apply, htransport, htransport, slotPerm_apply] + · have hout : g.val p ∉ Set.range (SlotMap a m U targets) := by + rintro ⟨⟨i,x⟩,he⟩ + rw [← htransport] at he + exact hp ⟨(i,x),g.val.injective he⟩ + rw [slotPerm_apply_of_notMem U slots hU σ hp, + slotPerm_apply_of_notMem U targets hT σ hout] + +end PolygonFullGroup +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrackTranslationChart.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrackTranslationChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..b98e0aa1df5d8cb0b73f6e40fe55cd03923fbaa3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrackTranslationChart.lean @@ -0,0 +1,178 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TupleChartDomain + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +section PolygonFullGroup +attribute [local instance] Classical.propDecidable + +private noncomputable def trackTranslationChart {a m : ℕ} + (d : Fin m → CutRing × CutRing) (i : Fin m) : TableChart a m := + ⟨i,i,d i,⟨Set.univ,BooleanSubalgebra.top_mem⟩⟩ + +theorem trackTranslation_hasTable {a m : ℕ} (d : Fin m → CutRing × CutRing) : + HasTranslationTable (trackTranslationPerm (a := a) d) := by + classical + refine ⟨Finset.univ.image (trackTranslationChart d), ?_, ?_⟩ + · intro c hc + obtain ⟨i,_,rfl⟩ := Finset.mem_image.mp hc + intro x _ + rfl + · intro p + exact ⟨trackTranslationChart d p.1, + Finset.mem_image.mpr ⟨p.1,Finset.mem_univ _,rfl⟩,rfl,Set.mem_univ _⟩ + +noncomputable def trackTranslation {a m : ℕ} (d : Fin m → CutRing × CutRing) : + polygonFullGroup a m := ⟨trackTranslationPerm d,trackTranslation_hasTable d⟩ + +@[simp] theorem trackTranslation_apply {a m : ℕ} (d : Fin m → CutRing × CutRing) + (p : TrackPoint a m) : + (trackTranslation d).val p = (p.1,translate a (d p.1) p.2) := rfl + +@[simp] theorem trackTranslation_zero {a m : ℕ} : + trackTranslation (a := a) (m := m) 0 = 1 := by + apply Subtype.ext + apply Equiv.ext + intro p + simp + +@[simp] theorem trackTranslation_add {a m : ℕ} (d e : Fin m → CutRing × CutRing) : + trackTranslation (a := a) (d+e) = trackTranslation d * trackTranslation e := by + apply Subtype.ext + apply Equiv.ext + intro p + change (p.1,translate a (d p.1 + e p.1) p.2) = + (p.1,translate a (d p.1) (translate a (e p.1) p.2)) + rw [translate_add] + +@[simp] theorem trackTranslation_neg {a m : ℕ} (d : Fin m → CutRing × CutRing) : + trackTranslation (a := a) (-d) = (trackTranslation d)⁻¹ := by + apply Subtype.ext + apply Equiv.ext + intro p + rfl + +@[simp] theorem trackTranslation_sub {a m : ℕ} (d e : Fin m → CutRing × CutRing) : + trackTranslation (a := a) (d-e) = trackTranslation d * (trackTranslation e)⁻¹ := by + rw [sub_eq_add_neg,trackTranslation_add,trackTranslation_neg] + +noncomputable def wholePolygon (a : ℕ) : polygonAlgebra a := + ⟨Set.univ,BooleanSubalgebra.top_mem⟩ + +theorem constant_conjugate_translation {a m : ℕ} (ρ : Equiv.Perm (Fin m)) + (d : Fin m → CutRing × CutRing) : + conditionalHom (wholePolygon a) ρ * trackTranslation d * + (conditionalHom (wholePolygon a) ρ)⁻¹ = + trackTranslation (fun i => d (ρ.symm i)) := by + apply Subtype.ext + apply Equiv.ext + intro p + change conditionalPerm (wholePolygon a) ρ + (trackTranslationPerm d ((conditionalPerm (wholePolygon a) ρ).symm p)) = _ + simp [conditionalPerm,wholePolygon,trackTranslationPerm,trackTranslation] + +theorem constant_conjugate_point_translation {a m : ℕ} (ρ : Equiv.Perm (Fin m)) + (i : Fin m) (v : CutRing × CutRing) : + conditionalHom (wholePolygon a) ρ * trackTranslation (Pi.single i v) * + (conditionalHom (wholePolygon a) ρ)⁻¹ = + trackTranslation (Pi.single (ρ i) v) := by + rw [constant_conjugate_translation] + congr 1 + funext j + simp only [Pi.single_apply] + congr 1 + exact propext (Equiv.symm_apply_eq ρ) + +theorem trackTranslation_difference_mem {a m : ℕ} (hm : 3 ≤ m) + (i j : Fin m) (v : CutRing × CutRing) : + trackTranslation (a := a) (Pi.single j v - Pi.single i v) ∈ polygonAlternatingGroup a m := by + classical + by_cases hij : i = j + · subst j + simp + obtain ⟨k,hki,hkj⟩ := Fin.exists_ne_and_ne_of_two_lt i j (by omega) + let ι : Fin 3 ↪ Fin m := ⟨![i,j,k], by + intro s t h + fin_cases s <;> fin_cases t <;> simp_all⟩ + let c := conditionalHom (wholePolygon a) (trackCycle ι) + let t := trackTranslation (a := a) (Pi.single i v) + have hc : c ∈ polygonAlternatingGroup a m := conditional_cycle_mem _ _ + have hnormal := polygonAlternatingGroup_normal a m + have ht : c * t * c⁻¹ * t⁻¹ ∈ polygonAlternatingGroup a m := by + have hconj := hnormal.conj_mem c⁻¹ ((polygonAlternatingGroup a m).inv_mem hc) t + simpa only [mul_assoc] using (polygonAlternatingGroup a m).mul_mem hc hconj + have he : (trackCycle ι) i = j := trackCycle_apply ι 0 + have heq : c * t * c⁻¹ = trackTranslation (a := a) (Pi.single j v) := by + change conditionalHom (wholePolygon a) (trackCycle ι) * trackTranslation (Pi.single i v) * + (conditionalHom (wholePolygon a) (trackCycle ι))⁻¹ = _ + rw [constant_conjugate_point_translation,he] + rw [heq] at ht + simpa only [trackTranslation_sub,t] using ht + +noncomputable def coordinatePrimitive (a : ℕ) (j : Fin 2) : polygonAlgebra a := + ⟨halfPlane a (Fin.castLE (by omega) j) (cutTau-1) ∩ + (halfPlane a (Fin.castLE (by omega) j) 0)ᶜ, + BooleanSubalgebra.inf_mem (halfPlane_mem _ _ _) (BooleanSubalgebra.compl_mem + (halfPlane_mem _ _ _))⟩ + +noncomputable def circularBoxPiece (a : ℕ) (r : CutRing) (k : Fin 2 × Fin 2) : + polygonAlgebra a := + ⟨(halfPlane a 0 (r + (k.1.val : CutRing)) ∩ + (halfPlane a 0 (-r + (k.1.val : CutRing)))ᶜ) ∩ + (halfPlane a 1 (r + (k.2.val : CutRing)) ∩ + (halfPlane a 1 (-r + (k.2.val : CutRing)))ᶜ), by + apply BooleanSubalgebra.inf_mem <;> apply BooleanSubalgebra.inf_mem + · exact halfPlane_mem _ _ _ + · exact BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _) + · exact halfPlane_mem _ _ _ + · exact BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _)⟩ + +noncomputable def clippedSlopePrimitive (a : ℕ) (r : CutRing) (j : Fin 4) : + polygonAlgebra a := + ⟨⋃ k : Fin 2 × Fin 2, (circularBoxPiece a r k).val ∩ + (halfPlane a j (integralCutForm a j (k.1.val,k.2.val)))ᶜ, by + apply BooleanSubalgebra.iSup_mem + intro k + exact BooleanSubalgebra.inf_mem (circularBoxPiece a r k).property + (BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _))⟩ + +noncomputable def initialTest (a : ℕ) (r : CutRing) : Fin 5 → polygonAlgebra a := + ![wholePolygon a,coordinatePrimitive a 0,coordinatePrimitive a 1, + clippedSlopePrimitive a r 2,clippedSlopePrimitive a r 3] + +def SourceGeneratorLabel (m : ℕ) := + (Fin 5 × {σ : Equiv.Perm (Fin (m+1)) // + σ ∈ alternatingGroup (Fin (m+1)) ∧ σ.support.card ≤ 5}) ⊕ (Fin m × Fin 2) + +instance (m : ℕ) : Finite (SourceGeneratorLabel m) := by + unfold SourceGeneratorLabel + infer_instance + +noncomputable def sourceGenerator (a : ℕ) (r : CutRing) (m : ℕ) : + SourceGeneratorLabel m → polygonFullGroup a (m+1) + | Sum.inl (j,σ) => conditionalHom (initialTest a r j) σ.val + | Sum.inr (i,j) => trackTranslation + (Pi.single i.castSucc (if j = 0 then (cutTau,0) else (0,cutTau)) - + Pi.single (Fin.last m) (if j = 0 then (cutTau,0) else (0,cutTau))) + +theorem sourceGenerator_mem (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (s : SourceGeneratorLabel m) : sourceGenerator a r m s ∈ polygonAlternatingGroup a (m+1) := by + cases s with + | inl s => exact conditionalHom_alternating_mem _ s.2.property.1 + | inr s => exact trackTranslation_difference_mem (by omega) _ _ _ + +noncomputable def alternatingGenerator (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) : + SourceGeneratorLabel m → polygonAlternatingGroup a (m+1) := + fun s => ⟨sourceGenerator a r m s,sourceGenerator_mem a r m hm s⟩ + +end PolygonFullGroup + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryCoordinates.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..a54b43eef649ded6f0cfae8bc97eedb9c91eb710 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryCoordinates.lean @@ -0,0 +1,67 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.ReindexHomology +import OAI.GroupTheory.SimpleAmenable.Configurations.TrajectoryFaces +import OAI.GroupTheory.SimpleAmenable.Homology.TrajectoryTensor + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory +open scoped TensorProduct +namespace SimpleAmenable.PolygonObject.LabelledStage +open Labelled + +variable {a n : ℕ} {K : Type} [AddCommGroup K] +abbrev RankTwo := Multiplicative (ℤ×ℤ) +noncomputable def negativeProjection (u : CutRing × CutRing) : RankTwo := + (SquareStep.orbitProjection (Multiplicative.ofAdd u))⁻¹ +lemma negativeProjection_add (u v : CutRing × CutRing) : + negativeProjection (u+v)=negativeProjection u*negativeProjection v := by + change (SquareStep.orbitProjection (Multiplicative.ofAdd u*Multiplicative.ofAdd v))⁻¹ = _ + rw [map_mul,mul_inv_rev,mul_comm] + rfl + +noncomputable def signedLabelEquiv (n : ℕ) : ReducedLabel n ≃ (Fin n → RankTwo) := + (reducedLabelEquiv n).trans (Equiv.piCongrRight (fun _ => Equiv.inv RankTwo)) +lemma signedLabelEquiv_apply (l : ReducedLabel n) (i : Fin n) : + signedLabelEquiv n l i=negativeProjection (l.val i) := rfl +lemma signedLabel_zero_face (l : ReducedLabel (n+1)) : + signedLabelEquiv n (labelMap (reindexLabel (faceFunctor 0)) + (reindexLabel_reduced (faceFunctor 0)) l)=Fin.tail (signedLabelEquiv (n+1) l) := by + change (fun i => negativeProjection (reindexLabel (faceFunctor 0) l.val i)) = _ + rw [reindexLabel_zero_face] + rfl +lemma signedLabel_succ_face (l : ReducedLabel (n+1)) (i : Fin (n+1)) : + signedLabelEquiv n (labelMap (reindexLabel (faceFunctor i.succ)) + (reindexLabel_reduced (faceFunctor i.succ)) l)=i.contractNth (·*·) (signedLabelEquiv (n+1) l) := by + change (fun k => negativeProjection (reindexLabel (faceFunctor i.succ) l.val k)) = _ + rw [reindexLabel_succ_face] + exact Fin.comp_contractNth (·+·) (·*·) negativeProjection_add i l.val +noncomputable def chainCoordinates (a n : ℕ) (K : Type) [AddCommGroup K] : + Coefficients a n K ≃ₗ[ℤ] ((Fin n → RankTwo) →₀ (SquareStep a ⊗[ℤ] K)) := + (Finsupp.mapRange.linearEquiv (BooleanStep.tensorEquiv (a:=a) (K:=K)).symm).trans + (Finsupp.domLCongr (signedLabelEquiv n)) +lemma chainCoordinates_single (l : ReducedLabel n) (v : BooleanStep a K) : + chainCoordinates a n K (Finsupp.single l v)= + Finsupp.single (signedLabelEquiv n l) ((BooleanStep.tensorEquiv (a:=a) (K:=K)).symm v) := by + simp [chainCoordinates] +lemma chainCoordinates_zero_face (l : ReducedLabel (n+1)) (v : BooleanStep a K) : + chainCoordinates a n K (reindexCoefficients (K:=K) (faceFunctor 0) (Finsupp.single l v)) = + Finsupp.single (Fin.tail (signedLabelEquiv (n+1) l)) + ((SquareStep.coefficientRep a K).ρ ((signedLabelEquiv (n+1) l 0)⁻¹) + ((BooleanStep.tensorEquiv (a:=a) (K:=K)).symm v)) := by + rw [reindexCoefficients_single,chainCoordinates_single,signedLabel_zero_face, + initialDisplacement_zero_face,tensorEquiv_symm_translation] + simp only [signedLabelEquiv_apply,negativeProjection,inv_inv] + rfl +lemma chainCoordinates_succ_face (l : ReducedLabel (n+1)) (v : BooleanStep a K) (i : Fin (n+1)) : + chainCoordinates a n K (reindexCoefficients (K:=K) (faceFunctor i.succ) (Finsupp.single l v)) = + Finsupp.single (i.contractNth (·*·) (signedLabelEquiv (n+1) l)) + ((BooleanStep.tensorEquiv (a:=a) (K:=K)).symm v) := by + rw [reindexCoefficients_single,chainCoordinates_single,signedLabel_succ_face, + initialDisplacement_succ_face,stepTranslate_zero] +end SimpleAmenable.PolygonObject.LabelledStage + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryFaces.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryFaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..39fa5a7c93e538de37b5506a5daa7e7d8cdeb7f4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryFaces.lean @@ -0,0 +1,40 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.TrajectoryReindexLabels + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory +namespace SimpleAmenable.PolygonObject.Labelled + +variable {n : ℕ} +abbrev faceFunctor (i : Fin (n+2)) : Fin (n+1) ⥤ Fin (n+2) := + (SimplexCategory.δ i).toOrderHom.toFunctor +lemma faceFunctor_obj (i : Fin (n+2)) (k : Fin (n+1)) : + (faceFunctor i).obj k = i.succAbove k := rfl +lemma reindexLabel_zero_face (g : Fin (n+1) → CutRing × CutRing) : + reindexLabel (faceFunctor (0 : Fin (n+2))) g = Fin.tail g := by + funext k + simp only [reindexLabel,faceFunctor_obj,Fin.zero_succAbove,Fin.partialSum_succ'] + rw [show g 0 + Fin.partialSum (Fin.tail g) k.succ - + (g 0 + Fin.partialSum (Fin.tail g) k.castSucc) = + -Fin.partialSum (Fin.tail g) k.castSucc + Fin.partialSum (Fin.tail g) k.succ by abel] + rw [Fin.partialSum_succ] + abel +lemma reindexLabel_succ_face (g : Fin (n+1) → CutRing × CutRing) (i : Fin (n+1)) : + reindexLabel (faceFunctor i.succ) g = i.contractNth (·+·) g := by + funext k + simp only [reindexLabel,faceFunctor_obj,Fin.succ_succAbove_succ] + rw [sub_eq_add_neg,add_comm] + exact Fin.neg_partialSum_add_eq_contractNth g i k +lemma initialDisplacement_zero_face (g : Fin (n+1) → CutRing × CutRing) : + initialDisplacement (faceFunctor (0 : Fin (n+2))) g = g 0 := by + simp only [initialDisplacement,faceFunctor_obj,Fin.zero_succAbove,Fin.partialSum_succ',Fin.partialSum_zero,add_zero] +lemma initialDisplacement_succ_face (g : Fin (n+1) → CutRing × CutRing) (i : Fin (n+1)) : + initialDisplacement (faceFunctor i.succ) g = 0 := by + simp only [initialDisplacement,faceFunctor_obj,Fin.succ_succAbove_zero,Fin.partialSum_zero] +end SimpleAmenable.PolygonObject.Labelled + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryLabels.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryLabels.lean new file mode 100644 index 0000000000000000000000000000000000000000..6bf671fa05a651ca1e839bba2a00725c33895a5e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryLabels.lean @@ -0,0 +1,168 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonStrandReconstruction + +namespace OAI + +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +structure Labelled (a n : ℕ) where + polygon : PolygonObject a + label : Fin polygon.tracks → Fin n → CutRing × CutRing + reduced : ∀ j i, orbitRepresentative (label j i) = label j i + +namespace Labelled +variable {a n : ℕ} +structure Hom (U V : Labelled a n) where + arrow : U.polygon ⟶ V.polygon + positional : Positional arrow + labelled : ∀ x, V.label (arrow.toEquiv x).val.1 = U.label x.val.1 + +@[ext] theorem Hom.ext {U V : Labelled a n} (f g : Hom U V) (h : f.arrow = g.arrow) : f=g := by + cases f; cases g; cases h; rfl + +noncomputable instance : Category (Labelled a n) where + Hom := Hom + id object := ⟨𝟙 object.polygon, (fun _ => rfl), fun _ => rfl⟩ + comp f g := ⟨f.arrow ≫ g.arrow, positional_comp f.positional g.positional, + fun point => (g.labelled (f.arrow.toEquiv point)).trans (f.labelled point)⟩ + id_comp _ := Hom.ext _ _ (Category.id_comp _) + comp_id _ := Hom.ext _ _ (Category.comp_id _) + assoc _ _ _ := Hom.ext _ _ (Category.assoc _ _ _) + +noncomputable instance {U V : Labelled a n} (f : U ⟶ V) : IsIso f := by + refine ⟨⟨⟨inv f.arrow,positional_inv f.positional,?_⟩,?_,?_⟩⟩ + · intro x + obtain ⟨y,rfl⟩ := f.arrow.toEquiv.surjective x + simpa only [inv_arrow_apply,Equiv.symm_apply_apply] using (f.labelled y).symm + · apply Hom.ext; exact IsIso.hom_inv_id _ + · apply Hom.ext; exact IsIso.inv_hom_id _ + +noncomputable instance : Groupoid (Labelled a n) := Groupoid.ofIsIso (fun _ => inferInstance) + +noncomputable abbrev string (U : Labelled a n) : StringGroupoid a n := + ⟨incrementString U.polygon U.label⟩ +noncomputable abbrev initial (U : Labelled a n) := incrementInitial U.polygon U.label + +noncomputable def initialArrow {U V : Labelled a n} (f : U ⟶ V) : + (string U).obj.obj 0 ⟶ (string V).obj.obj 0 := + inv (initial U) ≫ f.arrow ≫ initial V + +theorem initialArrow_positional {U V : Labelled a n} (f : U ⟶ V) : + Positional (initialArrow f) := + positional_comp (positional_inv (incrementInitial_positional _ _)) + (positional_comp f.positional (incrementInitial_positional _ _)) + +theorem initialArrow_labelled {U V : Labelled a n} (f : U ⟶ V) + (x : ((string U).obj.obj 0).Point) : + increments (string V).obj ((initialArrow f).toEquiv x) = increments (string U).obj x := by + obtain ⟨y,rfl⟩ := (initial U).toEquiv.surjective x + simp only [initialArrow,arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] + rw [incrementString_spec_reduced _ _ V.reduced,incrementString_spec_reduced _ _ U.reduced] + exact f.labelled y + +noncomputable def ladder {U V : Labelled a n} (f : U ⟶ V) : string U ⟶ string V := + ⟨extendLadder (initialArrow f),extendLadder_positional_of_increments _ + (initialArrow_positional f) (initialArrow_labelled f)⟩ + +@[simp] theorem ladder_zero {U V : Labelled a n} (f : U ⟶ V) : + (ladder f).hom.app 0 = initialArrow f := extendLadder_zero _ + +noncomputable def toStrings : Labelled a n ⥤ StringGroupoid a n where + obj := string + map := ladder + map_id U := by + apply WideSubcategory.hom_ext + apply ladder_ext + change (ladder (𝟙 U)).hom.app 0 = 𝟙 _ + rw [ladder_zero] + change inv (initial U) ≫ (𝟙 _) ≫ initial U = 𝟙 _ + simp + map_comp f g := by + apply WideSubcategory.hom_ext + apply ladder_ext + change (ladder (f ≫ g)).hom.app 0 = (ladder f).hom.app 0 ≫ (ladder g).hom.app 0 + rw [ladder_zero,ladder_zero,ladder_zero] + change inv _ ≫ (f.arrow ≫ g.arrow) ≫ _ = initialArrow f ≫ initialArrow g + simp [initialArrow,Category.assoc] + +noncomputable def fromLadder {U V : Labelled a n} (f : string U ⟶ string V) : U ⟶ V where + arrow := initial U ≫ f.hom.app 0 ≫ inv (initial V) + positional := positional_comp (incrementInitial_positional _ _) + (positional_comp (f.property 0) (positional_inv (incrementInitial_positional _ _))) + labelled x := by + have h := ladder_preserves_increments f ((initial U).toEquiv x) + rw [incrementString_spec_reduced _ _ U.reduced] at h + have hv := incrementString_spec_reduced V.polygon V.label V.reduced + ((initial V).toEquiv.symm ((f.hom.app 0).toEquiv ((initial U).toEquiv x))) + simp only [Equiv.apply_symm_apply] at hv + simpa only [arrow_comp_apply,inv_arrow_apply] using hv.symm.trans h + +noncomputable instance : toStrings (a:=a) (n:=n) |>.Full where + map_surjective f := ⟨fromLadder f,by + apply WideSubcategory.hom_ext + apply ladder_ext + change (ladder (fromLadder f)).hom.app 0 = f.hom.app 0 + rw [ladder_zero] + simp [initialArrow,fromLadder,Category.assoc]⟩ + +instance : toStrings (a:=a) (n:=n) |>.Faithful where + map_injective {U V} f g h := by + have h0 := congrArg (fun h : string U ⟶ string V => h.hom.app 0) h + change (ladder f).hom.app 0 = (ladder g).hom.app 0 at h0 + rw [ladder_zero,ladder_zero] at h0 + apply Hom.ext + simpa [initialArrow,Category.assoc] using congrArg (fun h => initial U ≫ h ≫ inv (initial V)) h0 + +theorem increments_reduced (F : RawString a n) (x : (F.obj 0).Point) (i : Fin n) : + orbitRepresentative (increments F x i) = increments F x i := by + simp only [increments,representative_sub,trajectoryShift,pointShift_reduced] + +abbrev Support (F : RawString a n) := Set.range (increments F) +noncomputable instance (F : RawString a n) : Fintype (Support F) := + (increments_finite_range F).fintype +noncomputable def supportLabel (F : RawString a n) (x : (F.obj 0).Point) : Support F := + ⟨increments F x,⟨x,rfl⟩⟩ +theorem supportLabel_polygon (F : RawString a n) (j : Fin (F.obj 0).tracks) (k : Support F) : + {z | ∃hz : z∈((F.obj 0).cell j).val,supportLabel F ⟨(j,z),hz⟩=k}∈polygonAlgebra a := by + simpa only [Subtype.ext_iff,supportLabel] using increments_fiber_polygon F j k.val + +noncomputable def refine (F : RawString a n) : Labelled a n where + polygon := refinement (F.obj 0) (supportLabel F) (supportLabel_polygon F) + label j := ((Fintype.equivFin (Fin (F.obj 0).tracks × Support F)).symm j).2.val + reduced j i := by + obtain ⟨x,hx⟩ := ((Fintype.equivFin (Fin (F.obj 0).tracks × Support F)).symm j).2.property + rw [←hx] + exact increments_reduced F x i + +noncomputable def drop (F : RawString a n) : (refine F).polygon ⟶ F.obj 0 := + refinementArrow (F.obj 0) (supportLabel F) (supportLabel_polygon F) + +theorem drop_label (F : RawString a n) (x : (refine F).polygon.Point) : + increments F ((drop F).toEquiv x) = (refine F).label x.val.1 := + congrArg Subtype.val (refinementArrow_label (F.obj 0) (supportLabel F) (supportLabel_polygon F) x) + +noncomputable def refinementLadder (F : RawString a n) : string (refine F) ⟶ (⟨F⟩ : StringGroupoid a n) := by + let h := inv (initial (refine F)) ≫ drop F + refine (incrementLadderEquiv _ _).symm ⟨h,?_,?_⟩ + · exact positional_comp (positional_inv (incrementInitial_positional _ _)) + (refinementArrow_positional _ _ _) + · intro x + obtain ⟨y,rfl⟩ := (initial (refine F)).toEquiv.surjective x + simp only [h,arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] + rw [incrementString_spec_reduced _ _ (refine F).reduced] + exact drop_label F y +noncomputable instance : toStrings (a:=a) (n:=n) |>.EssSurj where + mem_essImage F := by + let e := asIso (refinementLadder F.obj) + exact ⟨refine F.obj,⟨e⟩⟩ + +noncomputable instance : toStrings (a:=a) (n:=n) |>.IsEquivalence where + +noncomputable def equivalence (a n : ℕ) : Labelled a n ≌ StringGroupoid a n := + toStrings.asEquivalence + +end Labelled +end SimpleAmenable.PolygonObject + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryStages.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryStages.lean new file mode 100644 index 0000000000000000000000000000000000000000..26aba69521752f69d8610a6b9b7796d39cdfca90 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TrajectoryStages.lean @@ -0,0 +1,260 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.BooleanStages + +namespace OAI + +section + +section + +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +structure FiniteSetGroupoid where + size : ℕ +namespace FiniteSetGroupoid +instance : Groupoid FiniteSetGroupoid where + Hom U V := Fin U.size ≃ Fin V.size + id object := Equiv.refl (Fin object.size) + comp f g := f.trans g + inv f := f.symm + id_comp _ := rfl + comp_id _ := rfl + assoc _ _ _ := rfl + inv_comp f := Equiv.symm_trans_self f + comp_inv f := Equiv.self_trans_symm f +end FiniteSetGroupoid + +namespace LabelledStage +variable {a n s : ℕ} (P : BooleanPartition a) + (L : Fin s → Fin n → CutRing × CutRing) + (hL : ∀ j i, orbitRepresentative (L j i)=L j i) + +abbrev Obj := (Fin P.size × Fin s) → FiniteSetGroupoid +abbrev Track (U : Obj P (s:=s)) := Σ b : Fin P.size × Fin s, Fin (U b).size +noncomputable abbrev index (U : Obj P (s:=s)) := Fintype.equivFin (Track P U) +noncomputable def object (U : Obj P (s:=s)) : Labelled a n where + polygon := ⟨Fintype.card (Track P U), fun j => P.cell (((index P U).symm j).1.1)⟩ + label j := L (((index P U).symm j).1.2) + reduced track := hL (((index P U).symm track).1.2) + +noncomputable def trackMap {U V : Obj P (s:=s)} (f : U ⟶ V) : Track P U ≃ Track P V := + Equiv.sigmaCongrRight f +noncomputable def indexMap {U V : Obj P (s:=s)} (f : U ⟶ V) : + Fin (object P L hL U).polygon.tracks ≃ Fin (object P L hL V).polygon.tracks := + (index P U).symm.trans ((trackMap P f).trans (index P V)) + +@[simp] theorem indexMap_atom {U V : Obj P (s:=s)} (f : U ⟶ V) + (j : Fin (object P L hL U).polygon.tracks) : + ((index P V).symm (indexMap P L hL f j)).1 = ((index P U).symm j).1 := by + change ((index P V).symm ((index P V) ((trackMap P f) ((index P U).symm j)))).1 = _ + rw [Equiv.symm_apply_apply] + rfl + +@[simp] theorem indexMap_id (U : Obj P (s:=s)) (j : Fin (object P L hL U).polygon.tracks) : + indexMap P L hL (𝟙 U) j=j := by + change (index P U) ((index P U).symm j)=j + exact Equiv.apply_symm_apply _ _ + +@[simp] theorem indexMap_comp {U V W : Obj P (s:=s)} (f : U ⟶ V) (g : V ⟶ W) + (j : Fin (object P L hL U).polygon.tracks) : + indexMap P L hL (f≫g) j = indexMap P L hL g (indexMap P L hL f j) := by + change (index P W) ((trackMap P (f≫g)) ((index P U).symm j)) = + (index P W) ((trackMap P g) ((index P V).symm + ((index P V) ((trackMap P f) ((index P U).symm j))))) + rw [Equiv.symm_apply_apply] + rfl + +noncomputable def pointMap {U V : Obj P (s:=s)} (f : U ⟶ V) : + (object P L hL U).polygon.Point ≃ (object P L hL V).polygon.Point where + toFun x := ⟨(indexMap P L hL f x.val.1,x.val.2), by + change P.color x.val.2 = ((index P V).symm (indexMap P L hL f x.val.1)).1.1 + rw [indexMap_atom] + exact x.property⟩ + invFun x := ⟨((indexMap P L hL f).symm x.val.1,x.val.2),by + have h := indexMap_atom P L hL f ((indexMap P L hL f).symm x.val.1) + rw [Equiv.apply_symm_apply] at h + change P.color x.val.2 = ((index P U).symm ((indexMap P L hL f).symm x.val.1)).1.1 + rw [←h] + exact x.property⟩ + left_inv x := by apply Subtype.ext; simp + right_inv x := by apply Subtype.ext; simp + +noncomputable def arrow {U V : Obj P (s:=s)} (f : U ⟶ V) : object P L hL U ⟶ object P L hL V where + arrow := relabelArrow (pointMap P L hL f) (indexMap P L hL f) (fun _ => rfl) + positional _ := rfl + labelled x := by + change L (((index P V).symm (indexMap P L hL f x.val.1)).1.2) = _ + rw [indexMap_atom] + rfl + +@[simp] theorem arrow_apply {U V : Obj P (s:=s)} (f : U ⟶ V) + (x : (object P L hL U).polygon.Point) : + ((arrow P L hL f).arrow.toEquiv x).val = (indexMap P L hL f x.val.1,x.val.2) := rfl + +noncomputable def functor : Obj P (s:=s) ⥤ Labelled a n where + obj := object P L hL + map := arrow P L hL + map_id U := by + apply Labelled.Hom.ext + apply Arrow.ext + apply Equiv.ext + intro x + apply Subtype.ext + rw [arrow_apply] + change (indexMap P L hL (𝟙 U) x.val.1,x.val.2) = x.val + rw [indexMap_id] + map_comp f g := by + apply Labelled.Hom.ext + apply Arrow.ext + apply Equiv.ext + intro x + apply Subtype.ext + change _ = ((arrow P L hL g).arrow.toEquiv ((arrow P L hL f).arrow.toEquiv x)).val + rw [arrow_apply,arrow_apply,arrow_apply,indexMap_comp] + +instance : (functor P L hL).Faithful where + map_injective {U V} f g h := by + funext b + apply Equiv.ext + intro k + let j := index P U ⟨b,k⟩ + let x : (object P L hL U).polygon.Point := + ⟨(j,P.point b.1),by simp [object,j,BooleanPartition.cell]⟩ + have hx := congrArg (fun f : object P L hL U ⟶ object P L hL V => + (f.arrow.toEquiv x).val.1) h + change indexMap P L hL f j = indexMap P L hL g j at hx + have hh := (index P V).injective hx + change trackMap P f ((index P U).symm j) = trackMap P g ((index P U).symm j) at hh + simp only [j,Equiv.symm_apply_apply] at hh + exact Sigma.mk.inj_iff.mp hh |>.2 |> eq_of_heq + +end LabelledStage +end SimpleAmenable.PolygonObject + +end + +section + +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +namespace LabelledStage +variable {a n s : ℕ} (P : BooleanPartition a) + (L : Fin s → Fin n → CutRing × CutRing) + +structure UniformObject where + obj : Labelled a n + uniform : Labelled.ObjectUniform P obj + supported : ∀ j,∃ l,L l=obj.label j + +namespace UniformObject +variable {P L} +structure Hom (U V : UniformObject P L) where + arrow : U.obj ⟶ V.obj + uniform : Labelled.ArrowUniform P arrow +@[ext] theorem Hom.ext {U V : UniformObject P L} (f g : Hom U V) (h : f.arrow=g.arrow) : f=g := by + cases f; cases g; cases h; rfl +noncomputable instance : Category (UniformObject P L) where + Hom := Hom + id U := ⟨𝟙 _,Labelled.arrowUniform_id P U.obj⟩ + comp f g := ⟨f.arrow≫g.arrow,Labelled.arrowUniform_comp P f.uniform g.uniform⟩ + id_comp _ := Hom.ext _ _ (Category.id_comp _) + comp_id _ := Hom.ext _ _ (Category.comp_id _) + assoc _ _ _ := Hom.ext _ _ (Category.assoc _ _ _) +noncomputable instance {U V : UniformObject P L} (f : U ⟶ V) : IsIso f := by + refine ⟨⟨⟨inv f.arrow,Labelled.arrowUniform_inv P U.uniform f.uniform⟩,?_,?_⟩⟩ + · exact Hom.ext _ _ (IsIso.hom_inv_id _) + · exact Hom.ext _ _ (IsIso.inv_hom_id _) +noncomputable instance : Groupoid (UniformObject P L) := Groupoid.ofIsIso (fun _ => inferInstance) + +noncomputable def forget : UniformObject P L ⥤ Labelled a n where + obj U := U.obj + map f := f.arrow +instance : (forget (P:=P) (L:=L)).Faithful where + map_injective h := Hom.ext _ _ h + +abbrev Fiber (U : UniformObject P L) (b : Fin P.size × Fin s) := + {x : U.obj.polygon.Point // x.val.2=P.point b.1 ∧ U.obj.label x.val.1=L b.2} + +noncomputable instance (U : UniformObject P L) (b : Fin P.size × Fin s) : Fintype (Fiber U b) := + Fintype.ofInjective (fun x : Fiber U b => x.val.val.1) (by + intro x y h + apply Subtype.ext + apply Subtype.ext + exact Prod.ext h (x.property.1.trans y.property.1.symm)) + +noncomputable def fiberMap {U V : UniformObject P L} (f : U ⟶ V) (b : Fin P.size × Fin s) : + Fiber U b ≃ Fiber V b where + toFun x := ⟨f.arrow.arrow.toEquiv x.val, + (f.arrow.positional x.val).trans x.property.1, + (f.arrow.labelled x.val).trans x.property.2⟩ + invFun y := ⟨f.arrow.arrow.toEquiv.symm y.val,by + have h := f.arrow.positional (f.arrow.arrow.toEquiv.symm y.val) + rw [Equiv.apply_symm_apply] at h + exact h.symm.trans y.property.1,by + have h := f.arrow.labelled (f.arrow.arrow.toEquiv.symm y.val) + rw [Equiv.apply_symm_apply] at h + exact h.symm.trans y.property.2⟩ + left_inv _ := Subtype.ext (Equiv.symm_apply_apply _ _) + right_inv _ := Subtype.ext (Equiv.apply_symm_apply _ _) + +noncomputable def evaluation : UniformObject P L ⥤ Obj P (s:=s) where + obj U b := ⟨Fintype.card (Fiber U b)⟩ + map {U V} f b := (Fintype.equivFin (Fiber U b)).symm.trans + ((fiberMap f b).trans (Fintype.equivFin (Fiber V b))) + map_id U := by + funext b + apply Equiv.ext + intro j + change (Fintype.equivFin (Fiber U b)) ((fiberMap (𝟙 U) b) + ((Fintype.equivFin (Fiber U b)).symm j))=j + change (Fintype.equivFin (Fiber U b)) ((Fintype.equivFin (Fiber U b)).symm j)=j + exact Equiv.apply_symm_apply _ _ + map_comp {U V W} f g := by + funext b + apply Equiv.ext + intro j + change (Fintype.equivFin (Fiber W b)) ((fiberMap (f≫g) b) _)= + (Fintype.equivFin (Fiber W b)) ((fiberMap g b) + ((Fintype.equivFin (Fiber V b)).symm ((Fintype.equivFin (Fiber V b)) _))) + rw [Equiv.symm_apply_apply] + rfl + +instance : (evaluation (P:=P) (L:=L)).Faithful where + map_injective {U V} f g h := by + apply Hom.ext + apply Labelled.Hom.ext + apply Arrow.ext + apply Equiv.ext + intro x + obtain ⟨l,hl⟩ := U.supported x.val.1 + let b := (P.color x.val.2,l) + have hm : P.point b.1∈(U.obj.polygon.cell x.val.1).val := + (U.uniform x.val.1 x.val.2 (P.point b.1) (by simp [b])).mp x.property + let y : Fiber U b := ⟨⟨(x.val.1,P.point b.1),hm⟩,rfl,hl.symm⟩ + have hh := congrFun h b + have hy := congrArg (fun e : Fin (Fintype.card (Fiber U b)) ≃ + Fin (Fintype.card (Fiber V b)) => e (Fintype.equivFin (Fiber U b) y)) hh + change (Fintype.equivFin (Fiber V b)) ((fiberMap f b) + ((Fintype.equivFin (Fiber U b)).symm ((Fintype.equivFin (Fiber U b)) y)))= + (Fintype.equivFin (Fiber V b)) ((fiberMap g b) + ((Fintype.equivFin (Fiber U b)).symm ((Fintype.equivFin (Fiber U b)) y))) at hy + simp only [Equiv.symm_apply_apply] at hy + have he := (Fintype.equivFin (Fiber V b)).injective hy + apply Subtype.ext + apply Prod.ext + · exact (f.uniform x y.val rfl (by simp [y,b])).trans + ((congrArg (fun z : Fiber V b => z.val.val.1) he).trans + (g.uniform x y.val rfl (by simp [y,b])).symm) + · exact (f.arrow.positional x).trans (g.arrow.positional x).symm + +end UniformObject +end LabelledStage +end SimpleAmenable.PolygonObject + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TransitiveInduction.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TransitiveInduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3bd73767e9ef339a9d31e8e48e085a0adbb37db --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TransitiveInduction.lean @@ -0,0 +1,182 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonPlacementAlternating + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section TransitiveInduction + +open Classical CategoryTheory Representation Finsupp +namespace TransitiveInduction +variable {G X : Type} [Group G] [MulAction G X] (x : X) + +noncomputable def permutationRep : Representation ℤ G (X →₀ ℤ) where + toFun g := Finsupp.lmapDomain ℤ ℤ (g • ·) + map_one' := by ext y z; simp + map_mul' g h := by ext y z; simp [mul_smul] + +@[simp] lemma permutationRep_single (g : G) (y : X) (z : ℤ) : + permutationRep (G:=G) (X:=X) g (Finsupp.single y z)=Finsupp.single (g • y) z := by + simp [permutationRep] + +noncomputable def pointMap : Rep.trivial ℤ (MulAction.stabilizer G x) ℤ ⟶ + Rep.res (MulAction.stabilizer G x).subtype (Rep.of (permutationRep (G:=G) (X:=X))) := + Rep.ofHom ⟨Finsupp.lsingle x,by + intro g + apply LinearMap.ext + intro z + change Finsupp.single x z=permutationRep (G:=G) (X:=X) g.val (Finsupp.single x z) + rw [permutationRep_single] + exact congrArg (fun y => Finsupp.single y z) g.property.symm⟩ + +noncomputable def toPermutation : + Rep.ind (MulAction.stabilizer G x).subtype (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) ⟶ + Rep.of (permutationRep (G:=G) (X:=X)) := + (Rep.indResHomEquiv _ _ _).symm (pointMap (G:=G) x) + +@[simp] theorem toPermutation_mk (g : G) (z : ℤ) : + toPermutation (G:=G) x (IndV.mk (MulAction.stabilizer G x).subtype + (Representation.trivial ℤ (MulAction.stabilizer G x) ℤ) g z)=Finsupp.single (g⁻¹ • x) z := by + simp [toPermutation,Rep.indResHomEquiv,pointMap] + +lemma mk_same {g h : G} (he : g⁻¹ • x=h⁻¹ • x) (z : ℤ) : + IndV.mk (MulAction.stabilizer G x).subtype + (Representation.trivial ℤ (MulAction.stabilizer G x) ℤ) g z= + IndV.mk (MulAction.stabilizer G x).subtype + (Representation.trivial ℤ (MulAction.stabilizer G x) ℤ) h z := by + have hs : h*g⁻¹∈MulAction.stabilizer G x := by + change (h*g⁻¹) • x=x + rw [mul_smul,he,smul_inv_smul] + have hh := Coinvariants.mk_self_apply + (Representation.tprod ((Representation.leftRegular ℤ G).comp (MulAction.stabilizer G x).subtype) + (Representation.trivial ℤ (MulAction.stabilizer G x) ℤ)) + (⟨h*g⁻¹,hs⟩ : MulAction.stabilizer G x) + (TensorProduct.tmul ℤ (MonoidAlgebra.single g (1:ℤ)) z) + simpa [IndV.mk,Representation.tprod_apply,mul_assoc] using hh.symm + +noncomputable def transport (ht : ∀y : X,∃g : G,g • x=y) (y : X) : G := (ht y).choose +@[simp] theorem transport_spec (ht : ∀y : X,∃g : G,g • x=y) (y : X) : + transport x ht y • x=y := (ht y).choose_spec + +noncomputable def fromPermutation (ht : ∀y : X,∃g : G,g • x=y) : + (X →₀ ℤ) →ₗ[ℤ] Representation.IndV (MulAction.stabilizer G x).subtype + (Representation.trivial ℤ (MulAction.stabilizer G x) ℤ) := + Finsupp.lsum ℤ (fun y => IndV.mk _ _ (transport x ht y)⁻¹) + +@[simp] theorem fromPermutation_single (ht : ∀y : X,∃g : G,g • x=y) (y : X) (z : ℤ) : + fromPermutation x ht (Finsupp.single y z)=IndV.mk _ _ (transport x ht y)⁻¹ z := by + exact Finsupp.lsum_single ℤ _ y z + +lemma from_to (ht : ∀y : X,∃g : G,g • x=y) : + (fromPermutation x ht).comp (toPermutation (G:=G) x).hom.toLinearMap=LinearMap.id := by + apply IndV.hom_ext + intro g + apply LinearMap.ext + intro z + change fromPermutation x ht (toPermutation (G:=G) x (IndV.mk _ _ g z))=IndV.mk _ _ g z + rw [toPermutation_mk,fromPermutation_single] + apply mk_same + simp + +lemma to_from (ht : ∀y : X,∃g : G,g • x=y) : + (toPermutation (G:=G) x).hom.toLinearMap.comp (fromPermutation x ht)=LinearMap.id := by + apply Finsupp.lhom_ext + intro y z + change toPermutation (G:=G) x (fromPermutation x ht (Finsupp.single y z))=Finsupp.single y z + rw [fromPermutation_single,toPermutation_mk] + simp + +noncomputable def iso (ht : ∀y : X,∃g : G,g • x=y) : + Rep.ind (MulAction.stabilizer G x).subtype (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) ≅ + Rep.of (permutationRep (G:=G) (X:=X)) := + Rep.mkIso (Representation.IntertwiningMap.ofBijective (toPermutation (G:=G) x).hom + ⟨by + intro u v he + exact (LinearMap.congr_fun (from_to x ht) u).symm.trans + ((congrArg (fromPermutation x ht) he).trans (LinearMap.congr_fun (from_to x ht) v)), + fun y => ⟨fromPermutation x ht y,LinearMap.congr_fun (to_from x ht) y⟩⟩) + +noncomputable def homologyIso (ht : ∀y : X,∃g : G,g • x=y) (q : ℕ) : + groupHomology (Rep.of (permutationRep (G:=G) (X:=X))) q ≅ + groupHomology (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) q := + (groupHomology.functor ℤ G q).mapIso (iso x ht).symm ≪≫ groupHomology.indIso _ _ q + +end TransitiveInduction +end TransitiveInduction + +section PolygonConfigurationModule + +open Classical CategoryTheory Finsupp +namespace PolygonPlacement.Configuration +variable {a m p : ℕ} + +noncomputable def listEquiv (a m p : ℕ) : Configuration a m p ≃ + {l : List (PolygonPlacement a m) // l.Pairwise Apart ∧ l.length=p} where + toFun f := ⟨List.ofFn f.val,List.pairwise_ofFn.mpr (fun _ _ h => f.property (ne_of_lt h)),List.length_ofFn⟩ + invFun l := ⟨fun i => l.val.get ⟨i.val,by rw [l.property.2];exact i.isLt⟩,by + intro i j hij + rcases lt_or_gt_of_ne hij with h|h + · exact l.property.1.rel_get_of_lt h + · exact (l.property.1.rel_get_of_lt h).symm⟩ + left_inv f := by apply ext; intro i; simp + right_inv l := by + apply Subtype.ext + apply List.ext_getElem + · simp [l.property.2] + · intro i hi hj + simp + +@[simp] theorem listEquiv_apply_val (f : Configuration a m p) : + (listEquiv a m p f).val=List.ofFn f.val := rfl + +noncomputable def chainEquiv (a m p : ℕ) : + (Configuration a m p →₀ ℤ) ≃ₗ[ℤ] ConfigurationChains.degree (@Apart a m) p := + (Finsupp.domLCongr (listEquiv a m p)).trans (ConfigurationChains.simplexModuleEquiv _ p).symm + +@[simp] theorem chainEquiv_single_val (f : Configuration a m p) (z : ℤ) : + (chainEquiv a m p (Finsupp.single f z)).val=Finsupp.single (List.ofFn f.val) z := by + unfold chainEquiv + rw [LinearEquiv.trans_apply,Finsupp.domLCongr_single] + simp [ConfigurationChains.simplexModuleEquiv] + exact Finsupp.supportedEquivFinsupp_symm_single _ _ _ + +theorem chainEquiv_intertwines (g : polygonFullGroup a m) : + (chainEquiv a m p).toLinearMap.comp (TransitiveInduction.permutationRep + (G:=polygonFullGroup a m) (X:=Configuration a m p) g)= + (configurationRepresentation a m p g).comp (chainEquiv a m p).toLinearMap := by + apply Finsupp.lhom_ext + intro f z + apply Subtype.ext + change (chainEquiv a m p (TransitiveInduction.permutationRep g (Finsupp.single f z))).val= + ConfigurationChains.push (fun v => g • v) (chainEquiv a m p (Finsupp.single f z)).val + rw [TransitiveInduction.permutationRep_single,chainEquiv_single_val,chainEquiv_single_val, + ConfigurationChains.push_single] + congr 1 + simp [List.map_ofFn] + rfl + +noncomputable def representationIso (a m p : ℕ) : + Rep.of (TransitiveInduction.permutationRep (G:=polygonFullGroup a m) (X:=Configuration a m p)) ≅ + Rep.of (configurationRepresentation a m p) := + Rep.mkIso {toLinearEquiv:=chainEquiv a m p,isIntertwining':=chainEquiv_intertwines} + +noncomputable def columnHomologyIso (a p n : ℕ) (hm : 3*p+1 < p+n) (q : ℕ) : + groupHomology (Rep.of (configurationRepresentation a (p+n) p)) q ≅ + groupHomology (Rep.trivial ℤ (MulAction.stabilizer (polygonFullGroup a (p+n)) + (standard a p n)) ℤ) q := + (groupHomology.functor ℤ _ q).mapIso (representationIso a (p+n) p).symm ≪≫ + TransitiveInduction.homologyIso (standard a p n) (fun f => transitive _ f hm) q + +end PolygonPlacement.Configuration +end PolygonConfigurationModule + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TranslationFiber.lean b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TranslationFiber.lean new file mode 100644 index 0000000000000000000000000000000000000000..a64e983d411c2033527657ef580baae85d709682 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Configurations/TranslationFiber.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.TripleComposition +import OAI.GroupTheory.SimpleAmenable.Configurations.PointFiberEvaluation +import OAI.GroupTheory.SimpleAmenable.Configurations.LabelTranslation + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory MonoidalCategory Classical +namespace SimpleAmenable.PolygonObject.Labelled.PointFiber + +variable {a n : ℕ} (d : (Fin n → CutRing × CutRing) → CutRing × CutRing) +variable (c : GenericSquare a × (Fin n → CutRing × CutRing)) +noncomputable def backPoint : GenericSquare a × (Fin n → CutRing × CutRing) := + (SimpleAmenable.translate a (-d c.2) c.1,c.2) +lemma translated_predicate (U : Labelled a n) (x : U.polygon.Point) : + (x.val.2=(backPoint d c).1 ∧ U.label x.val.1=(backPoint d c).2) ↔ + (((translateArrow d U).toEquiv x).val.2=c.1 ∧ + (translateObj d U).label ((translateArrow d U).toEquiv x).val.1=c.2) := by + change (x.val.2=SimpleAmenable.translate a (-d c.2) c.1 ∧ U.label x.val.1=c.2) ↔ + (SimpleAmenable.translate a (d (U.label x.val.1)) x.val.2=c.1 ∧ U.label x.val.1=c.2) + constructor + · rintro ⟨hp,hl⟩ + refine ⟨?_,hl⟩ + rw [hl,hp,←SimpleAmenable.translate_add,add_neg_cancel,SimpleAmenable.translate_zero] + · rintro ⟨hp,hl⟩ + refine ⟨?_,hl⟩ + rw [hl] at hp + apply (translation a (d c.2)).injective + change SimpleAmenable.translate a (d c.2) x.val.2 = _ + rw [hp] + change _ = SimpleAmenable.translate a (d c.2) (SimpleAmenable.translate a (-d c.2) c.1) + rw [←SimpleAmenable.translate_add,add_neg_cancel,SimpleAmenable.translate_zero] +noncomputable def translateFiber (U : Labelled a n) : + Fiber U (backPoint d c) ≃ Fiber (translateObj d U) c := + (translateArrow d U).toEquiv.subtypeEquiv (translated_predicate d c U) +@[simp] lemma translateFiber_val (U : Labelled a n) (x : Fiber U (backPoint d c)) : + (translateFiber d c U x).val=(translateArrow d U).toEquiv x.val := rfl +lemma translateFiber_natural {U V : Labelled a n} (f : U ⟶ V) + (x : Fiber U (backPoint d c)) : + translateFiber d c V (fiberMap f (backPoint d c) x) = + fiberMap (translateHom d f) c (translateFiber d c U x) := by + apply Subtype.ext + change (translateArrow d V).toEquiv (f.arrow.toEquiv x.val) = + (inv (translateArrow d U) ≫ f.arrow ≫ translateArrow d V).toEquiv + ((translateArrow d U).toEquiv x.val) + simp only [arrow_comp_apply,inv_arrow_apply,Equiv.symm_apply_apply] +noncomputable def translationEvaluationIso : + evaluation ⋙ BarFinitePower.project _ (backPoint d c) ≅ + translateFunctor d ⋙ evaluation ⋙ BarFinitePower.project _ c := + NatIso.ofComponents (fun U => asIso (X := E.obj U (backPoint d c)) + (Y := E.obj (translateObj d U) c) + ((enumerate U (backPoint d c)).symm.trans ((translateFiber d c U).trans + (enumerate (translateObj d U) c)))) (by + intro U V f + apply Equiv.ext; intro x + obtain ⟨x,rfl⟩ := (enumerate U (backPoint d c)).surjective x + change enumerate (translateObj d V) c (translateFiber d c V + ((enumerate V (backPoint d c)).symm (E.map f (backPoint d c) + (enumerate U (backPoint d c) x)))) = E.map (translateHom d f) c + (enumerate (translateObj d U) c (translateFiber d c U + ((enumerate U (backPoint d c)).symm (enumerate U (backPoint d c) x)))) + rw [E_map_enum,Equiv.symm_apply_apply,Equiv.symm_apply_apply,E_map_enum,translateFiber_natural]) +@[simp] lemma translationEvaluationIso_enum (U : Labelled a n) (x : Fiber U (backPoint d c)) : + (translationEvaluationIso d c).hom.app U (enumerate U (backPoint d c) x) = + enumerate (translateObj d U) c (translateFiber d c U x) := by + change enumerate (translateObj d U) c (translateFiber d c U + ((enumerate U (backPoint d c)).symm (enumerate U (backPoint d c) x))) = _ + rw [Equiv.symm_apply_apply] +end SimpleAmenable.PolygonObject.Labelled.PointFiber + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/AbelianHomologyFinite.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/AbelianHomologyFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..4991a64a063680b2b862e2dba5e67af84786b028 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/AbelianHomologyFinite.lean @@ -0,0 +1,43 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FullH2 +import OAI.GroupTheory.SimpleAmenable.Simplicial.TranslationCoinvariants + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits +namespace AbelianHomologyFinite +open FreeChains SimpleAmenable + +attribute [local instance 1200] Rep.hV2 +variable (G:Type) [CommGroup G] +lemma fg [Module.Finite ℤ (groupHomology (Rep.trivial ℤ G ℤ) 1)] : Group.FG G := by + have :=TrivialHomology.abelianization_fg G + exact Group.fg_of_surjective (f:=(Abelianization.equivOfComm (H:=G)).symm.toMonoidHom) + (Abelianization.equivOfComm (H:=G)).symm.surjective +lemma finite (n:ℕ) [Group.FG G] : Module.Finite ℤ (groupHomology (Rep.trivial ℤ G ℤ) n) := by + have : Algebra.FiniteType ℤ (MonoidAlgebra ℤ G) := MonoidAlgebra.finiteType_iff_group_fg.mpr inferInstance + have : IsNoetherianRing (MonoidAlgebra ℤ G) := Algebra.FiniteType.isNoetherianRing ℤ _ + have : Module.Finite ℤ (Rep.trivial ℤ G ℤ).ρ.asModule := by + exact Module.Finite.equiv (Representation.trivial ℤ G ℤ).asModuleEquiv.symm + have : Module.Finite (MonoidAlgebra ℤ G) (Rep.trivial ℤ G ℤ).ρ.asModule := + Module.Finite.of_restrictScalars_finite ℤ _ _ + exact RingCoinvariants.finite_groupHomology _ n +end AbelianHomologyFinite +namespace TranslationNerve +open FreeChains + +attribute [local instance 1200] Rep.hV2 +variable (P:Type) [CommMonoid P] +lemma homology_finite_of_one (n:ℕ) [Module.Finite ℤ ((nerve (SingleObj P)).homology Z 1 : A)] : + Module.Finite ℤ ((nerve (SingleObj P)).homology Z n : A) := by + have : Module.Finite ℤ (groupHomology (Rep.trivial ℤ (TranslationFiltered.Q P) ℤ) 1) := + Module.Finite.equiv (completionHomologyIso P 1).toLinearEquiv + have :=AbelianHomologyFinite.fg (TranslationFiltered.Q P) + have :=AbelianHomologyFinite.finite (TranslationFiltered.Q P) n + exact Module.Finite.equiv (completionHomologyIso P n).symm.toLinearEquiv +end TranslationNerve + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/AlternatingH2.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/AlternatingH2.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef05b428472051ef501c91be824bdff6083ebb89 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/AlternatingH2.lean @@ -0,0 +1,211 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.PolygonHomologyAction +import OAI.GroupTheory.SimpleAmenable.Configurations.AlternatingStability + +namespace OAI + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable + +attribute [local instance 1200] Rep.hV2 +namespace PolygonPlacement.Configuration +variable {a m : ℕ} + +noncomputable def altEmptyIso (a m : ℕ) : + altColumn a m 0 ≅ Rep.trivial ℤ (polygonAlternatingGroup a m) ℤ := + (Rep.resFunctor (polygonAlternatingGroup a m).subtype).mapIso (emptyIso a m) + +@[simp] lemma altEmptyIso_single (a m : ℕ) (x : Configuration a m 0) (z : ℤ) : + (altEmptyIso a m).hom.hom (single x z)=z := emptyIso_single a m x z +lemma altAugmentation_pointMap (f : Configuration a m 1) (q : ℕ) : + groupHomology.map (MulAction.stabilizer (polygonAlternatingGroup a m) f).subtype + (TransitiveInduction.pointMap f) q ≫ + (groupHomology.functor ℤ (polygonAlternatingGroup a m) q).map (altBoundary a m 0) ≫ + (groupHomology.functor ℤ (polygonAlternatingGroup a m) q).map (altEmptyIso a m).hom = + TrivialHomology.map (MulAction.stabilizer (polygonAlternatingGroup a m) f).subtype q := by + erw [← Functor.map_comp] + erw [groupHomology.functor_map, ← groupHomology.map_comp] + apply groupHomology.map_congr + · rfl + · apply LinearMap.ext + intro z + change (emptyIso a m).hom.hom ((boundary a m 0).hom (single f z))=z + rw [boundary_zero_eq_face] + dsimp only [faceHom] + rw [TransitiveInduction.equivariantMap_single, emptyIso_single] +lemma alternatingStabilizer_H2_epi (a m : ℕ) (hm : 34 ≤ m) (f : Configuration a m 1) : + Epi (TrivialHomology.map (MulAction.stabilizer (polygonAlternatingGroup a m) f).subtype 2) := by + have := TransitiveInduction.isIso_map_pointMap f (fun g => alternating_transitive f g (by omega)) 2 + have first : Epi (groupHomology.map + (MulAction.stabilizer (polygonAlternatingGroup a m) f).subtype + (TransitiveInduction.pointMap f) 2) := inferInstance + have second := altBoundary_zero_H2_epi a m hm + have third : Epi ((groupHomology.functor ℤ (polygonAlternatingGroup a m) 2).map + (altEmptyIso a m).hom) := inferInstance + rw [← altAugmentation_pointMap f 2] + have composite := epi_comp' first (epi_comp' second third) + exact composite + +lemma stabilizeAlternating_H2_epi (a n : ℕ) (hn : 33 ≤ n) : + Epi (TrivialHomology.map (PolygonTracks.stabilizeAlternating a 1 n) 2) := by + rw [← alternatingStabilizerEquiv_subtype a 1 n (by omega), TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (alternatingStabilizerEquiv a 1 n (by omega)) 2 + have := alternatingStabilizer_H2_epi a (1+n) (by omega) (standard a 1 n) + infer_instance +end PolygonPlacement.Configuration + +namespace PolygonTracks +noncomputable def castAlternating (a : ℕ) {m n : ℕ} (h : m=n) : + polygonAlternatingGroup a m ≃* polygonAlternatingGroup a n := h ▸ MulEquiv.refl _ + +@[simp] lemma castAlternating_val (a : ℕ) {m n : ℕ} (h : m=n) (g : polygonAlternatingGroup a m) : + (castAlternating a h g).val=castFull a h g.val := by subst n; rfl + +lemma stabilizeAlternating_add (a k l n : ℕ) : stabilizeAlternating a (k+l) n = + (castAlternating a (Nat.add_assoc k l n).symm).toMonoidHom.comp + ((stabilizeAlternating a k (l+n)).comp (stabilizeAlternating a l n)) := by + apply MonoidHom.ext + intro g + apply Subtype.ext + change stabilize a (k+l) n g.val=_ + rw [stabilize_add] + simp only [MonoidHom.coe_comp,Function.comp_apply,MulEquiv.coe_toMonoidHom, + castAlternating_val,stabilizeAlternating_val] + +lemma stabilizeAlternating_zero_bijective (a n : ℕ) (hn : 32 ≤ n) : + Function.Bijective (stabilizeAlternating a 0 n) := by + refine ⟨stabilizeAlternating_injective,?_⟩ + intro g + obtain ⟨f,hf⟩ := (stabilize_zero_bijective a n).surjective g.val + have hg : f∈polygonAlternatingGroup a n := by + rw [← stabilize_alternating_comap a 0 n hn] + change stabilize a 0 n f∈polygonAlternatingGroup a (0+n) + rw [hf] + exact g.property + exact ⟨⟨f,hg⟩,Subtype.ext hf⟩ + +lemma stabilizeAlternating_H2_epi (a k n : ℕ) (hn : 33 ≤ n) : + Epi (TrivialHomology.map (stabilizeAlternating a k n) 2) := by + induction k with + | zero => + have : IsIso (TrivialHomology.map (stabilizeAlternating a 0 n) 2) := + TrivialHomology.isIso_equiv + (MulEquiv.ofBijective (stabilizeAlternating a 0 n) + (stabilizeAlternating_zero_bijective a n (by omega))) 2 + infer_instance + | succ k ih => + have he : Epi (TrivialHomology.map (stabilizeAlternating a (1+k) n) 2) := by + rw [stabilizeAlternating_add, TrivialHomology.map_comp, TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (castAlternating a (Nat.add_assoc 1 k n).symm) 2 + have := PolygonPlacement.Configuration.stabilizeAlternating_H2_epi a (k+n) (by omega) + have := ih + infer_instance + rw [show k+1=1+k by omega] + exact he + +lemma stabilizeAlternating_mapH2_surjective (a k n : ℕ) (hn : 33 ≤ n) : + Function.Surjective (IntegralHomology.mapH2 (stabilizeAlternating a k n)) := by + have := stabilizeAlternating_H2_epi a k n hn + exact (ModuleCat.epi_iff_surjective (TrivialHomology.map (stabilizeAlternating a k n) 2)).mp inferInstance + +lemma fullAction_trivial (a m : ℕ) (hm : 205 < m) (f : polygonFullGroup a m) : + IntegralHomology.mapH2 (fullConjugation a m f)=LinearMap.id := by + obtain ⟨k,rfl⟩ : ∃k,m=k+33 := ⟨m-33,by omega⟩ + exact mapH2_fullConjugation_eq_id_of_surjective (by omega) + (stabilizeAlternating_mapH2_surjective a k 33 (by omega)) f +end PolygonTracks +end SimpleAmenable + +end + +open CategoryTheory CategoryTheory.Limits + +namespace FiniteHomologyReturn + +section +universe u +variable {R : Type u} [CommRing R] [IsNoetherianRing R] + +lemma finite_of_exact {X : ShortComplex (ModuleCat.{u} R)} (hX : X.Exact) + [Module.Finite R X.X₁] [Module.Finite R X.X₃] : Module.Finite R X.X₂ := by + have : Module.Finite R (LinearMap.range X.g.hom) := + Module.Finite.of_injective (LinearMap.range X.g.hom).subtype Subtype.val_injective + exact Module.Finite.of_exact (f:=X.f.hom) (g:=X.g.hom.rangeRestrict) + (by + rw [LinearMap.exact_iff] + simpa using hX.moduleCat_range_eq_ker.symm) + (by rintro ⟨y,x,rfl⟩; exact ⟨x,rfl⟩) + +lemma finite_range_of_exact {A B C D : ModuleCat.{u} R} + (p : A ⟶ B) (δ : B ⟶ C) (f : B ⟶ D) (w : p ≫ δ=0) + (hex : (ShortComplex.mk p δ w).Exact) (hpf : p ≫ f=0) + [Module.Finite R C] : Module.Finite R (LinearMap.range f.hom) := by + have : Module.Finite R (LinearMap.range δ.hom) := + Module.Finite.of_injective (LinearMap.range δ.hom).subtype Subtype.val_injective + have : Module.Finite R (B ⧸ LinearMap.ker δ.hom) := + Module.Finite.equiv δ.hom.quotKerEquivRange.symm + have hk : LinearMap.ker δ.hom ≤ LinearMap.ker f.hom := by + rw [← hex.moduleCat_range_eq_ker] + exact LinearMap.range_le_ker_iff.mpr (ModuleCat.hom_ext_iff.mp hpf) + let φ : (B ⧸ LinearMap.ker δ.hom) →ₗ[R] LinearMap.range f.hom := + (LinearMap.ker δ.hom).liftQ f.hom.rangeRestrict (by + intro x hx + exact Subtype.ext (hk hx)) + exact Module.Finite.of_surjective φ (by + rintro ⟨y,x,rfl⟩ + exact ⟨(LinearMap.ker δ.hom).mkQ x,rfl⟩) + +end + +open BoundedHomologyEdge +variable {R G : Type} [CommRing R] [IsNoetherianRing R] [Group G] + +variable {Z₁ Z₂ Z₃ C₀ C₁ C₂ C₃ C₄ : Rep R G} + {i₁ : Z₁ ⟶ C₁} {p₁ : C₁ ⟶ C₀} {i₂ : Z₂ ⟶ C₂} {p₂ : C₂ ⟶ Z₁} + {i₃ : Z₃ ⟶ C₃} {p₃ : C₃ ⟶ Z₂} + {w₁ : i₁ ≫ p₁ = 0} {w₂ : i₂ ≫ p₂ = 0} {w₃ : i₃ ≫ p₃ = 0} + (h₁ : (ShortComplex.mk i₁ p₁ w₁).ShortExact) + (h₂ : (ShortComplex.mk i₂ p₂ w₂).ShortExact) + (h₃ : (ShortComplex.mk i₃ p₃ w₃).ShortExact) + (e : C₄ ⟶ Z₃) [Epi e] + +include h₁ h₂ h₃ e + +lemma finite_H2 [Module.Finite R (groupHomology C₀ 2)] + [Module.Finite R (groupHomology C₄ 0)] + (hz₃ : IsZero (groupHomology C₃ 1)) + (hd : Hmap 2 (p₂ ≫ i₁)=0) : Module.Finite R (groupHomology C₁ 2) := by + have : Module.Finite R ((groupHomology.functor R G 0).obj C₄) := + ‹Module.Finite R (groupHomology C₄ 0)› + have : Module.Finite R ((groupHomology.functor R G 2).obj C₀) := + ‹Module.Finite R (groupHomology C₀ 2)› + let : Epi (Hmap 0 e) := epi_Hmap_zero e + have : Module.Finite R (groupHomology Z₃ 0) := + Module.Finite.of_surjective (Hmap 0 e).hom ((ModuleCat.epi_iff_surjective _).mp inferInstance) + let : Mono (groupHomology.δ h₃ 1 0 rfl) := + (exact₃ h₃ 0).mono_g_iff.mpr (hz₃.eq_zero_of_src _) + have : Module.Finite R (groupHomology Z₂ 1) := + Module.Finite.of_injective (groupHomology.δ h₃ 1 0 rfl).hom + ((ModuleCat.mono_iff_injective _).mp inferInstance) + have : Module.Finite R (LinearMap.range (Hmap 2 i₁).hom) := + finite_range_of_exact (Hmap 2 p₂) (groupHomology.δ h₂ 2 1 rfl) (Hmap 2 i₁) + (groupHomology.mapShortComplex₃ h₂ rfl).zero (exact₃ h₂ 1) + (by rw [← Hmap_comp]; exact hd) + exact finite_of_exact (X:=ShortComplex.mk + (ModuleCat.ofHom (LinearMap.range (Hmap 2 i₁).hom).subtype) (Hmap 2 p₁) + (by + apply ModuleCat.hom_ext + apply LinearMap.ext + intro x + change (Hmap 2 p₁).hom x.val=0 + exact (show LinearMap.range (Hmap 2 i₁).hom ≤ LinearMap.ker (Hmap 2 p₁).hom by + rw [(exact₂ h₁ 2).moduleCat_range_eq_ker]) x.property)) + (by + rw [ShortComplex.moduleCat_exact_iff_range_eq_ker] + simpa using (exact₂ h₁ 2).moduleCat_range_eq_ker) + +end FiniteHomologyReturn + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ArithmeticTangentBasis.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ArithmeticTangentBasis.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbd8e718589ce2a0f03ad292b64db7489d852b2f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ArithmeticTangentBasis.lean @@ -0,0 +1,211 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Arithmetic.PropagationArithmetic + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ArithmeticTangentBasis + +theorem cutRing_coefficients (z : CutRing) : + (z.re : CutRing) + (z.im : CutRing)*cutTau = z := by + apply QuadraticAlgebra.ext <;> simp [cutTau] + +theorem cutTau_inverse_mul : (cutTau-1)*cutTau = 1 := by + apply ordinary_injective + simp only [map_mul,map_sub,map_one,ordinary_cutTau] + nlinarith [Real.goldenRatio_sq] + +theorem cutRing_coefficients_bound (z : CutRing) : + |(z.re : ℝ)| + |(z.im : ℝ)| ≤ 4 * (|ordinary z| + |conjugate z|) := by + have hs : 1 ≤ Real.sqrt 5 := by + nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 5), Real.sqrt_nonneg 5] + have hq : |(z.im : ℝ)| ≤ |ordinary z| + |conjugate z| := by + have he : (z.im : ℝ) * Real.sqrt 5 = ordinary z - conjugate z := by + have := (eq_div_iff (by positivity : Real.sqrt 5 ≠ 0)).mp (endpointLabel_embedding z) + exact this + have ht : |ordinary z - conjugate z| ≤ |ordinary z| + |conjugate z| := + abs_sub _ _ + rw [← he,abs_mul,abs_of_nonneg (le_trans zero_le_one hs)] at ht + nlinarith [abs_nonneg (z.im : ℝ)] + have hp : |(z.re : ℝ)| ≤ |ordinary z| + 2*|(z.im : ℝ)| := by + have he : (z.re : ℝ) = ordinary z - (z.im : ℝ)*Real.goldenRatio := by + rw [ordinary_apply] + ring + rw [he] + calc + _ ≤ |ordinary z| + |(z.im : ℝ)*Real.goldenRatio| := abs_sub _ _ + _ = |ordinary z| + |(z.im : ℝ)| * Real.goldenRatio := by + rw [abs_mul, abs_of_pos Real.goldenRatio_pos] + _ ≤ _ := by nlinarith [Real.goldenRatio_lt_two,abs_nonneg (z.im : ℝ)] + nlinarith [abs_nonneg (conjugate z)] + +theorem tangent_basis_coefficients (u v : CutRing) (huv : u*v = 1) (d : CutRing) : + ∃ p q : ℤ, d = (p : CutRing)*u + (q : CutRing)*(cutTau*u) ∧ + |(p : ℝ)| + |(q : ℝ)| ≤ + (4*(|ordinary v|+|conjugate v|+1))*(|ordinary d|+|conjugate d|) := by + let z := d*v + refine ⟨z.re,z.im,?_,?_⟩ + · have he : z*u = d := by dsimp [z]; calc + d*v*u = d*(u*v) := by ring + _ = d := by rw [huv,mul_one] + calc + d = z*u := he.symm + _ = ((z.re : CutRing) + (z.im : CutRing)*cutTau)*u := + congrArg (fun w : CutRing => w*u) (cutRing_coefficients z).symm + _ = _ := by ring + · have hb := cutRing_coefficients_bound z + have ho : |ordinary z| = |ordinary d| * |ordinary v| := by simp [z,abs_mul] + have hc : |conjugate z| = |conjugate d| * |conjugate v| := by simp [z,abs_mul] + rw [ho,hc] at hb + nlinarith [abs_nonneg (ordinary d),abs_nonneg (conjugate d), + abs_nonneg (ordinary v),abs_nonneg (conjugate v), + mul_nonneg (abs_nonneg (ordinary d)) (abs_nonneg (conjugate v)), + mul_nonneg (abs_nonneg (conjugate d)) (abs_nonneg (ordinary v))] + +theorem exists_short_tangent_basis (l : CutRing) {δ : ℝ} (hδ : 0 < δ) : + ∃ u v : CutRing, u*v = 1 ∧ + (1+|ordinary l|)*(|ordinary u|+|ordinary (cutTau*u)|) < δ := by + have hsmall : Real.goldenRatio-1 < 1 := by linarith [Real.goldenRatio_lt_two] + have hpos : 0 < Real.goldenRatio-1 := by linarith [Real.one_lt_goldenRatio] + have hk : 0 < 3*(1+|ordinary l|) := by positivity + obtain ⟨b,hb⟩ := exists_pow_lt_of_lt_one (div_pos hδ hk) hsmall + refine ⟨(cutTau-1)^b,cutTau^b,?_,?_⟩ + · rw [← mul_pow,cutTau_inverse_mul,one_pow] + · simp only [map_pow,map_sub,map_one,map_mul,ordinary_cutTau,abs_mul, + abs_pow,abs_of_pos Real.goldenRatio_pos,abs_of_pos hpos] + have hpow : 0 < (Real.goldenRatio-1)^b := pow_pos hpos b + have hb' := (lt_div_iff₀ hk).mp hb + nlinarith [Real.goldenRatio_lt_two,abs_nonneg (ordinary l), + mul_pos (by positivity : 0 < 1+|ordinary l|) hpow] + +end ArithmeticTangentBasis + +section FiniteTangentChains + +noncomputable def integerSteps (k : ℤ) (u : CutRing) : List CutRing := + if 0 ≤ k then List.replicate k.toNat u else List.replicate (-k).toNat (-u) + +@[simp]theorem integerSteps_sum (k : ℤ) (u : CutRing) : + (integerSteps k u).sum = (k : CutRing)*u := by + by_cases hk : 0 ≤ k + · have hc : (k.toNat : CutRing) = (k : CutRing) := by + exact_mod_cast Int.toNat_of_nonneg hk + simp [integerSteps,hk,List.sum_replicate,nsmul_eq_mul,hc] + · have hn : 0 ≤ -k := by omega + have hc : ((-k).toNat : CutRing) = -(k : CutRing) := by + exact_mod_cast Int.toNat_of_nonneg hn + simp [integerSteps,hk,List.sum_replicate,nsmul_eq_mul,hc] + +theorem integerSteps_length (k : ℤ) (u : CutRing) : + ((integerSteps k u).length : ℝ) = |(k : ℝ)| := by + by_cases hk : 0 ≤ k + · have hc : (k.toNat : ℝ) = (k : ℝ) := by exact_mod_cast Int.toNat_of_nonneg hk + simp [integerSteps,hk,hc,abs_of_nonneg (by exact_mod_cast hk : (0:ℝ) ≤ k)] + · have hn : 0 ≤ -k := by omega + have hc : ((-k).toNat : ℝ) = -(k : ℝ) := by exact_mod_cast Int.toNat_of_nonneg hn + simp [integerSteps,hk,hc,abs_of_nonpos (by exact_mod_cast (le_of_not_ge hk) : (k:ℝ) ≤ 0)] + +theorem integerSteps_mem (k : ℤ) (u e : CutRing) (he : e ∈ integerSteps k u) : + e = u ∨ e = -u := by + by_cases hk : 0 ≤ k + · left + exact (List.mem_replicate.mp (by simpa only [integerSteps,ite_eq_left hk] using he)).2 + · right + exact (List.mem_replicate.mp (by simpa only [integerSteps,ite_eq_right hk] using he)).2 + +private theorem sum_abs_bound_by_length {α : Type*} (v : α → ℝ) + (xs : List α) {B : ℝ} (hs : ∀ x ∈ xs, |v x| ≤ B) : + |(xs.map v).sum| ≤ (xs.length : ℝ)*B := by + induction xs with + | nil => simp + | cons x xs ih => + have hx := hs x (by simp) + have ht := ih (fun y hy => hs y (by simp [hy])) + simp only [List.map_cons,List.sum_cons,List.length_cons,Nat.cast_add,Nat.cast_one] + calc + |v x + (xs.map v).sum| ≤ |v x| + |(xs.map v).sum| := abs_add_le _ _ + _ ≤ B + (xs.length : ℝ)*B := add_le_add hx ht + _ = _ := by ring + +@[simp]theorem endpointLabel_list_sum (xs : List CutRing) : + (endpointLabel xs.sum : ℝ) = (xs.map (fun z => (endpointLabel z : ℝ))).sum := by + induction xs with + | nil => simp [endpointLabel] + | cons x xs ih => simpa only [List.sum_cons,endpointLabel_add,Int.cast_add, + List.map_cons] using congrArg (fun r => (endpointLabel x : ℝ)+r) ih + +theorem tangent_chain (u v : CutRing) (huv : u*v = 1) (d : CutRing) : + ∃ w : List CutRing, + w.sum = d ∧ + (∀ e ∈ w, e = u ∨ e = -u ∨ e = cutTau*u ∨ e = -(cutTau*u)) ∧ + (w.length : ℝ) ≤ (4*(|ordinary v|+|conjugate v|+1))*(|ordinary d|+|conjugate d|) ∧ + (∀ n : ℕ, + min 0 (ordinary d) - (|ordinary u|+|ordinary (cutTau*u)|) ≤ + ordinary (w.take n).sum ∧ + ordinary (w.take n).sum ≤ + max 0 (ordinary d) + (|ordinary u|+|ordinary (cutTau*u)|)) ∧ + ∀ n : ℕ, |(endpointLabel (w.take n).sum : ℝ)| ≤ + (4*(|ordinary v|+|conjugate v|+1))*(|ordinary d|+|conjugate d|)* + (|(endpointLabel u : ℝ)|+|(endpointLabel (cutTau*u) : ℝ)|) := by + obtain ⟨p,q,hd,hpq⟩ := tangent_basis_coefficients u v huv d + let xs := integerSteps p u ++ integerSteps q (cutTau*u) + have hsum : xs.sum = d := by simp only [xs,List.sum_append,integerSteps_sum]; exact hd.symm + have hmem : ∀ e ∈ xs, e = u ∨ e = -u ∨ e = cutTau*u ∨ e = -(cutTau*u) := by + intro e he + rcases List.mem_append.mp he with he | he + · rcases integerSteps_mem p u e he with rfl | rfl + · exact Or.inl rfl + · exact Or.inr (Or.inl rfl) + · rcases integerSteps_mem q (cutTau*u) e he with rfl | rfl + · exact Or.inr (Or.inr (Or.inl rfl)) + · exact Or.inr (Or.inr (Or.inr rfl)) + have ho : ∀ e ∈ xs, |ordinary e| ≤ |ordinary u|+|ordinary (cutTau*u)| := by + intro e he + rcases hmem e he with he | he | he | he + · rw [he]; exact le_add_of_nonneg_right (abs_nonneg _) + · rw [he,map_neg,abs_neg]; exact le_add_of_nonneg_right (abs_nonneg _) + · rw [he]; exact le_add_of_nonneg_left (abs_nonneg _) + · rw [he,map_neg,abs_neg]; exact le_add_of_nonneg_left (abs_nonneg _) + obtain ⟨w,hw,hbound⟩ := exists_step_order_near_segment ordinary xs (by positivity) ho + have hwsum : w.sum = d := hw.sum_eq.trans hsum + have hwm : ∀ e ∈ w, e = u ∨ e = -u ∨ e = cutTau*u ∨ e = -(cutTau*u) := + fun e he => hmem e (hw.mem_iff.mp he) + have hlen : (w.length : ℝ) ≤ + (4*(|ordinary v|+|conjugate v|+1))*(|ordinary d|+|conjugate d|) := by + rw [hw.length_eq] + simpa only [xs,List.length_append,Nat.cast_add,integerSteps_length] using hpq + refine ⟨w,hwsum,hwm,hlen,?_,?_⟩ + · intro n + simpa only [← map_list_sum,hsum] using hbound n + · intro n + let B := |(endpointLabel u : ℝ)|+|(endpointLabel (cutTau*u) : ℝ)| + have hB : 0 ≤ B := by dsimp [B]; positivity + have hb : ∀ e ∈ w.take n, |(endpointLabel e : ℝ)| ≤ B := by + intro e he + have hew := List.mem_of_mem_take he + have hneg : ∀ z : CutRing, |(endpointLabel (-z) : ℝ)| = |(endpointLabel z : ℝ)| := by + intro z + simp only [endpointLabel,QuadraticAlgebra.im_neg,Int.cast_neg,abs_neg] + rcases hwm e hew with he | he | he | he + · rw [he]; exact le_add_of_nonneg_right (abs_nonneg _) + · rw [he,hneg]; exact le_add_of_nonneg_right (abs_nonneg _) + · rw [he]; exact le_add_of_nonneg_left (abs_nonneg _) + · rw [he,hneg]; exact le_add_of_nonneg_left (abs_nonneg _) + rw [endpointLabel_list_sum] + calc + _ ≤ ((w.take n).length : ℝ)*B := sum_abs_bound_by_length _ _ hb + _ ≤ (w.length : ℝ)*B := mul_le_mul_of_nonneg_right (by exact_mod_cast (show (w.take n).length ≤ w.length by simp only [List.length_take]; exact min_le_right _ _)) hB + _ ≤ _ := mul_le_mul_of_nonneg_right hlen hB + +end FiniteTangentChains + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/AssemblyMap.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/AssemblyMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..b72f41d5c37d485475751f7d1ae7e6831400e1eb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/AssemblyMap.lean @@ -0,0 +1,100 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TotalSingle + +namespace OAI + +section +open CategoryTheory Limits SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace ModelAssembly + +open DiagonalResolution +variable {X Y : Dᵒᵖ ⥤ Type} (φ : X ⟶ Y) +noncomputable def mapCocone (F : D ⥤ A) : Cocone (projection X ⋙ F) where + pt := (assembly Y).obj F + ι := { + app e := colimit.ι (projection Y ⋙ F) (φ.mapElements.op.obj e) + naturality e e' f := by + simpa [projection,NatTrans.mapElements,assembly] using + colimit.w (projection Y ⋙ F) (φ.mapElements.op.map f) } +noncomputable def assemblyMapF (F : D ⥤ A) : (assembly X).obj F ⟶ (assembly Y).obj F := + colimit.desc (projection X ⋙ F) (mapCocone φ F) +@[reassoc (attr := simp)] lemma ι_assemblyMapF (F : D ⥤ A) (e : X.Elementsᵒᵖ) : + colimit.ι (projection X ⋙ F) e ≫ assemblyMapF φ F = + colimit.ι (projection Y ⋙ F) (φ.mapElements.op.obj e) := + colimit.ι_desc _ _ +noncomputable def assemblyMap : assembly X ⟶ assembly Y where + app := assemblyMapF φ + naturality F G α := by + apply colimit.hom_ext + intro e + change colimit.ι (projection X ⋙ F) e ≫ + colim.map (Functor.whiskerLeft (projection X) α) ≫ assemblyMapF φ G = + colimit.ι (projection X ⋙ F) e ≫ assemblyMapF φ F ≫ + colim.map (Functor.whiskerLeft (projection Y) α) + erw [colimit.ι_map_assoc,ι_assemblyMapF,←Category.assoc,ι_assemblyMapF,colimit.ι_map] + rfl +@[reassoc (attr := simp)] lemma ι_assemblyMap (F : D ⥤ A) (e : X.Elementsᵒᵖ) : + colimit.ι (projection X ⋙ F) e ≫ (assemblyMap φ).app F = + colimit.ι (projection Y ⋙ F) (φ.mapElements.op.obj e) := + ι_assemblyMapF φ F e +@[reassoc] lemma map_forward (d : D) : + (assemblyMap φ).app (free d) ≫ forward Y d = + forward X d ≫ (sigmaConst.obj Z).map (φ.app (op d)) := by + apply colimit.hom_ext + intro e + apply Sigma.hom_ext + intro f + change Sigma.ι (fun _ : d ⟶ e.unop.1.unop => Z) f ≫ colimit.ι (projection X ⋙ free d) e ≫ _ = _ + erw [← Category.assoc (colimit.ι (projection X ⋙ free d) e) + ((assemblyMap φ).app (free d)) (forward Y d), ι_assemblyMap, ι_to] + change Sigma.ι (fun _ : d ⟶ e.unop.1.unop => Z) f ≫ + (freeCocone Y d).ι.app (φ.mapElements.op.obj e) = + Sigma.ι (fun _ : d ⟶ e.unop.1.unop => Z) f ≫ + colimit.ι (projection X ⋙ free d) e ≫ forward X d ≫ _ + erw [← Category.assoc (colimit.ι (projection X ⋙ free d) e) (forward X d) + ((sigmaConst.obj Z).map (φ.app (op d))), ι_to] + dsimp only [freeCocone] + erw [Sigma.ι_comp_desc, Sigma.ι_comp_desc_assoc] + dsimp only [sigmaConst] + erw [Sigma.ι_comp_map', Category.id_comp] + congr 1 + exact (ConcreteCategory.congr_hom (φ.naturality f.op) e.unop.2).symm +end ModelAssembly + +end + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalFunctor + +universe u v u' v' +variable {C : Type u} [Category.{v} C] [Preadditive C] [HasCoproducts.{0} C] + {E : Type u'} [Category.{v'} E] [Preadditive E] [HasCoproducts.{0} E] +open TotalHomotopy +variable {F G : C ⥤ E} [F.Additive] [G.Additive] (α : F ⟶ G) +noncomputable abbrev nat₂ (K : HomologicalComplex₂ C c c) : map₂ F K ⟶ map₂ G K := + ((α.mapHomologicalComplex c).mapHomologicalComplex c).app K +@[reassoc] lemma comparison_natural (K : HomologicalComplex₂ C c c) : + total.map (nat₂ α K) c ≫ comparison G K = + comparison F K ≫ (α.mapHomologicalComplex c).app (K.total c) := by + apply HomologicalComplex.Hom.ext + funext n + apply total.hom_ext + intro p q hpq + change (map₂ F K).ιTotal c p q n hpq ≫ (total.map (nat₂ α K) c).f n ≫ comparisonF G K n = + (map₂ F K).ιTotal c p q n hpq ≫ comparisonF F K n ≫ α.app _ + rw [ιTotal_map_assoc,ι_comparisonF,ι_comparisonF_assoc] + exact (α.naturality _).symm +@[reassoc] lemma iso_natural [PreservesColimitsOfSize.{0,0} F] [PreservesColimitsOfSize.{0,0} G] + (K : HomologicalComplex₂ C c c) : + (α.mapHomologicalComplex c).app (K.total c) ≫ (iso G K).hom = + (iso F K).hom ≫ total.map (nat₂ α K) c := by + apply (cancel_mono (comparison G K)).mp + simp only [Category.assoc] + change _ ≫ inv (comparison G K) ≫ comparison G K = + inv (comparison F K) ≫ total.map (nat₂ α K) c ≫ comparison G K + rw [IsIso.inv_hom_id,Category.comp_id,comparison_natural,←Category.assoc, + IsIso.inv_hom_id,Category.id_comp] +end TotalFunctor + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/BiProjective.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BiProjective.lean new file mode 100644 index 0000000000000000000000000000000000000000..80e81cce2d10ba14f4f978da6ef3033128b977d1 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BiProjective.lean @@ -0,0 +1,234 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TotalSingle + +namespace OAI + +section + +section + +open CategoryTheory Limits SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace BiResolution + +open DiagonalResolution TotalHomotopy + +noncomputable def aug₀ : total.X 0 ⟶ (Functor.const D).obj Z := + complex.totalDesc (fun p q hpq => eqToHom (by + change p+q=0 at hpq + obtain ⟨rfl,rfl⟩ := Nat.add_eq_zero_iff.mp hpq + rfl) ≫ DiagonalResolution.augmentation.app (op ⦋0⦌)) + +@[reassoc (attr := simp)] lemma ι_aug₀ : + complex.ιTotal c 0 0 0 (by simp) ≫ aug₀ = + DiagonalResolution.augmentation.app (op ⦋0⦌) := by + simp [aug₀,ι_totalDesc] + change (𝟙 _) ≫ DiagonalResolution.augmentation.app (op ⦋0⦌) = _ + exact Category.id_comp _ + +lemma d_aug₀ : total.d 1 0 ≫ aug₀=0 := by + change (complex.total c).d 1 0 ≫ aug₀=0 + apply HomologicalComplex₂.total.hom_ext + intro p q hpq + change p+q=1 at hpq + have hpq' : (p=0 ∧ q=1) ∨ (p=1 ∧ q=0) := by omega + rcases hpq' with ⟨rfl,rfl⟩ | ⟨rfl,rfl⟩ + all_goals + simp only [comp_zero] + erw [←Category.assoc] + first | erw [ι_d_leftZero] | erw [ι_d_rightZero] + erw [Category.assoc,ι_aug₀] + apply NatTrans.ext + funext d + apply Sigma.hom_ext + intro f + simp [complex,chains,row,rowMap,AlternatingFaceMapComplex.objD, + DiagonalResolution.augmentation,pre,SimplicialObject.δ] + erw [NatTrans.comp_app,NatTrans.app_add,NatTrans.app_neg] + · change Sigma.ι (fun _ : (⦋0⦌,⦋1⦌) ⟶ d => Z) f ≫ + ((Limits.Sigma.desc (fun index : (⦋0⦌,⦋1⦌) ⟶ d => + Sigma.ι (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => Z) + (Prod.mkHom index.1 (SimplexCategory.δ 0 ≫ index.2))) + + -Limits.Sigma.desc (fun index : (⦋0⦌,⦋1⦌) ⟶ d => + Sigma.ι (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => Z) + (Prod.mkHom index.1 (SimplexCategory.δ 1 ≫ index.2)))) ≫ + Sigma.desc (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => 𝟙 Z)) = 0 + simp [Preadditive.add_comp,Preadditive.comp_add,Preadditive.neg_comp, + Preadditive.comp_neg] + · change Sigma.ι (fun _ : (⦋1⦌,⦋0⦌) ⟶ d => Z) f ≫ + ((Limits.Sigma.desc (fun index : (⦋1⦌,⦋0⦌) ⟶ d => + Sigma.ι (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => Z) + (Prod.mkHom (SimplexCategory.δ 0 ≫ index.1) index.2)) + + -Limits.Sigma.desc (fun index : (⦋1⦌,⦋0⦌) ⟶ d => + Sigma.ι (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => Z) + (Prod.mkHom (SimplexCategory.δ 1 ≫ index.1) index.2))) ≫ + Sigma.desc (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => 𝟙 Z)) = 0 + simp [Preadditive.add_comp,Preadditive.comp_add,Preadditive.neg_comp, + Preadditive.comp_neg] + +noncomputable def pi : total ⟶ (ChainComplex.single₀ (D ⥤ A)).obj ((Functor.const D).obj Z) := + (ChainComplex.toSingle₀Equiv total ((Functor.const D).obj Z)).symm ⟨aug₀,d_aug₀⟩ + +@[simp] lemma pi_f_zero : pi.f 0 = aug₀ := ChainComplex.toSingle₀Equiv_symm_apply_f_zero _ _ + +noncomputable def evalComplexIso (d : D) : + TotalFunctor.map₂ ((evaluation D A).obj d) complex ≅ complexAt d := by + let E := (evaluation D A).obj d + let F := E.mapHomologicalComplex c + refine eqToIso ?_ + change ((alternatingFaceMapComplex (ChainComplex (D ⥤ A) ℕ) ⋙ F.mapHomologicalComplex c).obj + (chains ⋙ alternatingFaceMapComplex (D ⥤ A))) = _ + rw [map_alternatingFaceMapComplex F] + change AlternatingFaceMapComplex.obj (chains ⋙ alternatingFaceMapComplex (D ⥤ A) ⋙ F) = _ + rw [map_alternatingFaceMapComplex E] + rfl + +noncomputable def evalTotalIso (d : D) : + (((evaluation D A).obj d).mapHomologicalComplex c).obj total ≅ (complexAt d).total c := + TotalFunctor.iso ((evaluation D A).obj d) complex ≪≫ total.mapIso (evalComplexIso d) c + +end BiResolution + +end + +section + +open CategoryTheory Limits SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace BiResolution + +open DiagonalResolution TotalHomotopy + +lemma contraction_aug (d : D) : + (complexAt d).ιTotal c 0 0 0 (by simp) ≫ ((totalAtEquiv d).hom.f 0) = + Sigma.desc (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => 𝟙 Z) := by + change (complexAt d).ιTotal c 0 0 0 (by simp) ≫ + (total.map (complexAtEquiv d).hom c).f 0 ≫ + (TotalHomotopy.singleIso (AlternatingFaceMapComplex.obj (point d))).hom.f 0 ≫ + (pointExtra d).homotopyEquiv.hom.f 0 = _ + rw [ιTotal_map_assoc] + have hs : (TotalHomotopy.single (AlternatingFaceMapComplex.obj (point d))).ιTotal c 0 0 0 (by simp) ≫ + (TotalHomotopy.singleIso (AlternatingFaceMapComplex.obj (point d))).hom.f 0 = 𝟙 _ := by + change (TotalHomotopy.singleIn _).f 0 ≫ _ = _ + have h := congrArg (fun f : AlternatingFaceMapComplex.obj (point d) ⟶ _ => f.f 0) + (Iso.inv_hom_id (TotalHomotopy.singleIso (AlternatingFaceMapComplex.obj (point d)))) + exact h + erw [←Category.assoc _ ((TotalHomotopy.singleIso (AlternatingFaceMapComplex.obj (point d))).hom.f 0) + ((pointExtra d).homotopyEquiv.hom.f 0),hs,Category.id_comp] + dsimp [complexAtEquiv,complexAtIso,pointExtra] + simp [HomotopyEquiv.ofIso,CategoryTheory.eqToIso,HomologicalComplex.eqToHom_f,HomologicalComplex.singleMapHomologicalComplex, + SimplicialObject.Augmented.ExtraDegeneracy.homotopyEquiv, + extra,augmentedAt,augmentation,pointAugmented,pointAugmentation] + apply Sigma.hom_ext + intro f + erw [eqToHom_refl,Category.id_comp] + change Sigma.ι (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => Z) f ≫ + Sigma.desc (fun index : (⦋0⦌,⦋0⦌) ⟶ d => + Sigma.ι (fun _ : ⦋0⦌ ⟶ d.2 => Z) index.2) ≫ + Sigma.desc (fun _ : ⦋0⦌ ⟶ d.2 => 𝟙 Z) = + Sigma.ι (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => Z) f ≫ + Sigma.desc (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => 𝟙 Z) + simp + +lemma eval_inverse_aug (d : D) : + (complexAt d).ιTotal c 0 0 0 (by simp) ≫ (evalTotalIso d).inv.f 0 ≫ + ((((evaluation D A).obj d).mapHomologicalComplex c).map pi).f 0 = + Sigma.desc (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => 𝟙 Z) := by + change (complexAt d).ιTotal c 0 0 0 (by simp) ≫ + (total.map (evalComplexIso d).inv c).f 0 ≫ + TotalFunctor.comparisonF ((evaluation D A).obj d) complex 0 ≫ (pi.f 0).app d = _ + rw [ιTotal_map_assoc] + simp only [evalComplexIso,CategoryTheory.eqToIso,HomologicalComplex.eqToHom_f] + change _ ≫ (TotalFunctor.comparisonF ((evaluation D A).obj d) complex 0) ≫ (pi.f 0).app d = _ + erw [←Category.assoc,TotalFunctor.ι_comparisonF,pi_f_zero] + change (complex.ιTotal c 0 0 0 (by simp)).app d ≫ aug₀.app d = _ + erw [←NatTrans.comp_app,ι_aug₀] + rfl + +instance pi_quasiIso : QuasiIso pi := by + rw [HomologicalComplex.quasiIso_iff_evaluation] + intro d + let f := (((evaluation D A).obj d).mapHomologicalComplex c).map pi + have h : (evalTotalIso d).inv ≫ f ≫ (DiagonalResolution.singleAtIso d).hom = + (totalAtEquiv d).hom := by + apply HomologicalComplex.to_single_hom_ext + apply HomologicalComplex₂.total.hom_ext + intro p q hpq + change p+q=0 at hpq + obtain ⟨rfl,rfl⟩ := Nat.add_eq_zero_iff.mp hpq + simp only [HomologicalComplex.comp_f,←Category.assoc,contraction_aug] + dsimp only [f] + rw [Category.assoc ((complexAt d).ιTotal c 0 0 0 hpq),eval_inverse_aug] + simp [DiagonalResolution.singleAtIso,HomologicalComplex.singleMapHomologicalComplex] + change (Sigma.desc (fun _ : (⦋0⦌,⦋0⦌) ⟶ d => 𝟙 Z)) ≫ 𝟙 Z = _ + exact Category.comp_id _ + change QuasiIso f + rw [←quasiIso_iff_comp_left (evalTotalIso d).inv f, + ←quasiIso_iff_comp_right ((evalTotalIso d).inv ≫ f) (DiagonalResolution.singleAtIso d).hom, + Category.assoc,h] + infer_instance + +noncomputable def resolution : ProjectiveResolution ((Functor.const D).obj Z) where + complex := total + π := pi + quasiIso := pi_quasiIso + +end BiResolution + +end + +section + +open CategoryTheory Limits SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace ModelAssembly + +open DiagonalResolution +variable (X : Dᵒᵖ ⥤ Type) + +@[reassoc (attr := simp)] lemma pre_forward {a b : D} (k : a ⟶ b) : + (assembly X).map (pre k) ≫ forward X a = + forward X b ≫ (sigmaConst.obj Z).map (X.map k.op) := by + apply colimit.hom_ext + intro e + apply Sigma.hom_ext + intro f + change Sigma.ι (fun _ : b ⟶ e.unop.1.unop => Z) f ≫ + colimit.ι (projection X ⋙ free b) e ≫ + colim.map (Functor.whiskerLeft (projection X) (pre k)) ≫ forward X a = _ + erw [colimit.ι_map_assoc] + change Sigma.ι (fun _ : b ⟶ e.unop.1.unop => Z) f ≫ + (pre k).app e.unop.1.unop ≫ colimit.ι (projection X ⋙ free a) e ≫ forward X a = _ + erw [←Category.assoc,ι_pre,ι_to] + erw [ι_to_assoc] + dsimp [freeCocone,sigmaConst] + erw [Sigma.ι_comp_desc,←Category.assoc,Sigma.ι_comp_desc,Sigma.ι_comp_map',Category.id_comp] + congr 1 + change X.map (k ≫ f).op e.unop.2 = X.map k.op (X.map f.op e.unop.2) + rw [op_comp,X.map_comp] + rfl + +noncomputable def models : Dᵒᵖ ⥤ (D ⥤ A) where + obj d := free d.unop + map f := pre f.unop + map_id d := pre_id _ + map_comp f g := by simp only [unop_comp,pre_comp] + +noncomputable def freeNatIso : models ⋙ assembly X ≅ X ⋙ sigmaConst.obj Z := + NatIso.ofComponents (fun d => freeIso X d.unop) (fun f => pre_forward X f.unop) + +noncomputable def modelEquiv : HomotopyEquiv DiagonalResolution.complex BiResolution.total := + ProjectiveResolution.homotopyEquiv DiagonalResolution.resolution BiResolution.resolution + +noncomputable def assembledEquiv : HomotopyEquiv + (((assembly X).mapHomologicalComplex (ComplexShape.down ℕ)).obj DiagonalResolution.complex) + (((assembly X).mapHomologicalComplex (ComplexShape.down ℕ)).obj BiResolution.total) := + (assembly X).mapHomotopyEquiv modelEquiv + +end ModelAssembly + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/BiResolution.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BiResolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..31b9713c8fa7721b299043d0062b59ffc4b36ef2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BiResolution.lean @@ -0,0 +1,171 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.DiagonalResolution + +namespace OAI + +open CategoryTheory Limits SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace BiResolution + +open DiagonalResolution + +noncomputable def row (p : SimplexCategory) : SimplicialObject (D ⥤ A) where + obj q := free (p,q.unop) + map f := pre (Prod.mkHom (𝟙 p) f.unop) + map_id q := by simpa only [unop_id,←prod_id] using pre_id (p,q.unop) + map_comp f g := by + simpa only [prod_comp, Prod.mkHom, unop_comp, Category.id_comp] using + pre_comp (Prod.mkHom (𝟙 p) g.unop) (Prod.mkHom (𝟙 p) f.unop) + +noncomputable def rowMap {p p' : SimplexCategory} (f : p ⟶ p') : row p' ⟶ row p where + app q := pre (Prod.mkHom f (𝟙 q.unop)) + naturality q q' g := by + dsimp [row] + rw [←pre_comp,←pre_comp] + congr 1 + +noncomputable def chains : SimplicialObject (SimplicialObject (D ⥤ A)) where + obj p := row p.unop + map f := rowMap f.unop + map_id p := by + apply NatTrans.ext + funext q + dsimp [rowMap] + simpa only [unop_id,←prod_id,row] using pre_id (p.unop,q.unop) + map_comp f g := by + apply NatTrans.ext + funext q + dsimp [rowMap, row] + simpa only [prod_comp,Prod.mkHom,unop_comp,Category.id_comp] using + pre_comp (Prod.mkHom g.unop (𝟙 q.unop)) (Prod.mkHom f.unop (𝟙 q.unop)) + +noncomputable def complex : HomologicalComplex₂ (D ⥤ A) (ComplexShape.down ℕ) (ComplexShape.down ℕ) := + AlternatingFaceMapComplex.obj (chains ⋙ alternatingFaceMapComplex (D ⥤ A)) + +noncomputable def total : ChainComplex (D ⥤ A) ℕ := complex.total (ComplexShape.down ℕ) + +instance projective (n : ℕ) : Projective (total.X n) := by + change Projective (∐ (fun ij : {ij : ℕ × ℕ // ij.1+ij.2=n} => free (⦋ij.1.1⦌,⦋ij.1.2⦌))) + have (ij : {ij : ℕ × ℕ // ij.1+ij.2=n}) : Projective (free (⦋ij.1.1⦌,⦋ij.1.2⦌)) := + (evaluationAdjunctionRight A _).map_projective Z inferInstance + infer_instance + +noncomputable def rowAt (d : D) (p : SimplexCategory) : SimplicialObject A := + row p ⋙ (evaluation D A).obj d + +noncomputable def chainsAt (d : D) : SimplicialObject (SimplicialObject A) := + chains ⋙ (SimplicialObject.whiskering _ _).obj ((evaluation D A).obj d) + +noncomputable def point (d : D) : SimplicialObject A where + obj q := ∐ (fun _ : q.unop ⟶ d.2 => Z) + map f := Sigma.desc (fun g => Sigma.ι (fun _ : _ ⟶ d.2 => Z) (f.unop ≫ g)) + map_id q := by apply Sigma.hom_ext; intro g; simp + map_comp f g := by apply Sigma.hom_ext; intro h; simp [Category.assoc] + +@[simp] lemma chainsAt_obj_map (d : D) (p : SimplexCategoryᵒᵖ) + {q q' : SimplexCategoryᵒᵖ} (f : q ⟶ q') : + ((chainsAt d).obj p).map f = (pre (Prod.mkHom (𝟙 p.unop) f.unop)).app d := rfl +@[simp] lemma chainsAt_map_app (d : D) {p p' : SimplexCategoryᵒᵖ} (f : p ⟶ p') + (q : SimplexCategoryᵒᵖ) : + ((chainsAt d).map f).app q = (pre (Prod.mkHom f.unop (𝟙 q.unop))).app d := rfl +noncomputable def augmentation (d : D) : chainsAt d ⟶ (SimplicialObject.const _).obj (point d) where + app p := + { app q := Sigma.desc (fun f : (p.unop,q.unop) ⟶ d => Sigma.ι (fun _ : q.unop ⟶ d.2 => Z) f.2) + naturality q q' f := by + apply Sigma.hom_ext + intro g + simp [point,pre] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, + Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] } + naturality p p' f := by + apply NatTrans.ext + funext q + apply Sigma.hom_ext + intro g + simp [pre] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] + rfl + +noncomputable def augmentedAt (d : D) : SimplicialObject.Augmented (SimplicialObject A) where + left := chainsAt d + right := point d + hom := augmentation d +noncomputable def section_ (d : D) : point d ⟶ (chainsAt d).obj (op ⦋0⦌) where + app q := Sigma.desc (fun f : q.unop ⟶ d.2 => + Sigma.ι (fun _ : (⦋0⦌,q.unop) ⟶ d => Z) (zeroSimplex d.1,f)) + naturality q q' f := by + apply Sigma.hom_ext + intro g + simp [point,pre] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] + rfl + +open SSet.Augmented.StandardSimplex in +noncomputable def shift_ (d : D) (n : ℕ) : + (chainsAt d).obj (op ⦋n⦌) ⟶ (chainsAt d).obj (op ⦋n+1⦌) where + app q := Sigma.desc (fun f : (⦋n⦌,q.unop) ⟶ d => + Sigma.ι (fun _ : (⦋n+1⦌,q.unop) ⟶ d => Z) (shift f.1,f.2)) + naturality q q' f := by + apply Sigma.hom_ext + intro g + simp [pre] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, + Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] +noncomputable def extra (d : D) : (augmentedAt d).ExtraDegeneracy where + s' := section_ d + s := shift_ d + s'_comp_ε := by + apply NatTrans.ext + funext q + apply Sigma.hom_ext + intro f + dsimp only [augmentedAt,section_,shift_,augmentation,SimplicialObject.δ,SimplicialObject.σ,NatTrans.comp_app,NatTrans.id_app] + simp + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, Category.comp_id] + s₀_comp_δ₁ := by + apply NatTrans.ext + funext q + apply Sigma.hom_ext + intro f + dsimp only [augmentedAt,section_,shift_,augmentation,SimplicialObject.δ,SimplicialObject.σ,NatTrans.comp_app,NatTrans.id_app] + simp only [Quiver.Hom.unop_op, chainsAt_map_app, pre, prod_comp, Prod.mkHom, Category.id_comp] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, + Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] + simp only [shift_δ₁] + rfl + s_comp_δ₀ n := by + apply NatTrans.ext + funext q + apply Sigma.hom_ext + intro f + dsimp only [augmentedAt,section_,shift_,augmentation,SimplicialObject.δ,SimplicialObject.σ,NatTrans.comp_app,NatTrans.id_app] + simp only [Quiver.Hom.unop_op, chainsAt_map_app, pre, prod_comp, Prod.mkHom, Category.id_comp] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] + simp only [shift_δ₀, Prod.eta] + exact (Category.comp_id _).symm + s_comp_δ n i := by + apply NatTrans.ext + funext q + apply Sigma.hom_ext + intro f + dsimp only [augmentedAt,section_,shift_,augmentation,SimplicialObject.δ,SimplicialObject.σ,NatTrans.comp_app,NatTrans.id_app] + simp only [Quiver.Hom.unop_op, chainsAt_map_app, pre, prod_comp, Prod.mkHom, Category.id_comp] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, + Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] + simp only [shift_δ_succ] + rfl + s_comp_σ n i := by + apply NatTrans.ext + funext q + apply Sigma.hom_ext + intro f + dsimp only [augmentedAt,section_,shift_,augmentation,SimplicialObject.δ,SimplicialObject.σ,NatTrans.comp_app,NatTrans.id_app] + simp only [Quiver.Hom.unop_op, chainsAt_map_app, pre, prod_comp, Prod.mkHom, Category.id_comp] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, + Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc] + simp only [shift_σ_succ] + rfl + +end BiResolution + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/BinaryPullback.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BinaryPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..825fd8f3c37f8712b3452fac3ac1b63b1f00fed5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BinaryPullback.lean @@ -0,0 +1,73 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.NerveProduct + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace ComponentStable +open FreeChains ComponentTranslation ConnectedProduct + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +variable {X Y X' Y':SSet} +noncomputable def pullD (f:X⟶nerve C) (g:Y⟶nerve C) (q:ℕ) : + (X⊗Y).homology Z q ⟶ object (C:=C) q := SSet.homologyMap (f⊗ₘg) Z q ≫ binaryD q +omit [SymmetricCategory C] in +@[reassoc] lemma pullD_comp (f:X⟶X') (g:Y⟶Y') (F:X'⟶nerve C) (G:Y'⟶nerve C) (q:ℕ) : + SSet.homologyMap (f⊗ₘg) Z q ≫ pullD F G q=pullD (f≫F) (g≫G) q := by + rw [pullD,←SSet.homologyMap_comp_assoc,tensorHom_comp_tensorHom, pullD] +omit [SymmetricCategory C] in +lemma pullD_congr {D E:Type} [Category.{0} D] [Category.{0} E] + {f f':D⥤C} {g g':E⥤C} (α:f≅f') (β:g≅g') (q:ℕ) : + pullD (nerveMap f) (nerveMap g) q=pullD (nerveMap f') (nerveMap g') q := by + rw [pullD,pullD,NerveProduct.homology_congr α β] +omit [SymmetricCategory C] in +lemma pullD_left (f:X⟶nerve C) (g:Y⟶nerve C) (U:C) (q:ℕ) : + pullD (f≫nerveMap (tensorLeft U)) g q=pullD f g q := by + conv_lhs => rw [←Category.comp_id g] + rw [pullD,←tensorHom_comp_tensorHom,SSet.homologyMap_comp,Category.assoc,binaryD_left] + rfl +lemma pullD_right (f:X⟶nerve C) (g:Y⟶nerve C) (U:C) (q:ℕ) : + pullD f (g≫nerveMap (tensorLeft U)) q=pullD f g q := by + conv_lhs => rw [←Category.comp_id f] + rw [pullD,←tensorHom_comp_tensorHom,SSet.homologyMap_comp,Category.assoc,binaryD_second_left] + rfl +lemma pairLeft_tensor (f:X⟶X') (g:Y⟶Y') (y:Y.obj (op ⦋0⦌)) : + pairLeft X Y y ≫ (f⊗ₘg)=f≫pairLeft X' Y' (g.app _ y) := by + apply CartesianMonoidalCategory.hom_ext + · simp [pairLeft] + · simp [pairLeft,SSet.const_comp] +lemma pairRight_tensor (f:X⟶X') (g:Y⟶Y') (x:X.obj (op ⦋0⦌)) : + pairRight X Y x ≫ (f⊗ₘg)=g≫pairRight X' Y' (f.app _ x) := by + apply CartesianMonoidalCategory.hom_ext + · simp [pairRight,SSet.const_comp] + · simp [pairRight] +@[reassoc] lemma inclusion_pullD (f:X⟶nerve C) (g:Y⟶nerve C) + (x:X.obj (op ⦋0⦌)) (y:Y.obj (op ⦋0⦌)) (q:ℕ) (hq:q≠0) : + ConnectedProduct.inclusion X Y x y q ≫ pullD f g q=0 := by + apply biprod.hom_ext' + · simp only [ConnectedProduct.inclusion,biprod.inl_desc_assoc,pullD] + rw [←SSet.homologyMap_comp_assoc,pairLeft_tensor,SSet.homologyMap_comp_assoc,pairLeft_binaryD _ q hq,comp_zero] + simp + · simp only [ConnectedProduct.inclusion,biprod.inr_desc_assoc,pullD] + rw [←SSet.homologyMap_comp_assoc,pairRight_tensor,SSet.homologyMap_comp_assoc,pairRight_binaryD _ q hq,comp_zero] + simp +lemma pullD_kernel_value (f:X⟶nerve C) (g:Y⟶nerve C) + (x:X.obj (op ⦋0⦌)) (y:Y.obj (op ⦋0⦌)) (q:ℕ) (hq:q≠0) + (z:((X⊗Y).homology Z q:A)) : + ∃w:((X⊗Y).homology Z q:A), projection X Y q w=0 ∧ pullD f g q w=pullD f g q z := by + let inc:=ConnectedProduct.inclusion X Y x y q + refine ⟨z-inc (projection X Y q z),?_,?_⟩ + · rw [map_sub] + have h:=congrArg (fun k=>k (projection X Y q z)) (inclusion_projection X Y x y q hq) + change projection X Y q (inc (projection X Y q z))=projection X Y q z at h + rw [h,sub_self] + · rw [map_sub] + have h:=congrArg (fun k=>k (projection X Y q z)) (inclusion_pullD f g x y q hq) + change pullD f g q (inc (projection X Y q z))=0 at h + rw [h,sub_zero] +end ComponentStable + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/BooleanStepCoefficients.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BooleanStepCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0e72623174f5c20f7cdb0c087dc9b52b794bd4a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BooleanStepCoefficients.lean @@ -0,0 +1,184 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TorusStepFunctions +import OAI.GroupTheory.SimpleAmenable.Configurations.BooleanStages +import OAI.GroupTheory.SimpleAmenable.Configurations.StageOrder + +namespace OAI + +section + +section +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject + +namespace BooleanPartition +variable {a:ℕ} +lemma arrangement_color (P:BooleanPartition a) : HasSquareArrangement P.color := by + choose S hS using fun b => polygon_hasSquareArrangement (P.polygon b) + refine ⟨Finset.univ.biUnion S,fun p q hpq => ?_⟩ + have h := hS (P.color p) p q (fun l hl => hpq l (Finset.mem_biUnion.mpr ⟨_,Finset.mem_univ _,hl⟩)) + exact ((decide_eq_decide.mp h).mp rfl).symm +lemma arrangement_values (P:BooleanPartition a) {K:Type*} (v:Fin P.size→K) : + HasSquareArrangement (fun p => v (P.color p)) := by + obtain ⟨S,hS⟩ := P.arrangement_color + exact ⟨S,fun p q h => congrArg v (hS p q h)⟩ + +lemma exists_arrangement_partition {ι K:Type} [Fintype ι] (f:ι→GenericSquare a→K) + (hf:∀i,HasSquareArrangement (f i)) : + ∃P:BooleanPartition a,∀i p q,P.color p=P.color q → f i p=f i q := by + choose S hS using hf + let T := Finset.univ.biUnion S + let C : T → polygonAlgebra a := fun l => ⟨_,halfPlane_mem a l.val.1 l.val.2⟩ + refine ⟨generated C,fun i p q hpq => hS i p q (fun l hl => ?_)⟩ + have h := generated_constant C hpq (⟨l,Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ _,hl⟩⟩:T) + exact decide_eq_decide.mpr h +end BooleanPartition +variable (a:ℕ) (K:Type) [AddCommGroup K] [Module ℤ K] +noncomputable def booleanStepSubmodule : Submodule ℤ (GenericSquare a→K) where + carrier := {f | HasSquareArrangement f} + zero_mem' := ⟨∅,fun _ _ _ => rfl⟩ + add_mem' := by + rintro f g ⟨S,hS⟩ ⟨T,hT⟩ + exact ⟨S∪T,fun p q h => congrArg₂ (·+·) + (hS p q (fun l hl => h l (Finset.mem_union_left T hl))) + (hT p q (fun l hl => h l (Finset.mem_union_right S hl)))⟩ + smul_mem' := by + rintro r f ⟨S,hS⟩ + exact ⟨S,fun p q h => congrArg (r • ·) (hS p q h)⟩ +noncomputable abbrev BooleanStep := ↥(booleanStepSubmodule a K) +namespace BooleanStep +variable {a K} +noncomputable def inflate (P:BooleanPartition a) : (Fin P.size→K) →ₗ[ℤ] BooleanStep a K where + toFun v := ⟨fun p => v (P.color p),P.arrangement_values v⟩ + map_add' _ _ := rfl + map_smul' _ _ := rfl +noncomputable def evaluate (P:BooleanPartition a) : BooleanStep a K →ₗ[ℤ] (Fin P.size→K) where + toFun f b := f.val (P.point b) + map_add' _ _ := rfl + map_smul' _ _ := rfl +omit [Module ℤ K] in +@[simp] lemma inflate_apply (P:BooleanPartition a) (v:Fin P.size→K) (p:GenericSquare a) : + (inflate (K:=K) P v).val p=v (P.color p) := rfl +omit [Module ℤ K] in +@[simp] lemma evaluate_apply (P:BooleanPartition a) (v:BooleanStep a K) (b:Fin P.size) : + evaluate (K:=K) P v b=v.val (P.point b) := rfl +omit [Module ℤ K] in +lemma evaluate_inflate (P:BooleanPartition a) : (evaluate (K:=K) P).comp (inflate (K:=K) P)=LinearMap.id := by + apply LinearMap.ext; intro v; funext i + simp only [LinearMap.comp_apply,evaluate_apply,inflate_apply,BooleanPartition.color_point,LinearMap.id_apply] +omit [Module ℤ K] in +lemma inflate_injective (P:BooleanPartition a) : Function.Injective (inflate (K:=K) P) := by + intro x y h + have hh := congrArg (evaluate (K:=K) P) h + change ((evaluate (K:=K) P).comp (inflate (K:=K) P)) x=((evaluate (K:=K) P).comp (inflate (K:=K) P)) y at hh + simpa only [evaluate_inflate,LinearMap.id_apply] using hh +noncomputable def refinement {P Q:BooleanPartition a} (_h:P.Refines Q) : + (Fin P.size→K) →ₗ[ℤ] (Fin Q.size→K) := (evaluate (K:=K) Q).comp (inflate (K:=K) P) +omit [Module ℤ K] in +lemma inflate_refinement {P Q:BooleanPartition a} (h:P.Refines Q) : + (inflate (K:=K) Q).comp (refinement h)=inflate (K:=K) P := by + apply LinearMap.ext; intro v; apply Subtype.ext; funext p + change v (P.color (Q.point (Q.color p)))=v (P.color p) + exact congrArg v (h _ _ (Q.color_point (Q.color p))) +omit [Module ℤ K] in +lemma exists_common {ι:Type} [Fintype ι] (f:ι→BooleanStep a K) : + ∃P:BooleanPartition a,∀i,inflate (K:=K) P (evaluate (K:=K) P (f i))=f i := by + obtain ⟨P,hP⟩ := BooleanPartition.exists_arrangement_partition (fun i => (f i).val) (fun i => (f i).property) + refine ⟨P,fun i => ?_⟩ + apply Subtype.ext; funext p + exact hP i _ _ (P.color_point (P.color p)) +end BooleanStep +end SimpleAmenable.PolygonObject + +end + +section +open CategoryTheory Classical Set TensorProduct +namespace SimpleAmenable.PolygonObject.BooleanStep + +variable {a:ℕ} {K:Type} [AddCommGroup K] +noncomputable def multiply : BooleanStep a ℤ →ₗ[ℤ] K →ₗ[ℤ] BooleanStep a K where + toFun f := { + toFun k := ⟨fun p => f.val p • k,by + obtain ⟨S,hS⟩ := f.property + exact ⟨S,fun p q h => congrArg (· • k) (hS p q h)⟩⟩ + map_add' x y := by apply Subtype.ext; funext p; change f.val p • (x+y)=f.val p • x+f.val p • y; exact smul_add _ _ _ + map_smul' r k := by apply Subtype.ext; funext p; change f.val p • (r • k)=r • (f.val p • k); exact smul_comm _ _ _ } + map_add' f g := by ext k p; exact add_smul _ _ _ + map_smul' r f := by + apply LinearMap.ext; intro k; apply Subtype.ext; funext p + change (r • f.val p) • k = r • (f.val p • k) + exact smul_assoc r (f.val p) k +noncomputable def tensorMap : BooleanStep a ℤ ⊗[ℤ] K →ₗ[ℤ] BooleanStep a K := + TensorProduct.lift multiply +@[simp] lemma tensorMap_tmul (f:BooleanStep a ℤ) (k:K) (p:GenericSquare a) : + (tensorMap (a:=a) (K:=K) (f ⊗ₜ[ℤ] k)).val p=f.val p • k := rfl +noncomputable def finiteTensorEquiv (P:BooleanPartition a) : + (Fin P.size→ℤ) ⊗[ℤ] K ≃ₗ[ℤ] (Fin P.size→K) := + TensorProduct.comm ℤ _ _ ≪≫ₗ TensorProduct.piScalarRight ℤ ℤ K (Fin P.size) +@[simp] lemma finiteTensorEquiv_tmul (P:BooleanPartition a) (v:Fin P.size→ℤ) (k:K) : + finiteTensorEquiv (K:=K) P (v ⊗ₜ[ℤ] k)=fun i => v i • k := by + change TensorProduct.piScalarRightHom ℤ ℤ K (Fin P.size) (k ⊗ₜ[ℤ] v)=_ + exact TensorProduct.piScalarRightHom_tmul ℤ ℤ K (Fin P.size) k v +noncomputable def tensorInflate (P:BooleanPartition a) : + (Fin P.size→ℤ) ⊗[ℤ] K →ₗ[ℤ] BooleanStep a ℤ ⊗[ℤ] K := + TensorProduct.map (inflate (K:=ℤ) P) LinearMap.id +lemma tensorMap_inflate (P:BooleanPartition a) : + (tensorMap (a:=a) (K:=K)).comp (tensorInflate P) = + (inflate (K:=K) P).comp (finiteTensorEquiv (K:=K) P).toLinearMap := by + apply TensorProduct.ext'; intro v k; apply Subtype.ext; funext p + change v (P.color p) • k=finiteTensorEquiv (K:=K) P (v ⊗ₜ[ℤ] k) (P.color p) + rw [finiteTensorEquiv_tmul] +lemma tensorInflate_refinement {P Q:BooleanPartition a} (h:P.Refines Q) : + (tensorInflate (K:=K) Q).comp (TensorProduct.map (refinement (K:=ℤ) h) LinearMap.id)= + tensorInflate P := by + apply TensorProduct.ext'; intro v k + exact congrArg (fun f => f ⊗ₜ[ℤ] k) (LinearMap.congr_fun (inflate_refinement (K:=ℤ) h) v) +lemma exists_tensor_stage (x:BooleanStep a ℤ ⊗[ℤ] K) : + ∃P:BooleanPartition a,∃v:(Fin P.size→ℤ) ⊗[ℤ] K,tensorInflate P v=x := by + induction x using TensorProduct.inductionOn with + | tmul f k => + obtain ⟨P,hP⟩ := exists_common (fun _:Fin 1 => f) + refine ⟨P,evaluate (K:=ℤ) P f ⊗ₜ[ℤ] k,?_⟩ + change inflate (K:=ℤ) P (evaluate (K:=ℤ) P f) ⊗ₜ[ℤ] k = f ⊗ₜ[ℤ] k + rw [hP 0] + | add x y hx hy => + obtain ⟨P,v,rfl⟩ := hx + obtain ⟨Q,w,rfl⟩ := hy + let T := P.join Q + let hP : P.Refines T := P.le_join_left Q + let hQ : Q.Refines T := P.le_join_right Q + refine ⟨T,TensorProduct.map (refinement hP) LinearMap.id v+ + TensorProduct.map (refinement hQ) LinearMap.id w,?_⟩ + rw [map_add] + exact congrArg₂ (·+·) (LinearMap.congr_fun (tensorInflate_refinement (K:=K) hP) v) + (LinearMap.congr_fun (tensorInflate_refinement (K:=K) hQ) w) +lemma tensorMap_injective : Function.Injective (tensorMap (a:=a) (K:=K)) := by + apply (tensorMap (a:=a) (K:=K)).ker_eq_bot.mp + rw [LinearMap.ker_eq_bot'] + intro x hx + obtain ⟨P,v,rfl⟩ := exists_tensor_stage x + have hv : inflate (K:=K) P (finiteTensorEquiv (K:=K) P v)=0 := by + change ((inflate (K:=K) P).comp (finiteTensorEquiv (K:=K) P).toLinearMap) v=0 + rw [←tensorMap_inflate] + exact hx + have hv0 : finiteTensorEquiv (K:=K) P v=0 := inflate_injective P (hv.trans (map_zero _).symm) + have h := (finiteTensorEquiv (K:=K) P).injective (hv0.trans (map_zero _).symm) + rw [h,map_zero] +lemma tensorMap_surjective : Function.Surjective (tensorMap (a:=a) (K:=K)) := by + intro f + obtain ⟨P,hP⟩ := exists_common (fun _:Fin 1 => f) + refine ⟨tensorInflate P ((finiteTensorEquiv (K:=K) P).symm (evaluate (K:=K) P f)),?_⟩ + change ((tensorMap (a:=a) (K:=K)).comp (tensorInflate P)) _ = _ + rw [tensorMap_inflate,LinearMap.comp_apply,LinearEquiv.coe_coe,LinearEquiv.apply_symm_apply] + exact hP 0 + +noncomputable def tensorEquiv : SquareStep a ⊗[ℤ] K ≃ₗ[ℤ] BooleanStep a K := + LinearEquiv.ofBijective tensorMap ⟨tensorMap_injective,tensorMap_surjective⟩ +end SimpleAmenable.PolygonObject.BooleanStep + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/BoundedHomologyEdge.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BoundedHomologyEdge.lean new file mode 100644 index 0000000000000000000000000000000000000000..d205115958a807dc6187c1c112dcc1954a3ccefc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/BoundedHomologyEdge.lean @@ -0,0 +1,273 @@ +import Mathlib + +namespace OAI + +section + +section + +open CategoryTheory CategoryTheory.Limits + +namespace BoundedHomologyEdge + +universe u +variable {k G : Type u} [CommRing k] [Group G] + +noncomputable abbrev Hmap {A B : Rep k G} (n : ℕ) (f : A ⟶ B) : + groupHomology A n ⟶ groupHomology B n := + (groupHomology.functor k G n).map f + +lemma Hmap_comp {A B C : Rep k G} (n : ℕ) (f : A ⟶ B) (g : B ⟶ C) : + Hmap n (f ≫ g) = Hmap n f ≫ Hmap n g := + (groupHomology.functor k G n).map_comp f g + +lemma epi_Hmap_zero {A B : Rep k G} (f : A ⟶ B) [Epi f] : Epi (Hmap 0 f) := + groupHomology.epi_map_0_of_epi f + +lemma exact₂ {X : ShortComplex (Rep k G)} (hX : X.ShortExact) (n : ℕ) : + (ShortComplex.mk (Hmap n X.f) (Hmap n X.g) + (by rw [← Hmap_comp, X.zero]; exact (groupHomology.functor k G n).map_zero _ _)).Exact := + groupHomology.mapShortComplex₂_exact hX n + +lemma exact₁ {X : ShortComplex (Rep k G)} (hX : X.ShortExact) (n : ℕ) : + (ShortComplex.mk (groupHomology.δ hX (n+1) n rfl) (Hmap n X.f) + (groupHomology.mapShortComplex₁ hX rfl).zero).Exact := + groupHomology.mapShortComplex₁_exact hX rfl + +lemma exact₃ {X : ShortComplex (Rep k G)} (hX : X.ShortExact) (n : ℕ) : + (ShortComplex.mk (Hmap (n+1) X.g) (groupHomology.δ hX (n+1) n rfl) + (groupHomology.mapShortComplex₃ hX rfl).zero).Exact := + groupHomology.mapShortComplex₃_exact hX rfl + +lemma epi_Hmap_succ_of_mono {X : ShortComplex (Rep k G)} (hX : X.ShortExact) (n : ℕ) + [Mono (Hmap n X.f)] : Epi (Hmap (n+1) X.g) := by + exact (exact₃ hX n).epi_f ((exact₁ hX n).mono_g_iff.mp (show Mono (Hmap n X.f) from inferInstance)) + +lemma epi_Hmap_succ_of_isZero {X : ShortComplex (Rep k G)} (hX : X.ShortExact) (n : ℕ) + (h : IsZero (groupHomology X.X₁ n)) : Epi (Hmap (n+1) X.g) := by + exact (exact₃ hX n).epi_f (h.eq_zero_of_tgt _) + +lemma mono_Hmap_of_zero {X : ShortComplex (Rep k G)} (hX : X.ShortExact) (n : ℕ) + (h : Hmap n X.f = 0) : Mono (Hmap n X.g) := + (exact₂ hX n).mono_g_iff.mpr h + +lemma isZero_H0_quotient {X : ShortComplex (Rep k G)} (hX : X.ShortExact) + [Epi (Hmap 0 X.f)] : IsZero (groupHomology X.X₃ 0) := by + let : Epi X.g := hX.epi_g + let : Epi (Hmap 0 X.g) := epi_Hmap_zero X.g + exact IsZero.of_epi_eq_zero (Hmap 0 X.g) ((exact₂ hX 0).epi_f_iff.mp (show Epi (Hmap 0 X.f) from inferInstance)) + +lemma isIso_right_of_epi_left {A B C : ModuleCat k} (f : A ⟶ B) (g : B ⟶ C) + [Epi f] [IsIso (f ≫ g)] : IsIso g := by + let : Mono f := mono_of_mono f g + let : IsIso f := isIso_of_mono_of_epi f + exact IsIso.of_isIso_comp_left f g + +section TwoKernels +variable {Z₁ Z₂ C₀ C₁ C₂ C₃ : Rep k G} + {i₁ : Z₁ ⟶ C₁} {p₁ : C₁ ⟶ C₀} {i₂ : Z₂ ⟶ C₂} {p₂ : C₂ ⟶ Z₁} + {w₁ : i₁ ≫ p₁ = 0} {w₂ : i₂ ≫ p₂ = 0} + (h₁ : (ShortComplex.mk i₁ p₁ w₁).ShortExact) + (h₂ : (ShortComplex.mk i₂ p₂ w₂).ShortExact) + (e : C₃ ⟶ Z₂) [Epi e] + +lemma isIso_H0_i₂ [IsIso (Hmap 0 (e ≫ i₂))] : IsIso (Hmap 0 i₂) := by + let : Epi (Hmap 0 e) := epi_Hmap_zero e + let : IsIso (Hmap 0 e ≫ Hmap 0 i₂) := by rw [← Hmap_comp]; infer_instance + exact isIso_right_of_epi_left (Hmap 0 e) (Hmap 0 i₂) + +include h₂ + +lemma isZero_H0_kernel [IsIso (Hmap 0 (e ≫ i₂))] : + IsZero (groupHomology Z₁ 0) := by + let : IsIso (Hmap 0 i₂) := isIso_H0_i₂ e + exact isZero_H0_quotient h₂ + +include h₁ + +lemma H1_isIso [IsIso (Hmap 0 (e ≫ i₂))] + (hodd : Hmap 1 (p₂ ≫ i₁) = 0) : IsIso (Hmap 1 p₁) := by + let : IsIso (Hmap 0 i₂) := isIso_H0_i₂ e + let : Epi (Hmap 1 p₂) := epi_Hmap_succ_of_mono h₂ 0 + have hi : Hmap 1 i₁ = 0 := zero_of_epi_comp (Hmap 1 p₂) (by + rw [← Hmap_comp]; exact hodd) + let : Mono (Hmap 1 p₁) := mono_Hmap_of_zero h₁ 1 hi + let : Epi (Hmap 1 p₁) := epi_Hmap_succ_of_isZero h₁ 0 (isZero_H0_kernel h₂ e) + exact isIso_of_mono_of_epi (Hmap 1 p₁) + +lemma H2_epi_of_isZero [IsIso (Hmap 0 (e ≫ i₂))] + (hperfect : IsZero (groupHomology C₂ 1)) : Epi (Hmap 2 p₁) := by + let : IsIso (Hmap 0 i₂) := isIso_H0_i₂ e + let : Epi (Hmap 1 p₂) := epi_Hmap_succ_of_mono h₂ 0 + have hz : IsZero (groupHomology Z₁ 1) := IsZero.of_epi (Hmap 1 p₂) hperfect + exact epi_Hmap_succ_of_isZero h₁ 1 hz + +lemma H2_epi_of_epi [IsIso (Hmap 0 (e ≫ i₂))] + [Epi (Hmap 1 (e ≫ i₂))] : Epi (Hmap 2 p₁) := by + let : IsIso (Hmap 0 i₂) := isIso_H0_i₂ e + let : Epi (Hmap 1 p₂) := epi_Hmap_succ_of_mono h₂ 0 + let : Epi (Hmap 1 e ≫ Hmap 1 i₂) := by rw [← Hmap_comp]; infer_instance + let : Epi (Hmap 1 i₂) := epi_of_epi (Hmap 1 e) (Hmap 1 i₂) + have hp : Hmap 1 p₂ = 0 := (exact₂ h₂ 1).epi_f_iff.mp inferInstance + have hz : IsZero (groupHomology Z₁ 1) := IsZero.of_epi_eq_zero (Hmap 1 p₂) hp + exact epi_Hmap_succ_of_isZero h₁ 1 hz + +end TwoKernels + +section ThreeKernels +variable {Z₁ Z₂ Z₃ C₀ C₁ C₂ C₃ C₄ C₅ : Rep k G} + {i₁ : Z₁ ⟶ C₁} {p₁ : C₁ ⟶ C₀} {i₂ : Z₂ ⟶ C₂} {p₂ : C₂ ⟶ Z₁} + {i₃ : Z₃ ⟶ C₃} {p₃ : C₃ ⟶ Z₂} + {w₁ : i₁ ≫ p₁ = 0} {w₂ : i₂ ≫ p₂ = 0} {w₃ : i₃ ≫ p₃ = 0} + (h₁ : (ShortComplex.mk i₁ p₁ w₁).ShortExact) + (h₂ : (ShortComplex.mk i₂ p₂ w₂).ShortExact) + (h₃ : (ShortComplex.mk i₃ p₃ w₃).ShortExact) + (e₄ : C₄ ⟶ Z₃) [Epi e₄] (d₅ : C₅ ⟶ C₄) (w₅ : d₅ ≫ e₄ = 0) + +include w₅ + +lemma isZero_H0_third_kernel [Epi (Hmap 0 d₅)] : + IsZero (groupHomology Z₃ 0) := by + let : Epi (Hmap 0 e₄) := epi_Hmap_zero e₄ + have he : Hmap 0 e₄ = 0 := zero_of_epi_comp (Hmap 0 d₅) (by + rw [← Hmap_comp, w₅]; exact (groupHomology.functor k G 0).map_zero _ _) + exact IsZero.of_epi_eq_zero (Hmap 0 e₄) he + +include h₁ h₂ h₃ + +lemma H2_isIso [IsIso (Hmap 0 (p₃ ≫ i₂))] [IsIso (Hmap 1 (p₃ ≫ i₂))] + [Epi (Hmap 0 d₅)] (hodd : Hmap 2 (p₂ ≫ i₁) = 0) : IsIso (Hmap 2 p₁) := by + let : Epi p₃ := h₃.epi_g + let : Epi (Hmap 2 p₁) := H2_epi_of_epi h₁ h₂ p₃ + have hz : IsZero (groupHomology Z₃ 0) := isZero_H0_third_kernel e₄ d₅ w₅ + let : Epi (Hmap 1 p₃) := epi_Hmap_succ_of_isZero h₃ 0 hz + let : IsIso (Hmap 1 p₃ ≫ Hmap 1 i₂) := by rw [← Hmap_comp]; infer_instance + let : IsIso (Hmap 1 i₂) := isIso_right_of_epi_left (Hmap 1 p₃) (Hmap 1 i₂) + let : Epi (Hmap 2 p₂) := epi_Hmap_succ_of_mono h₂ 1 + have hi : Hmap 2 i₁ = 0 := zero_of_epi_comp (Hmap 2 p₂) (by + rw [← Hmap_comp]; exact hodd) + let : Mono (Hmap 2 p₁) := mono_Hmap_of_zero h₁ 2 hi + exact isIso_of_mono_of_epi (Hmap 2 p₁) +end ThreeKernels + +section KernelWindow + +lemma exact_of_comp_mono {𝒞 : Type*} [Category 𝒞] [HasZeroMorphisms 𝒞] + {A B C D : 𝒞} (f : A ⟶ B) (g : B ⟶ C) (i : C ⟶ D) [Mono i] + (w : f ≫ g = 0) (w' : f ≫ (g ≫ i) = 0) + (h : (ShortComplex.mk f (g ≫ i) w').Exact) : + (ShortComplex.mk f g w).Exact := by + let φ : ShortComplex.mk f g w ⟶ ShortComplex.mk f (g ≫ i) w' := + { τ₁ := 𝟙 A, τ₂ := 𝟙 B, τ₃ := i, comm₁₂ := by simp, comm₂₃ := by simp } + exact (ShortComplex.exact_iff_of_epi_of_isIso_of_mono φ).mpr h + +lemma kernel_shortExact {A B : Rep k G} (f : A ⟶ B) [Epi f] : + (ShortComplex.mk (kernel.ι f) f (kernel.condition f)).ShortExact := + { exact := ShortComplex.exact_kernel f, mono_f := inferInstance, epi_g := inferInstance } + +variable {C₀ C₁ C₂ C₃ C₄ C₅ : Rep k G} + (d₁ : C₁ ⟶ C₀) (d₂ : C₂ ⟶ C₁) (d₃ : C₃ ⟶ C₂) (d₄ : C₄ ⟶ C₃) (d₅ : C₅ ⟶ C₄) + (w₂ : d₂ ≫ d₁ = 0) (w₃ : d₃ ≫ d₂ = 0) (w₄ : d₄ ≫ d₃ = 0) (w₅ : d₅ ≫ d₄ = 0) + +noncomputable def lift₂ := kernel.lift d₁ d₂ w₂ + +@[simp] lemma lift₂_ι : lift₂ d₁ d₂ w₂ ≫ kernel.ι d₁ = d₂ := kernel.lift_ι _ _ _ + +include w₃ in +lemma comp_lift₂_zero : d₃ ≫ lift₂ d₁ d₂ w₂ = 0 := by + apply zero_of_comp_mono (kernel.ι d₁) + simpa only [Category.assoc, lift₂_ι] using w₃ + +noncomputable def lift₃ := + kernel.lift (lift₂ d₁ d₂ w₂) d₃ (comp_lift₂_zero d₁ d₂ d₃ w₂ w₃) + +@[simp] lemma lift₃_ι : lift₃ d₁ d₂ d₃ w₂ w₃ ≫ kernel.ι (lift₂ d₁ d₂ w₂) = d₃ := + kernel.lift_ι _ _ _ + +include w₄ in +lemma comp_lift₃_zero : d₄ ≫ lift₃ d₁ d₂ d₃ w₂ w₃ = 0 := by + apply zero_of_comp_mono (kernel.ι (lift₂ d₁ d₂ w₂)) + simpa only [Category.assoc, lift₃_ι] using w₄ + +noncomputable def lift₄ := + kernel.lift (lift₃ d₁ d₂ d₃ w₂ w₃) d₄ (comp_lift₃_zero d₁ d₂ d₃ d₄ w₂ w₃ w₄) + +@[simp] lemma lift₄_ι : lift₄ d₁ d₂ d₃ d₄ w₂ w₃ w₄ ≫ + kernel.ι (lift₃ d₁ d₂ d₃ w₂ w₃) = d₄ := kernel.lift_ι _ _ _ + +include w₅ in +lemma comp_lift₄_zero : d₅ ≫ lift₄ d₁ d₂ d₃ d₄ w₂ w₃ w₄ = 0 := by + apply zero_of_comp_mono (kernel.ι (lift₃ d₁ d₂ d₃ w₂ w₃)) + simpa only [Category.assoc, lift₄_ι] using w₅ + +lemma epi_lift₂ (h : (ShortComplex.mk d₂ d₁ w₂).Exact) : Epi (lift₂ d₁ d₂ w₂) := + h.epi_kernelLift + +lemma epi_lift₃ (h : (ShortComplex.mk d₃ d₂ w₃).Exact) : Epi (lift₃ d₁ d₂ d₃ w₂ w₃) := by + have hh : (ShortComplex.mk d₃ (lift₂ d₁ d₂ w₂) + (comp_lift₂_zero d₁ d₂ d₃ w₂ w₃)).Exact := by + apply exact_of_comp_mono d₃ (lift₂ d₁ d₂ w₂) (kernel.ι d₁) + (comp_lift₂_zero d₁ d₂ d₃ w₂ w₃) (by simpa using w₃) + simpa using h + exact hh.epi_kernelLift + +lemma epi_lift₄ (h : (ShortComplex.mk d₄ d₃ w₄).Exact) : + Epi (lift₄ d₁ d₂ d₃ d₄ w₂ w₃ w₄) := by + have hh : (ShortComplex.mk d₄ (lift₃ d₁ d₂ d₃ w₂ w₃) + (comp_lift₃_zero d₁ d₂ d₃ d₄ w₂ w₃ w₄)).Exact := by + apply exact_of_comp_mono d₄ (lift₃ d₁ d₂ d₃ w₂ w₃) (kernel.ι (lift₂ d₁ d₂ w₂)) + (comp_lift₃_zero d₁ d₂ d₃ d₄ w₂ w₃ w₄) (by simpa using w₄) + simpa using h + exact hh.epi_kernelLift + +lemma chain_H2_epi [Epi d₁] + (h₁ : (ShortComplex.mk d₂ d₁ w₂).Exact) + (h₂ : (ShortComplex.mk d₃ d₂ w₃).Exact) + [IsIso (Hmap 0 d₃)] (hz : IsZero (groupHomology C₂ 1)) : Epi (Hmap 2 d₁) := by + let : Epi (lift₂ d₁ d₂ w₂) := epi_lift₂ d₁ d₂ w₂ h₁ + let : Epi (lift₃ d₁ d₂ d₃ w₂ w₃) := epi_lift₃ d₁ d₂ d₃ w₂ w₃ h₂ + let : IsIso (Hmap 0 (lift₃ d₁ d₂ d₃ w₂ w₃ ≫ kernel.ι (lift₂ d₁ d₂ w₂))) := by + simpa only [lift₃_ι] using (inferInstance : IsIso (Hmap 0 d₃)) + exact H2_epi_of_isZero (kernel_shortExact d₁) (kernel_shortExact (lift₂ d₁ d₂ w₂)) + (lift₃ d₁ d₂ d₃ w₂ w₃) hz + +lemma chain_H1_isIso [Epi d₁] + (h₁ : (ShortComplex.mk d₂ d₁ w₂).Exact) + (h₂ : (ShortComplex.mk d₃ d₂ w₃).Exact) + [IsIso (Hmap 0 d₃)] (hodd : Hmap 1 d₂ = 0) : IsIso (Hmap 1 d₁) := by + let : Epi (lift₂ d₁ d₂ w₂) := epi_lift₂ d₁ d₂ w₂ h₁ + let : Epi (lift₃ d₁ d₂ d₃ w₂ w₃) := epi_lift₃ d₁ d₂ d₃ w₂ w₃ h₂ + let : IsIso (Hmap 0 (lift₃ d₁ d₂ d₃ w₂ w₃ ≫ kernel.ι (lift₂ d₁ d₂ w₂))) := by + simpa only [lift₃_ι] using (inferInstance : IsIso (Hmap 0 d₃)) + apply H1_isIso (kernel_shortExact d₁) (kernel_shortExact (lift₂ d₁ d₂ w₂)) + (lift₃ d₁ d₂ d₃ w₂ w₃) + simpa only [lift₂_ι] using hodd + +include w₅ in + +lemma chain_H2_isIso [Epi d₁] + (h₁ : (ShortComplex.mk d₂ d₁ w₂).Exact) + (h₂ : (ShortComplex.mk d₃ d₂ w₃).Exact) + (h₃ : (ShortComplex.mk d₄ d₃ w₄).Exact) + [IsIso (Hmap 0 d₃)] [IsIso (Hmap 1 d₃)] [Epi (Hmap 0 d₅)] + (hodd : Hmap 2 d₂ = 0) : IsIso (Hmap 2 d₁) := by + let : Epi (lift₂ d₁ d₂ w₂) := epi_lift₂ d₁ d₂ w₂ h₁ + let : Epi (lift₃ d₁ d₂ d₃ w₂ w₃) := epi_lift₃ d₁ d₂ d₃ w₂ w₃ h₂ + let : Epi (lift₄ d₁ d₂ d₃ d₄ w₂ w₃ w₄) := epi_lift₄ d₁ d₂ d₃ d₄ w₂ w₃ w₄ h₃ + let : IsIso (Hmap 0 (lift₃ d₁ d₂ d₃ w₂ w₃ ≫ kernel.ι (lift₂ d₁ d₂ w₂))) := by + simpa only [lift₃_ι] using (inferInstance : IsIso (Hmap 0 d₃)) + let : IsIso (Hmap 1 (lift₃ d₁ d₂ d₃ w₂ w₃ ≫ kernel.ι (lift₂ d₁ d₂ w₂))) := by + simpa only [lift₃_ι] using (inferInstance : IsIso (Hmap 1 d₃)) + apply H2_isIso (kernel_shortExact d₁) (kernel_shortExact (lift₂ d₁ d₂ w₂)) + (kernel_shortExact (lift₃ d₁ d₂ d₃ w₂ w₃)) + (lift₄ d₁ d₂ d₃ d₄ w₂ w₃ w₄) d₅ (comp_lift₄_zero d₁ d₂ d₃ d₄ d₅ w₂ w₃ w₄ w₅) + simpa only [lift₂_ι] using hodd +end KernelWindow + +end BoundedHomologyEdge + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/CanonicalProduct.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/CanonicalProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ed4d6467c4172f0beb798674b8e4d96dd2ea00c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/CanonicalProduct.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ConeHomology +import OAI.GroupTheory.SimpleAmenable.Homology.ConnectedProduct +import OAI.GroupTheory.SimpleAmenable.Simplicial.SimplicialConnectedProduct + +namespace OAI + +section + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite AlgebraicTopology +namespace ConnectedProduct +open FreeChains AugmentedSplit + +abbrev one : SSet := (Functor.const SimplexCategoryᵒᵖ).obj PUnit +lemma one_homology_zero (n : ℕ) (hn : n≠0) : IsZero (one.homology Z n) := by + let V := (sigmaConst.obj Z).obj PUnit + let e := (SimplicialObject.Augmented.ExtraDegeneracy.const V).homotopyEquiv + have hz : IsZero (((ChainComplex.single₀ A).obj V).homology n) := by + apply ShortComplex.isZero_homology_of_isZero_X₂ + exact HomologicalComplex.isZero_single_obj_X c 0 V n hn + let ei : one.chainComplex Z ≅ AlternatingFaceMapComplex.obj ((Functor.const SimplexCategoryᵒᵖ).obj V) := + (alternatingFaceMapComplex A).mapIso + (Functor.constComp SimplexCategoryᵒᵖ PUnit (sigmaConst.obj Z)) + exact IsZero.of_iso hz (((homologyFunctor A c n).mapIso ei) ≪≫ e.toHomologyIso n) +lemma const_homology_zero {X Y : SSet} (y : Y.obj (op ⦋0⦌)) (n : ℕ) (hn : n≠0) : + SSet.homologyMap (SSet.const (X:=X) y) Z n = 0 := by + have hh : SSet.const (X:=X) y = SSet.const (X:=X) (Y:=one) PUnit.unit ≫ SSet.const y := by simp + rw [hh,SSet.homologyMap_comp] + have hz := one_homology_zero n hn + rw [hz.eq_of_src (SSet.homologyMap (SSet.const (X:=one) y) Z n) 0,comp_zero] +variable (X Y : SSet) +noncomputable def diagonalProductIso : EilenbergZilber.diag ⋙ ProductChains.product X Y ≅ X⊗Y := + NatIso.ofComponents (fun _ => Iso.refl _) (by intros; rfl) +noncomputable def projection (n : ℕ) : (X⊗Y).homology Z n ⟶ X.homology Z n ⊞ Y.homology Z n := + biprod.lift (SSet.homologyMap (CartesianMonoidalCategory.fst X Y) Z n) + (SSet.homologyMap (CartesianMonoidalCategory.snd X Y) Z n) +noncomputable def inclusion (x : X.obj (op ⦋0⦌)) (y : Y.obj (op ⦋0⦌)) (n : ℕ) : + X.homology Z n ⊞ Y.homology Z n ⟶ (X⊗Y).homology Z n := + biprod.desc (SSet.homologyMap (pairLeft X Y y) Z n) (SSet.homologyMap (pairRight X Y x) Z n) +lemma inclusion_projection (x : X.obj (op ⦋0⦌)) (y : Y.obj (op ⦋0⦌)) (n : ℕ) (hn : n≠0) : + inclusion X Y x y n ≫ projection X Y n=𝟙 _ := by + apply biprod.hom_ext' <;> apply biprod.hom_ext + all_goals simp only [inclusion,projection,Category.assoc,biprod.inl_desc_assoc, + biprod.inr_desc_assoc,biprod.lift_fst,biprod.lift_snd,biprod.inl_fst,biprod.inl_snd, + biprod.inr_fst,biprod.inr_snd,Category.comp_id,←SSet.homologyMap_comp] + all_goals simp [pairLeft,pairRight,CartesianMonoidalCategory.lift_fst, + CartesianMonoidalCategory.lift_snd,const_homology_zero _ n hn] +lemma finite_biprod {R : Type} [CommRing R] (M N : ModuleCat R) + [Module.Finite R M] [Module.Finite R N] : Module.Finite R (M ⊞ N : ModuleCat R) := + Module.Finite.equiv (ModuleCat.biprodIsoProd M N).symm.toLinearEquiv +lemma projection_isIso [X.IsConnected] [Y.IsConnected] + (a b n : ℕ) (hn : 0 f z) (inclusion_projection X Y (point X) (point Y) n (by omega)) + have : Module.Finite ℤ (X.homology Z n ⊞ Y.homology Z n : A) := + finite_biprod _ _ + exact (ConcreteCategory.isIso_iff_bijective _).mpr + ⟨IsNoetherian.injective_of_surjective_of_injective e.toLinearEquiv.toLinearMap + (projection X Y n).hom e.toLinearEquiv.injective hsurj,hsurj⟩ +end ConnectedProduct + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ChainPositiveCokernel.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ChainPositiveCokernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..d173d9b1c833871598243b855c861bc19ef8a7c9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ChainPositiveCokernel.lean @@ -0,0 +1,28 @@ +import Mathlib + +namespace OAI + +section +open CategoryTheory Limits HomologicalComplex +namespace ChainComplex +open scoped _root_.ChainComplex + +variable {R:Type} [CommRing R] (K:ChainComplex (ModuleCat.{0} R) ℕ) +variable (n:ℕ) (hn:K.d (n+1) n=0) +noncomputable def positiveπ : K.X (n+1) ⟶ K.homology (n+1) := + K.pOpcycles (n+1) ≫ (K.isoHomologyι (n+1) n (by simp) hn).inv +instance : Epi (positiveπ K n hn) := by dsimp only [positiveπ]; infer_instance +@[reassoc (attr:=simp)] lemma d_positiveπ : K.d (n+2) (n+1) ≫ positiveπ K n hn=0 := by + simp [positiveπ] +noncomputable def positiveDesc {V:ModuleCat.{0} R} (f:K.X (n+1) ⟶ V) + (hf:K.d (n+2) (n+1) ≫ f=0) : K.homology (n+1) ⟶ V := + (K.isoHomologyι (n+1) n (by simp) hn).hom ≫ + K.descOpcycles f (n+2) (by simp) hf +@[reassoc (attr:=simp)] lemma positiveπ_desc {V:ModuleCat.{0} R} (f:K.X (n+1) ⟶ V) + (hf:K.d (n+2) (n+1) ≫ f=0) : positiveπ K n hn ≫ positiveDesc K n hn f hf=f := by + simp [positiveπ,positiveDesc] +end ChainComplex + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ChartControlChain.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ChartControlChain.lean new file mode 100644 index 0000000000000000000000000000000000000000..901064f13162ee3227daacb75824ba7f3400d494 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ChartControlChain.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.RandomFields.PrimitiveCovariance +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SmallControlTransfer +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CoordinateFamilyCompare +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ControlCalculus + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ChartControlChain + +variable {α H : Type*} [Fintype α] [DecidableEq α] [Group H] + [Group.IsPerfect (alternatingGroup α)] + +theorem small_control_action_chain (c : alternatingGroup α →* H) + (f : TrackStar α →* H) (g : ℕ → TrackStar α →* H) (n : ℕ) + (hstart : SmallControlled c f (g 0)) + (hstep : ∀ k, k < n → ∀ (I : ControlAlphabet α) s, ∀ x ∈ f.range, + g k (universalMap (subtypeAlternatingHom I.val) s)*x* + (g k (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + g (k+1) (universalMap (subtypeAlternatingHom I.val) s)*x* + (g (k+1) (universalMap (subtypeAlternatingHom I.val) s))⁻¹) : + SmallControlled c f (g n) := by + have h (k : ℕ) (hk : k ≤ n) : SmallControlled c f (g k) := by + induction k with + | zero => exact hstart + | succ k ih => + intro I s x hx + dsimp only [MonoidHom.comp_apply] + rw [← hstep k (by omega) I s x hx] + exact ih (by omega) I s x hx + exact h n le_rfl + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Finite κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem chartCoordinateSector_eq_window (hlarge : 15 < m+1) + (n : ℕ) (h : B.CoordinateWindowLaw n) (q : Fin 2 → ℤ) + (P : ι → Fin 5 × (CutRing × CutRing)) + (hP : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (v : κ → ι) (j : κ → Fin 2) (u : κ → CutRing × CutRing) + (hv : ∀ i, P (v i) = (coordinateTestIndex (j i),u i)) + (hs : ∀ i, q (j i) ≤ endpointLabel (if j i=0 then (u i).1 else (u i).2)) + (he : ∀ i, endpointLabel (if j i=0 then (u i).1 else (u i).2) < q (j i)+(n-1:ℕ)) + (V : polygonAlgebra a) + (hV : ResolvedBy (fun i => (spatialTranslate (u i) (coordinatePrimitive a (j i))).val) V.val) : + B.fullGeometricSector hlarge P hP V = B.windowSector hlarge n h q V := by + let Q := fun i => (coordinateTestIndex (j i),u i) + have heq : P ∘ v = Q := funext hv + have hQ : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb Q := by + intro I hI b hb + rw [← heq] + exact PrimitiveFamilyLaw.reindex B I b hb P (hP I hI b hb) v + have hVQ : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) Q i).val) V.val := by + simpa only [Q,primitiveTests,primitiveFamilyTests,initialTest_coordinate] using hV + rw [← B.fullGeometricSector_subfamily hlarge P Q v heq hP hQ V hVQ] + exact B.coordinateFamilySector_eq_window hlarge n h q j u hs he hQ V hV + +theorem chart_chain_disjoint_control (hlarge : 20 ≤ m+1) + (f g : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) (hg : B.AlignedSmallSupported g) + (c : ℕ → TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (n : ℕ) (hc : B.AlignedSmallSupported (c n)) + (d : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hstart : SmallControlled B.c f (c 0)) + (hstep : ∀ k, k < n → ∀ (I : ControlAlphabet (Fin (m+1))) s, ∀ x ∈ f.range, + c k (universalMap (subtypeAlternatingHom I.val) s)*x* + (c k (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + c (k+1) (universalMap (subtypeAlternatingHom I.val) s)*x* + (c (k+1) (universalMap (subtypeAlternatingHom I.val) s))⁻¹) + (hfinish : SmallControlled B.c g d) (hsplit : ∀ s t, Commute (c n s) (d t)) : + ∀ s t, Commute (f s) (g t) := by + apply small_control_disjoint _ B.c B.constant_aligned B.disjoint_aligned + (by simpa using hlarge) f g (c n) d hf hg hc + (small_control_action_chain B.c f c n hstart hstep) hfinish hsplit + +end InitialCoverSystem +end ChartControlChain + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ClippedLineSlide.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ClippedLineSlide.lean new file mode 100644 index 0000000000000000000000000000000000000000..514169633efa24c7aea484ac8bd036e156aef38d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ClippedLineSlide.lean @@ -0,0 +1,142 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ClosedChartOverlap + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ClippedLineSlide + +theorem coordinateRectangle_in_clippingOverlap {a : ℕ} (r : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (z t : CutRing × CutRing) (L V : Fin 2 → CutRing) + (hLV : ∀ j, ordinary (L j) ≤ ordinary (V j)) + (ht : ∀ j, |ordinary (pointCoordinate t j)| ≤ 2*ordinary r) + (hz : ∀ j, -ordinary r ≤ ordinary (L j)-ordinary (pointCoordinate z j) ∧ + ordinary (V j)-ordinary (pointCoordinate z j) ≤ ordinary r) + (hzt : ∀ j, -ordinary r ≤ ordinary (L j)-ordinary (pointCoordinate (z+t) j) ∧ + ordinary (V j)-ordinary (pointCoordinate (z+t) j) ≤ ordinary r) : + coordinateRectangle a L V ≤ spatialTranslate z + (coordinateRectangle a (clippingOverlapLower r t) (clippingOverlapUpper r t)) := by + rw [spatialTranslate_coordinateRectangle] + apply coordinateRectangle_mono L V _ _ _ hLV _ _ + · intro j + have h0 := hz j + have h1 := hzt j + simp only [pointCoordinate_add,map_add] at h1 + change ordinary (clippingOverlapLower r t j + pointCoordinate z j) ≤ ordinary (L j) + simp only [clippingOverlapLower,ordinary_orderedCutMax,map_add,map_sub,map_neg] + have hh : max (-ordinary r) (ordinary (pointCoordinate t j)-ordinary r) ≤ + ordinary (L j)-ordinary (pointCoordinate z j) := max_le (by linarith) (by linarith) + linarith + · intro j + have h0 := hz j + have h1 := hzt j + simp only [pointCoordinate_add,map_add] at h1 + change ordinary (V j) ≤ ordinary (clippingOverlapUpper r t j + pointCoordinate z j) + simp only [clippingOverlapUpper,ordinary_orderedCutMin,map_add] + have hh : ordinary (V j)-ordinary (pointCoordinate z j) ≤ + min (ordinary r) (ordinary (pointCoordinate t j)+ordinary r) := le_min (by linarith) (by linarith) + linarith + · intro j + simpa only [map_add,add_sub_add_right_eq_sub] using (clippingOverlap_bounds r t hr ht j).2.1 + +noncomputable def tangentCoefficient (a : ℕ) (d j : Fin 2) : ℝ := + ordinary (pointCoordinate (tangentOffset a d 1) j) + +theorem tangentCoefficient_pos (a : ℕ) (d j : Fin 2) : 0 < tangentCoefficient a d j := by + fin_cases d <;> fin_cases j <;> simp [tangentCoefficient,pointCoordinate,tangentOffset, + pow_pos Real.goldenRatio_pos] + +theorem tangentCoefficient_bound (a : ℕ) (d j : Fin 2) : + tangentCoefficient a d j ≤ 1+|ordinary (cutTau^a)| := by + fin_cases d <;> fin_cases j <;> simp [tangentCoefficient,pointCoordinate,tangentOffset, + abs_of_pos (pow_pos Real.goldenRatio_pos a)] <;> positivity + +@[simp] theorem tangentOffset_coordinate (a : ℕ) (d j : Fin 2) (x : CutRing) : + ordinary (pointCoordinate (tangentOffset a d x) j) = tangentCoefficient a d j*ordinary x := by + fin_cases d <;> fin_cases j <;> simp [tangentCoefficient,pointCoordinate,tangentOffset] + +noncomputable def tangentAllowedLower (a : ℕ) (r : CutRing) (d : Fin 2) + (z : CutRing × CutRing) (V : Fin 2 → CutRing) : ℝ := + max ((ordinary (V 0)-ordinary (pointCoordinate z 0)-ordinary r)/tangentCoefficient a d 0) + ((ordinary (V 1)-ordinary (pointCoordinate z 1)-ordinary r)/tangentCoefficient a d 1) + +noncomputable def tangentAllowedUpper (a : ℕ) (r : CutRing) (d : Fin 2) + (z : CutRing × CutRing) (L : Fin 2 → CutRing) : ℝ := + min ((ordinary (L 0)-ordinary (pointCoordinate z 0)+ordinary r)/tangentCoefficient a d 0) + ((ordinary (L 1)-ordinary (pointCoordinate z 1)+ordinary r)/tangentCoefficient a d 1) + +theorem tangentAllowed_iff (a : ℕ) (r : CutRing) (d : Fin 2) + (z : CutRing × CutRing) (L V : Fin 2 → CutRing) (t : ℝ) : + (tangentAllowedLower a r d z V ≤ t ∧ t ≤ tangentAllowedUpper a r d z L) ↔ + ∀ j : Fin 2, -ordinary r ≤ ordinary (L j)-(ordinary (pointCoordinate z j)+tangentCoefficient a d j*t) ∧ + ordinary (V j)-(ordinary (pointCoordinate z j)+tangentCoefficient a d j*t) ≤ ordinary r := by + constructor + · rintro ⟨hl,hu⟩ j + have hl' : (ordinary (V j)-ordinary (pointCoordinate z j)-ordinary r)/tangentCoefficient a d j ≤ t := by + fin_cases j + · exact (le_max_left _ _).trans hl + · exact (le_max_right _ _).trans hl + have hu' : t ≤ (ordinary (L j)-ordinary (pointCoordinate z j)+ordinary r)/tangentCoefficient a d j := by + fin_cases j + · exact hu.trans (min_le_left _ _) + · exact hu.trans (min_le_right _ _) + have hlo := (div_le_iff₀ (tangentCoefficient_pos a d j)).mp hl' + have hup := (le_div_iff₀ (tangentCoefficient_pos a d j)).mp hu' + constructor <;> nlinarith + · intro h + have hlo (j : Fin 2) : + (ordinary (V j)-ordinary (pointCoordinate z j)-ordinary r)/tangentCoefficient a d j ≤ t := by + apply (div_le_iff₀ (tangentCoefficient_pos a d j)).mpr + have hh := (h j).2 + nlinarith + have hup (j : Fin 2) : + t ≤ (ordinary (L j)-ordinary (pointCoordinate z j)+ordinary r)/tangentCoefficient a d j := by + apply (le_div_iff₀ (tangentCoefficient_pos a d j)).mpr + have hh := (h j).1 + nlinarith + exact ⟨max_le (hlo 0) (hlo 1),le_min (hup 0) (hup 1)⟩ + +theorem tangentAllowed_wide (a : ℕ) (r u : CutRing) (hr : 0 < ordinary r) + (d : Fin 2) (z : CutRing × CutRing) (L V : Fin 2 → CutRing) (c : ℝ) + (hshort : 4*(1+|ordinary (cutTau^a)|)*(|ordinary u|+|ordinary (cutTau*u)|) ≤ ordinary r) + (hnear : ∀ j : Fin 2, + |ordinary (L j)-(ordinary (pointCoordinate z j)+tangentCoefficient a d j*c)| ≤ ordinary r/4 ∧ + |ordinary (V j)-(ordinary (pointCoordinate z j)+tangentCoefficient a d j*c)| ≤ ordinary r/4) : + 4*(|ordinary u|+|ordinary (cutTau*u)|) ≤ + tangentAllowedUpper a r d z L-tangentAllowedLower a r d z V := by + let b : ℝ := |ordinary u|+|ordinary (cutTau*u)| + have hb : 0 ≤ b := add_nonneg (abs_nonneg _) (abs_nonneg _) + have he (j : Fin 2) : 2*tangentCoefficient a d j*b ≤ ordinary r/2 := by + have hm := mul_le_mul_of_nonneg_right (tangentCoefficient_bound a d j) hb + change 4*(1+|ordinary (cutTau^a)|)*b ≤ ordinary r at hshort + nlinarith + have hl := (tangentAllowed_iff a r d z L V (c-2*b)).mpr (by + intro j + have hn0 := abs_le.mp (hnear j).1 + have hn1 := abs_le.mp (hnear j).2 + have hh := he j + have hp := mul_nonneg (tangentCoefficient_pos a d j).le hb + constructor <;> nlinarith) + have hu := (tangentAllowed_iff a r d z L V (c+2*b)).mpr (by + intro j + have hn0 := abs_le.mp (hnear j).1 + have hn1 := abs_le.mp (hnear j).2 + have hh := he j + have hp := mul_nonneg (tangentCoefficient_pos a d j).le hb + constructor <;> nlinarith) + change 4*b ≤ _ + linarith + +end ClippedLineSlide + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/Coefficient.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Coefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..db9521899a468c4a59e8e699d847a8390320462c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Coefficient.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.CoefficientFiltered + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial SimplicialObject Opposite AlgebraicTopology HomologicalComplex +namespace ChainComplex +open scoped _root_.ChainComplex + +variable {R:Type} [CommRing R] (K:ChainComplex (ModuleCat.{0} R) ℕ) +noncomputable def zeroπ : K.X 0 ⟶ K.homology 0 := K.pOpcycles 0 ≫ K.isoHomologyι₀.inv +instance : Epi (zeroπ K) := by dsimp [zeroπ]; infer_instance +@[reassoc (attr:=simp)] lemma d_zeroπ : K.d 1 0 ≫ zeroπ K=0 := by simp [zeroπ] +noncomputable def zeroDesc {V:ModuleCat.{0} R} (f:K.X 0 ⟶ V) (hf:K.d 1 0 ≫ f=0) : + K.homology 0 ⟶ V := K.isoHomologyι₀.hom ≫ K.descOpcycles f 1 ((ComplexShape.down ℕ).prev_eq' rfl) hf +@[reassoc (attr:=simp)] lemma zeroπ_desc {V:ModuleCat.{0} R} (f:K.X 0 ⟶ V) (hf:K.d 1 0 ≫ f=0) : + zeroπ K ≫ zeroDesc K f hf=f := by simp [zeroπ,zeroDesc] +end ChainComplex +namespace CoefficientNerve + +variable {C:Type} [Category.{0} C] (F:C ⥤ ModuleCat.{0} ℤ) +noncomputable def point (x:C) : F.obj x ⟶ Obj F 0 := single F (ComposableArrows.mk₀ (op x)) +noncomputable def zeroι (x:C) : F.obj x ⟶ (complex F).homology 0 := + single F (ComposableArrows.mk₀ (op x)) ≫ (_root_.OAI.ChainComplex.zeroπ (complex F)) +lemma d10 : (complex F).d 1 0=map F (SimplexCategory.δ 0)-map F (SimplexCategory.δ 1) := by + change (∑ i:Fin 2, (-1:ℤ)^i.val • map F (SimplexCategory.δ i))=_ + simp [Fin.sum_univ_two] + exact (sub_eq_add_neg _ _).symm +noncomputable def edge (s:Simplex C 1) : s.right.unop ⟶ s.left.unop := + (s.map (homOfLE (Fin.zero_le (Fin.last 1)))).unop +lemma single_d10 (s:Simplex C 1) : + single F s ≫ (complex F).d 1 0 = + point F s.right.unop- + F.map (edge s) ≫ + point F s.left.unop := by + dsimp only [point] + erw [d10,Preadditive.comp_sub,single_map,single_map] + have h0 : trunc (SimplexCategory.δ (0:Fin 2)) s=ComposableArrows.mk₀ s.right := + ComposableArrows.ext₀ rfl + have h1 : trunc (SimplexCategory.δ (1:Fin 2)) s=ComposableArrows.mk₀ s.left := + ComposableArrows.ext₀ rfl + have t0 : tail (SimplexCategory.δ (0:Fin 2)) s=𝟙 _ := by + change (s.map (𝟙 _)).unop=𝟙 _ + rw [s.map_id]; rfl + erw [t0,F.map_id,Category.id_comp] + have e0:=single_eq F h0 rfl + have e1:=single_eq F h1 rfl + erw [eqToHom_refl,Category.id_comp] at e0 e1 + rw [e0,e1] + rfl +lemma zeroι_naturality {x y:C} (f:x⟶y) : F.map f ≫ zeroι F y=zeroι F x := by + have h:=congrArg (fun k=>single F (ComposableArrows.mk₁ f.op) ≫ k) (ChainComplex.d_zeroπ (complex F)) + erw [←Category.assoc,single_d10,Preadditive.sub_comp,comp_zero] at h + change zeroι F x - F.map f ≫ zeroι F y=0 at h + exact (sub_eq_zero.mp h).symm +noncomputable def zeroCocone : Cocone F where + pt := (complex F).homology 0 + ι := { app := zeroι F + naturality x y f := by simpa using zeroι_naturality F f } +lemma desc_d10 (d:Cocone F) : (complex F).d 1 0 ≫ desc F (fun s=>d.ι.app s.right.unop)=0 := by + apply hom_ext; intro s + erw [←Category.assoc,single_d10,Preadditive.sub_comp] + dsimp only [point] + erw [single_desc,Category.assoc,single_desc,comp_zero] + exact sub_eq_zero.mpr (d.w (s.map (homOfLE (Fin.zero_le (Fin.last 1)))).unop).symm +noncomputable def zeroIsColimit : IsColimit (zeroCocone F) where + desc d := _root_.OAI.ChainComplex.zeroDesc (complex F) (desc F (fun s=>d.ι.app s.right.unop)) (desc_d10 F d) + fac d x := by + dsimp only [zeroCocone,zeroι] + erw [Category.assoc,ChainComplex.zeroπ_desc,single_desc] + rfl + uniq d m hm := by + change (complex F).homology 0 ⟶ d.pt at m + apply (cancel_epi (_root_.OAI.ChainComplex.zeroπ (complex F))).mp + erw [ChainComplex.zeroπ_desc] + apply hom_ext; intro s + rw [single_desc] + have he : single F s = single F (ComposableArrows.mk₀ s.right) := by + have single_equality := + single_eq F (ComposableArrows.ext₀ (F:=s) (G:=ComposableArrows.mk₀ s.right) rfl) rfl + erw [eqToHom_refl,Category.id_comp] at single_equality + exact single_equality + rw [he] + exact hm s.right.unop +noncomputable def zeroIso : (complex F).homology 0 ≅ colimit F := + (zeroIsColimit F).coconePointUniqueUpToIso (colimit.isColimit F) +end CoefficientNerve + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/CoefficientContraction.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/CoefficientContraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fa3bfb9d949e028023a11854ab6527983fc7bb5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/CoefficientContraction.lean @@ -0,0 +1,117 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.CoefficientNerve + +namespace OAI + +open CategoryTheory Limits Simplicial SimplicialObject Opposite AlgebraicTopology +namespace SemiExtra +variable {C:Type*} [Category* C] +structure Data (X:Augmented C) where + s' : X.right ⟶ X.left _⦋0⦌ + s : ∀n:ℕ, X.left _⦋n⦌ ⟶ X.left _⦋n+1⦌ + s'_comp_ε : s' ≫ X.hom.app (op ⦋0⦌)=𝟙 X.right + s₀_comp_δ₁ : s 0 ≫ X.left.δ 1=X.hom.app (op ⦋0⦌) ≫ s' + s_comp_δ₀ : ∀n:ℕ, s n ≫ X.left.δ 0=𝟙 _ + s_comp_δ : ∀ (n:ℕ) (i:Fin (n+2)),s (n+1) ≫ X.left.δ i.succ=X.left.δ i ≫ s n +attribute [reassoc] Data.s₀_comp_δ₁ Data.s_comp_δ +attribute [reassoc (attr:=simp)] Data.s'_comp_ε Data.s_comp_δ₀ + +noncomputable def homotopyEquiv [Preadditive C] [HasZeroObject C] + {X:Augmented C} (ed:Data X) : + HomotopyEquiv (AlternatingFaceMapComplex.obj (Augmented.drop.obj X)) + ((ChainComplex.single₀ C).obj (Augmented.point.obj X)) where + hom := AlternatingFaceMapComplex.ε.app X + inv := (ChainComplex.fromSingle₀Equiv _ _).symm (by exact ed.s') + homotopyInvHomId := Homotopy.ofEq (by + ext + simp [dsimp% ChainComplex.fromSingle₀Equiv_symm_apply_f_zero + (C:=AlternatingFaceMapComplex.obj X.left)]) + homotopyHomInvId := + { hom i := Pi.single (i+1) (-ed.s i) + zero i j hij := Pi.single_eq_of_ne (Ne.symm hij) _ + comm i := by + cases i with + | zero => + rw [Homotopy.prevD_chainComplex,Homotopy.dNext_zero_chainComplex] + simp [dsimp% ChainComplex.fromSingle₀Equiv_symm_apply_f_zero + (C:=AlternatingFaceMapComplex.obj X.left),Data.s_comp_δ₀,Data.s₀_comp_δ₁] + | succ i => + rw [Homotopy.prevD_chainComplex,Homotopy.dNext_succ_chainComplex] + simp [Fin.sum_univ_succ (n:=i+2),Data.s_comp_δ₀,Preadditive.sum_comp, + Preadditive.comp_sum,Data.s_comp_δ,pow_succ] } +end SemiExtra +namespace CoefficientNerve + +variable {R:Type} [CommRing R] {C:Type} [Category.{0} C] +variable (F:C ⥤ ModuleCat.{0} R) +lemma weighted_eq {n:ℕ} {s t:Simplex C n} (h:s=t) {x:C} + (f:x ⟶ s.right.unop) (g:x ⟶ t.right.unop) + (w:f ≫ eqToHom (congrArg (fun s:Simplex C n => s.right.unop) h)=g) : + F.map f ≫ single F s=F.map g ≫ single F t := by + subst t + simpa only [eqToHom_refl,Category.comp_id] using congrArg (fun v=>F.map v ≫ single F s) w +variable {d:C} (hd:IsTerminal d) +noncomputable def augmentation : simplicial F ⟶ (SimplicialObject.const _).obj (F.obj d) where + app n := desc F (fun s=>F.map (hd.from s.right.unop)) + naturality n m f := by + apply hom_ext; intro s + change single F s ≫ map F f.unop ≫ desc F _ = single F s ≫ desc F _ ≫ 𝟙 _ + rw [single_map_assoc,single_desc,Category.comp_id,single_desc,←F.map_comp] + congr 1 + exact hd.hom_ext _ _ +noncomputable def augmented : Augmented (ModuleCat.{0} R) := + { left := simplicial F, right := F.obj d, hom := augmentation F hd } +noncomputable def extra (n:ℕ) : Obj F n ⟶ Obj F (n+1) := + desc F (fun s=>single F (NervePrefix.extra hd.op s)) +@[reassoc (attr:=simp)] lemma single_extra {n:ℕ} (s:Simplex C n) : + single F s ≫ extra F hd n=single F (NervePrefix.extra hd.op s) := single_desc _ _ _ +lemma extra_zero (n:ℕ) : extra F hd n ≫ (simplicial F).δ 0=𝟙 _ := by + apply hom_ext; intro s + change single F s ≫ extra F hd n ≫ map F (SimplexCategory.δ 0)=single F s ≫ 𝟙 _ + erw [single_extra_assoc,single_map,Category.comp_id] + change F.map ((s.map (𝟙 _)).unop) ≫ single F s=single F s + simp +lemma extra_tail_map {n:ℕ} (s:Simplex C n) (i j:Fin (n+1)) (hij:i≤j) + (k:Fin (n+2)) (hk:k=i.succ) (hkj:k≤j.succ) + (he:((NervePrefix.extra hd.op s).obj k).unop=(s.obj i).unop) : + ((NervePrefix.extra hd.op s).map (homOfLE hkj)).unop ≫ eqToHom he = + (s.map (homOfLE hij)).unop := by + subst k + change (s.map (homOfLE hij)).unop ≫ eqToHom _ = (s.map (homOfLE hij)).unop + simp +lemma extra_succ (n:ℕ) (i:Fin (n+2)) : + extra F hd (n+1) ≫ (simplicial F).δ i.succ=(simplicial F).δ i ≫ extra F hd n := by + apply hom_ext; intro s + change single F s ≫ extra F hd (n+1) ≫ map F (SimplexCategory.δ i.succ) = + single F s ≫ map F (SimplexCategory.δ i) ≫ extra F hd n + erw [single_extra_assoc,single_map,single_map_assoc,single_extra] + apply weighted_eq F (NervePrefix.precomp_delta hd.op s i) + change ((NervePrefix.extra hd.op s).map (homOfLE + (show i.succ.succAbove (Fin.last n).succ ≤ (Fin.last (n+1)).succ from Fin.le_last _))).unop ≫ eqToHom _ = + (s.map (homOfLE (Fin.le_last (i.succAbove (Fin.last n))))).unop + exact extra_tail_map hd s (i.succAbove (Fin.last n)) (Fin.last (n+1)) _ _ + (Fin.succ_succAbove_succ i (Fin.last n)) _ _ +noncomputable def contraction : SemiExtra.Data (augmented F hd) where + s' := single F (ComposableArrows.mk₀ (op d)) + s := extra F hd + s'_comp_ε := by + change single F _ ≫ desc F _=𝟙 _ + erw [single_desc] + change F.map (hd.from d)=𝟙 (F.obj d) + rw [show hd.from d=𝟙 d from hd.hom_ext _ _,F.map_id] + s₀_comp_δ₁ := by + apply hom_ext; intro s + change single F s ≫ extra F hd 0 ≫ map F (SimplexCategory.δ 1) = + single F s ≫ desc F _ ≫ single F (ComposableArrows.mk₀ (op d)) + erw [single_extra_assoc,single_map,single_desc_assoc] + have hs : trunc (SimplexCategory.δ 1) (NervePrefix.extra hd.op s) = ComposableArrows.mk₀ (op d) := ComposableArrows.ext₀ rfl + apply weighted_eq F hs + exact hd.hom_ext _ _ + s_comp_δ₀ := extra_zero F hd + s_comp_δ := extra_succ F hd +noncomputable def terminalHomotopyEquiv : HomotopyEquiv (complex F) + ((ChainComplex.single₀ (ModuleCat R)).obj (F.obj d)) := + SemiExtra.homotopyEquiv (contraction F hd) +end CoefficientNerve + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/CoefficientUCT.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/CoefficientUCT.lean new file mode 100644 index 0000000000000000000000000000000000000000..4246f7e3d204c45d67ecb657f0b37414c785866d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/CoefficientUCT.lean @@ -0,0 +1,158 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.AlternatingH2 +import OAI.GroupTheory.SimpleAmenable.Homology.TotalFiniteness +import OAI.GroupTheory.SimpleAmenable.Homology.FreeChains + +namespace OAI + +section + +section + +open CategoryTheory Limits MonoidalCategory HomologicalComplex +namespace TensorCoefficient + +variable {R : Type} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] + +lemma presentation (A : ModuleCat.{0} R) [Module.Finite R A] : + ∃ S : ShortComplex (ModuleCat.{0} R), S.X₃=A ∧ S.ShortExact ∧ + Module.Finite R S.X₁ ∧ Module.Free R S.X₁ ∧ Module.Finite R S.X₂ ∧ Module.Free R S.X₂ := by + obtain ⟨n,φ,hφ⟩ := Module.Finite.exists_fin' R A + let B : ModuleCat R := ModuleCat.of R (Fin n → R) + let C : ModuleCat R := ModuleCat.of R φ.ker + let i : C ⟶ B := ModuleCat.ofHom φ.ker.subtype + let p : B ⟶ A := ModuleCat.ofHom φ + have hi : Mono i := (ModuleCat.mono_iff_injective _).mpr Subtype.val_injective + have hp : Epi p := (ModuleCat.epi_iff_surjective _).mpr hφ + have hz : i≫p=0 := by + apply ModuleCat.hom_ext + apply LinearMap.ext + intro x + exact x.property + let S : ShortComplex (ModuleCat R) := ShortComplex.mk i p hz + have he : S.ShortExact := { + mono_f := hi + epi_g := hp + exact := (S.moduleCat_exact_iff).mpr (by + intro x hx + exact ⟨⟨x,hx⟩,rfl⟩) } + have : Module.Finite R C := Module.Finite.of_injective φ.ker.subtype Subtype.val_injective + have : Module.Free R C := Module.free_of_finite_type_torsion_free' + exact ⟨S,rfl,he,inferInstance,inferInstance,inferInstance,inferInstance⟩ + +variable (K : ChainComplex (ModuleCat.{0} R) ℕ) [∀n,Module.Flat R (K.X n)] + +lemma finite_coefficient_succ (A : ModuleCat.{0} R) [Module.Finite R A] (n : ℕ) + [Module.Finite R (K.homology n)] [Module.Finite R (K.homology (n+1))] : + Module.Finite R ((homologyFunctor K (n+1)).obj A) := by + obtain ⟨S,hA,hS,h1,hf1,h2,hf2⟩ := presentation A + have := h1; have := hf1; have := h2; have := hf2 + rw [←hA] + have : Module.Finite R ((S.map (functor K)).X₁.homology n) := free_finite K S.X₁ n + have : Module.Finite R ((S.map (functor K)).X₂.homology (n+1)) := free_finite K S.X₂ (n+1) + exact FiniteHomologyReturn.finite_of_exact + ((shortExact K hS).homology_exact₃ (n+1) n rfl) + +lemma finite_coefficient_zero (A : ModuleCat.{0} R) [Module.Finite R A] + [Module.Finite R (K.homology 0)] : Module.Finite R ((homologyFunctor K 0).obj A) := by + obtain ⟨S,hA,hS,h1,hf1,h2,hf2⟩ := presentation A + have := h1; have := hf1; have := h2; have := hf2 + rw [←hA] + have : Module.Finite R ((S.map (functor K)).X₂.homology 0) := free_finite K S.X₂ 0 + have hs := shortExact K hS + have := hs.epi_g + have : Epi (homologyMap (S.map (functor K)).g 0) := + epi_homologyMap_of_epi_of_not_rel _ 0 (by intro _; simp [ComplexShape.down_Rel]) + exact Module.Finite.of_surjective (homologyMap (S.map (functor K)).g 0).hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) + +lemma zero_coefficient_succ (A : ModuleCat.{0} R) [Module.Finite R A] (n : ℕ) + (h0 : IsZero (K.homology n)) (h1 : IsZero (K.homology (n+1))) : + IsZero ((homologyFunctor K (n+1)).obj A) := by + obtain ⟨S,hA,hS,hf1,hfr1,hf2,hfr2⟩ := presentation A + have := hf1; have := hfr1; have := hf2; have := hfr2 + rw [←hA] + exact ((shortExact K hS).homology_exact₃ (n+1) n rfl).isZero_X₂ + ((free_isZero K S.X₂ (n+1) h1).eq_of_src _ _) + ((free_isZero K S.X₁ n h0).eq_of_tgt _ _) + +lemma zero_coefficient_zero (A : ModuleCat.{0} R) [Module.Finite R A] + (h : IsZero (K.homology 0)) : IsZero ((homologyFunctor K 0).obj A) := by + obtain ⟨S,hA,hS,h1,hf1,h2,hf2⟩ := presentation A + have := h1; have := hf1; have := h2; have := hf2 + rw [←hA] + have hs := shortExact K hS + have := hs.epi_g + have homology_epi : Epi (homologyMap (S.map (functor K)).g 0) := + epi_homologyMap_of_epi_of_not_rel _ 0 (by intro _; simp [ComplexShape.down_Rel]) + exact @IsZero.of_epi _ _ _ _ _ (homologyMap (S.map (functor K)).g 0) + homology_epi (free_isZero K S.X₂ 0 h) + +end TensorCoefficient + +end + +section + +open CategoryTheory Limits MonoidalCategory HomologicalComplex HomologicalComplex₂ +namespace TensorProductHomology + +variable {R : Type} [CommRing R] +abbrev c := ComplexShape.down ℕ +variable (K L : ChainComplex (ModuleCat.{0} R) ℕ) +noncomputable def bicomplex : HomologicalComplex₂ (ModuleCat.{0} R) c c := + (((curriedTensor (ModuleCat.{0} R)).mapBifunctorHomologicalComplex c c).obj K).obj L + +noncomputable def rowIso [∀n,Module.Flat R (K.X n)] (q : ℕ) : + TotalFiniteness.row (bicomplex K L) q ≅ (TensorCoefficient.functor K).obj (L.homology q) := by + refine HomologicalComplex.Hom.isoOfComponents + (fun p => (L.sc q).mapHomologyIso (tensorLeft (K.X p))) ?_ + intro p p' _ + symm + change ShortComplex.homologyMap ((L.sc q).mapNatTrans + ((tensoringLeft (ModuleCat R)).map (K.d p p'))) ≫ _ = _ + apply (Iso.eq_comp_inv ((L.sc q).mapHomologyIso (tensorLeft (K.X p')))).mp + exact (ShortComplex.homologyMap_mapNatTrans (L.sc q) + ((tensoringLeft (ModuleCat R)).map (K.d p p'))).trans (Category.assoc _ _ _).symm + +lemma finite [IsDomain R] [IsPrincipalIdealRing R] [∀n,Module.Flat R (K.X n)] + (n : ℕ) (hK : ∀i,i≤n → Module.Finite R (K.homology i)) + (hL : ∀i,i≤n → Module.Finite R (L.homology i)) : + Module.Finite R (((bicomplex K L).total c).homology n) := by + apply TotalFiniteness.finite + intro p q hpq + have := hL q (by omega) + have := hK p (by omega) + have : Module.Finite R ((homologyFunctor (ModuleCat R) c p).obj ((TensorCoefficient.functor K).obj (L.homology q))) := by + cases p with + | zero => exact TensorCoefficient.finite_coefficient_zero K _ + | succ p => + have := hK p (by omega) + exact TensorCoefficient.finite_coefficient_succ K _ p + exact Module.Finite.equiv ((homologyFunctor _ c p).mapIso (rowIso K L q)).symm.toLinearEquiv + +lemma isZero [IsDomain R] [IsPrincipalIdealRing R] [∀n,Module.Flat R (K.X n)] + (a b n : ℕ) (hn : n exact TensorCoefficient.zero_coefficient_zero K _ (hK 0 (by omega)) + | succ p => exact TensorCoefficient.zero_coefficient_succ K _ p (hK p (by omega)) (hK (p+1) (by omega)) + +end TensorProductHomology + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ComponentStable.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ComponentStable.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ce678ae8653be4c95a15c51773d72bf808e6e99 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ComponentStable.lean @@ -0,0 +1,62 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ExactShapeHomology + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace ComponentStable +open FreeChains ComponentTranslation + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +noncomputable abbrev H (q:ℕ) := SSet.homologyFunctor Z q +noncomputable abbrev object (q:ℕ) := colimit (homologyDiagram (C:=C) q) +noncomputable def inclusion (p:Skeleton C) (q:ℕ) : + (nerve (Fiber p)).homology Z q ⟶ (nerve C).homology Z q := + SSet.homologyMap (nerveMap (property p).ι) Z q +noncomputable def unionCocone (q:ℕ) : + Cocone (ComponentCoproduct.diagram C ⋙ H q) where + pt := object (C:=C) q + ι := Discrete.natTrans (fun p=>colimit.ι (homologyDiagram (C:=C) q) ((ActionCategory.objEquiv _ _) p.as)) +noncomputable def toStable (q:ℕ) : (nerve C).homology Z q ⟶ object (C:=C) q := + (ComponentCoproduct.homologyIsColimit C q).desc (unionCocone q) +omit [SymmetricCategory C] in +@[reassoc (attr:=simp)] lemma inclusion_toStable (p:Skeleton C) (q:ℕ) : + inclusion p q ≫ toStable q=colimit.ι (homologyDiagram q) ((ActionCategory.objEquiv _ _) p) := + (ComponentCoproduct.homologyIsColimit C q).fac (unionCocone q) ⟨p⟩ +instance epi_toStable (q:ℕ) : Epi (toStable (C:=C) q) where + left_cancellation f g h := by + apply colimit.hom_ext + intro stage + obtain ⟨component,rfl⟩ := (ActionCategory.objEquiv (Skeleton C) (Skeleton C)).surjective stage + have hp:=congrArg (fun k=>inclusion component q ≫ k) h + simp only [←Category.assoc,inclusion_toStable] at hp + change colimit.ι (homologyDiagram (C:=C) q) ((ActionCategory.objEquiv _ _) component) ≫ f = + colimit.ι (homologyDiagram (C:=C) q) ((ActionCategory.objEquiv _ _) component) ≫ g + exact hp +omit [SymmetricCategory C] in +lemma translate_toStable (r p s:Skeleton C) (h:r*p=s) (q:ℕ) : + SSet.homologyMap (nerveMap (translate r p s h)) Z q ≫ inclusion s q ≫ toStable q = + inclusion p q ≫ toStable q := by + rw [inclusion_toStable,inclusion_toStable] + exact colimit.w (homologyDiagram q) (show (ActionCategory.objEquiv _ _) p ⟶ + (ActionCategory.objEquiv _ _) s from ⟨r,h⟩) +variable {D E:Type} [Category.{0} D] [Category.{0} E] +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma map_comp (F:C⥤D) (G:D⥤E) (q:ℕ) : + SSet.homologyMap (nerveMap (F⋙G)) Z q= + SSet.homologyMap (nerveMap F) Z q ≫ SSet.homologyMap (nerveMap G) Z q := + by + change SSet.homologyMap (nerveMap F ≫ nerveMap G) Z q=_ + rw [SSet.homologyMap_comp] +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma map_const (U:D) (q:ℕ) (hq:q≠0) : SSet.homologyMap (nerveMap ((Functor.const C).obj U)) Z q=0 := by + have h : nerveMap ((Functor.const C).obj U)=SSet.const (nerveEquiv.symm U) := by + ext n x; rfl + rw [h] + exact ConnectedProduct.const_homology_zero _ q hq +end ComponentStable + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConcreteHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConcreteHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2c5b872aac1b5a78e9bfc6e51c477a5927819f3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConcreteHomology.lean @@ -0,0 +1,176 @@ +import Mathlib + +namespace OAI + +section + +section + +open CategoryTheory Limits HomologicalComplex +namespace ConcreteHomology + +universe u +variable {R : Type u} [CommRing R] +abbrev c := ComplexShape.down ℕ +abbrev CC := ChainComplex (ModuleCat.{u} R) ℕ +variable (K L : CC (R:=R)) (n : ℕ) +def S := K.sc' (n+1) n (n-1) +abbrev Cycles := LinearMap.ker ((K.d n (n-1)).hom) +abbrev boundary := (S K n).moduleCatToCycles +abbrev H := Cycles K n ⧸ LinearMap.range (boundary K n) +def π : Cycles K n →ₗ[R] H K n := (LinearMap.range (boundary K n)).mkQ + +@[simp] lemma π_eq_zero (x : Cycles K n) : π K n x=0 ↔ ∃ y, boundary K n y=x := + Submodule.Quotient.mk_eq_zero _ + +lemma π_surjective : Function.Surjective (π K n) := + Submodule.mkQ_surjective (LinearMap.range (boundary K n)) + +noncomputable def sFunctor : ShortComplex (ModuleCat.{u} R) ⥤ ModuleCat.{u} R where + obj T := T.moduleCatLeftHomologyData.H + map f := ShortComplex.leftHomologyMap' f _ _ + map_id _ := ShortComplex.leftHomologyMap'_id _ + map_comp _ _ := ShortComplex.leftHomologyMap'_comp _ _ _ _ _ + +instance : (sFunctor (R:=R)).Additive where + map_add {X Y} f g := by + exact ShortComplex.leftHomologyMap'_add X.moduleCatLeftHomologyData Y.moduleCatLeftHomologyData + +noncomputable def sIso : ShortComplex.homologyFunctor (ModuleCat.{u} R) ≅ sFunctor (R:=R) := + NatIso.ofComponents (fun T => T.moduleCatHomologyIso) (fun f => + (ShortComplex.LeftHomologyData.leftHomologyIso_hom_naturality f _ _).symm) + +noncomputable def functor (n : ℕ) : CC (R:=R) ⥤ ModuleCat.{u} R := + shortComplexFunctor' _ c (n+1) n (n-1) ⋙ sFunctor + +instance : (functor (R:=R) n).Additive where + map_add {X Y} f g := by + change ShortComplex.leftHomologyMap' ((shortComplexFunctor' (ModuleCat.{u} R) c (n+1) n (n-1)).map (f+g)) (S X n).moduleCatLeftHomologyData (S Y n).moduleCatLeftHomologyData = _ + have h : (shortComplexFunctor' (ModuleCat.{u} R) c (n+1) n (n-1)).map (f+g) = + (shortComplexFunctor' (ModuleCat.{u} R) c (n+1) n (n-1)).map f + + (shortComplexFunctor' (ModuleCat.{u} R) c (n+1) n (n-1)).map g := by + ext <;> rfl + rw [h] + exact ShortComplex.leftHomologyMap'_add (S X n).moduleCatLeftHomologyData + (S Y n).moduleCatLeftHomologyData + +lemma prev (n : ℕ) : c.prev n=n+1 := c.prev_eq' rfl +lemma next (n : ℕ) : c.next n=n-1 := by + cases n with + | zero => exact c.next_eq_self' 0 (by intro k; change ¬k+1=0; omega) + | succ n => exact c.next_eq' rfl + +noncomputable def naturalIso (n : ℕ) : homologyFunctor (ModuleCat.{u} R) c n ≅ functor n := + homologyFunctorIso' _ c (n+1) n (n-1) (prev n) (next n) ≪≫ + Functor.isoWhiskerLeft _ sIso + +noncomputable def iso : K.homology n ≅ ModuleCat.of R (H K n) := (naturalIso n).app K + +variable {K L} +noncomputable def cyclesMap (f : K ⟶ L) (n : ℕ) : Cycles K n →ₗ[R] Cycles L n := + (ShortComplex.cyclesMap' ((shortComplexFunctor' _ c (n+1) n (n-1)).map f) + (S K n).moduleCatLeftHomologyData (S L n).moduleCatLeftHomologyData).hom + +@[simp] lemma cyclesMap_val (f : K ⟶ L) (n : ℕ) (x : Cycles K n) : + (cyclesMap f n x).val=(f.f n).hom x := by + have h := ShortComplex.cyclesMap'_i ((shortComplexFunctor' _ c (n+1) n (n-1)).map f) + (S K n).moduleCatLeftHomologyData (S L n).moduleCatLeftHomologyData + exact congrArg (fun g : ModuleCat.of R (Cycles K n) ⟶ L.X n => g.hom x) h + +@[simp] lemma map_π (f : K ⟶ L) (n : ℕ) (x : Cycles K n) : + ((functor n).map f).hom (π K n x)=π L n (cyclesMap f n x) := by + have h := ShortComplex.leftHomologyπ_naturality' ((shortComplexFunctor' _ c (n+1) n (n-1)).map f) + (S K n).moduleCatLeftHomologyData (S L n).moduleCatLeftHomologyData + exact congrArg (fun g : ModuleCat.of R (Cycles K n) ⟶ ModuleCat.of R (H L n) => g.hom x) h + +end ConcreteHomology + +end + +section +open CategoryTheory Limits HomologicalComplex +namespace ConeCoordinates + +universe u +variable {R : Type u} [CommRing R] +open ConcreteHomology +variable {F G : CC (R:=R)} (φ : F ⟶ G) +noncomputable abbrev C := homotopyCofiber φ +noncomputable abbrev left (n : ℕ) : F.X n ⟶ (C φ).X (n+1) := homotopyCofiber.inlX φ n (n+1) rfl +noncomputable abbrev right (n : ℕ) : G.X n ⟶ (C φ).X n := homotopyCofiber.inrX φ n +noncomputable abbrev fst (n : ℕ) : (C φ).X (n+1) ⟶ F.X n := homotopyCofiber.fstX φ (n+1) n rfl +noncomputable abbrev snd (n : ℕ) : (C φ).X n ⟶ G.X n := homotopyCofiber.sndX φ n +lemma zero_next : ¬ c.Rel 0 (c.next 0) := by change ¬ c.next 0+1=0; omega +@[simp] lemma fst_left (n : ℕ) (x : F.X n) : fst φ n (left φ n x)=x := by + exact congrArg (fun f : F.X n ⟶ F.X n => f x) (homotopyCofiber.inlX_fstX φ n (n+1) rfl) +@[simp] lemma snd_right (n : ℕ) (x : G.X n) : snd φ n (right φ n x)=x := by + exact congrArg (fun f : G.X n ⟶ G.X n => f x) (homotopyCofiber.inrX_sndX φ n) +@[simp] lemma fst_right (n : ℕ) (x : G.X (n+1)) : fst φ n (right φ (n+1) x)=0 := by + exact congrArg (fun f : G.X (n+1) ⟶ F.X n => f x) (homotopyCofiber.inrX_fstX φ (n+1) n rfl) +@[simp] lemma snd_left (n : ℕ) (x : F.X n) : snd φ (n+1) (left φ n x)=0 := by + exact congrArg (fun f : F.X n ⟶ G.X (n+1) => f x) (homotopyCofiber.inlX_sndX φ n (n+1) rfl) +lemma ext {n : ℕ} {x y : (C φ).X (n+1)} (hfst : fst φ n x=fst φ n y) + (hsnd : snd φ (n+1) x=snd φ (n+1) y) : x=y := by + have hrel : c.Rel (n+1) n := rfl + apply (homotopyCofiber.XIsoBiprod φ (n+1) n hrel).toLinearEquiv.injective + apply (ModuleCat.biprodIsoProd (F.X n) (G.X (n+1))).toLinearEquiv.injective + apply Prod.ext + · exact hfst + · change (biprod.snd : F.X n ⊞ G.X (n+1) ⟶ G.X (n+1)) ((homotopyCofiber.XIsoBiprod φ (n+1) n hrel).hom x) = + (biprod.snd : F.X n ⊞ G.X (n+1) ⟶ G.X (n+1)) ((homotopyCofiber.XIsoBiprod φ (n+1) n hrel).hom y) + have he : (homotopyCofiber.XIsoBiprod φ (n+1) n hrel).hom ≫ biprod.snd = snd φ (n+1) := by + apply homotopyCofiber.ext_from_X φ n (n+1) hrel + · simp only [homotopyCofiber.inlX_XIsoBiprod_hom_assoc,biprod.inl_snd, + homotopyCofiber.inlX_sndX] + · simp only [homotopyCofiber.inrX_XIsoBiprod_hom_assoc,biprod.inr_snd, + homotopyCofiber.inrX_sndX] + change ((homotopyCofiber.XIsoBiprod φ (n+1) n hrel).hom ≫ biprod.snd) x = + ((homotopyCofiber.XIsoBiprod φ (n+1) n hrel).hom ≫ biprod.snd) y + rw [he]; exact hsnd +lemma ext_zero {x y : (C φ).X 0} (h : snd φ 0 x=snd φ 0 y) : x=y := + (homotopyCofiber.XIso φ 0 zero_next).toLinearEquiv.injective h +lemma decomp (n : ℕ) (x : (C φ).X (n+1)) : + left φ n (fst φ n x)+right φ (n+1) (snd φ (n+1) x)=x := by + apply ext φ + · simp only [map_add,fst_left φ n _,fst_right φ n _,add_zero] + · simp only [map_add,snd_left φ n _,snd_right φ (n+1) _,zero_add] +lemma decomp_zero (x : (C φ).X 0) : right φ 0 (snd φ 0 x)=x := by + apply ext_zero φ; exact snd_right φ 0 _ +lemma d_snd (n : ℕ) (x : (C φ).X (n+1)) : + snd φ n ((C φ).d (n+1) n x)=φ.f n (fst φ n x)+G.d (n+1) n (snd φ (n+1) x) := by + exact congrArg (fun f : (C φ).X (n+1) ⟶ G.X n => f x) + (homotopyCofiber.d_sndX φ (n+1) n rfl) +lemma d_fst (n : ℕ) (x : (C φ).X (n+2)) : + fst φ n ((C φ).d (n+2) (n+1) x) = -F.d (n+1) n (fst φ (n+1) x) := by + exact congrArg (fun f : (C φ).X (n+2) ⟶ F.X n => f x) + (homotopyCofiber.d_fstX φ (n+2) (n+1) n rfl rfl) +lemma d_right (n m : ℕ) (x : G.X n) : + (C φ).d n m (right φ n x)=right φ m (G.d n m x) := by + exact congrArg (fun f : G.X n ⟶ (C φ).X m => f x) + (homotopyCofiber.inrX_d φ n m) +lemma d_left (n : ℕ) (x : F.X (n+1)) : + (C φ).d (n+2) (n+1) (left φ (n+1) x) = + -left φ n (F.d (n+1) n x)+right φ (n+1) (φ.f (n+1) x) := by + apply ext φ + · rw [d_fst φ n, fst_left φ (n+1)] + simp only [map_add,map_neg,fst_left φ n _,fst_right φ n _,add_zero] + · rw [d_snd φ (n+1),fst_left φ (n+1),snd_left φ (n+1)] + simp only [map_add,map_neg,map_zero,snd_left φ n _,snd_right φ (n+1) _,neg_zero,zero_add,add_zero] +lemma d_left_zero (x : F.X 0) : (C φ).d 1 0 (left φ 0 x)=right φ 0 (φ.f 0 x) := by + apply ext_zero φ + rw [d_snd φ 0,fst_left φ 0,snd_left φ 0,map_zero,add_zero,snd_right φ 0] +lemma d_left_cycle (n : ℕ) (x : Cycles F n) : + (C φ).d (n+1) n (left φ n x)=right φ n (φ.f n x) := by + cases n with + | zero => exact d_left_zero φ x + | succ n => + rw [d_left] + have hx : F.d (n+1) n x=0 := x.property + rw [hx,map_zero,neg_zero,zero_add] +end ConeCoordinates + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConeHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConeHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3c042a3873226d2286cdeead8fa516fc6e3ab16 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConeHomology.lean @@ -0,0 +1,278 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ModelAssembly +import OAI.GroupTheory.SimpleAmenable.Homology.ConcreteHomology + +namespace OAI + +section + +section +open CategoryTheory Limits HomologicalComplex +namespace ConeCoordinates + +universe u +variable {R : Type u} [CommRing R] +open ConcreteHomology +variable {F G : CC (R:=R)} (φ : F ⟶ G) +lemma right_cycle (n : ℕ) (y : Cycles G n) : + (C φ).d n (n-1) (right φ n y)=0 := by + rw [d_right φ n (n-1),y.property,map_zero] +lemma fst_cycle (n : ℕ) (w : (C φ).X (n+1)) (y : G.X n) + (hw : (C φ).d (n+1) n w=right φ n y) : F.d n (n-1) (fst φ n w)=0 := by + cases n with + | zero => rw [F.shape 0 (0-1) (by decide)]; rfl + | succ n => + have h := congrArg (fst φ n) hw + rw [d_fst φ n,fst_right φ n] at h + exact neg_eq_zero.mp h +lemma surjective_of_cone_zero (n : ℕ) [Subsingleton (H (C φ) n)] : + Function.Surjective ((functor n).map φ).hom := by + intro z + obtain ⟨y,rfl⟩ := π_surjective G n z + let yc : Cycles (C φ) n := ⟨right φ n y,right_cycle φ n y⟩ + obtain ⟨w,hw⟩ := (π_eq_zero (C φ) n yc).mp (Subsingleton.elim _ _) + change (C φ).X (n+1) at w + have hw' : (C φ).d (n+1) n w=right φ n y := congrArg Subtype.val hw + let x : Cycles F n := ⟨fst φ n w,fst_cycle φ n w y hw'⟩ + refine ⟨π F n x,?_⟩ + rw [map_π] + apply (Submodule.Quotient.eq _).mpr + refine ⟨-snd φ (n+1) w,?_⟩ + apply Subtype.ext + have hs := congrArg (snd φ n) hw' + rw [d_snd φ n,snd_right φ n] at hs + change G.d (n+1) n (-snd φ (n+1) w)=φ.f n x-y + rw [map_neg] + change -(G.d (n+1) n (snd φ (n+1) w))=φ.f n (fst φ n w)-y + rw [←hs] + abel +lemma injective_of_cone_zero (n : ℕ) [Subsingleton (H (C φ) (n+1))] : + Function.Injective ((functor n).map φ).hom := by + apply (LinearMap.ker_eq_bot).mp + apply le_antisymm _ bot_le + intro z hz + obtain ⟨x,rfl⟩ := π_surjective F n z + have hz' : π G n (cyclesMap φ n x)=0 := by + rw [←map_π]; exact hz + obtain ⟨y,hy⟩ := (π_eq_zero G n _).mp hz' + change G.X (n+1) at y + have hy' : G.d (n+1) n y=φ.f n x := by + have hh := congrArg Subtype.val hy + change G.d (n+1) n y=(cyclesMap φ n x).val at hh + rw [cyclesMap_val] at hh + exact hh + let w := left φ n x-right φ (n+1) y + have hw : (C φ).d (n+1) n w=0 := by + change (C φ).d (n+1) n (left φ n x-right φ (n+1) y)=0 + rw [map_sub,d_left_cycle φ n x,d_right φ (n+1) n,hy',sub_self] + let wc : Cycles (C φ) (n+1) := ⟨w,hw⟩ + obtain ⟨a,ha⟩ := (π_eq_zero (C φ) (n+1) wc).mp (Subsingleton.elim _ _) + change (C φ).X (n+2) at a + have ha' : (C φ).d (n+2) (n+1) a=w := congrArg Subtype.val ha + have hf := congrArg (fst φ n) ha' + rw [d_fst φ n] at hf + change -F.d (n+1) n (fst φ (n+1) a)=fst φ n (left φ n x-right φ (n+1) y) at hf + rw [map_sub,fst_left φ n,fst_right φ n,sub_zero] at hf + apply (Submodule.mem_bot R).mpr + apply (π_eq_zero F n x).mpr + refine ⟨-fst φ (n+1) a,?_⟩ + apply Subtype.ext + change F.d (n+1) n (-fst φ (n+1) a)=x + rw [map_neg]; exact hf +lemma cone_subsingleton_of_iso [IsIso φ] (n : ℕ) : Subsingleton (H (C φ) n) := by + apply subsingleton_of_forall_eq 0 + intro z + obtain ⟨x,rfl⟩ := π_surjective (C φ) n z + apply (π_eq_zero (C φ) n x).mpr + refine ⟨left φ n ((inv φ).f n (snd φ n x)),?_⟩ + apply Subtype.ext + change (C φ).d (n+1) n (left φ n ((inv φ).f n (snd φ n x)))=x + cases n with + | zero => + rw [d_left_zero φ] + have hi : φ.f 0 ((inv φ).f 0 (snd φ 0 x))=snd φ 0 x := by + have h := congrArg (fun f : G ⟶ G => f.f 0 (snd φ 0 x)) (IsIso.inv_hom_id φ) + exact h + rw [hi]; exact decomp_zero φ x + | succ n => + rw [d_left φ] + apply ext φ + · simp only [map_add,map_neg,fst_left φ n _,fst_right φ n _,add_zero] + have hx : (C φ).d (n+1) n x=0 := x.property + have hs := congrArg (snd φ n) hx + rw [d_snd φ n,map_zero] at hs + have hc := congrArg (fun f : G.X (n+1) ⟶ F.X n => f (snd φ (n+1) x)) + ((inv φ).comm (n+1) n) + have hi : (inv φ).f n (φ.f n (fst φ n x))=fst φ n x := by + exact congrArg (fun f : F ⟶ F => f.f n (fst φ n x)) (IsIso.hom_inv_id φ) + have hs' := congrArg ((inv φ).f n) hs + rw [map_add,hi,map_zero] at hs' + change -(F.d (n+1) n ((inv φ).f (n+1) (snd φ (n+1) x)))=fst φ n x + change F.d (n+1) n ((inv φ).f (n+1) (snd φ (n+1) x)) = + (inv φ).f n (G.d (n+1) n (snd φ (n+1) x)) at hc + rw [hc] + exact (eq_neg_of_add_eq_zero_left hs').symm + · simp only [map_add,map_neg,snd_left φ n _,snd_right φ (n+1) _,neg_zero,zero_add] + exact congrArg (fun f : G ⟶ G => f.f (n+1) (snd φ (n+1) x)) (IsIso.inv_hom_id φ) +end ConeCoordinates + +end + +section +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalCone + +universe u +variable {R : Type u} [CommRing R] +abbrev c := ComplexShape.down ℕ +variable {K L : HomologicalComplex₂ (ModuleCat.{u} R) c c} (φ : K ⟶ L) +noncomputable abbrev B : HomologicalComplex₂ (ModuleCat.{u} R) c c := homotopyCofiber φ +noncomputable abbrev f := total.map φ c +noncomputable abbrev inr := total.map (homotopyCofiber.inr φ) c +lemma total_zero {K L : HomologicalComplex₂ (ModuleCat.{u} R) c c} : total.map (0 : K ⟶ L) c=0 := by + apply HomologicalComplex.Hom.ext + funext n + apply total.hom_ext + intro p q hpq + simp only [ιTotal_map,HomologicalComplex.zero_f,zero_comp,comp_zero] +noncomputable def h : Homotopy (f φ ≫ inr φ) 0 := by + let t := TotalHomotopy.total (homotopyCofiber.inrCompHomotopy φ (fun j => ⟨j+1,rfl⟩)) + exact { + hom := t.hom + zero := t.zero + comm n := by + simpa only [total.map_comp,total_zero] using t.comm n } +noncomputable def comparison : homotopyCofiber (f φ) ⟶ (B φ).total c := + homotopyCofiber.desc (f φ) (inr φ) (h φ) +@[reassoc] lemma right_comparison (n : ℕ) : + homotopyCofiber.inrX (f φ) n ≫ (comparison φ).f n=(inr φ).f n := + homotopyCofiber.inrX_desc_f _ _ _ _ +@[reassoc] lemma left_comparison (p q n : ℕ) (hpq : p+q=n) : + K.ιTotal c p q n hpq ≫ homotopyCofiber.inlX (f φ) n (n+1) rfl ≫ (comparison φ).f (n+1)= + (homotopyCofiber.inlX φ p (p+1) rfl).f q ≫ + (B φ).ιTotal c (p+1) q (n+1) (by dsimp;omega) := by + have hn : c.Rel (n+1) n := rfl + have hp : c.Rel (p+1) p := rfl + change K.ιTotal c p q n hpq ≫ homotopyCofiber.inlX (f φ) n (n+1) hn ≫ + (comparison φ).f (n+1) = (homotopyCofiber.inlX φ p (p+1) hp).f q ≫ + (B φ).ιTotal c (p+1) q (n+1) _ + dsimp only [comparison] + rw [homotopyCofiber.inlX_desc_f] + change K.ιTotal c p q n hpq ≫ + TotalHomotopy.hom (homotopyCofiber.inrCompHomotopy φ (fun j => ⟨j+1,rfl⟩)) n (n+1)=_ + rw [TotalHomotopy.hom_diag,TotalHomotopy.ι_step,homotopyCofiber.inrCompHomotopy_hom] + +noncomputable def inverseFZero : ((B φ).total c).X 0 ⟶ (homotopyCofiber (f φ)).X 0 := + (B φ).totalDesc (fun p q hpq => (homotopyCofiber.sndX φ p).f q ≫ + L.ιTotal c p q 0 hpq ≫ homotopyCofiber.inrX (f φ) 0) +noncomputable def inverseFSucc (n : ℕ) : ((B φ).total c).X (n+1) ⟶ (homotopyCofiber (f φ)).X (n+1) := + (B φ).totalDesc (fun p q hpq => + (if hp : p=0 then 0 else + (homotopyCofiber.fstX φ p (p-1) (by change p-1+1=p;omega)).f q ≫ + K.ιTotal c (p-1) q n (by dsimp at hpq ⊢;omega) ≫ + homotopyCofiber.inlX (f φ) n (n+1) rfl) + + (homotopyCofiber.sndX φ p).f q ≫ L.ιTotal c p q (n+1) hpq ≫ + homotopyCofiber.inrX (f φ) (n+1)) +noncomputable def inverseF : ∀ n, ((B φ).total c).X n ⟶ (homotopyCofiber (f φ)).X n + | 0 => inverseFZero φ + | n+1 => inverseFSucc φ n +@[reassoc] lemma zero_inverse (q n : ℕ) (hq : q=n) : + (B φ).ιTotal c 0 q n (by dsimp;omega) ≫ inverseF φ n = + (homotopyCofiber.sndX φ 0).f q ≫ L.ιTotal c 0 q n (by dsimp;omega) ≫ + homotopyCofiber.inrX (f φ) n := by + cases n with + | zero => simp only [inverseF,inverseFZero,ι_totalDesc] + | succ n => + simp only [inverseF,inverseFSucc,ι_totalDesc,dite_true,zero_add] +@[reassoc] lemma succ_inverse (p q n : ℕ) (hpq : p+q=n) : + (B φ).ιTotal c (p+1) q (n+1) (by dsimp;omega) ≫ inverseF φ (n+1)= + (homotopyCofiber.fstX φ (p+1) p rfl).f q ≫ K.ιTotal c p q n hpq ≫ + homotopyCofiber.inlX (f φ) n (n+1) rfl + + (homotopyCofiber.sndX φ (p+1)).f q ≫ L.ιTotal c (p+1) q (n+1) (by dsimp;omega) ≫ + homotopyCofiber.inrX (f φ) (n+1) := by + simp only [inverseF,inverseFSucc,ι_totalDesc,dite_eq_right (Nat.succ_ne_zero p),Nat.add_one_sub_one] +@[reassoc] lemma inr_snd (p q : ℕ) : + (homotopyCofiber.inrX φ p).f q ≫ (homotopyCofiber.sndX φ p).f q = 𝟙 _ := by + rw [←HomologicalComplex.comp_f,homotopyCofiber.inrX_sndX,HomologicalComplex.id_f] +@[reassoc] lemma inr_fst (p q : ℕ) : + (homotopyCofiber.inrX φ (p+1)).f q ≫ (homotopyCofiber.fstX φ (p+1) p rfl).f q = 0 := by + exact congrArg (fun morphism => morphism.f q) (homotopyCofiber.inrX_fstX φ (p+1) p rfl) +@[reassoc] lemma inl_snd (p q : ℕ) : + (homotopyCofiber.inlX φ p (p+1) rfl).f q ≫ (homotopyCofiber.sndX φ (p+1)).f q = 0 := by + exact congrArg (fun morphism => morphism.f q) (homotopyCofiber.inlX_sndX φ p (p+1) rfl) +@[reassoc] lemma inl_fst (p q : ℕ) : + (homotopyCofiber.inlX φ p (p+1) rfl).f q ≫ (homotopyCofiber.fstX φ (p+1) p rfl).f q = 𝟙 _ := by + exact congrArg (fun morphism => morphism.f q) (homotopyCofiber.inlX_fstX φ p (p+1) rfl) +lemma decomp (p q : ℕ) : + (homotopyCofiber.fstX φ (p+1) p rfl).f q ≫ (homotopyCofiber.inlX φ p (p+1) rfl).f q + + (homotopyCofiber.sndX φ (p+1)).f q ≫ (homotopyCofiber.inrX φ (p+1)).f q = 𝟙 _ := by + have hrel : c.Rel (p+1) p := rfl + have hh : homotopyCofiber.fstX φ (p+1) p hrel ≫ homotopyCofiber.inlX φ p (p+1) hrel + + homotopyCofiber.sndX φ (p+1) ≫ homotopyCofiber.inrX φ (p+1) = 𝟙 _ := by + apply homotopyCofiber.ext_from_X φ p (p+1) hrel <;> simp + exact congrArg (fun h => h.f q) hh +lemma decomp_zero (q : ℕ) : + (homotopyCofiber.sndX φ 0).f q ≫ (homotopyCofiber.inrX φ 0).f q = 𝟙 _ := by + rw [←HomologicalComplex.comp_f,homotopyCofiber.sndX_inrX _ _ (by simp [c]),HomologicalComplex.id_f] +@[reassoc] lemma right_inverse (n : ℕ) : + (inr φ).f n ≫ inverseF φ n = homotopyCofiber.inrX (f φ) n := by + apply total.hom_ext + intro p q hpq + rw [ιTotal_map_assoc] + change (homotopyCofiber.inrX φ p).f q ≫ (B φ).ιTotal c p q n hpq ≫ inverseF φ n = _ + cases p with + | zero => + rw [zero_inverse φ q n (by simpa using hpq),inr_snd_assoc] + | succ p => + obtain ⟨n,rfl⟩ : ∃ n',n=n'+1 := ⟨p+q,by dsimp at hpq;omega⟩ + rw [succ_inverse φ p q n (by dsimp at hpq;omega),Preadditive.comp_add, + inr_fst_assoc,zero_comp,inr_snd_assoc,zero_add] +@[reassoc] lemma left_inverse (p q n : ℕ) (hpq : p+q=n) : + (homotopyCofiber.inlX φ p (p+1) rfl).f q ≫ + (B φ).ιTotal c (p+1) q (n+1) (by dsimp;omega) ≫ inverseF φ (n+1) = + K.ιTotal c p q n hpq ≫ homotopyCofiber.inlX (f φ) n (n+1) rfl := by + rw [succ_inverse,Preadditive.comp_add,inl_fst_assoc,inl_snd_assoc,zero_comp,add_zero] +lemma comparison_inverse (n : ℕ) : (comparison φ).f n ≫ inverseF φ n=𝟙 _ := by + cases n with + | zero => + apply homotopyCofiber.ext_from_X' (f φ) 0 (by simp [c]) + rw [←Category.assoc,right_comparison,right_inverse] + simp + | succ n => + apply homotopyCofiber.ext_from_X (f φ) n (n+1) rfl + · apply total.hom_ext + intro p q hpq + rw [left_comparison_assoc φ p q n hpq,left_inverse φ p q n hpq] + simp + · rw [←Category.assoc,right_comparison,right_inverse] + simp +lemma inverse_comparison (n : ℕ) : inverseF φ n ≫ (comparison φ).f n=𝟙 _ := by + apply total.hom_ext + intro p q hpq + cases p with + | zero => + rw [zero_inverse_assoc φ q n (by simpa using hpq),right_comparison,ιTotal_map] + change (homotopyCofiber.sndX φ 0).f q ≫ (homotopyCofiber.inrX φ 0).f q ≫ _ = _ + rw [←Category.assoc,decomp_zero] + simp + | succ p => + obtain ⟨n,rfl⟩ : ∃ n',n=n'+1 := ⟨p+q,by dsimp at hpq;omega⟩ + rw [succ_inverse_assoc φ p q n (by dsimp at hpq;omega),Preadditive.add_comp] + simp only [Category.assoc] + rw [left_comparison,right_comparison,ιTotal_map] + change (homotopyCofiber.fstX φ (p+1) p rfl).f q ≫ + (homotopyCofiber.inlX φ p (p+1) rfl).f q ≫ _ + + (homotopyCofiber.sndX φ (p+1)).f q ≫ (homotopyCofiber.inrX φ (p+1)).f q ≫ _ = _ + simp only [←Category.assoc,←Preadditive.add_comp,decomp,Category.id_comp,Category.comp_id] +noncomputable def iso : homotopyCofiber (f φ) ≅ (B φ).total c := by + haveI : ∀ n,IsIso ((comparison φ).f n) := fun n => + ⟨⟨inverseF φ n,comparison_inverse φ n,inverse_comparison φ n⟩⟩ + haveI : IsIso (comparison φ) := HomologicalComplex.Hom.isIso_of_components _ + exact asIso (comparison φ) +end TotalCone + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean new file mode 100644 index 0000000000000000000000000000000000000000..125d7e98e880e41834b88b1b28198d8b555339c7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean @@ -0,0 +1,281 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.IntegralHomologyFunctorial + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConfigurationSupport +open Classical Finsupp +namespace ConfigurationChains +variable {V : Type*} + +theorem linear_expansion (f : Chain V →ₗ[ℤ] Chain V) (c : Chain V) : + f c=c.sum (fun l n => n • f (single l 1)) := by + conv_lhs => rw [← Finsupp.sum_single c] + rw [map_finsuppSum] + apply Finsupp.sum_congr + intro l hl + rw [←map_smul,Finsupp.smul_single,smul_eq_mul,mul_one] + +theorem linear_support_subset (f : Chain V →ₗ[ℤ] Chain V) (c : Chain V) : + (f c).support⊆c.support.biUnion (fun l => (f (single l 1)).support) := by + rw [linear_expansion f c] + intro s hs + obtain ⟨l,hl,hs⟩ := Finset.mem_biUnion.mp (Finsupp.support_sum hs) + exact Finset.mem_biUnion.mpr ⟨l,hl,Finsupp.support_smul hs⟩ + +theorem vertices_linear_subset (f : Chain V →ₗ[ℤ] Chain V) (c : Chain V) : + vertices (f c)⊆c.support.biUnion (fun l => vertices (f (single l 1))) := by + intro v hv + obtain ⟨s,hs,hv⟩ := mem_vertices.mp hv + obtain ⟨l,hl,hs⟩ := Finset.mem_biUnion.mp (linear_support_subset f c hs) + exact Finset.mem_biUnion.mpr ⟨l,hl,mem_vertices.mpr ⟨s,hs,hv⟩⟩ + +theorem vertices_linear_card (f : Chain V →ₗ[ℤ] Chain V) (c : Chain V) + (b : ℕ) (hb : ∀l∈c.support,(vertices (f (single l 1))).card≤b) : + (vertices (f c)).card≤c.support.card*b := by + calc + _ ≤ (c.support.biUnion (fun l => vertices (f (single l 1)))).card := + Finset.card_le_card (vertices_linear_subset f c) + _ ≤ ∑l∈c.support,(vertices (f (single l 1))).card := Finset.card_biUnion_le + _ ≤ ∑l∈c.support,b := Finset.sum_le_sum hb + _ = _ := by simp + +def Admissible (R : V → V → Prop) (n : ℕ) (c : Chain V) : Prop := + ∀l∈c.support,List.Pairwise R l ∧ l.length=n + +@[simp] theorem admissible_zero (R : V → V → Prop) (n : ℕ) : + Admissible R n (0 : Chain V) := by simp [Admissible] + +theorem admissible_single {R : V → V → Prop} {n : ℕ} {l : List V} + (hl : List.Pairwise R l) (hn : l.length=n) (k : ℤ) : + Admissible R n (single l k) := by + intro s hs + have he : s=l := Finset.mem_singleton.mp (Finsupp.support_single_subset hs) + subst s + exact ⟨hl,hn⟩ + +theorem admissible_sub {R : V → V → Prop} {n : ℕ} {c d : Chain V} + (hc : Admissible R n c) (hd : Admissible R n d) : Admissible R n (c-d) := by + intro l hl + rcases Finset.mem_union.mp (Finsupp.support_sub hl) with hl|hl + · exact hc l hl + · exact hd l hl + +theorem admissible_linear {R : V → V → Prop} {n k : ℕ} {c : Chain V} + (f : Chain V →ₗ[ℤ] Chain V) (hc : Admissible R n c) + (hf : ∀l,List.Pairwise R l → l.length=n → Admissible R k (f (single l 1))) : + Admissible R k (f c) := by + intro s hs + obtain ⟨l,hl,hs⟩ := Finset.mem_biUnion.mp (linear_support_subset f c hs) + exact hf l (hc l hl).1 (hc l hl).2 s hs + +theorem admissible_faceSum {R : V → V → Prop} {n : ℕ} {l : List V} + (hl : List.Pairwise R l) (hn : l.length=n+1) : Admissible R n (faceSum l) := by + intro s hs + obtain ⟨hsub,hlen⟩ := faceSum_support hs + exact ⟨hl.sublist hsub,by omega⟩ + +theorem admissible_boundary {R : V → V → Prop} {n : ℕ} {c : Chain V} + (hc : Admissible R (n+1) c) : Admissible R n (boundary c) := by + apply admissible_linear boundary hc + intro l hl hn + simpa using admissible_faceSum hl hn + +theorem admissible_cone {R : V → V → Prop} {n : ℕ} {c : Chain V} + (hc : Admissible R n c) (v : V) (hv : ∀w∈vertices c,R v w) : + Admissible R (n+1) (cone v c) := by + intro l hl + obtain ⟨s,hs,rfl⟩ := Finset.mem_image.mp (cone_support_subset v c hl) + have h := hc s hs + refine ⟨List.pairwise_cons.mpr ⟨?_,h.1⟩,by simp [h.2]⟩ + intro w hw + exact hv w (mem_vertices.mpr ⟨s,hs,hw⟩) + +theorem vertices_boundary_subset (c : Chain V) : vertices (boundary c)⊆vertices c := by + intro v hv + obtain ⟨l,hl,hv⟩ := Finset.mem_biUnion.mp (vertices_linear_subset boundary c hv) + simp only [boundary_single,one_smul] at hv + obtain ⟨s,hs,hv⟩ := mem_vertices.mp hv + exact mem_vertices.mpr ⟨l,hl,(faceSum_support hs).1.subset hv⟩ + +theorem linear_eq_on_admissible {R : V → V → Prop} {n : ℕ} + (f g : Chain V →ₗ[ℤ] Chain V) + (h : ∀l,List.Pairwise R l → l.length=n → f (single l 1)=g (single l 1)) + {c : Chain V} (hc : Admissible R n c) : f c=g c := by + rw [linear_expansion f c,linear_expansion g c] + apply Finsupp.sum_congr + intro l hl + rw [h l (hc l hl).1 (hc l hl).2] + +end ConfigurationChains +end ConfigurationSupport + +section BoundedConfigurationContraction +open Classical Finsupp +namespace ConfigurationChains +variable {V : Type*} {R : V → V → Prop} + +structure Step (R : V → V → Prop) (n b : ℕ) where + previous : Chain V →ₗ[ℤ] Chain V + current : Chain V →ₗ[ℤ] Chain V + equation : ∀c,Admissible R n c → boundary (current c)+previous (boundary c)=c + admissible : ∀l,List.Pairwise R l → l.length=n → + Admissible R (n+1) (current (single l 1)) + bounded : ∀l,List.Pairwise R l → l.length=n → + (vertices (current (single l 1))).card≤b + +namespace Step +variable {n b : ℕ} (D : Step R n b) + +noncomputable def base (v : V) : Step R 0 1 where + previous := 0 + current := cone v + equation c hc := by + have he : boundary c=0 := by + have hz : ∀l,List.Pairwise R l → l.length=0 → boundary (single l 1)=(0 : Chain V) := by + intro l hl hn + have : l=[] := List.length_eq_zero_iff.mp hn + simp [this,faceSum] + exact linear_eq_on_admissible boundary 0 hz hc + simp [boundary_cone,he] + admissible l hl hn := by + have : l=[] := List.length_eq_zero_iff.mp hn + simp only [this,cone_single] + exact admissible_single (by simp) (by simp) _ + bounded l hl hn := by + have : l=[] := List.length_eq_zero_iff.mp hn + simp only [this,cone_single] + exact (Finset.card_le_card (vertices_single_subset [v] (1:ℤ))).trans (by simp) + +noncomputable def residual (l : List V) : Chain V := single l 1-D.current (faceSum l) + +theorem residual_admissible {l : List V} (hl : List.Pairwise R l) (hn : l.length=n+1) : + Admissible R (n+1) (D.residual l) := by + apply admissible_sub (admissible_single hl hn 1) + exact admissible_linear D.current (admissible_faceSum hl hn) D.admissible + +theorem residual_cycle {l : List V} (hl : List.Pairwise R l) (hn : l.length=n+1) : + boundary (D.residual l)=0 := by + have he := D.equation (faceSum l) (admissible_faceSum hl hn) + simp only [boundary_faceSum,map_zero,add_zero] at he + simp [residual,he] + +theorem residual_bound {l : List V} (hl : List.Pairwise R l) (hn : l.length=n+1) : + (vertices (D.residual l)).card≤(n+1)+(n+1)*b := by + have hb : (vertices (D.current (faceSum l))).card≤(n+1)*b := by + apply (vertices_linear_card D.current (faceSum l) b ?_).trans + (Nat.mul_le_mul_right b ((faceSum_support_card l).trans hn.le)) + intro s hs + have had := admissible_faceSum hl hn s hs + exact D.bounded s had.1 had.2 + calc + _ ≤ (vertices (single l 1)∪vertices (D.current (faceSum l))).card := + Finset.card_le_card (vertices_sub_subset _ _) + _ ≤ (vertices (single l 1)).card+(vertices (D.current (faceSum l))).card := Finset.card_union_le _ _ + _ ≤ l.toFinset.card+(n+1)*b := Nat.add_le_add + (Finset.card_le_card (vertices_single_subset _ _)) hb + _ ≤ (n+1)+(n+1)*b := Nat.add_le_add_right ((List.toFinset_card_le l).trans hn.le) _ + +variable (hc : ∀S : Finset V,S.card≤(n+1)+(n+1)*b → ∃v,∀w∈S,R v w) + +noncomputable def nextVertex (l : List V) (hl : List.Pairwise R l ∧ l.length=n+1) : V := + (hc (vertices (D.residual l)) (D.residual_bound hl.1 hl.2)).choose + +theorem nextVertex_rel (l : List V) (hl : List.Pairwise R l ∧ l.length=n+1) : + ∀w∈vertices (D.residual l),R (D.nextVertex hc l hl) w := + (hc _ (D.residual_bound hl.1 hl.2)).choose_spec + +noncomputable def nextGenerator (l : List V) : Chain V := + if hl : List.Pairwise R l ∧ l.length=n+1 then + cone (D.nextVertex hc l hl) (D.residual l) else 0 + +noncomputable def next : Chain V →ₗ[ℤ] Chain V := + Finsupp.linearCombination ℤ (D.nextGenerator hc) + +@[simp] theorem next_single (l : List V) : + D.next hc (single l 1)=D.nextGenerator hc l := by simp [next] + +theorem next_contraction {l : List V} (hl : List.Pairwise R l) (hn : l.length=n+1) : + boundary (D.next hc (single l 1))+D.current (boundary (single l 1))=single l 1 := by + rw [next_single,nextGenerator,dite_eq_left ⟨hl,hn⟩,boundary_cone,D.residual_cycle hl hn] + simp [residual] + +theorem next_admissible {l : List V} (hl : List.Pairwise R l) (hn : l.length=n+1) : + Admissible R (n+1+1) (D.next hc (single l 1)) := by + rw [next_single,nextGenerator,dite_eq_left ⟨hl,hn⟩] + exact admissible_cone (D.residual_admissible hl hn) _ (D.nextVertex_rel hc l ⟨hl,hn⟩) + +theorem next_bounded {l : List V} (hl : List.Pairwise R l) (hn : l.length=n+1) : + (vertices (D.next hc (single l 1))).card≤1+(n+1)+(n+1)*b := by + rw [next_single,nextGenerator,dite_eq_left ⟨hl,hn⟩] + have hi := Finset.card_le_card (vertices_cone_subset (D.nextVertex hc l ⟨hl,hn⟩) (D.residual l)) + have hj := Finset.card_insert_le (D.nextVertex hc l ⟨hl,hn⟩) (vertices (D.residual l)) + have hb := D.residual_bound hl hn + omega + +noncomputable def extend : Step R (n+1) (1+(n+1)+(n+1)*b) where + previous := D.current + current := D.next hc + equation c h := by + have he : (boundary.comp (D.next hc)+D.current.comp boundary) c=LinearMap.id c := + linear_eq_on_admissible _ _ (fun _ hl hn => D.next_contraction hc hl hn) h + exact he + admissible _ := D.next_admissible hc + bounded _ := D.next_bounded hc + +include D in + +theorem fills {c : Chain V} (hc : Admissible R n c) (hz : boundary c=0) : + ∃d,Admissible R (n+1) d ∧ boundary d=c := by + refine ⟨D.current c,admissible_linear D.current hc D.admissible,?_⟩ + have he := D.equation c hc + simpa [hz] using he + +end Step + +def bankBound : ℕ → ℕ + | 0 => 1 + | n+1 => 1+(n+1)+(n+1)*bankBound n + +theorem bankBound_mono : Monotone bankBound := by + apply monotone_nat_of_le_succ + intro n + rw [bankBound] + have hh : bankBound n≤(n+1)*bankBound n := by nlinarith + omega + +theorem exists_step (N : ℕ) + (hc : ∀S : Finset V,S.card≤bankBound N → ∃v,∀w∈S,R v w) : + ∀n≤N,Nonempty (Step R n (bankBound n)) := by + intro n hn + induction n with + | zero => + obtain ⟨v,hv⟩ := hc ∅ (by simp) + exact ⟨Step.base v⟩ + | succ n ih => + obtain ⟨D⟩ := ih (by omega) + refine ⟨D.extend (fun S hS => hc S ?_)⟩ + apply hS.trans + apply le_trans (by simp only [bankBound]; omega) (bankBound_mono hn) + +theorem low_degree_filling + (hc : ∀S : Finset V,S.card≤31 → ∃v,∀w∈S,R v w) + {n : ℕ} (hn : n≤3) {c : Chain V} (had : Admissible R n c) (hz : boundary c=0) : + ∃d,Admissible R (n+1) d ∧ boundary d=c := by + obtain ⟨D⟩ := exists_step (R:=R) 3 (by simpa [bankBound] using hc) n hn + exact D.fills had hz + +end ConfigurationChains +end BoundedConfigurationContraction + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConfigurationEquivariance.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConfigurationEquivariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..994236200c93fdae617c13e39d722cd1b3910123 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConfigurationEquivariance.lean @@ -0,0 +1,111 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.Configuration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConfigurationEquivariance +open Classical Finsupp +namespace ConfigurationChains +variable {V W Z : Type*} + +noncomputable def push (f : V → W) : Chain V →ₗ[ℤ] Chain W := + Finsupp.lmapDomain ℤ ℤ (List.map f) + +@[simp] theorem push_single (f : V → W) (l : List V) (n : ℤ) : + push f (single l n)=single (l.map f) n := by simp [push] + +@[simp] theorem push_id (c : Chain V) : push id c=c := by + induction c using Finsupp.induction with + | zero => simp + | @single_add l n c hl hn ih => simp [ih] + +@[simp] theorem push_comp (g : W → Z) (f : V → W) (c : Chain V) : + push g (push f c)=push (g ∘ f) c := by + induction c using Finsupp.induction with + | zero => simp + | @single_add l n c hl hn ih => simp [ih, List.map_map] + +theorem push_cone (f : V → W) (v : V) (c : Chain V) : + push f (cone v c)=cone (f v) (push f c) := by + induction c using Finsupp.induction with + | zero => simp + | @single_add l n c hl hn ih => simp [ih] + +theorem push_faceSum (f : V → W) (l : List V) : + push f (faceSum l)=faceSum (l.map f) := by + induction l with + | nil => simp [faceSum] + | cons v l ih => simp [faceSum,push_cone,ih] + +theorem push_boundary (f : V → W) (c : Chain V) : + push f (boundary c)=boundary (push f c) := by + induction c using Finsupp.induction with + | zero => simp + | @single_add l n c hl hn ih => simp [push_faceSum,ih] + +theorem push_admissible {R : V → V → Prop} {S : W → W → Prop} + (f : V → W) (hf : ∀v w,R v w → S (f v) (f w)) {n : ℕ} {c : Chain V} + (hc : Admissible R n c) : Admissible S n (push f c) := by + intro l hl + obtain ⟨k,hk,rfl⟩ := Finset.mem_image.mp (Finsupp.mapDomain_support hl) + exact ⟨List.pairwise_map.mpr ((hc k hk).1.imp (fun h => hf _ _ h)), + by simpa only [List.length_map] using (hc k hk).2⟩ + +noncomputable def degree (R : V → V → Prop) (n : ℕ) : Submodule ℤ (Chain V) where + carrier := {c | Admissible R n c} + zero_mem' := admissible_zero R n + add_mem' := by + intro c d hc hd l hl + rcases Finset.mem_union.mp (Finsupp.support_add hl) with hl|hl + · exact hc l hl + · exact hd l hl + smul_mem' := by + intro k c hc l hl + exact hc l (Finsupp.support_smul hl) + +@[simp] theorem mem_degree {R : V → V → Prop} {n : ℕ} {c : Chain V} : + c∈degree R n ↔ Admissible R n c := Iff.rfl + +noncomputable def degreeBoundary (R : V → V → Prop) (n : ℕ) : + degree R (n+1) →ₗ[ℤ] degree R n := + boundary.restrict (fun _ h => admissible_boundary h) + +@[simp] theorem degreeBoundary_val {R : V → V → Prop} {n : ℕ} + (c : degree R (n+1)) : (degreeBoundary R n c).val=boundary c.val := rfl + +@[simp] theorem degreeBoundary_square (R : V → V → Prop) (n : ℕ) + (c : degree R (n+2)) : degreeBoundary R n (degreeBoundary R (n+1) c)=0 := by + apply Subtype.ext + exact boundary_boundary c.val + +noncomputable def degreePush {R : V → V → Prop} {S : W → W → Prop} + (f : V → W) (hf : ∀v w,R v w → S (f v) (f w)) (n : ℕ) : + degree R n →ₗ[ℤ] degree S n := + (push f).restrict (fun _ h => push_admissible f hf h) + +@[simp] theorem degreePush_val {R : V → V → Prop} {S : W → W → Prop} + (f : V → W) (hf : ∀v w,R v w → S (f v) (f w)) (n : ℕ) + (c : degree R n) : (degreePush f hf n c).val=push f c.val := rfl + +theorem degreePush_boundary {R : V → V → Prop} {S : W → W → Prop} + (f : V → W) (hf : ∀v w,R v w → S (f v) (f w)) (n : ℕ) + (c : degree R (n+1)) : + degreePush f hf n (degreeBoundary R n c)= + degreeBoundary S n (degreePush f hf (n+1) c) := by + apply Subtype.ext + exact push_boundary f c.val + +end ConfigurationChains +end ConfigurationEquivariance + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConfigurationResolution.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConfigurationResolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e78bcc74f98ead870ba3dc56c13187a11042fae --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConfigurationResolution.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonFixedTrackProgress +import OAI.GroupTheory.SimpleAmenable.Homology.ConfigurationEquivariance + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConfigurationResolution +open Classical CategoryTheory Finsupp +namespace ConfigurationChains +variable {V : Type*} {R : V → V → Prop} + +noncomputable def complex (R : V → V → Prop) : ChainComplex (ModuleCat ℤ) ℕ := + ChainComplex.of (fun n => ModuleCat.of ℤ (degree R n)) + (fun n => ModuleCat.ofHom (degreeBoundary R n)) (fun n => by + apply ModuleCat.hom_ext + apply LinearMap.ext + intro c + exact degreeBoundary_square R n c) + +noncomputable def representation {G : Type*} [Monoid G] [MulAction G V] + (hR : ∀g : G,∀v w,R v w → R (g • v) (g • w)) (n : ℕ) : + Representation ℤ G (degree R n) where + toFun g := degreePush (fun v => g • v) (hR g) n + map_one' := by + apply LinearMap.ext + intro c + apply Subtype.ext + change push (fun v : V => (1:G) • v) c.val=c.val + have he : (fun v : V => (1:G) • v)=id := funext (fun v => one_smul G v) + rw [he] + exact push_id c.val + map_mul' g h := by + apply LinearMap.ext + intro c + apply Subtype.ext + change push (fun v : V => (g*h) • v) c.val=push (fun v => g • v) (push (fun v => h • v) c.val) + rw [push_comp] + simp only [Function.comp_def, mul_smul] + +@[simp] theorem representation_boundary {G : Type*} [Monoid G] [MulAction G V] + (hR : ∀g : G,∀v w,R v w → R (g • v) (g • w)) (g : G) (n : ℕ) + (c : degree R (n+1)) : + representation hR n g (degreeBoundary R n c)= + degreeBoundary R n (representation hR (n+1) g c) := + degreePush_boundary _ (hR g) n c + +noncomputable def simplexModuleEquiv (R : V → V → Prop) (n : ℕ) : + degree R n ≃ₗ[ℤ] ({l : List V // l.Pairwise R ∧ l.length=n} →₀ ℤ) := by + have he : degree R n=Finsupp.supported ℤ ℤ {l : List V | l.Pairwise R ∧ l.length=n} := by + ext c + rw [Finsupp.mem_supported] + rfl + exact (LinearEquiv.ofEq _ _ he).trans (Finsupp.supportedEquivFinsupp _) + +theorem lowDegree_exact + (hc : ∀S : Finset V,S.card≤31 → ∃v,∀w∈S,R v w) + {n : ℕ} (hn : n≤2) : + Function.Exact (degreeBoundary R (n+1)) (degreeBoundary R n) := by + intro c + constructor + · intro hz + have hz' : boundary c.val=0 := congrArg Subtype.val hz + obtain ⟨d,hd,he⟩ := low_degree_filling hc (by omega : n+1≤3) c.property hz' + exact ⟨⟨d,hd⟩,Subtype.ext he⟩ + · rintro ⟨d,rfl⟩ + exact degreeBoundary_square R n d + +end ConfigurationChains + +namespace PolygonPlacement + +noncomputable def configurationRepresentation (a m n : ℕ) : + Representation ℤ (polygonFullGroup a m) (ConfigurationChains.degree (@Apart a m) n) := + ConfigurationChains.representation (fun g v w h => (apart_smul_iff g v w).mpr h) n +end PolygonPlacement +end ConfigurationResolution + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConnectedProduct.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConnectedProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbe05be9e22e3f4f58137ef5691aefa766fbe2c7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ConnectedProduct.lean @@ -0,0 +1,53 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TensorSplit +import OAI.GroupTheory.SimpleAmenable.Simplicial.SimplicialAugment + +namespace OAI + +section + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite AlgebraicTopology +namespace ConnectedProduct +open FreeChains AugmentedSplit + +variable (X : SSet) [X.IsConnected] +noncomputable def point : X.obj (op ⦋0⦌) := Classical.arbitrary _ +lemma reduced_zero : IsZero ((red (SimplicialAugment.aug X)).homology 0) := by + let e := SimplicialAugment.aug X + let s := SimplicialAugment.sec X (point X) + have hs : s ≫ e=𝟙 U := SimplicialAugment.section_aug X _ + have h : homologyMap (kernel.ι e) 0 = 0 := by + apply (cancel_mono (homologyMap e 0)).mp + rw [←homologyMap_comp,kernel.condition,homologyMap_zero,Limits.zero_comp] + apply (IsZero.iff_id_eq_zero _).mpr + have hsplit := congrArg (fun f => homologyMap f 0) (splitting e s hs).f_r + change homologyMap (sc e).f 0 = 0 at h + rw [homologyMap_comp,homologyMap_id,h,Limits.zero_comp] at hsplit + exact hsplit.symm +variable (Y : SSet) [Y.IsConnected] +noncomputable def additiveIso (a b n : ℕ) (hn : 0 homologyMap f 0) (chainMap_aug _) + have compositeIso : IsIso (homologyMap (aug X) 0 ≫ homologyMap (SimplicialAugment.aug one) 0) := by + rw [he]; infer_instance + exact (isIso_comp_right_iff _ (homologyMap (SimplicialAugment.aug one) 0)).mp inferInstance +lemma red_zero (X:SSet) [X.IsConnected] (a:ℕ) + (hv : ∀ i, 0 < i → i < a → IsZero ((complex X).homology i)) : + ∀ i, i < a → IsZero (((sc X).X₁).homology i) := by + intro i hi + let s := splitting X (ConnectedProduct.point X) + have hz : homologyMap (sc X).f i=0 := by + by_cases h:i=0 + · subst i + change homologyMap (kernel.ι (aug X)) 0 = 0 + apply (cancel_mono (homologyMap (aug X) 0)).mp + rw [←homologyMap_comp,kernel.condition,homologyMap_zero,zero_comp] + · exact (hv i (by omega) hi).eq_of_tgt _ _ + apply (IsZero.iff_id_eq_zero _).mpr + have hh := congrArg (fun f => homologyMap f i) s.f_r + rw [homologyMap_comp,homologyMap_id,hz,zero_comp] at hh + exact hh.symm +instance red_flat (X:SSet) (i:ℕ) : Module.Flat ℤ (((sc X).X₁).X i) := by + have hi : Function.Injective ((kernel.ι (aug X)).f i) := + (ModuleCat.mono_iff_injective _).mp inferInstance + have reducedTorsionFree : Module.IsTorsionFree ℤ (((sc X).X₁).X i) := + hi.moduleIsTorsionFree _ (fun r x => ((kernel.ι (aug X)).f i).hom.map_smul r x) + infer_instance +end ConstantSplit + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite +namespace ConnectedProduct +open FreeChains ProductChains + +variable (X Y:SSet) [X.IsConnected] [Y.IsConnected] +lemma projection_kernel_aux (a b n:ℕ) (hab:n (biprod.fst : X.homology Z n ⊞ Y.homology Z n ⟶ X.homology Z n) z) hx + simp only [map_zero] at h + change (projection X Y n ≫ biprod.fst) x=0 at h + simpa only [projection,biprod.lift_fst] using h + have hg : SSet.homologyMap (CartesianMonoidalCategory.snd X Y) Z n x=0 := by + have h := congrArg (fun z => (biprod.snd : X.homology Z n ⊞ Y.homology Z n ⟶ Y.homology Z n) z) hx + simp only [map_zero] at h + change (projection X Y n ≫ biprod.snd) x=0 at h + simpa only [projection,biprod.lift_snd] using h + let e := homologyIsoN X Y n + have h1 : homologyMap (𝟙 (complex X)⊗ₘConstantSplit.aug Y) n (e.hom x)=0 := by + have hn := homology_natural (𝟙 X) (SSet.const (X:=Y) (Y:=one) PUnit.unit) n + rw [chainMap_id] at hn + have he : (𝟙 X)⊗ₘ(SSet.const (X:=Y) (Y:=one) PUnit.unit) = + CartesianMonoidalCategory.fst X Y ≫ pairLeft X one PUnit.unit := by ext d z <;> rfl + rw [he,SSet.homologyMap_comp] at hn + have hh := congrArg (fun f => f x) hn + change (homologyIsoN X one n).hom + (SSet.homologyMap (pairLeft X one PUnit.unit) Z n + (SSet.homologyMap (CartesianMonoidalCategory.fst X Y) Z n x)) = _ at hh + simpa only [hf,map_zero,ConstantSplit.aug,ConstantSplit.one,e,ModuleCat.comp_apply] using hh.symm + have h2 : homologyMap (ConstantSplit.aug X⊗ₘ𝟙 (complex Y)) n (e.hom x)=0 := by + have hn := homology_natural (SSet.const (X:=X) (Y:=one) PUnit.unit) (𝟙 Y) n + rw [chainMap_id] at hn + have he : (SSet.const (X:=X) (Y:=one) PUnit.unit)⊗ₘ(𝟙 Y) = + CartesianMonoidalCategory.snd X Y ≫ pairRight one Y PUnit.unit := by ext d z <;> rfl + rw [he,SSet.homologyMap_comp] at hn + have hh := congrArg (fun f => f x) hn + change (homologyIsoN one Y n).hom + (SSet.homologyMap (pairRight one Y PUnit.unit) Z n + (SSet.homologyMap (CartesianMonoidalCategory.snd X Y) Z n x)) = _ at hh + simpa only [hg,map_zero,ConstantSplit.aug,ConstantSplit.one,e,ModuleCat.comp_apply] using hh.symm + have hz : IsZero ((((ConstantSplit.sc X).X₁)⊗((ConstantSplit.sc Y).X₁)).homology n) := + TensorProductHomology.arbitrary_isZero _ _ a b n hab + (ConstantSplit.red_zero X a hX) (ConstantSplit.red_zero Y b hY) + have hh := ChainTensor.homology_joint_kernel (ConstantSplit.sc X) (ConstantSplit.sc Y) + (ConstantSplit.splitting X (point X)) (ConstantSplit.splitting Y (point Y)) n hz (e.hom x) h1 h2 + exact e.toLinearEquiv.injective (hh.trans (map_zero e.toLinearEquiv).symm) + +lemma projection_isIso_arbitrary (a b n:ℕ) (hn:0 f z) (inclusion_projection X Y (point X) (point Y) n (by omega)) +end ConnectedProduct + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/DoubleCoordinates.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/DoubleCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3980d6c5f581f3305c7705b109a2c5ae339adaa --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/DoubleCoordinates.lean @@ -0,0 +1,263 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.PiH1Coproduct +import OAI.GroupTheory.SimpleAmenable.Simplicial.IntervalBinary +import OAI.GroupTheory.SimpleAmenable.Homology.ComponentStable +import OAI.GroupTheory.SimpleAmenable.Homology.RegularBlock + +namespace OAI + +namespace DoubleCoordinates +variable {P:Type} {n:ℕ} +abbrev Index (P:Type) (n:ℕ) := Σhv:{hv:ℕ×ℕ // hv.1+hv.2=n},(Fin hv.val.2→P) × P × (Fin hv.val.1→P) +def toSplit (s:Index P n) : MarkedCoordinates.Split P n := + ⟨⟨s.1.val.2,by have:=s.1.property; omega⟩,s.2.1,s.2.2.1, + fun j=>s.2.2.2 ⟨j.val,by have:=s.1.property; dsimp at *; omega⟩⟩ +def ofSplit (s:MarkedCoordinates.Split P n) : Index P n := + ⟨⟨(n-s.1.val,s.1.val),by omega⟩,s.2.1,s.2.2.1,s.2.2.2⟩ +lemma payload_heq {m n v:ℕ} (e:m=n) (y:Fin v→P) (p:P) (x:Fin n→P) + (hp:∀j:Fin m,j.val x ⟨j.val,hp j⟩) (y,p,x) := by + subst n + rfl +lemma left_inv (s:Index P n) : ofSplit (toSplit s)=s := by + rcases s with ⟨⟨⟨h,v⟩,hn⟩,y,p,x⟩ + subst n + change Fin v→P at y + change Fin h→P at x + dsimp [toSplit,ofSplit] + apply Sigma.ext + · exact Subtype.ext (Prod.ext (Nat.add_sub_cancel h v) rfl) + · exact payload_heq (Nat.add_sub_cancel h v) y p x _ +lemma right_inv (s:MarkedCoordinates.Split P n) : toSplit (ofSplit s)=s := by + rcases s with ⟨i,y,p,x⟩ + rfl +noncomputable def equiv (P:Type) (n:ℕ) : Index P n ≃ MarkedCoordinates.Split P n where + toFun:=toSplit + invFun:=ofSplit + left_inv:=left_inv + right_inv:=right_inv +noncomputable def words (P:Type) (n:ℕ) : Index P n ≃ (Σ_:Fin (n+1),Fin (n+1)→P) := + (equiv P n).trans (MarkedCoordinates.equiv P n) +lemma center (s:Index P n) : (words P n s).2 (words P n s).1=s.2.2.1 := + MarkedCoordinates.word_center _ _ _ _ +end DoubleCoordinates + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace RegularLabels +open FreeChains + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +noncomputable def totalInj {n:ℕ} (s:DoubleCoordinates.Index P n) : + fiber F s.2.2.1 ⟶ ((RegularCoefficient.double F).total c).X n := + inj F s.2 ≫ (RegularCoefficient.double F).ιTotal c s.1.val.1 s.1.val.2 n s.1.property +noncomputable def totalDesc {n:ℕ} {M:A} + (f:∀s:DoubleCoordinates.Index P n,fiber F s.2.2.1 ⟶ M) : + ((RegularCoefficient.double F).total c).X n ⟶ M := + (RegularCoefficient.double F).totalDesc (fun h v hn=>desc F (fun w=>f ⟨⟨(h,v),hn⟩,w⟩)) +@[reassoc (attr:=simp)] lemma totalInj_desc {n:ℕ} {M:A} + (f:∀s:DoubleCoordinates.Index P n,fiber F s.2.2.1 ⟶ M) (s:DoubleCoordinates.Index P n) : + totalInj F s ≫ totalDesc F f=f s := by + dsimp only [totalInj,totalDesc] + rw [Category.assoc,HomologicalComplex₂.ι_totalDesc,include_desc] +lemma total_hom_ext {n:ℕ} {M:A} {f g:((RegularCoefficient.double F).total c).X n ⟶ M} + (hh:∀s:DoubleCoordinates.Index P n,totalInj F s ≫ f=totalInj F s ≫ g) : f=g := by + apply HomologicalComplex₂.total.hom_ext + intro h v hn + apply hom_ext F + intro w + exact (Category.assoc _ _ _).symm.trans ((hh ⟨⟨(h,v),hn⟩,w⟩).trans (Category.assoc _ _ _)) +noncomputable def totalIsColimit (n:ℕ) : IsColimit (Cofan.mk _ (totalInj F (n:=n))) := + Cofan.IsColimit.mk _ (fun s=>totalDesc F s.inj) (fun _ _=>totalInj_desc F _ _) + (fun s _ hh=>total_hom_ext F (fun w=>(hh w).trans (totalInj_desc F s.inj w).symm)) +end RegularLabels + +end + +namespace MarkedH1 + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +open FreeChains ComponentTranslation + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +noncomputable def wordInclude {n:ℕ} (p:Fin n→Skeleton C) (i:Fin n) : Fiber (p i) ⥤ (Fin n→C) := by + classical + exact Functor.pi' (fun j=>if i=j then (property (p i)).ι else (Functor.const _).obj (repr (p j))) +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma wordInclude_nerve {n:ℕ} (p:Fin n→Skeleton C) (i:Fin n) : + nerveMap (wordInclude p i) ≫ (PiSSet.nervePiIso (fun _:Fin n=>C)).hom = + PiSSet.incl (fun j=>nerve (Fiber (p j))) (points p) i ≫ PiFiber.inclusion C (Fin n) p := by + classical + apply NatTrans.ext; funext d + apply ConcreteCategory.hom_ext; intro s + funext j + change (s ⋙ wordInclude p i ⋙ Pi.eval _ j) = + ((PiSSet.incl (fun j=>nerve (Fiber (p j))) (points p) i ≫ PiSSet.proj _ j ≫ + nerveMap (property (p j)).ι).app d s) + dsimp only [wordInclude] + rw [Functor.pi'_eval] + by_cases h:i=j + · subst j + rw [ite_eq_left rfl, ←Category.assoc, PiSSet.incl_self] + rfl + · rw [ite_eq_right h, ←Category.assoc, PiSSet.incl_other _ _ h, SSet.const_comp] + rfl +noncomputable def wordDiagram {n:ℕ} (p:Fin n→Skeleton C) (i:Fin n) : + Fiber (p i) ⥤ IntervalBar.Diagram C (Fin (n+1)) := + wordInclude p i ⋙ (IntervalBar.Diagram.eval (C:=C) n).asEquivalence.inverse +omit [SymmetricCategory C] in +lemma primitive_eq {n:ℕ} (p:Fin n→Skeleton C) (i:Fin n) : + primitive p i=SSet.homologyMap (nerveMap (wordDiagram p i)) Z 1 := by + have:=NerveHomotopy.homologyMap_isIso ((IntervalBar.Diagram.eval (C:=C) n).asEquivalence.functor) Z 1 + apply (cancel_mono (evalIso (C:=C) n).hom).mp + dsimp only [primitive] + erw [Category.assoc, Category.assoc, Iso.inv_hom_id, Category.comp_id] + erw [←SSet.homologyMap_comp,←wordInclude_nerve] + erw [SSet.homologyMap_comp] + dsimp only [wordDiagram,evalIso,Iso.trans_hom,Functor.mapIso_hom,asIso_hom] + have h:=(NerveHomotopy.ofNatTrans + (Functor.isoWhiskerLeft (wordInclude p i) (IntervalBar.Diagram.eval (C:=C) n).asEquivalence.counitIso).hom).congr_homologyMap Z 1 + have hh : SSet.homologyMap (nerveMap (wordDiagram p i)) Z 1 ≫ + SSet.homologyMap (nerveMap (IntervalBar.Diagram.eval (C:=C) n)) Z 1 = + SSet.homologyMap (nerveMap (wordInclude p i)) Z 1 := by + rw [←SSet.homologyMap_comp] + exact h + change SSet.homologyMap (nerveMap (wordInclude p i)) Z 1 ≫ _ = + SSet.homologyMap (nerveMap (wordDiagram p i)) Z 1 ≫ + SSet.homologyMap (nerveMap (IntervalBar.Diagram.eval (C:=C) n)) Z 1 ≫ _ + rw [←Category.assoc,hh] + rfl +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +open FreeChains ComponentTranslation IntervalBar.Diagram + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma wordInclude_proj {n:ℕ} (p:Fin n→Skeleton C) (i j:Fin n) : + wordInclude p i ⋙ Pi.eval (fun _:Fin n=>C) j = + if i=j then (property (p i)).ι else (Functor.const _).obj (repr (p j)) := by + classical + exact Functor.pi'_eval _ _ +noncomputable def oneIncludeIso (p:Fin 1→Skeleton C) : + wordDiagram p 0 ⋙ oneEval ≅ (property (p 0)).ι := by + classical + change (wordInclude p 0 ⋙ (eval 1).asEquivalence.inverse) ⋙ + (eval 1 ⋙ Pi.eval (fun _:Fin 1=>C) 0) ≅ _ + exact Functor.associator _ _ _ ≪≫ + Functor.isoWhiskerLeft (wordInclude p 0) + ((Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (eval 1).asEquivalence.counitIso _ ≪≫ Functor.leftUnitor _) ≪≫ + eqToIso (by rw [wordInclude_proj,ite_eq_left rfl]) +noncomputable def binaryLeft (p:Fin 2→Skeleton C) : + wordInclude p 0 ⋙ tensorPair ≅ (property (p 0)).ι ⋙ tensorRight (repr (p 1)) := by + classical + apply eqToIso + refine CategoryTheory.Functor.ext ?_ ?_ + · intro object + simp [wordInclude, tensorPair, tensorRight, Functor.pi'] + · intro source target morphism + simp [wordInclude, tensorPair, tensorRight, Functor.pi'] + change morphism.hom ▷ repr (p 1) = 𝟙 _ ≫ morphism.hom ▷ repr (p 1) + exact (Category.id_comp _).symm +noncomputable def binaryRight (p:Fin 2→Skeleton C) : + wordInclude p 1 ⋙ tensorPair ≅ (property (p 1)).ι ⋙ tensorLeft (repr (p 0)) := by + classical + apply eqToIso + refine CategoryTheory.Functor.ext ?_ ?_ + · intro object + simp [wordInclude, tensorPair, tensorLeft, Functor.pi'] + · intro source target morphism + simp [wordInclude, tensorPair, tensorLeft, Functor.pi'] + change repr (p 0) ◁ morphism.hom = 𝟙 _ ≫ repr (p 0) ◁ morphism.hom + exact (Category.id_comp _).symm +noncomputable def binaryLeftTranslate (p:Fin 2→Skeleton C) : + wordInclude p 0 ⋙ tensorPair ≅ + translate (p 1) (p 0) (p 1*p 0) rfl ⋙ (property (p 1*p 0)).ι := + binaryLeft p ≪≫ Functor.isoWhiskerLeft (property (p 0)).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr (p 1))).symm +noncomputable def binaryRightTranslate (p:Fin 2→Skeleton C) : + wordInclude p 1 ⋙ tensorPair ≅ + translate (p 0) (p 1) (p 0*p 1) rfl ⋙ (property (p 0*p 1)).ι := binaryRight p +omit [SymmetricCategory C] in +@[reassoc] lemma binary_primitive_face (p:Fin 2→Skeleton C) (i:Fin 2) (k:Fin 3) : + primitive p i ≫ SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ k).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1 = + SSet.homologyMap (nerveMap (wordInclude p i ⋙ binaryFace k)) Z 1 := by + rw [primitive_eq] + change SSet.homologyMap (nerveMap (wordDiagram p i)) Z 1 ≫ + SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ k).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1 = + SSet.homologyMap (nerveMap (wordDiagram p i) ≫ + nerveMap (reindex (SimplexCategory.δ k).toOrderHom) ≫ nerveMap oneEval) Z 1 + simp only [SSet.homologyMap_comp] +omit [SymmetricCategory C] in +@[reassoc] lemma binary_primitive_zero (p:Fin 2→Skeleton C) : + primitive p 1 ≫ SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ (0:Fin 3)).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1=ComponentStable.inclusion (p 1) 1 := by + rw [binary_primitive_face] + have h:=(NerveHomotopy.ofNatTrans (Functor.isoWhiskerLeft (wordInclude p 1) (binaryFaceZero (C:=C))).hom).congr_homologyMap Z 1 + rw [h] + rw [wordInclude_proj,ite_eq_left rfl] + rfl +omit [SymmetricCategory C] in +@[reassoc] lemma binary_primitive_last (p:Fin 2→Skeleton C) : + primitive p 0 ≫ SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ (2:Fin 3)).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1=ComponentStable.inclusion (p 0) 1 := by + rw [binary_primitive_face] + have h:=(NerveHomotopy.ofNatTrans (Functor.isoWhiskerLeft (wordInclude p 0) (binaryFaceLast (C:=C))).hom).congr_homologyMap Z 1 + rw [h] + rw [wordInclude_proj,ite_eq_left rfl] + rfl +omit [SymmetricCategory C] in +@[reassoc] lemma binary_primitive_zero_other (p:Fin 2→Skeleton C) : + primitive p 0 ≫ SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ (0:Fin 3)).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1=0 := by + rw [binary_primitive_face] + have h:=(NerveHomotopy.ofNatTrans (Functor.isoWhiskerLeft (wordInclude p 0) (binaryFaceZero (C:=C))).hom).congr_homologyMap Z 1 + rw [h,wordInclude_proj,ite_eq_right (by decide)] + have hc : nerveMap ((Functor.const (Fiber (p 0))).obj (repr (p 1))) = + SSet.const (nerveEquiv.symm (repr (p 1))) := by ext n x; rfl + rw [hc] + exact ConnectedProduct.const_homology_zero _ 1 (by decide) +omit [SymmetricCategory C] in +@[reassoc] lemma binary_primitive_last_other (p:Fin 2→Skeleton C) : + primitive p 1 ≫ SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ (2:Fin 3)).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1=0 := by + rw [binary_primitive_face] + have h:=(NerveHomotopy.ofNatTrans (Functor.isoWhiskerLeft (wordInclude p 1) (binaryFaceLast (C:=C))).hom).congr_homologyMap Z 1 + rw [h,wordInclude_proj,ite_eq_right (by decide)] + have hc : nerveMap ((Functor.const (Fiber (p 1))).obj (repr (p 0))) = + SSet.const (nerveEquiv.symm (repr (p 0))) := by ext n x; rfl + rw [hc] + exact ConnectedProduct.const_homology_zero _ 1 (by decide) +lemma binary_primitive_middle_stable (p:Fin 2→Skeleton C) (i:Fin 2) : + primitive p i ≫ SSet.homologyMap (nerveMap (reindex (SimplexCategory.δ (1:Fin 3)).toOrderHom)) Z 1 ≫ + SSet.homologyMap (nerveMap oneEval) Z 1 ≫ ComponentStable.toStable 1 = + ComponentStable.inclusion (p i) 1 ≫ ComponentStable.toStable 1 := by + rw [binary_primitive_face_assoc] + have h:=(NerveHomotopy.ofNatTrans (Functor.isoWhiskerLeft (wordInclude p i) (binaryFaceMiddle (C:=C))).hom).congr_homologyMap Z 1 + rw [h] + fin_cases i + · change SSet.homologyMap (nerveMap (wordInclude p 0 ⋙ tensorPair)) Z 1 ≫ ComponentStable.toStable 1 = + ComponentStable.inclusion (p 0) 1 ≫ ComponentStable.toStable 1 + have ht:=(NerveHomotopy.ofNatTrans (binaryLeftTranslate p).hom).congr_homologyMap Z 1 + rw [ht] + change SSet.homologyMap (nerveMap (translate (p 1) (p 0) (p 1*p 0) rfl) ≫ + nerveMap (property (p 1*p 0)).ι) Z 1 ≫ _ = _ + rw [SSet.homologyMap_comp,Category.assoc] + exact ComponentStable.translate_toStable _ _ _ rfl 1 + · change SSet.homologyMap (nerveMap (wordInclude p 1 ⋙ tensorPair)) Z 1 ≫ ComponentStable.toStable 1 = + ComponentStable.inclusion (p 1) 1 ≫ ComponentStable.toStable 1 + have ht:=(NerveHomotopy.ofNatTrans (binaryRightTranslate p).hom).congr_homologyMap Z 1 + rw [ht] + change SSet.homologyMap (nerveMap (translate (p 0) (p 1) (p 0*p 1) rfl) ≫ + nerveMap (property (p 0*p 1)).ι) Z 1 ≫ _ = _ + rw [SSet.homologyMap_comp,Category.assoc] + exact ComponentStable.translate_toStable _ _ _ rfl 1 +end + +end MarkedH1 + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/E2Boundary.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/E2Boundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad9e1deff0ba02a3cb656c0ccba6c5b9f121233e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/E2Boundary.lean @@ -0,0 +1,203 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TotalFiltration + +namespace OAI + +section + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace E2Leading + +universe u +variable {R : Type u} [CommRing R] +open TotalProjection +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) + +lemma entry_inclusion (p q n : ℕ) (h : p+q=n) (x : (K.X p).X q) : + projection K p q n (K.ιTotal c p q n h x)=x := + congrArg (fun f : (K.X p).X q ⟶ (K.X p).X q => f.hom x) (inclusion_projection K p q n h) + +lemma entry_inclusion_ne (i j p q n : ℕ) (h : i+j=n) (hne : (i,j)≠(p,q)) (x : (K.X i).X j) : + projection K p q n (K.ιTotal c i j n h x)=0 := + congrArg (fun f : (K.X i).X j ⟶ (K.X p).X q => f.hom x) + (inclusion_projection_of_ne K i j p q n h hne) + +lemma lower_filtration (p q : ℕ) {x : (K.total c).X (p+q)} + (hx : x∈filtration K (p+q) ((p:ℤ)+1)) (htop : projection K p q (p+q) x=0) : + x∈filtration K (p+q) p := by + intro i hi + by_cases he : i.val.1=p + · obtain ⟨⟨i,j⟩,hij⟩ := i + dsimp at he + subst i + have hj : j=q := by have := Finset.HasAntidiagonal.mem_antidiagonal.mp hij; omega + subst j + exact htop + · exact hx i (by omega) + +lemma lower_filtration' (p q n : ℕ) (hn : p+q=n) {x : (K.total c).X n} + (hx : x∈filtration K n ((p:ℤ)+1)) (htop : projection K p q n x=0) : + x∈filtration K n p := by + subst n + exact lower_filtration K p q hx htop + +lemma linear_units_smul {A B : Type*} [AddCommGroup A] [AddCommGroup B] + [Module R A] [Module R B] (f : A →ₗ[R] B) (a : ℤˣ) (x : A) : + f (a • x)=a • f x := by simp [Units.smul_def] + +noncomputable def lift (p q : ℕ) (y : (K.X (p+1)).X q) (z : (K.X p).X (q+1)) : + (K.total c).X (p+q+1) := + K.ιTotal c (p+1) q (p+q+1) (by dsimp; omega) y + + ((-1 : ℤˣ)^p) • K.ιTotal c p (q+1) (p+q+1) (by dsimp; omega) z + +lemma lift_mem (p q : ℕ) (y : (K.X (p+1)).X q) (z : (K.X p).X (q+1)) : + lift K p q y z ∈ filtration K (p+q+1) ((p:ℤ)+2) := by + apply Submodule.add_mem + · exact inclusion_mem K (by omega) y (by omega) + · change ((-1 : ℤˣ)^p) • _ ∈ _ + rw [Units.smul_def] + exact (filtration K (p+q+1) ((p:ℤ)+2)).toAddSubgroup.zsmul_mem + (inclusion_mem K (by omega) z (by omega)) _ + +@[simp] lemma lift_left (p q : ℕ) (y : (K.X (p+1)).X q) (z : (K.X p).X (q+1)) : + projection K (p+1) q (p+q+1) (lift K p q y z)=y := by + simp only [lift,map_add,Units.smul_def,map_zsmul,entry_inclusion, + entry_inclusion_ne K p (q+1) (p+1) q _ _ (by intro h; have := congrArg Prod.fst h; omega), + smul_zero,add_zero] + +@[simp] lemma lift_right (p q : ℕ) (y : (K.X (p+1)).X q) (z : (K.X p).X (q+1)) : + projection K p (q+1) (p+q+1) (lift K p q y z)=((-1 : ℤˣ)^p) • z := by + simp only [lift,map_add,Units.smul_def,map_zsmul,entry_inclusion, + entry_inclusion_ne K (p+1) q p (q+1) _ _ (by intro h; have := congrArg Prod.fst h; omega), + zero_add] + +lemma neg_pow_smul_twice {A : Type*} [AddCommGroup A] (p : ℕ) (a : A) : + ((-1 : ℤˣ)^p) • (((-1 : ℤˣ)^p) • a)=a := by + rw [smul_smul,←mul_pow] + simp + +lemma d_lift_top (p q : ℕ) (y : (K.X (p+1)).X q) (z : (K.X p).X (q+1)) : + projection K p q (p+q) ((K.total c).d (p+q+1) (p+q) (lift K p q y z))= + (K.d (p+1) p).f q y + (K.X p).d (q+1) q z := by + rw [d_entry,lift_left,lift_right] + congr 1 + change ((-1 : ℤˣ)^p) • ((K.X p).d (q+1) q).hom (((-1 : ℤˣ)^p) • z) = _ + rw [linear_units_smul,neg_pow_smul_twice] + +lemma d_lift_mem (p q : ℕ) (y : ConcreteHomology.Cycles (K.X (p+1)) q) + (z : (K.X p).X (q+1)) : + (K.total c).d (p+q+1) (p+q) (lift K p q y.val z) ∈ filtration K (p+q) ((p:ℤ)+1) := by + cases q with + | zero => + simpa only [Nat.add_zero,filtration_top] using + (show (K.total c).d (p+1) p (lift K p 0 y.val z)∈(⊤ : Submodule R _) from trivial) + | succ q => + apply lower_filtration' K (p+1) q (p+(q+1)) (by omega) + · exact d_filtration K (lift_mem K p (q+1) y.val z) + · have he := d_entry' K (p+1) q (p+(q+1)+1) (p+(q+1)) (by omega) (by omega) (lift K p (q+1) y.val z) + have hz : projection K (p+1+1) q (p+(q+1)+1) (lift K p (q+1) y.val z)=0 := + entry_zero K (lift_mem K p (q+1) y.val z) (by omega) + rw [hz,map_zero,zero_add] at he + have hy : projection K (p+1) (q+1) (p+(q+1)+1) (lift K p (q+1) y.val z)=y.val := + lift_left K p (q+1) y.val z + rw [hy] at he + have hcyc : (K.X (p+1)).d (q+1) q y.val=0 := y.property + rw [hcyc,smul_zero] at he + exact he + +end E2Leading + +end + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace E2Leading + +universe u +variable {R : Type u} [CommRing R] +open TotalProjection +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) + +lemma lead_zero_boundary (p q : ℕ) (x : (filteredData K (p+q)).Z₂ ((p:ℤ)+1)) + (hx : lead K p q x=0) : x.val∈(filteredData K (p+q)).B₂ ((p:ℤ)+1) := by + obtain ⟨u,hu⟩ := (ConcreteHomology.π_eq_zero (row K q) p (topRowCycle K p q x)).mp hx + obtain ⟨y,rfl⟩ := ConcreteHomology.π_surjective (K.X (p+1)) q u + have he : ConcreteHomology.π (K.X p) q (ConcreteHomology.cyclesMap (K.d (p+1) p) q y)= + ConcreteHomology.π (K.X p) q (topCycle K p q x) := by + have h := congrArg Subtype.val hu + change ((ConcreteHomology.functor q).map (K.d (p+1) p)).hom + (ConcreteHomology.π (K.X (p+1)) q y)= _ at h + rw [ConcreteHomology.map_π] at h + exact h + have hπ : ConcreteHomology.π (K.X p) q + (topCycle K p q x - ConcreteHomology.cyclesMap (K.d (p+1) p) q y)=0 := by + rw [map_sub,he,sub_self] + obtain ⟨z,hz⟩ := (ConcreteHomology.π_eq_zero _ _ _).mp hπ + have hzval : (K.X p).d (q+1) q z = projection K p q (p+q) x.val - (K.d (p+1) p).f q y.val := by + have h := congrArg Subtype.val hz + change (K.X p).d (q+1) q z = (topCycle K p q x).val - (ConcreteHomology.cyclesMap (K.d (p+1) p) q y).val at h + rw [ConcreteHomology.cyclesMap_val] at h + exact h + let w := lift K p q y.val z + have hw : w∈(filteredData K (p+q)).FA (((p:ℤ)+1)+1) := by + change w∈filtration K (p+q+1) (((p:ℤ)+1)+1) + simpa only [Int.add_assoc,Int.reduceAdd] using lift_mem K p q y.val z + have hdw := d_lift_mem K p q y z + have htop : projection K p q (p+q) ((K.total c).d (p+q+1) (p+q) w) = + projection K p q (p+q) x.val := by + calc + _ = (K.d (p+1) p).f q y.val + (K.X p).d (q+1) q z := d_lift_top K p q y.val z + _ = _ := by rw [hzval]; abel + have hlower : x.val - (K.total c).d (p+q+1) (p+q) w∈filtration K (p+q) p := by + apply lower_filtration K p q ((filtration K _ _).sub_mem x.property.1 hdw) + rw [map_sub,htop,sub_self] + refine Submodule.mem_sup.mpr ⟨x.val-(K.total c).d (p+q+1) (p+q) w,⟨?_,?_⟩, + (K.total c).d (p+q+1) (p+q) w,⟨⟨w,hw,rfl⟩,hdw⟩,sub_add_cancel _ _⟩ + · change x.val-(K.total c).d (p+q+1) (p+q) w∈filtration K (p+q) (((p:ℤ)+1)-1) + simpa using hlower + · change (K.total c).d (p+q) (p+q-1) (x.val-(K.total c).d (p+q+1) (p+q) w)∈ + filtration K (p+q-1) (((p:ℤ)+1)-2) + rw [map_sub] + have hd : (K.total c).d (p+q) (p+q-1) ((K.total c).d (p+q+1) (p+q) w)=0 := + congrArg (fun f : (K.total c).X (p+q+1) ⟶ (K.total c).X (p+q-1) => f.hom w) + ((K.total c).d_comp_d _ _ _) + rw [hd,sub_zero] + exact x.property.2 + +lemma finite_E₂ [IsNoetherianRing R] (p q : ℕ) + [Module.Finite R (ConcreteHomology.H (row K q) p)] : + Module.Finite R ((filteredData K (p+q)).E₂ ((p:ℤ)+1)) := by + apply FilteredFiniteness.finite_of_ker_le + (((filteredData K (p+q)).B₂ ((p:ℤ)+1)).comap + ((filteredData K (p+q)).Z₂ ((p:ℤ)+1)).subtype).mkQ (lead K p q) + (Submodule.mkQ_surjective _) + intro x hx + exact (Submodule.Quotient.mk_eq_zero _).mpr (lead_zero_boundary K p q x hx) + +lemma finite_total_concrete [IsNoetherianRing R] (n : ℕ) + (hfinite : ∀ p q, p+q=n → Module.Finite R (ConcreteHomology.H (row K q) p)) : + Module.Finite R (ConcreteHomology.H (K.total c) n) := by + change Module.Finite R (filteredData K n).H + apply FilteredFiniteness.Data.finite_H _ n (filtration_zero K n) (filtration_top K n) + intro p hp + have hn : p+(n-p)=n := Nat.add_sub_of_le hp + have := hfinite p (n-p) hn + have h := finite_E₂ K p (n-p) + rwa [hn] at h + +lemma finite_total [IsNoetherianRing R] (n : ℕ) + (hfinite : ∀ p q, p+q=n → Module.Finite R (ConcreteHomology.H (row K q) p)) : + Module.Finite R ((K.total c).homology n) := by + have := finite_total_concrete K n hfinite + exact Module.Finite.equiv (CategoryTheory.Iso.toLinearEquiv (ConcreteHomology.iso (K.total c) n)).symm + +end E2Leading + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/E2Descend.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/E2Descend.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9c274db53a6ff4d017d9e7428e862d0735a1f29 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/E2Descend.lean @@ -0,0 +1,171 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FilteredEdgeReturn + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace E2Leading +open TotalProjection + +universe u +variable {R : Type u} [CommRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) +lemma boundary_top_cycle (p q : ℕ) (w : (K.total c).X (p+q+1)) + (hw : w∈filtration K (p+q+1) (p+2)) + (hdw : (K.total c).d (p+q+1) (p+q) w∈filtration K (p+q) (p+1)) : + (K.X (p+1)).d q (q-1) (projection K (p+1) q (p+q+1) w)=0 := by + cases q with + | zero => rw [(K.X (p+1)).shape 0 (0-1) (by decide)]; rfl + | succ q => + rw [Nat.add_sub_cancel] + have hd := d_entry' K (p+1) q (p+(q+1)+1) (p+(q+1)) (by omega) (by omega) w + have hz : projection K (p+1) q (p+(q+1)) ((K.total c).d (p+(q+1)+1) (p+(q+1)) w)=0 := + entry_zero K hdw (by omega) + have hf : projection K (p+1+1) q (p+(q+1)+1) w=0 := entry_zero K hw (by omega) + rw [hz,hf,map_zero,zero_add] at hd + have hh := congrArg (fun z => (((-1 : ℤˣ)^(p+1))⁻¹) • z) hd.symm + rw [inv_smul_smul,smul_zero] at hh + exact hh +lemma boundary_lead_zero (p q : ℕ) (w : (K.total c).X (p+q+1)) + (hw : w∈filtration K (p+q+1) (p+2)) + (x : (filteredData K (p+q)).Z₂ ((p:ℤ)+1)) + (hx : x.val=(K.total c).d (p+q+1) (p+q) w) : lead K p q x=0 := by + have hdw : (K.total c).d (p+q+1) (p+q) w∈filtration K (p+q) (p+1) := hx ▸ x.property.1 + let y : ConcreteHomology.Cycles (K.X (p+1)) q := + ⟨projection K (p+1) q (p+q+1) w,boundary_top_cycle K p q w hw hdw⟩ + apply (ConcreteHomology.π_eq_zero (row K q) p (topRowCycle K p q x)).mpr + refine ⟨ConcreteHomology.π (K.X (p+1)) q y,?_⟩ + apply Subtype.ext + change ((ConcreteHomology.functor q).map (K.d (p+1) p)).hom + (ConcreteHomology.π (K.X (p+1)) q y) = ConcreteHomology.π (K.X p) q (topCycle K p q x) + rw [ConcreteHomology.map_π] + apply (Submodule.Quotient.eq _).mpr + refine ⟨- (((-1 : ℤˣ)^p) • projection K p (q+1) (p+q+1) w),?_⟩ + apply Subtype.ext + change (K.X p).d (q+1) q (- (((-1 : ℤˣ)^p) • projection K p (q+1) (p+q+1) w))= + (ConcreteHomology.cyclesMap (K.d (p+1) p) q y).val - (topCycle K p q x).val + rw [ConcreteHomology.cyclesMap_val] + change _ = (K.d (p+1) p).f q (projection K (p+1) q (p+q+1) w) - projection K p q (p+q) x.val + rw [hx,d_entry,map_neg,linear_units_smul] + abel +lemma boundary_lead (p q : ℕ) (x : (filteredData K (p+q)).Z₂ ((p:ℤ)+1)) + (hx : x.val∈(filteredData K (p+q)).B₂ ((p:ℤ)+1)) : lead K p q x=0 := by + obtain ⟨y,hy,z,hz,hyz⟩ := Submodule.mem_sup.mp hx + have hz' := (filteredData K (p+q)).B₂_le_Z₂ ((p:ℤ)+1) + (show z∈(filteredData K (p+q)).B₂ ((p:ℤ)+1) from Submodule.mem_sup_right hz) + let z' : (filteredData K (p+q)).Z₂ ((p:ℤ)+1) := ⟨z,hz'⟩ + let y' : (filteredData K (p+q)).Z₂ ((p:ℤ)+1) := x-z' + have hy' : y'.val=y := by change x.val-z=y; rw [←hyz]; abel + have hly : lead K p q y'=0 := by + have ht : projection K p q (p+q) y'.val=0 := by + rw [hy'] + exact entry_zero K hy.1 (by omega) + have hc : topCycle K p q y'=0 := by apply Subtype.ext; exact ht + change ConcreteHomology.π (row K q) p (topRowCycle K p q y')=0 + have hr : topRowCycle K p q y'=0 := by + apply Subtype.ext + change ConcreteHomology.π (K.X p) q (topCycle K p q y')=0 + rw [hc,map_zero] + rw [hr,map_zero] + have hlz : lead K p q z'=0 := by + obtain ⟨w,hw,hwe⟩ := hz.1 + apply boundary_lead_zero K p q w _ z' hwe.symm + change w∈filtration K (p+q+1) (((p:ℤ)+1)+1) at hw + simpa only [Int.add_assoc,Int.reduceAdd] using hw + rw [show x=y'+z' by dsimp [y']; abel,map_add,hly,hlz,add_zero] +noncomputable def descendedLead (p q : ℕ) : + (filteredData K (p+q)).E₂ ((p:ℤ)+1) →ₗ[R] ConcreteHomology.H (row K q) p := + (((filteredData K (p+q)).B₂ ((p:ℤ)+1)).comap + ((filteredData K (p+q)).Z₂ ((p:ℤ)+1)).subtype).liftQ (lead K p q) + (fun x hx => boundary_lead K p q x hx) +lemma descendedLead_injective (p q : ℕ) : Function.Injective (descendedLead K p q) := by + apply LinearMap.ker_eq_bot.mp + apply le_antisymm _ bot_le + intro x hx + obtain ⟨y,rfl⟩ := Submodule.mkQ_surjective _ x + exact (Submodule.Quotient.mk_eq_zero _).mpr (lead_zero_boundary K p q y hx) +lemma first_descendedLead_surjective (q : ℕ) : Function.Surjective (descendedLead K 1 q) := by + intro y + obtain ⟨x,hx⟩ := first_lead_surjective K q y + exact ⟨Submodule.Quotient.mk x,hx⟩ +end E2Leading + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalProjection + +universe u +variable {R : Type u} [CommRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) +noncomputable def edgeData (n : ℕ) : FilteredEdge.Data + (R:=R) (D:=(K.total c).X (n+2)) (A:=(K.total c).X (n+1)) + (B:=(K.total c).X n) (C:=(K.total c).X (n-1)) where + s := ((K.total c).d (n+2) (n+1)).hom + d := ((K.total c).d (n+1) n).hom + e := ((K.total c).d n (n-1)).hom + ds := ModuleCat.hom_ext_iff.mp ((K.total c).d_comp_d (n+2) (n+1) n) + ed := ModuleCat.hom_ext_iff.mp ((K.total c).d_comp_d (n+1) n (n-1)) + FD := filtration K (n+2) + FA := filtration K (n+1) + FB := filtration K n + FC := filtration K (n-1) + monoA := filtration_mono K (n+1) + monoB := filtration_mono K n +lemma edgeData_current (n : ℕ) : (edgeData K n).current=filteredData K n := rfl +lemma edgeData_previous (n : ℕ) : (edgeData K n).previous=filteredData K (n+1) := rfl +end TotalProjection +namespace E2Leading +open TotalProjection + +universe u +variable {R : Type u} [CommRing R] [IsNoetherianRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) +lemma finite_first (q : ℕ) + [Module.Finite R (ConcreteHomology.H (K.total c) (1+q))] + (hf : ∀ p r, p+r=q+2 → 3≤p → Module.Finite R (ConcreteHomology.H (row K r) p)) : + Module.Finite R (ConcreteHomology.H (row K q) 1) := by + let E := edgeData K (1+q) + have : Module.Finite R E.current.H := ‹Module.Finite R (ConcreteHomology.H (K.total c) (1+q))› + have : Module.Finite R (E.tower 2 (2+(q:ℤ)+1)) := by + apply E.finite_tower 2 q + intro i hi + have hpq : (i+3)+(q-1-i)=1+q+1 := by omega + have := hf (i+3) (q-1-i) (by omega) (by omega) + have ht := finite_E₂ K (i+3) (q-1-i) + rw [hpq] at ht + change Module.Finite R ((filteredData K (1+q+1)).E₂ (2+(i:ℤ)+2)) + rw [show ((i+3:ℕ):ℤ)+1=2+(i:ℤ)+2 by omega] at ht + exact ht + have hzero : E.FC (2-2)=⊥ := filtration_zero K (1+q-1) + have htop : E.FA (2+(q:ℤ)+1)=⊤ := by + change filtration K (1+q+1) (2+(q:ℤ)+1)=⊤ + rw [show 2+(q:ℤ)+1=((1+q+1:ℕ):ℤ)+1 by omega] + exact filtration_top K (1+q+1) + have : Module.Finite R ((filteredData K (1+q)).E₂ ((1:ℤ)+1)) := + E.finite_edge 2 hzero (2+(q:ℤ)+1) htop + exact Module.Finite.of_surjective (descendedLead K 1 q) (first_descendedLead_surjective K q) +end E2Leading +namespace TotalFiniteness + +universe u +variable {R : Type u} [CommRing R] [IsNoetherianRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) +lemma finite_first (q : ℕ) [Module.Finite R ((K.total c).homology (1+q))] + (hf : ∀ p r, p+r=q+2 → 3≤p → Module.Finite R ((row K r).homology p)) : + Module.Finite R ((row K q).homology 1) := by + have : Module.Finite R (ConcreteHomology.H (K.total c) (1+q)) := + Module.Finite.equiv (ConcreteHomology.iso (K.total c) (1+q)).toLinearEquiv + have : Module.Finite R (ConcreteHomology.H (E2Leading.row K q) 1) := by + apply E2Leading.finite_first K q + intro p r hpr hp + have := hf p r hpr hp + exact Module.Finite.equiv (rowHomologyIso K p r).toLinearEquiv + exact Module.Finite.equiv (rowHomologyIso K 1 q).symm.toLinearEquiv +end TotalFiniteness + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ExactShapeHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ExactShapeHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0f599b36ede00da8ea4c643df59735439bd2100 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ExactShapeHomology.lean @@ -0,0 +1,161 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.PiSSet + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits +namespace ExactShapeHomology + +section + +variable {J : Type} [Category.{0} J] +abbrev A := ModuleCat.{0} ℤ +abbrev c := ComplexShape.down ℕ +variable [HasExactColimitsOfShape J A] +noncomputable def complex (F : J ⥤ ChainComplex A ℕ) : ChainComplex (J ⥤ A) ℕ where + X i := F ⋙ HomologicalComplex.eval A c i + d i j := { app t := (F.obj t).d i j + naturality _ _ f := (F.map f).comm i j } + shape i j h := by apply NatTrans.ext; funext t; exact (F.obj t).shape i j h + d_comp_d' i j k _ _ := by apply NatTrans.ext; funext t; exact (F.obj t).d_comp_d i j k +noncomputable def injection (j : J) : (evaluation J A).obj j ⟶ colim where + app F := colimit.ι F j + naturality _ _ f := (colimit.ι_map f j).symm +noncomputable def cocone (F : J ⥤ ChainComplex A ℕ) : Cocone F where + pt := (colim.mapHomologicalComplex c).obj (complex F) + ι := { + app j := { + f i := colimit.ι ((complex F).X i) j + comm' i k _ := colimit.ι_map ((complex F).d i k) j } + naturality _ _ f := by + apply HomologicalComplex.Hom.ext; funext n + exact colimit.w (F ⋙ HomologicalComplex.eval A c n) f } +noncomputable def isColimit (F : J ⥤ ChainComplex A ℕ) : IsColimit (cocone F) := + HomologicalComplex.isColimitOfEval F (cocone F) (fun _ => colimit.isColimit _) +noncomputable def evaluationHomology (F : J ⥤ ChainComplex A ℕ) (n : ℕ) (j:J) : + (F.obj j).homology n ≅ ((complex F).homology n).obj j := + ((complex F).sc n).mapHomologyIso ((evaluation J A).obj j) +noncomputable def colimitHomology (F : J ⥤ ChainComplex A ℕ) (n : ℕ) : + (cocone F).pt.homology n ≅ colimit ((complex F).homology n) := + ((complex F).sc n).mapHomologyIso colim +lemma homology_injection (F : J ⥤ ChainComplex A ℕ) (n : ℕ) (j:J) : + HomologicalComplex.homologyMap ((cocone F).ι.app j) n = + (evaluationHomology F n j).hom ≫ colimit.ι ((complex F).homology n) j ≫ + (colimitHomology F n).inv := + ShortComplex.homologyMap_mapNatTrans ((complex F).sc n) (injection j) +omit [HasExactColimitsOfShape J A] in +lemma evaluationHomology_naturality (F : J ⥤ ChainComplex A ℕ) (n : ℕ) {i j:J} (f:i⟶j) : + HomologicalComplex.homologyMap (F.map f) n ≫ (evaluationHomology F n j).hom = + (evaluationHomology F n i).hom ≫ ((complex F).homology n).map f := by + have h := ShortComplex.homologyMap_mapNatTrans ((complex F).sc n) ((evaluation J A).map f) + change HomologicalComplex.homologyMap (F.map f) n = + (evaluationHomology F n i).hom ≫ ((complex F).homology n).map f ≫ + (evaluationHomology F n j).inv at h + rw [h] + simp [Category.assoc] +noncomputable def homologyCocone (F : J ⥤ ChainComplex A ℕ) (n : ℕ) + (d : Cocone (F ⋙ HomologicalComplex.homologyFunctor A c n)) : + Cocone ((complex F).homology n) where + pt := d.pt + ι := { app j := (evaluationHomology F n j).inv ≫ d.ι.app j + naturality i _ f := by + have h := evaluationHomology_naturality F n f + rw [←Iso.inv_comp_eq] at h + rw [←h] + simp only [Category.assoc,Functor.const_obj_map] + erw [Iso.hom_inv_id_assoc,Category.comp_id] + exact congrArg (fun t => (evaluationHomology F n i).inv ≫ t) (d.w f) } +noncomputable def homologyIsColimit (F : J ⥤ ChainComplex A ℕ) (n : ℕ) : + IsColimit ((HomologicalComplex.homologyFunctor A c n).mapCocone (cocone F)) where + desc d := (colimitHomology F n).hom ≫ colimit.desc _ (homologyCocone F n d) + fac d j := by + change HomologicalComplex.homologyMap ((cocone F).ι.app j) n ≫ + ((colimitHomology F n).hom ≫ colimit.desc _ (homologyCocone F n d)) = d.ι.app j + rw [homology_injection] + simp only [Category.assoc] + erw [Iso.inv_hom_id_assoc,colimit.ι_desc] + exact Iso.hom_inv_id_assoc _ _ + uniq d m hm := by + change m = (colimitHomology F n).hom ≫ colimit.desc _ (homologyCocone F n d) + apply (Iso.inv_comp_eq (colimitHomology F n)).mp + apply colimit.hom_ext + intro j + erw [colimit.ι_desc] + change colimit.ι ((complex F).homology n) j ≫ ((colimitHomology F n).inv ≫ m) = + (evaluationHomology F n j).inv ≫ d.ι.app j + apply (Iso.eq_inv_comp (evaluationHomology F n j)).mpr + have h := hm j + change HomologicalComplex.homologyMap ((cocone F).ι.app j) n ≫ m = _ at h + rw [homology_injection] at h + erw [Category.assoc,Category.assoc] at h + exact h +noncomputable instance homology_preserves (n : ℕ) : + PreservesColimitsOfShape J (HomologicalComplex.homologyFunctor A c n) where + preservesColimit {F} := preservesColimit_of_preserves_colimit_cocone (isColimit F) (homologyIsColimit F n) +end +variable {J : Type} [Category.{0} J] [HasExactColimitsOfShape J A] +noncomputable instance sset_homology_preserves (Z:A) (n:ℕ) : + PreservesColimitsOfShape J (SSet.homologyFunctor Z n) := by + change PreservesColimitsOfShape J (((SSet.chainComplexFunctor A).obj Z) ⋙ + HomologicalComplex.homologyFunctor A c n) + infer_instance +end ExactShapeHomology + +end + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite +namespace ComponentCoproduct +open ComponentTranslation FreeChains + +variable (C:Type) [Groupoid.{0} C] +noncomputable def diagram : Discrete (Skeleton C) ⥤ SSet := + Discrete.functor (fun p=>nerve (Fiber p)) +noncomputable def cocone : Cocone (diagram C) := + Cofan.mk (nerve C) (fun p=>nerveMap (property p).ι) +noncomputable def lift {n:ℕ} (s:ComposableArrows C n) : + ComposableArrows (Fiber (toSkeleton s.left)) n := + (property (toSkeleton s.left)).lift s (fun i=> + (congr_toSkeleton_of_iso (asIso (s.map (homOfLE (Fin.zero_le i))))).symm) +lemma lift_forget {n:ℕ} (s:ComposableArrows C n) : + lift C s ⋙ (property (toSkeleton s.left)).ι=s := rfl +lemma inclusion_injective (p:Skeleton C) {n:ℕ} : + Function.Injective (fun s:ComposableArrows (Fiber p) n=>s ⋙ (property p).ι) := by + intro s t h + have object_eq : ∀ index, s.obj index = t.obj index := by + intro index + apply ObjectProperty.FullSubcategory.ext + exact CategoryTheory.Functor.congr_obj h index + refine CategoryTheory.Functor.ext object_eq ?_ + intro source target arrow + apply ObjectProperty.hom_ext + simpa using CategoryTheory.Functor.congr_hom h arrow +noncomputable def pointwiseIsColimit (n:ℕ) : + IsColimit (((evaluation _ (Type)).obj (op ⦋n⦌)).mapCocone (cocone C)) := by + let cf : Cofan (fun p:Skeleton C=>ComposableArrows (Fiber p) n) := + Cofan.mk (ComposableArrows C n) (fun p=>↾fun s=>s ⋙ (property p).ι) + let s := (((evaluation _ (Type)).obj (op ⦋n⦌)).mapCocone (cocone C)) + let e : diagram C ⋙ (evaluation _ (Type)).obj (op ⦋n⦌) ≅ Discrete.functor (fun p:Skeleton C=>ComposableArrows (Fiber p) n) := Discrete.natIso (fun _=>Iso.refl _) + let pointIso : s.pt ≅ cf.pt := Iso.refl _ + apply ColimitTransfer.ofIsos s cf e.hom pointIso.hom (fun _=>by simp [s,e,cf,cocone,pointIso]; rfl) + apply Classical.choice + rw [←cf.isColimit_cofanTypes_iff] + apply CofanTypes.isColimit_mk + · intro s + exact ⟨toSkeleton s.left,lift C s,rfl⟩ + · intro p; exact inclusion_injective C p + · intro p q s t h + have he := CategoryTheory.Functor.congr_obj h (0:Fin (n+1)) + exact s.left.property.symm.trans ((congrArg toSkeleton he).trans t.left.property) +noncomputable def isColimit : IsColimit (cocone C) := + evaluationJointlyReflectsColimits _ (fun n=>pointwiseIsColimit C n.unop.len) +noncomputable def homologyIsColimit (q:ℕ) : + IsColimit ((SSet.homologyFunctor Z q).mapCocone (cocone C)) := + isColimitOfPreserves _ (isColimit C) +noncomputable def homologyIso (q:ℕ) : + (nerve C).homology Z q ≅ ∐ (fun p:Skeleton C=>(nerve (Fiber p)).homology Z q) := + (homologyIsColimit C q).coconePointUniqueUpToIso (colimit.isColimit _) ≪≫ + HasColimit.isoOfNatIso (Discrete.natIsoFunctor) +end ComponentCoproduct + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/Face200.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Face200.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae32c9565a496fcc40138a618bdde4a4ee002280 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Face200.lean @@ -0,0 +1,462 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.Id + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace MarkedH1 +open FreeChains ComponentTranslation IntervalBar.Diagram NerveHomology + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +omit [SymmetricCategory C] in +@[reassoc] lemma face_2_0_0 (a b:Skeleton C) : + primitive ![a,b] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 3)).toOrderHom) 1 = + 0 := by + apply face_recognition_const ![a,b] 0 0 (fun j=>repr (![b] j)) + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b] 0 ⋙ (Pi.eval _ (1:Fin 2)) ≅ (Functor.const (Fiber a)).obj (repr b) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) +@[reassoc] lemma face_2_0_1 (a b:Skeleton C) : + primitive ![a,b] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 3)).toOrderHom) 1 = + NerveHomology.map (translate b a (a*b) (mul_comm _ _)) 1 ≫ primitive ![(a*b)] 0 := by + have hh := face_recognition ![a,b] 0 1 ![(a*b)] 0 (translate b a (a*b) (mul_comm _ _)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b] 0 ⋙ (pairAt (0:Fin 2) (1:Fin 2)) ≅ + (translate b a (a*b) (mul_comm _ _)) ⋙ (wordInclude ![(a*b)] 0 ⋙ Pi.eval _ (0:Fin 1)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_left ![a,b] 0 1 (by decide) ≪≫ + Functor.isoWhiskerLeft (property a).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr b)).symm + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_2_0_2 (a b:Skeleton C) : + primitive ![a,b] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 3)).toOrderHom) 1 = + primitive ![a] 0 := by + have hh := face_recognition ![a,b] 0 2 ![a] 0 (𝟭 (Fiber a)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b] 0 ⋙ (Pi.eval _ (0:Fin 2)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a] 0 ⋙ Pi.eval _ (0:Fin 1)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + ) + erw [NerveHomology.id (D:=Fiber a)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_2_1_0 (a b:Skeleton C) : + primitive ![a,b] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 3)).toOrderHom) 1 = + primitive ![b] 0 := by + have hh := face_recognition ![a,b] 1 0 ![b] 0 (𝟭 (Fiber b)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b] 1 ⋙ (Pi.eval _ (1:Fin 2)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![b] 0 ⋙ Pi.eval _ (0:Fin 1)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + ) + erw [NerveHomology.id (D:=Fiber b)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_2_1_1 (a b:Skeleton C) : + primitive ![a,b] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 3)).toOrderHom) 1 = + NerveHomology.map (translate a b (a*b) rfl) 1 ≫ primitive ![(a*b)] 0 := by + have hh := face_recognition ![a,b] 1 1 ![(a*b)] 0 (translate a b (a*b) rfl) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b] 1 ⋙ (pairAt (0:Fin 2) (1:Fin 2)) ≅ + (translate a b (a*b) rfl) ⋙ (wordInclude ![(a*b)] 0 ⋙ Pi.eval _ (0:Fin 1)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_right ![a,b] 0 1 (by decide) + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_2_1_2 (a b:Skeleton C) : + primitive ![a,b] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 3)).toOrderHom) 1 = + 0 := by + apply face_recognition_const ![a,b] 1 2 (fun j=>repr (![a] j)) + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b] 1 ⋙ (Pi.eval _ (0:Fin 2)) ≅ (Functor.const (Fiber b)).obj (repr a) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_0_0 (a b d:Skeleton C) : + primitive ![a,b,d] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 4)).toOrderHom) 1 = + 0 := by + apply face_recognition_const ![a,b,d] 0 0 (fun j=>repr (![b,d] j)) + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (Pi.eval _ (1:Fin 3)) ≅ (Functor.const (Fiber a)).obj (repr b) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (Pi.eval _ (2:Fin 3)) ≅ (Functor.const (Fiber a)).obj (repr d) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) +@[reassoc] lemma face_3_0_1 (a b d:Skeleton C) : + primitive ![a,b,d] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 4)).toOrderHom) 1 = + NerveHomology.map (translate b a (a*b) (mul_comm _ _)) 1 ≫ primitive ![(a*b),d] 0 := by + have hh := face_recognition ![a,b,d] 0 1 ![(a*b),d] 0 (translate b a (a*b) (mul_comm _ _)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (pairAt (0:Fin 3) (1:Fin 3)) ≅ + (translate b a (a*b) (mul_comm _ _)) ⋙ (wordInclude ![(a*b),d] 0 ⋙ Pi.eval _ (0:Fin 2)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_left ![a,b,d] 0 1 (by decide) ≪≫ + Functor.isoWhiskerLeft (property a).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr b)).symm + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (Pi.eval _ (2:Fin 3)) ≅ + (translate b a (a*b) (mul_comm _ _)) ⋙ (wordInclude ![(a*b),d] 0 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_0_2 (a b d:Skeleton C) : + primitive ![a,b,d] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 4)).toOrderHom) 1 = + primitive ![a,(b*d)] 0 := by + have hh := face_recognition ![a,b,d] 0 2 ![a,(b*d)] 0 (𝟭 (Fiber a)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (Pi.eval _ (0:Fin 3)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,(b*d)] 0 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (pairAt (1:Fin 3) (2:Fin 3)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,(b*d)] 0 ⋙ Pi.eval _ (1:Fin 2)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d] 1 2 0 (by decide) (by decide) ≪≫ + (Functor.const (Fiber a)).mapIso (reprMul b d) + ) + erw [NerveHomology.id (D:=Fiber a)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_0_3 (a b d:Skeleton C) : + primitive ![a,b,d] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 4)).toOrderHom) 1 = + primitive ![a,b] 0 := by + have hh := face_recognition ![a,b,d] 0 3 ![a,b] 0 (𝟭 (Fiber a)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (Pi.eval _ (0:Fin 3)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b] 0 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 0 ⋙ (Pi.eval _ (1:Fin 3)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b] 0 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + erw [NerveHomology.id (D:=Fiber a)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_1_0 (a b d:Skeleton C) : + primitive ![a,b,d] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 4)).toOrderHom) 1 = + primitive ![b,d] 0 := by + have hh := face_recognition ![a,b,d] 1 0 ![b,d] 0 (𝟭 (Fiber b)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (Pi.eval _ (1:Fin 3)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![b,d] 0 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (Pi.eval _ (2:Fin 3)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![b,d] 0 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + erw [NerveHomology.id (D:=Fiber b)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_1_1 (a b d:Skeleton C) : + primitive ![a,b,d] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 4)).toOrderHom) 1 = + NerveHomology.map (translate a b (a*b) rfl) 1 ≫ primitive ![(a*b),d] 0 := by + have hh := face_recognition ![a,b,d] 1 1 ![(a*b),d] 0 (translate a b (a*b) rfl) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (pairAt (0:Fin 3) (1:Fin 3)) ≅ + (translate a b (a*b) rfl) ⋙ (wordInclude ![(a*b),d] 0 ⋙ Pi.eval _ (0:Fin 2)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_right ![a,b,d] 0 1 (by decide) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (Pi.eval _ (2:Fin 3)) ≅ + (translate a b (a*b) rfl) ⋙ (wordInclude ![(a*b),d] 0 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + exact hh +@[reassoc] lemma face_3_1_2 (a b d:Skeleton C) : + primitive ![a,b,d] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 4)).toOrderHom) 1 = + NerveHomology.map (translate d b (b*d) (mul_comm _ _)) 1 ≫ primitive ![a,(b*d)] 1 := by + have hh := face_recognition ![a,b,d] 1 2 ![a,(b*d)] 1 (translate d b (b*d) (mul_comm _ _)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (Pi.eval _ (0:Fin 3)) ≅ + (translate d b (b*d) (mul_comm _ _)) ⋙ (wordInclude ![a,(b*d)] 1 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (pairAt (1:Fin 3) (2:Fin 3)) ≅ + (translate d b (b*d) (mul_comm _ _)) ⋙ (wordInclude ![a,(b*d)] 1 ⋙ Pi.eval _ (1:Fin 2)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_left ![a,b,d] 1 2 (by decide) ≪≫ + Functor.isoWhiskerLeft (property b).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr d)).symm + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_1_3 (a b d:Skeleton C) : + primitive ![a,b,d] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 4)).toOrderHom) 1 = + primitive ![a,b] 1 := by + have hh := face_recognition ![a,b,d] 1 3 ![a,b] 1 (𝟭 (Fiber b)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (Pi.eval _ (0:Fin 3)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b] 1 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 1 ⋙ (Pi.eval _ (1:Fin 3)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b] 1 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + ) + erw [NerveHomology.id (D:=Fiber b)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_2_0 (a b d:Skeleton C) : + primitive ![a,b,d] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 4)).toOrderHom) 1 = + primitive ![b,d] 1 := by + have hh := face_recognition ![a,b,d] 2 0 ![b,d] 1 (𝟭 (Fiber d)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (Pi.eval _ (1:Fin 3)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![b,d] 1 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (Pi.eval _ (2:Fin 3)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![b,d] 1 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + ) + erw [NerveHomology.id (D:=Fiber d)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_2_1 (a b d:Skeleton C) : + primitive ![a,b,d] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 4)).toOrderHom) 1 = + primitive ![(a*b),d] 1 := by + have hh := face_recognition ![a,b,d] 2 1 ![(a*b),d] 1 (𝟭 (Fiber d)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (pairAt (0:Fin 3) (1:Fin 3)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![(a*b),d] 1 ⋙ Pi.eval _ (0:Fin 2)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d] 0 1 2 (by decide) (by decide) ≪≫ + (Functor.const (Fiber d)).mapIso (reprMul a b) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (Pi.eval _ (2:Fin 3)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![(a*b),d] 1 ⋙ Pi.eval _ (1:Fin 2)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + ) + erw [NerveHomology.id (D:=Fiber d)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_2_2 (a b d:Skeleton C) : + primitive ![a,b,d] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 4)).toOrderHom) 1 = + NerveHomology.map (translate b d (b*d) rfl) 1 ≫ primitive ![a,(b*d)] 1 := by + have hh := face_recognition ![a,b,d] 2 2 ![a,(b*d)] 1 (translate b d (b*d) rfl) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (Pi.eval _ (0:Fin 3)) ≅ + (translate b d (b*d) rfl) ⋙ (wordInclude ![a,(b*d)] 1 ⋙ Pi.eval _ (0:Fin 2)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (pairAt (1:Fin 3) (2:Fin 3)) ≅ + (translate b d (b*d) rfl) ⋙ (wordInclude ![a,(b*d)] 1 ⋙ Pi.eval _ (1:Fin 2)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_right ![a,b,d] 1 2 (by decide) + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_3_2_3 (a b d:Skeleton C) : + primitive ![a,b,d] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 4)).toOrderHom) 1 = + 0 := by + apply face_recognition_const ![a,b,d] 2 3 (fun j=>repr (![a,b] j)) + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (Pi.eval _ (0:Fin 3)) ≅ (Functor.const (Fiber d)).obj (repr a) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d] 2 ⋙ (Pi.eval _ (1:Fin 3)) ≅ (Functor.const (Fiber d)).obj (repr b) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_0_0 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 5)).toOrderHom) 1 = + 0 := by + apply face_recognition_const ![a,b,d,e] 0 0 (fun j=>repr (![b,d,e] j)) + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (1:Fin 4)) ≅ (Functor.const (Fiber a)).obj (repr b) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (2:Fin 4)) ≅ (Functor.const (Fiber a)).obj (repr d) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (3:Fin 4)) ≅ (Functor.const (Fiber a)).obj (repr e) + exact eqToIso (by rw [wordInclude_proj,ite_eq_right (by decide)]; rfl) +@[reassoc] lemma face_4_0_1 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 5)).toOrderHom) 1 = + NerveHomology.map (translate b a (a*b) (mul_comm _ _)) 1 ≫ primitive ![(a*b),d,e] 0 := by + have hh := face_recognition ![a,b,d,e] 0 1 ![(a*b),d,e] 0 (translate b a (a*b) (mul_comm _ _)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (pairAt (0:Fin 4) (1:Fin 4)) ≅ + (translate b a (a*b) (mul_comm _ _)) ⋙ (wordInclude ![(a*b),d,e] 0 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_left ![a,b,d,e] 0 1 (by decide) ≪≫ + Functor.isoWhiskerLeft (property a).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr b)).symm + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (translate b a (a*b) (mul_comm _ _)) ⋙ (wordInclude ![(a*b),d,e] 0 ⋙ Pi.eval _ (1:Fin 3)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (translate b a (a*b) (mul_comm _ _)) ⋙ (wordInclude ![(a*b),d,e] 0 ⋙ Pi.eval _ (2:Fin 3)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_0_2 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 5)).toOrderHom) 1 = + primitive ![a,(b*d),e] 0 := by + have hh := face_recognition ![a,b,d,e] 0 2 ![a,(b*d),e] 0 (𝟭 (Fiber a)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,(b*d),e] 0 ⋙ Pi.eval _ (0:Fin 3)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (pairAt (1:Fin 4) (2:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,(b*d),e] 0 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d,e] 1 2 0 (by decide) (by decide) ≪≫ + (Functor.const (Fiber a)).mapIso (reprMul b d) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,(b*d),e] 0 ⋙ Pi.eval _ (2:Fin 3)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + erw [NerveHomology.id (D:=Fiber a)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_0_3 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 5)).toOrderHom) 1 = + primitive ![a,b,(d*e)] 0 := by + have hh := face_recognition ![a,b,d,e] 0 3 ![a,b,(d*e)] 0 (𝟭 (Fiber a)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b,(d*e)] 0 ⋙ Pi.eval _ (0:Fin 3)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b,(d*e)] 0 ⋙ Pi.eval _ (1:Fin 3)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (pairAt (2:Fin 4) (3:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b,(d*e)] 0 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d,e] 2 3 0 (by decide) (by decide) ≪≫ + (Functor.const (Fiber a)).mapIso (reprMul d e) + ) + erw [NerveHomology.id (D:=Fiber a)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_0_4 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 0 ≫ NerveHomology.map (reindex (SimplexCategory.δ (4:Fin 5)).toOrderHom) 1 = + primitive ![a,b,d] 0 := by + have hh := face_recognition ![a,b,d,e] 0 4 ![a,b,d] 0 (𝟭 (Fiber a)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b,d] 0 ⋙ Pi.eval _ (0:Fin 3)) + rw [wordInclude_proj,ite_eq_left rfl] + exact eqToIso (by erw [wordInclude_proj,ite_eq_left rfl]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b,d] 0 ⋙ Pi.eval _ (1:Fin 3)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 0 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber a)) ⋙ (wordInclude ![a,b,d] 0 ⋙ Pi.eval _ (2:Fin 3)) + rw [wordInclude_proj,ite_eq_right (by decide)] + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + ) + erw [NerveHomology.id (D:=Fiber a)] at hh + exact hh.trans (Category.id_comp _) + +end MarkedH1 +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/Face410.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Face410.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d71f3026d27c26ffa7d16cc129402614913bd64 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/Face410.lean @@ -0,0 +1,361 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.Id + +namespace OAI + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace MarkedH1 +open FreeChains ComponentTranslation IntervalBar.Diagram NerveHomology +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_1_0 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 5)).toOrderHom) 1 = + primitive ![b,d,e] 0 := by + have hh := face_recognition ![a,b,d,e] 1 0 ![b,d,e] 0 (𝟭 (Fiber b)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![b,d,e] 0 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![b,d,e] 0 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![b,d,e] 0 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + erw [NerveHomology.id (D:=Fiber b)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_1_1 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 5)).toOrderHom) 1 = + NerveHomology.map (translate a b (a*b) rfl) 1 ≫ primitive ![(a*b),d,e] 0 := by + have hh := face_recognition ![a,b,d,e] 1 1 ![(a*b),d,e] 0 (translate a b (a*b) rfl) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (pairAt (0:Fin 4) (1:Fin 4)) ≅ + (translate a b (a*b) rfl) ⋙ (wordInclude ![(a*b),d,e] 0 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_right ![a,b,d,e] 0 1 (by decide) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (translate a b (a*b) rfl) ⋙ (wordInclude ![(a*b),d,e] 0 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (translate a b (a*b) rfl) ⋙ (wordInclude ![(a*b),d,e] 0 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + exact hh +@[reassoc] lemma face_4_1_2 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 5)).toOrderHom) 1 = + NerveHomology.map (translate d b (b*d) (mul_comm _ _)) 1 ≫ primitive ![a,(b*d),e] 1 := by + have hh := face_recognition ![a,b,d,e] 1 2 ![a,(b*d),e] 1 (translate d b (b*d) (mul_comm _ _)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (translate d b (b*d) (mul_comm _ _)) ⋙ (wordInclude ![a,(b*d),e] 1 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (pairAt (1:Fin 4) (2:Fin 4)) ≅ + (translate d b (b*d) (mul_comm _ _)) ⋙ (wordInclude ![a,(b*d),e] 1 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_left ![a,b,d,e] 1 2 (by decide) ≪≫ + Functor.isoWhiskerLeft (property b).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr d)).symm + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (translate d b (b*d) (mul_comm _ _)) ⋙ (wordInclude ![a,(b*d),e] 1 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_1_3 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 5)).toOrderHom) 1 = + primitive ![a,b,(d*e)] 1 := by + have hh := face_recognition ![a,b,d,e] 1 3 ![a,b,(d*e)] 1 (𝟭 (Fiber b)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b,(d*e)] 1 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b,(d*e)] 1 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (pairAt (2:Fin 4) (3:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b,(d*e)] 1 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d,e] 2 3 1 (by decide) (by decide) ≪≫ + (Functor.const (Fiber b)).mapIso (reprMul d e) + ) + erw [NerveHomology.id (D:=Fiber b)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_1_4 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 1 ≫ NerveHomology.map (reindex (SimplexCategory.δ (4:Fin 5)).toOrderHom) 1 = + primitive ![a,b,d] 1 := by + have hh := face_recognition ![a,b,d,e] 1 4 ![a,b,d] 1 (𝟭 (Fiber b)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b,d] 1 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b,d] 1 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 1 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber b)) ⋙ (wordInclude ![a,b,d] 1 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + erw [NerveHomology.id (D:=Fiber b)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_2_0 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 5)).toOrderHom) 1 = + primitive ![b,d,e] 1 := by + have hh := face_recognition ![a,b,d,e] 2 0 ![b,d,e] 1 (𝟭 (Fiber d)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![b,d,e] 1 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![b,d,e] 1 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![b,d,e] 1 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + erw [NerveHomology.id (D:=Fiber d)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_2_1 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 5)).toOrderHom) 1 = + primitive ![(a*b),d,e] 1 := by + have hh := face_recognition ![a,b,d,e] 2 1 ![(a*b),d,e] 1 (𝟭 (Fiber d)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (pairAt (0:Fin 4) (1:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![(a*b),d,e] 1 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d,e] 0 1 2 (by decide) (by decide) ≪≫ + (Functor.const (Fiber d)).mapIso (reprMul a b) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![(a*b),d,e] 1 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![(a*b),d,e] 1 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + erw [NerveHomology.id (D:=Fiber d)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_2_2 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 5)).toOrderHom) 1 = + NerveHomology.map (translate b d (b*d) rfl) 1 ≫ primitive ![a,(b*d),e] 1 := by + have hh := face_recognition ![a,b,d,e] 2 2 ![a,(b*d),e] 1 (translate b d (b*d) rfl) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (translate b d (b*d) rfl) ⋙ (wordInclude ![a,(b*d),e] 1 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (pairAt (1:Fin 4) (2:Fin 4)) ≅ + (translate b d (b*d) rfl) ⋙ (wordInclude ![a,(b*d),e] 1 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_right ![a,b,d,e] 1 2 (by decide) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (translate b d (b*d) rfl) ⋙ (wordInclude ![a,(b*d),e] 1 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + ) + exact hh +@[reassoc] lemma face_4_2_3 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 5)).toOrderHom) 1 = + NerveHomology.map (translate e d (d*e) (mul_comm _ _)) 1 ≫ primitive ![a,b,(d*e)] 2 := by + have hh := face_recognition ![a,b,d,e] 2 3 ![a,b,(d*e)] 2 (translate e d (d*e) (mul_comm _ _)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (translate e d (d*e) (mul_comm _ _)) ⋙ (wordInclude ![a,b,(d*e)] 2 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (translate e d (d*e) (mul_comm _ _)) ⋙ (wordInclude ![a,b,(d*e)] 2 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (pairAt (2:Fin 4) (3:Fin 4)) ≅ + (translate e d (d*e) (mul_comm _ _)) ⋙ (wordInclude ![a,b,(d*e)] 2 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_left ![a,b,d,e] 2 3 (by decide) ≪≫ + Functor.isoWhiskerLeft (property d).ι + (BraidedCategory.tensorLeftIsoTensorRight (repr e)).symm + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_2_4 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 2 ≫ NerveHomology.map (reindex (SimplexCategory.δ (4:Fin 5)).toOrderHom) 1 = + primitive ![a,b,d] 2 := by + have hh := face_recognition ![a,b,d,e] 2 4 ![a,b,d] 2 (𝟭 (Fiber d)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![a,b,d] 2 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![a,b,d] 2 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 2 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber d)) ⋙ (wordInclude ![a,b,d] 2 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + ) + erw [NerveHomology.id (D:=Fiber d)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_3_0 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 3 ≫ NerveHomology.map (reindex (SimplexCategory.δ (0:Fin 5)).toOrderHom) 1 = + primitive ![b,d,e] 2 := by + have hh := face_recognition ![a,b,d,e] 3 0 ![b,d,e] 2 (𝟭 (Fiber e)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![b,d,e] 2 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![b,d,e] 2 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![b,d,e] 2 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + ) + erw [NerveHomology.id (D:=Fiber e)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_3_1 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 3 ≫ NerveHomology.map (reindex (SimplexCategory.δ (1:Fin 5)).toOrderHom) 1 = + primitive ![(a*b),d,e] 2 := by + have hh := face_recognition ![a,b,d,e] 3 1 ![(a*b),d,e] 2 (𝟭 (Fiber e)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (pairAt (0:Fin 4) (1:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![(a*b),d,e] 2 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d,e] 0 1 3 (by decide) (by decide) ≪≫ + (Functor.const (Fiber e)).mapIso (reprMul a b) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (2:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![(a*b),d,e] 2 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![(a*b),d,e] 2 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + ) + erw [NerveHomology.id (D:=Fiber e)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_3_2 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 3 ≫ NerveHomology.map (reindex (SimplexCategory.δ (2:Fin 5)).toOrderHom) 1 = + primitive ![a,(b*d),e] 2 := by + have hh := face_recognition ![a,b,d,e] 3 2 ![a,(b*d),e] 2 (𝟭 (Fiber e)) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![a,(b*d),e] 2 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (pairAt (1:Fin 4) (2:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![a,(b*d),e] 2 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + exact wordPair_other ![a,b,d,e] 1 2 3 (by decide) (by decide) ≪≫ + (Functor.const (Fiber e)).mapIso (reprMul b d) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (3:Fin 4)) ≅ + (𝟭 (Fiber e)) ⋙ (wordInclude ![a,(b*d),e] 2 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + ) + erw [NerveHomology.id (D:=Fiber e)] at hh + exact hh.trans (Category.id_comp _) +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_3_3 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 3 ≫ NerveHomology.map (reindex (SimplexCategory.δ (3:Fin 5)).toOrderHom) 1 = + NerveHomology.map (translate d e (d*e) rfl) 1 ≫ primitive ![a,b,(d*e)] 2 := by + have hh := face_recognition ![a,b,d,e] 3 3 ![a,b,(d*e)] 2 (translate d e (d*e) rfl) (by + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (0:Fin 4)) ≅ + (translate d e (d*e) rfl) ⋙ (wordInclude ![a,b,(d*e)] 2 ⋙ Pi.eval _ (0:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (1:Fin 4)) ≅ + (translate d e (d*e) rfl) ⋙ (wordInclude ![a,b,(d*e)] 2 ⋙ Pi.eval _ (1:Fin 3)) + erw [wordInclude_proj,ite_eq_right (by decide)] + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (pairAt (2:Fin 4) (3:Fin 4)) ≅ + (translate d e (d*e) rfl) ⋙ (wordInclude ![a,b,(d*e)] 2 ⋙ Pi.eval _ (2:Fin 3)) + erw [wordInclude_proj,ite_eq_left rfl] + exact wordPair_right ![a,b,d,e] 2 3 (by decide) + ) + exact hh +omit [SymmetricCategory C] in +@[reassoc] lemma face_4_3_4 (a b d e:Skeleton C) : + primitive ![a,b,d,e] 3 ≫ NerveHomology.map (reindex (SimplexCategory.δ (4:Fin 5)).toOrderHom) 1 = + 0 := by + apply face_recognition_const ![a,b,d,e] 3 4 (fun j=>repr (![a,b,d] j)) + intro j + apply Classical.choice + fin_cases j + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (0:Fin 4)) ≅ (Functor.const (Fiber e)).obj (repr a) + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (1:Fin 4)) ≅ (Functor.const (Fiber e)).obj (repr b) + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) + · refine ⟨?_⟩ + change wordInclude ![a,b,d,e] 3 ⋙ (Pi.eval _ (2:Fin 4)) ≅ (Functor.const (Fiber e)).obj (repr d) + exact eqToIso (by erw [wordInclude_proj,ite_eq_right (by decide)]; rfl) +end MarkedH1 + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiberSumHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiberSumHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc514291019127ab0d8e75b356b36b8b995f245d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiberSumHomology.lean @@ -0,0 +1,69 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.StageHomologyCoordinates +import OAI.GroupTheory.SimpleAmenable.Configurations.FiberAddition + +namespace OAI + +section + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory +namespace SimpleAmenable.PolygonObject.FiniteSetGroupoid +open BarFiberProduct IntervalBar.Diagram BarFinitePower FreeChains +open LabelledStage.Stage + +attribute [local instance 1200] Pi.module Prod.instModule +noncomputable def fiberCoordinates (j:ℕ) : + (bar₃ (C:=Bool→FiniteSetGroupoid)).homology Z j ⟶ ModuleCat.of ℤ (Bool→K j) := + SSet.homologyMap (triplePowerComparison Bool) Z j ≫ coordinates Bool E j +lemma fiberCoordinates_isIso (j:ℕ) (hj:0 rfl +lemma merge_insert_homology (b:Bool) (j:ℕ) (x:K j) : + SSet.homologyMap (bar₃Map merge) Z j + (SSet.homologyMap (bar₃Map (insertFiber b)) Z j x) = x := by + change (SSet.homologyMap (bar₃Map (insertFiber b)) Z j ≫ + SSet.homologyMap (bar₃Map merge) Z j) x = _ + rw [←SSet.homologyMap_comp,←bar₃Map_comp, + bar₃Map_eq_of_monoidalNatTrans (mergeInsertIso b).hom j,bar₃Map_id_homology] + rfl + +lemma merge_homology_addition (j:ℕ) (hj:0 simp [fiberCoordinates_insert _ _ j hj] + rw [hx,map_add,merge_insert_homology,merge_insert_homology] + simp only [map_add,Pi.add_apply,fiberCoordinates_insert _ _ j hj] + simp +end SimpleAmenable.PolygonObject.FiniteSetGroupoid + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FilteredEdgeReturn.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FilteredEdgeReturn.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d0489be27b9039738a89150b3d0c3c9e2dae434 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FilteredEdgeReturn.lean @@ -0,0 +1,158 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.RegularTotalDifferential + +namespace OAI + +section +namespace FilteredEdge.Data +open FilteredFiniteness + +universe u +variable {R : Type u} [CommRing R] [IsNoetherianRing R] +variable {D A B C : Type u} [AddCommGroup D] [Module R D] + [AddCommGroup A] [Module R A] [AddCommGroup B] [Module R B] + [AddCommGroup C] [Module R C] +variable (K : FilteredEdge.Data (R:=R) (D:=D) (A:=A) (B:=B) (C:=C)) +variable (p : ℤ) (hp : K.FC (p-2)=⊥) +def edgeCycles : K.current.Z₂ p →ₗ[R] LinearMap.ker K.current.e := + (K.current.Z₂ p).subtype.codRestrict _ (fun x => by + have hx := x.property.2 + change K.e x.val∈K.FC (p-2) at hx + rw [hp] at hx + exact hx) +def edgeLift : K.current.Z₂ p →ₗ[R] K.current.H ⧸ K.current.filtration (p-1) := + (K.current.filtration (p-1)).mkQ.comp (K.current.π.comp (K.edgeCycles p hp)) +omit [IsNoetherianRing R] in +lemma boundary_in_edge_kernel : + (K.current.B₂ p).comap (K.current.Z₂ p).subtype ≤ LinearMap.ker (K.edgeLift p hp) := by + intro x hx + obtain ⟨y,hy,z,hz,hyz⟩ := Submodule.mem_sup.mp hx + obtain ⟨a,ha,haz⟩ := hz.1 + change y+z=x.val at hyz + change K.d a=z at haz + have hez : K.e z=0 := by + rw [←haz]; exact congrArg (fun f : A →ₗ[R] C => f a) K.ed + have hex : K.e x.val=0 := (K.edgeCycles p hp x).property + have hey : K.e y=0 := by + rw [←hyz,map_add,hez,add_zero] at hex + exact hex + change K.edgeLift p hp x=0 + apply (Submodule.Quotient.mk_eq_zero _).mpr + refine ⟨⟨⟨y,hey⟩,hy.1⟩,?_⟩ + change K.current.π ⟨y,hey⟩=K.current.π (K.edgeCycles p hp x) + apply (Submodule.Quotient.eq _).mpr + refine ⟨-a,?_⟩ + apply Subtype.ext + change K.d (-a)=y-x.val + rw [map_neg,haz,←hyz] + abel +def edgeMap : K.current.E₂ p →ₗ[R] K.current.H ⧸ K.current.filtration (p-1) := + ((K.current.B₂ p).comap (K.current.Z₂ p).subtype).liftQ + (K.edgeLift p hp) (K.boundary_in_edge_kernel p hp) +omit [IsNoetherianRing R] in +lemma edge_kernel_le_tower (N : ℤ) (hN : K.FA N=⊤) : + LinearMap.ker (K.edgeMap p hp) ≤ K.tower p N := by + intro z hz + obtain ⟨x,rfl⟩ := Submodule.mkQ_surjective + ((K.current.B₂ p).comap (K.current.Z₂ p).subtype) z + have hx : K.edgeLift p hp x=0 := hz + have hx' : K.current.π (K.edgeCycles p hp x)∈K.current.filtration (p-1) := + (Submodule.Quotient.mk_eq_zero _).mp hx + obtain ⟨y,hy⟩ := hx' + have hxy : K.current.π (K.edgeCycles p hp x-y.val)=0 := by + rw [map_sub,show K.current.π y.val=K.current.π (K.edgeCycles p hp x) from hy,sub_self] + obtain ⟨a,ha⟩ := (Submodule.Quotient.mk_eq_zero _).mp hxy + have hav : K.d a=x.val-y.val.val := congrArg Subtype.val ha + have had : K.d a∈K.FB p := by + rw [hav] + exact (K.FB p).sub_mem x.property.1 (K.monoB (by omega) y.property) + refine ⟨⟨a,by rw [hN]; trivial,had⟩,?_⟩ + apply (Submodule.Quotient.eq _).mpr + change K.d a-x.val∈K.current.B₂ p + rw [hav,sub_sub_cancel_left] + apply Submodule.mem_sup_left + refine ⟨(K.FB (p-1)).neg_mem y.property,?_⟩ + change K.e (-y.val.val)∈K.FC (p-2) + have hey : K.e y.val.val=0 := y.val.property + rw [map_neg,hey,neg_zero] + exact Submodule.zero_mem _ +include hp in +lemma finite_edge (N : ℤ) (hN : K.FA N=⊤) + [Module.Finite R K.current.H] [Module.Finite R (K.tower p N)] : + Module.Finite R (K.current.E₂ p) := by + let f := K.edgeMap p hp + have : Module.Finite R (LinearMap.ker f) := + Module.Finite.of_injective (Submodule.inclusion (K.edge_kernel_le_tower p hp N hN)) + (Submodule.inclusion_injective _) + have : Module.Finite R (LinearMap.range f) := + Module.Finite.of_injective (LinearMap.range f).subtype Subtype.val_injective + have : Module.Finite R (K.current.E₂ p ⧸ LinearMap.ker f) := + Module.Finite.equiv f.quotKerEquivRange.symm + exact Module.Finite.of_submodule_quotient (LinearMap.ker f) +lemma finite_tower (r : ℕ) + (hfinite : ∀i:ℕ, i rw [Nat.cast_zero,add_zero,K.tower_start]; infer_instance + | succ r ih => + have := ih (fun i hi => hfinite i (by omega)) + have := hfinite r (by omega) + have he : p+(r+1:ℕ)+1=p+r+2 := by push_cast; omega + rw [he] + have : Module.Finite R (K.tower p (p+r+2-1)) := by + rw [show p+(r:ℤ)+2-1=p+r+1 by ring] + exact ih (fun i hi => hfinite i (by omega)) + exact K.finite_tower_step p (p+r+2) (by omega) +end FilteredEdge.Data + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace E2Leading +open TotalProjection + +universe u +variable {R : Type u} [CommRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) +lemma lift_first_cycle (q : ℕ) (y : ConcreteHomology.Cycles (K.X 1) q) + (z : (K.X 0).X (q+1)) (hz : (K.X 0).d (q+1) q z=(K.d 1 0).f q y.val) : + ∃ x : (filteredData K (1+q)).Z₂ 2, projection K 1 q (1+q) x.val=y.val := by + have hw : (K.total c).d (0+q+1) (0+q) (lift K 0 q y.val (-z))=0 := by + apply (Submodule.mem_bot R).mp + rw [←filtration_zero K (0+q)] + apply lower_filtration K 0 q (d_lift_mem K 0 q y (-z)) + rw [d_lift_top,map_neg,hz,add_neg_cancel] + have aux : ∃ x : (filteredData K (0+q+1)).Z₂ 2, + projection K 1 q (0+q+1) x.val=y.val := by + refine ⟨⟨lift K 0 q y.val (-z),lift_mem K 0 q y.val (-z),?_⟩,lift_left K 0 q y.val (-z)⟩ + change (K.total c).d (0+q+1) (0+q+1-1) (lift K 0 q y.val (-z))∈filtration K (0+q+1-1) (2-2) + rw [Nat.add_sub_cancel,hw] + exact Submodule.zero_mem _ + rw [show 1+q=0+q+1 by omega] + exact aux +lemma first_lead_surjective (q : ℕ) : Function.Surjective (lead K 1 q) := by + intro v + obtain ⟨w,rfl⟩ := ConcreteHomology.π_surjective (row K q) 1 v + obtain ⟨y,hy⟩ := ConcreteHomology.π_surjective (K.X 1) q w.val + have hdy : ConcreteHomology.π (K.X 0) q + (ConcreteHomology.cyclesMap (K.d 1 0) q y)=0 := by + rw [←ConcreteHomology.map_π,hy] + exact w.property + obtain ⟨z,hz⟩ := (ConcreteHomology.π_eq_zero _ _ _).mp hdy + have hzv : (K.X 0).d (q+1) q z=(K.d 1 0).f q y.val := by + have h := congrArg Subtype.val hz + change (K.X 0).d (q+1) q z=(K.d 1 0).f q y.val at h + exact h + obtain ⟨x,hx⟩ := lift_first_cycle K q y z hzv + refine ⟨x,?_⟩ + change ConcreteHomology.π (row K q) 1 (topRowCycle K 1 q x)=_ + congr 1 + apply Subtype.ext + change ConcreteHomology.π (K.X 1) q (topCycle K 1 q x)=w.val + rw [show topCycle K 1 q x=y by apply Subtype.ext; exact hx,hy] +end E2Leading + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FilteredHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FilteredHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..fea5c5b8decf131ba7bf1ae2439768450e7c2bc3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FilteredHomology.lean @@ -0,0 +1,210 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.StageNerveColimit + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory CategoryTheory.Limits +namespace FilteredHomology + +variable {J : Type} [Category.{0} J] [IsFiltered J] +abbrev A := ModuleCat.{0} ℤ +abbrev c := ComplexShape.down ℕ +noncomputable def complex (F : J ⥤ ChainComplex A ℕ) : ChainComplex (J ⥤ A) ℕ where + X i := F ⋙ HomologicalComplex.eval A c i + d i j := { app t := (F.obj t).d i j + naturality _ _ f := (F.map f).comm i j } + shape i j h := by apply NatTrans.ext; funext t; exact (F.obj t).shape i j h + d_comp_d' i j k _ _ := by apply NatTrans.ext; funext t; exact (F.obj t).d_comp_d i j k +noncomputable def injection (j : J) : (evaluation J A).obj j ⟶ colim where + app F := colimit.ι F j + naturality _ _ f := (colimit.ι_map f j).symm +noncomputable def cocone (F : J ⥤ ChainComplex A ℕ) : Cocone F where + pt := (colim.mapHomologicalComplex c).obj (complex F) + ι := { + app j := { + f i := colimit.ι ((complex F).X i) j + comm' i k _ := colimit.ι_map ((complex F).d i k) j } + naturality i j f := by + apply HomologicalComplex.Hom.ext; funext n + exact colimit.w (F ⋙ HomologicalComplex.eval A c n) f } +noncomputable def isColimit (F : J ⥤ ChainComplex A ℕ) : IsColimit (cocone F) := + HomologicalComplex.isColimitOfEval F (cocone F) (fun _ => colimit.isColimit _) +noncomputable def evaluationHomology (F : J ⥤ ChainComplex A ℕ) (n : ℕ) (j:J) : + (F.obj j).homology n ≅ ((complex F).homology n).obj j := + ((complex F).sc n).mapHomologyIso ((evaluation J A).obj j) +noncomputable def colimitHomology (F : J ⥤ ChainComplex A ℕ) (n : ℕ) : + (cocone F).pt.homology n ≅ colimit ((complex F).homology n) := + ((complex F).sc n).mapHomologyIso colim +lemma homology_injection (F : J ⥤ ChainComplex A ℕ) (n : ℕ) (j:J) : + HomologicalComplex.homologyMap ((cocone F).ι.app j) n = + (evaluationHomology F n j).hom ≫ colimit.ι ((complex F).homology n) j ≫ + (colimitHomology F n).inv := + ShortComplex.homologyMap_mapNatTrans ((complex F).sc n) (injection j) +omit [IsFiltered J] in +lemma evaluationHomology_naturality (F : J ⥤ ChainComplex A ℕ) (n : ℕ) {i j:J} (f:i⟶j) : + HomologicalComplex.homologyMap (F.map f) n ≫ (evaluationHomology F n j).hom = + (evaluationHomology F n i).hom ≫ ((complex F).homology n).map f := by + have h := ShortComplex.homologyMap_mapNatTrans ((complex F).sc n) ((evaluation J A).map f) + change HomologicalComplex.homologyMap (F.map f) n = + (evaluationHomology F n i).hom ≫ ((complex F).homology n).map f ≫ + (evaluationHomology F n j).inv at h + rw [h] + simp [Category.assoc] +noncomputable def homologyCocone (F : J ⥤ ChainComplex A ℕ) (n : ℕ) + (d : Cocone (F ⋙ HomologicalComplex.homologyFunctor A c n)) : + Cocone ((complex F).homology n) where + pt := d.pt + ι := { app j := (evaluationHomology F n j).inv ≫ d.ι.app j + naturality i j f := by + have h := evaluationHomology_naturality F n f + rw [←Iso.inv_comp_eq] at h + erw [Category.assoc ((evaluationHomology F n i).inv), ←h] + erw [Category.assoc ((evaluationHomology F n i).inv), + Category.assoc (HomologicalComplex.homologyMap (F.map f) n), + Iso.hom_inv_id_assoc (evaluationHomology F n j)] + simp only [Functor.const_obj_map] + exact congrArg (fun t => (evaluationHomology F n i).inv ≫ t) (d.w f) } +noncomputable def homologyIsColimit (F : J ⥤ ChainComplex A ℕ) (n : ℕ) : + IsColimit ((HomologicalComplex.homologyFunctor A c n).mapCocone (cocone F)) where + desc d := (colimitHomology F n).hom ≫ colimit.desc _ (homologyCocone F n d) + fac d j := by + change HomologicalComplex.homologyMap ((cocone F).ι.app j) n ≫ _ = _ + rw [homology_injection] + erw [Category.assoc (evaluationHomology F n j).hom, + Category.assoc (colimit.ι ((complex F).homology n) j), + Iso.inv_hom_id_assoc (colimitHomology F n), colimit.ι_desc] + change (evaluationHomology F n j).hom ≫ ((evaluationHomology F n j).inv ≫ d.ι.app j) = _ + exact Iso.hom_inv_id_assoc _ _ + uniq d m hm := by + apply (cancel_epi (colimitHomology F n).inv).mp + erw [Iso.inv_hom_id_assoc] + apply colimit.hom_ext + intro j + have h := hm j + change HomologicalComplex.homologyMap ((cocone F).ι.app j) n ≫ m = _ at h + rw [homology_injection] at h + have he := congrArg (fun t => (evaluationHomology F n j).inv ≫ t) h + erw [Category.assoc (evaluationHomology F n j).hom, + Iso.inv_hom_id_assoc (evaluationHomology F n j), + Category.assoc (colimit.ι ((complex F).homology n) j)] at he + erw [colimit.ι_desc] + exact he +noncomputable instance homology_preserves (n : ℕ) : + PreservesColimitsOfShape J (HomologicalComplex.homologyFunctor A c n) where + preservesColimit {F} := preservesColimit_of_preserves_colimit_cocone (isColimit F) (homologyIsColimit F n) +end FilteredHomology + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory CategoryTheory.Limits Opposite Simplicial +namespace FilteredHomology + +variable {J : Type} [Category.{0} J] +noncomputable instance chain_preserves (Z : A) : + PreservesColimitsOfShape J ((SSet.chainComplexFunctor A).obj Z) := by + apply HomologicalComplex.preservesColimitsOfShape_of_eval + intro n + change PreservesColimitsOfShape J ((evaluation SimplexCategoryᵒᵖ (Type)).obj (op ⦋n⦌) ⋙ sigmaConst.obj Z) + infer_instance +noncomputable instance sset_homology_preserves [IsFiltered J] (Z : A) (n:ℕ) : + PreservesColimitsOfShape J (SSet.homologyFunctor Z n) := by + change PreservesColimitsOfShape J (((SSet.chainComplexFunctor A).obj Z) ⋙ + HomologicalComplex.homologyFunctor A c n) + infer_instance +end FilteredHomology +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +variable {a n : ℕ} + +noncomputable def homologyIsColimit (q:ℕ) : IsColimit + ((SSet.homologyFunctor (ModuleCat.of ℤ ℤ) q).mapCocone (nerveCocone (a:=a) (n:=n))) := + isColimitOfPreserves _ nerveIsColimit + +noncomputable def barHomologyIsColimit (p q:ℕ) : IsColimit + ((SSet.homologyFunctor (ModuleCat.of ℤ ℤ) q).mapCocone + (barNerveCocone (a:=a) (n:=n) (I:=Fin (p+1)))) := + isColimitOfPreserves _ (barNerveIsColimit p) +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +open _root_.CategoryTheory _root_.OAI.CategoryTheory CategoryTheory.Limits Opposite +namespace StageProductColimit + +variable {C D E : Type} [Category.{0} C] [Category.{0} D] [Category.{0} E] +variable (κ : Type) +def powerMap (F : C ⥤ D) : (κ → C) ⥤ (κ → D) where + obj U i := F.obj (U i) + map f i := F.map (f i) + map_id _ := by funext i; exact F.map_id _ + map_comp _ _ := by funext i; exact F.map_comp _ _ +lemma powerMap_id : powerMap κ (𝟭 C)=𝟭 _ := rfl +lemma powerMap_comp (F : C ⥤ D) (G : D ⥤ E) : + powerMap κ (F⋙G)=powerMap κ F ⋙ powerMap κ G := rfl +instance (F : C ⥤ D) [F.Faithful] : (powerMap κ F).Faithful where + map_injective h := by funext i; exact F.map_injective (congrFun h i) +lemma powerMap_injective (F : C ⥤ D) (hF : Function.Injective F.obj) : + Function.Injective (powerMap κ F).obj := by + intro U V h; funext i; exact hF (congrFun h i) +end StageProductColimit +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open StageProductColimit + +variable {a n : ℕ} (κ : Type) +noncomputable def productStage : Stage a n ⥤ Cat.{0,0} where + obj S := Cat.of (κ → S.Obj) + map h := (powerMap κ (inclusion (leOfHom h))).toCatHom + map_id S := by + apply Cat.ext + change powerMap κ (inclusion (le_refl S))=𝟭 _ + rw [inclusion_id]; rfl + map_comp h k := by + apply Cat.ext + change powerMap κ (inclusion ((leOfHom h).trans (leOfHom k)))= + powerMap κ (inclusion (leOfHom h)) ⋙ powerMap κ (inclusion (leOfHom k)) + rw [←powerMap_comp,←inclusion_comp] +noncomputable def productCocone : Cocone (productStage (a:=a) (n:=n) κ) where + pt := Cat.of (κ → Labelled a n) + ι := { + app S := (powerMap κ S.forget).toCatHom + naturality S T h := by + apply Cat.ext + change powerMap κ (inclusion (leOfHom h)) ⋙ powerMap κ T.forget=powerMap κ S.forget + rw [←powerMap_comp,inclusion_forget] } +noncomputable def productNerveCocone : Cocone (productStage (a:=a) (n:=n) κ ⋙ nerveFunctor) := + nerveFunctor.mapCocone (productCocone κ) +lemma exists_lift_product [Fintype κ] {K : Type} [Category.{0} K] [Fintype K] + [∀i j:K,Fintype (i ⟶ j)] (F : K ⥤ (κ → Labelled a n)) : + ∃S : Stage a n,∃G : K ⥤ (κ → S.Obj),G ⋙ powerMap κ S.forget=F := by + let τ := κ × (Σk:K,Σl:K,k ⟶ l) + let U : κ × K → Labelled a n := fun t => F.obj t.2 t.1 + let src : τ → κ × K := fun t => (t.1,t.2.1) + let dst : τ → κ × K := fun t => (t.1,t.2.2.1) + let f : ∀t,U (src t) ⟶ U (dst t) := fun t => F.map t.2.2.2 t.1 + obtain ⟨S,hP,hL,hf⟩ := exists_lift_family U src dst f + let G : K ⥤ (κ → S.Obj) := { + obj k i := ⟨F.obj k i,hP (i,k),hL (i,k)⟩ + map {k l} g i := ⟨F.map g i,hf (i,⟨k,l,g⟩)⟩ + map_id k := by funext i; apply UniformObject.Hom.ext; exact congrFun (F.map_id k) i + map_comp g h := by funext i; apply UniformObject.Hom.ext; exact congrFun (F.map_comp g h) i } + exact ⟨S,G,rfl⟩ +noncomputable def productNerveIsColimit [Fintype κ] : + IsColimit (productNerveCocone (a:=a) (n:=n) κ) := by + apply evaluationJointlyReflectsColimits + intro p + apply Types.FilteredColimit.isColimitOf' + · intro x + obtain ⟨S,G,h⟩ := exists_lift_product κ x + exact ⟨S,G,h.symm⟩ + · intro S x y h + have he : x=y := StageNerveColimit.comp_injective (powerMap κ S.forget) + (powerMap_injective κ S.forget (forget_injective S)) h + exact ⟨S,𝟙 S,congrArg _ he⟩ +noncomputable def productHomologyIsColimit [Fintype κ] (q:ℕ) : IsColimit + ((SSet.homologyFunctor (ModuleCat.of ℤ ℤ) q).mapCocone + (productNerveCocone (a:=a) (n:=n) κ)) := + isColimitOfPreserves _ (productNerveIsColimit κ) +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteCokernelExtension.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteCokernelExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c2ec82bab2259906a05a4315a884cb4273fa53c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteCokernelExtension.lean @@ -0,0 +1,28 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ReducedTensorTwo + +namespace OAI + +section +open CategoryTheory Limits HomologicalComplex +namespace ChainComplex +open scoped _root_.ChainComplex + +variable {R:Type} [CommRing R] (K:ChainComplex (ModuleCat.{0} R) ℕ) +lemma finite_of_boundary_annihilation (hK:K.d 1 0=0) {S:ModuleCat.{0} R} (T:K.X 1⟶S) [Epi T] + (N:Submodule R S) [Module.Finite R N] [Module.Finite R (K.homology 1)] + (h:K.d 2 1 ≫ T ≫ ModuleCat.ofHom N.mkQ=0) : Module.Finite R S := by + let c:=CokernelCofork.ofπ (T≫ModuleCat.ofHom N.mkQ) h + let f:K.homology 1 ⟶ ModuleCat.of R (S⧸N):=(positiveIsCokernel K 0 hK).desc c + have hf:positiveπ K 0 hK ≫ f=T≫ModuleCat.ofHom N.mkQ:= + Cofork.IsColimit.π_desc (positiveIsCokernel K 0 hK) (t := c) + have : Epi (ModuleCat.ofHom N.mkQ):=(ModuleCat.epi_iff_surjective _).mpr N.mkQ_surjective + have : Epi (positiveπ K 0 hK ≫ f):=by rw [hf]; infer_instance + have : Epi f:=epi_of_epi (positiveπ K 0 hK) _ + have : Module.Finite R (S⧸N):=Module.Finite.of_surjective f.hom ((ModuleCat.epi_iff_surjective f).mp inferInstance) + exact Module.Finite.of_submodule_quotient N +end ChainComplex + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteCutResolution.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteCutResolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f290d5787b83ea645127ee541ba0b981a54b75f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteCutResolution.lean @@ -0,0 +1,57 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FinitePrimitiveResolution + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiniteCutResolution + +theorem finite_cut_resolution {a : ℕ} {κ : Type*} [Finite κ] (R : κ → polygonAlgebra a) : + ∃ S : Finset (Fin 4 × CutRing), ∀ i, + ResolvedBy (fun p : S => halfPlane a p.val.1 p.val.2) (R i).val := by + classical + let _ := Fintype.ofFinite κ + have hgen : {U : Set (GenericSquare a) | ∃ j z, U=halfPlane a j z}= + Set.range (fun p : Fin 4 × CutRing => halfPlane a p.1 p.2) := by + ext U + constructor + · rintro ⟨j,z,rfl⟩; exact ⟨(j,z),rfl⟩ + · rintro ⟨⟨j,z⟩,rfl⟩; exact ⟨j,z,rfl⟩ + have h (i : κ) : ∃ S : Finset (Fin 4 × CutRing), + ResolvedBy (fun p : S => halfPlane a p.val.1 p.val.2) (R i).val := by + apply finite_resolving_subfamily (fun p : Fin 4 × CutRing => halfPlane a p.1 p.2) + have hp := (R i).property + change (R i).val ∈ BooleanSubalgebra.closure _ at hp + rwa [hgen] at hp + choose S hS using h + refine ⟨Finset.univ.biUnion S,fun i x y hh => ?_⟩ + apply hS i x y + intro p + exact hh ⟨p.val,Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ i,p.property⟩⟩ + +theorem finite_cut_resolution_extend {a : ℕ} {κ η : Type*} [Finite κ] [Finite η] + (R : κ → polygonAlgebra a) (j : η → Fin 4) (c : η → CutRing) : + ∃ S : Finset (Fin 4 × CutRing), + (∀ i, ResolvedBy (fun p : S => halfPlane a p.val.1 p.val.2) (R i).val) ∧ + ∀ e, (j e,c e) ∈ S := by + classical + let _ := Fintype.ofFinite η + obtain ⟨S,hS⟩ := finite_cut_resolution R + refine ⟨S ∪ Finset.univ.image (fun e => (j e,c e)),?_,?_⟩ + · intro i x y hh + exact hS i x y (fun p => hh ⟨p.val,Finset.mem_union_left _ p.property⟩) + · intro e + exact Finset.mem_union_right _ (Finset.mem_image.mpr ⟨e,Finset.mem_univ e,rfl⟩) + +end FiniteCutResolution + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteGroupHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteGroupHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6ea731432e38315412f99e8469be4be2afd24d7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FiniteGroupHomology.lean @@ -0,0 +1,73 @@ +import Mathlib + +namespace OAI + +section +open CategoryTheory Limits +namespace FiniteGroupHomology +universe u +variable {R G : Type u} [CommRing R] [IsNoetherianRing R] [Group G] +lemma of_finite_chains (K : ChainComplex (ModuleCat R) ℕ) (n : ℕ) + [Module.Finite R (K.X n)] : Module.Finite R (K.homology n) := by + have : Module.Finite R (K.cycles n) := + Module.Finite.of_injective (K.iCycles n).hom ((ModuleCat.mono_iff_injective _).mp inferInstance) + exact Module.Finite.of_surjective (K.homologyπ n).hom ((ModuleCat.epi_iff_surjective _).mp inferInstance) + +lemma finite (A : Rep R G) [Finite G] [Module.Finite R A] (n : ℕ) : + Module.Finite R (groupHomology A n) := by + change Module.Finite R ((groupHomology.inhomogeneousChains A).homology n) + apply of_finite_chains +end FiniteGroupHomology + +end + +section +open CategoryTheory CategoryTheory.Limits +namespace CategoryTheory.Functor +open scoped _root_.CategoryTheory _root_.CategoryTheory.Functor +variable {C : Type*} [Category* C] + +lemma isEventuallyConstantFrom_of_succ (F : ℕ ⥤ C) (N : ℕ) + (h : ∀ n, N ≤ n → _root_.CategoryTheory.IsIso (F.map (_root_.CategoryTheory.homOfLE (Nat.le_succ n)))) : + F.IsEventuallyConstantFrom N := by + intro n f + have hn : N ≤ n := _root_.CategoryTheory.leOfHom f + obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hn + induction k with + | zero => + have hf : f = 𝟙 N := Subsingleton.elim _ _ + rw [hf, F.map_id] + infer_instance + | succ k ih => + have : _root_.CategoryTheory.IsIso (F.map (_root_.CategoryTheory.homOfLE (show N ≤ N+k by omega))) := ih _ (by omega) + have := h (N+k) (by omega) + have hf : f = (_root_.CategoryTheory.homOfLE (show N ≤ N+k by omega)) ≫ + (_root_.CategoryTheory.homOfLE (Nat.le_succ (N+k))) := Subsingleton.elim _ _ + rw [hf, F.map_comp] + infer_instance +end CategoryTheory.Functor + +namespace FixedStageReturn + +lemma stage_ι_isIso {R : Type*} [Ring R] (F : ℕ ⥤ ModuleCat R) (N m : ℕ) + (h : ∀ n, N ≤ n → IsIso (F.map (homOfLE (Nat.le_succ n)))) (hm : N ≤ m) : + IsIso (colimit.ι F m) := by + exact (_root_.OAI.CategoryTheory.Functor.isEventuallyConstantFrom_of_succ F N h).isIso_ι_of_isColimit' + (colimit.isColimit F) m (homOfLE hm) + +lemma finite_stage_iff_colimit {R : Type*} [Ring R] (F : ℕ ⥤ ModuleCat R) (N m : ℕ) + (h : ∀ n, N ≤ n → IsIso (F.map (homOfLE (Nat.le_succ n)))) (hm : N ≤ m) : + Module.Finite R (F.obj m) ↔ Module.Finite R (colimit F : ModuleCat R) := by + have := stage_ι_isIso F N m h hm + constructor + · intro hfin + exact Module.Finite.of_surjective (colimit.ι F m).hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) + · intro hfin + exact Module.Finite.of_surjective (inv (colimit.ι F m)).hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) +end FixedStageReturn + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FinitePrimitiveResolution.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FinitePrimitiveResolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..2474f19571f9c4c6c3f68c76adb03efbc92dec50 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FinitePrimitiveResolution.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ResolvedBoolean + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FinitePrimitiveResolution +variable {X ι : Type*} + +theorem finite_resolving_subfamily (U : ι → Set X) {V : Set X} + (hV : V ∈ BooleanSubalgebra.closure (Set.range U)) : + ∃ S : Finset ι, ResolvedBy (fun i : S => U i.val) V := by + classical + induction hV using BooleanSubalgebra.closure_bot_sup_induction with + | mem V h => + obtain ⟨i,rfl⟩ := h + exact ⟨{i},fun x y he => he ⟨i,Finset.mem_singleton_self i⟩⟩ + | bot => exact ⟨∅,fun _ _ _ => Iff.rfl⟩ + | sup V W _ _ ihV ihW => + obtain ⟨S,hS⟩ := ihV + obtain ⟨T,hT⟩ := ihW + refine ⟨S ∪ T,fun x y he => or_congr (hS x y ?_) (hT x y ?_)⟩ + · intro i + exact he ⟨i.val,Finset.mem_union_left _ i.property⟩ + · intro i + exact he ⟨i.val,Finset.mem_union_right _ i.property⟩ + | compl V _ ih => + obtain ⟨S,hS⟩ := ih + exact ⟨S,fun x y he => not_congr (hS x y he)⟩ + +noncomputable def translatedPrimitiveAlgebra (a : ℕ) (r : CutRing) : + BooleanSubalgebra (Set (GenericSquare a)) := + BooleanSubalgebra.closure (Set.range fun p : Fin 5 × (CutRing × CutRing) => + (spatialTranslate p.2 (initialTest a r p.1)).val) + +theorem translatedPrimitiveAlgebra_test (a : ℕ) (r : CutRing) + (p : Fin 5 × (CutRing × CutRing)) : + (spatialTranslate p.2 (initialTest a r p.1)).val ∈ translatedPrimitiveAlgebra a r := + BooleanSubalgebra.subset_closure ⟨p,rfl⟩ + +theorem translatedPrimitiveAlgebra_translate (a : ℕ) (r : CutRing) + (u : CutRing × CutRing) {V : Set (GenericSquare a)} + (hV : V ∈ translatedPrimitiveAlgebra a r) : + translate a u ⁻¹' V ∈ translatedPrimitiveAlgebra a r := by + induction hV using BooleanSubalgebra.closure_bot_sup_induction with + | mem V h => + obtain ⟨p,rfl⟩ := h + have he : translate a u ⁻¹' (spatialTranslate p.2 (initialTest a r p.1)).val = + (spatialTranslate (p.2-u) (initialTest a r p.1)).val := by + ext x + simp only [spatialTranslate,Set.mem_preimage,← translate_add] + abel_nf + rw [he] + exact translatedPrimitiveAlgebra_test a r (p.1,p.2-u) + | bot => exact BooleanSubalgebra.bot_mem + | sup V W _ _ ihV ihW => exact BooleanSubalgebra.sup_mem ihV ihW + | compl V _ ih => exact BooleanSubalgebra.compl_mem ih + +theorem translatedPrimitiveAlgebra_initial (a : ℕ) (r : CutRing) (j : Fin 5) : + (initialTest a r j).val ∈ translatedPrimitiveAlgebra a r := by + have h := translatedPrimitiveAlgebra_test a r (j,0) + have he : (spatialTranslate (0:CutRing × CutRing) (initialTest a r j)).val = + (initialTest a r j).val := by + ext p + simp [spatialTranslate,translate_zero] + rwa [he] at h + +theorem polygon_finite_primitive_resolution {a : ℕ} (r : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (V : polygonAlgebra a) : + ∃ S : Finset (Fin 5 × (CutRing × CutRing)), + ResolvedBy (fun p : S => (spatialTranslate p.val.2 (initialTest a r p.val.1)).val) V.val := by + apply finite_resolving_subfamily (fun p : Fin 5 × (CutRing × CutRing) => + (spatialTranslate p.2 (initialTest a r p.1)).val) + let B := translatedPrimitiveAlgebra a r + have ht := fun u U hU => translatedPrimitiveAlgebra_translate a r u (V := U) hU + have hcoord (j : Fin 2) (z : CutRing) : + halfPlane a (Fin.castLE (by omega) j) z ∈ B := by + apply coordinate_cuts_generated B j ht + fin_cases j + · exact translatedPrimitiveAlgebra_initial a r 1 + · exact translatedPrimitiveAlgebra_initial a r 2 + apply polygon_induction (P := fun U => U ∈ B) ?_ BooleanSubalgebra.bot_mem + (fun _ _ hU hV => BooleanSubalgebra.sup_mem hU hV) + (fun _ hU => BooleanSubalgebra.compl_mem hU) V.property + intro j z + fin_cases j + · exact hcoord 0 z + · exact hcoord 1 z + · exact slope_cuts_generated r hr B ht hcoord 2 (Or.inl rfl) + (translatedPrimitiveAlgebra_initial a r 3) z + · exact slope_cuts_generated r hr B ht hcoord 3 (Or.inr rfl) + (translatedPrimitiveAlgebra_initial a r 4) z + +end FinitePrimitiveResolution + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FreeChains.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FreeChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..7506df2a5067778cef7861b1f8a3f25fbdd1c4e2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FreeChains.lean @@ -0,0 +1,178 @@ +import Mathlib + +namespace OAI + +section + +section + +open CategoryTheory Limits MonoidalCategory SimplicialObject AlgebraicTopology +namespace FreeChains + +abbrev A := ModuleCat.{0} ℤ +abbrev Z : A := ModuleCat.of ℤ ℤ +abbrev c := ComplexShape.down ℕ + +noncomputable def forward (X : Type) : (sigmaConst.obj Z).obj X ⟶ (ModuleCat.free ℤ).obj X := + Sigma.desc (fun x => ModuleCat.ofHom (Finsupp.lsingle x)) +noncomputable def backward (X : Type) : (ModuleCat.free ℤ).obj X ⟶ (sigmaConst.obj Z).obj X := + ModuleCat.freeDesc (↾fun x => (Sigma.ι (fun _ : X => Z) x) (1:ℤ)) +@[reassoc (attr := simp)] lemma ι_forward (X : Type) (x : X) : + Sigma.ι (fun _ : X => Z) x ≫ forward X = ModuleCat.ofHom (Finsupp.lsingle x) := + Sigma.ι_comp_desc _ _ +@[simp] lemma backward_mk (X : Type) (x : X) : + backward X (ModuleCat.freeMk x)=(Sigma.ι (fun _ : X => Z) x) (1:ℤ) := by + simp [backward] + +noncomputable def iso (X : Type) : (sigmaConst.obj Z).obj X ≅ (ModuleCat.free ℤ).obj X where + hom := forward X + inv := backward X + hom_inv_id := by + apply Sigma.hom_ext + intro x + apply ModuleCat.hom_ext + apply LinearMap.ext_ring + have h := congrArg (fun f : Z ⟶ (ModuleCat.free ℤ).obj X => f (1:ℤ)) (ι_forward X x) + change backward X (forward X ((Sigma.ι (fun _ : X => Z) x) (1:ℤ))) = _ + rw [show forward X ((Sigma.ι (fun _ : X => Z) x) (1:ℤ))=ModuleCat.freeMk x from h] + exact backward_mk X x + inv_hom_id := by + apply ModuleCat.free_hom_ext + intro x + change forward X (backward X (ModuleCat.freeMk x)) = ModuleCat.freeMk x + rw [backward_mk] + exact congrArg (fun f : Z ⟶ (ModuleCat.free ℤ).obj X => f (1:ℤ)) (ι_forward X x) + +noncomputable def naturalIso : sigmaConst.obj Z ≅ ModuleCat.free ℤ := + NatIso.ofComponents iso (by + intro X Y f + apply Sigma.hom_ext + intro x + dsimp only [iso,sigmaConst] + erw [Sigma.ι_comp_map'_assoc] + rw [Category.id_comp,ι_forward,ι_forward_assoc] + apply ModuleCat.hom_ext + apply LinearMap.ext_ring + change Finsupp.single (f x) 1 = (ModuleCat.free ℤ).map f (ModuleCat.freeMk x) + exact (ModuleCat.free_map_apply f x).symm) + +noncomputable def complex (X : SSet) : ChainComplex A ℕ := + AlternatingFaceMapComplex.obj (X ⋙ ModuleCat.free ℤ) +noncomputable def complexIso (X : SSet) : SSet.chainComplex X Z ≅ complex X := + (alternatingFaceMapComplex A).mapIso (Functor.isoWhiskerLeft X naturalIso) + +end FreeChains + +end + +section + +open CategoryTheory Limits Classical +namespace AdditiveFinite + +variable {R : Type} [CommRing R] [Nontrivial R] [IsNoetherianRing R] + (F : ModuleCat R ⥤ ModuleCat R) [F.Additive] + (A : ModuleCat R) [Module.Free R A] [Module.Finite R A] + +noncomputable abbrev basis := Module.finBasis R A +noncomputable abbrev I := Fin (Module.finrank R A) +noncomputable def incl (i : I A) : ModuleCat.of R R ⟶ A := + ModuleCat.ofHom (LinearMap.toSpanSingleton R A (basis A i)) +noncomputable def proj (i : I A) : A ⟶ ModuleCat.of R R := + ModuleCat.ofHom ((basis A).coord i) +omit [IsNoetherianRing R] in +lemma sum_proj_incl : ∑ i : I A, proj A i ≫ incl A i = 𝟙 A := by + apply ModuleCat.hom_ext + apply LinearMap.ext + intro x + simp [proj,incl] + +omit [IsNoetherianRing R] in +lemma isZero (h : IsZero (F.obj (ModuleCat.of R R))) : IsZero (F.obj A) := by + apply (IsZero.iff_id_eq_zero _).mpr + rw [← F.map_id, ← sum_proj_incl A,F.map_sum] + apply Finset.sum_eq_zero + intro i hi + rw [F.map_comp,h.eq_zero_of_tgt (F.map (proj A i)),zero_comp] + +lemma finite [Module.Finite R (F.obj (ModuleCat.of R R))] : + Module.Finite R (F.obj A) := by + let φ : F.obj A →ₗ[R] (I A → F.obj (ModuleCat.of R R)) := + LinearMap.pi (fun i => (F.map (proj A i)).hom) + apply Module.Finite.of_injective φ + apply (LinearMap.ker_eq_bot).mp + rw [Submodule.eq_bot_iff] + intro x hx + have hp : ∀i : I A, (F.map (proj A i)).hom x=0 := fun i => congrFun hx i + have he : ∑ i : I A, (F.map (proj A i) ≫ F.map (incl A i))=𝟙 _ := by + simp only [← F.map_comp, ← F.map_sum,sum_proj_incl,F.map_id] + have ht := congrArg (fun t => t.hom x) he + simpa [hp] using ht.symm + +end AdditiveFinite + +end + +section + +open CategoryTheory Limits MonoidalCategory HomologicalComplex +namespace TensorCoefficient + +variable {R : Type} [CommRing R] +abbrev c := ComplexShape.down ℕ +variable (K : ChainComplex (ModuleCat.{0} R) ℕ) + +noncomputable def functor : ModuleCat.{0} R ⥤ ChainComplex (ModuleCat.{0} R) ℕ where + obj A := ((tensorRight A).mapHomologicalComplex c).obj K + map f := (NatTrans.mapHomologicalComplex ((tensoringRight (ModuleCat.{0} R)).map f) c).app K + map_id A := by apply HomologicalComplex.Hom.ext; funext n; change K.X n ◁ 𝟙 A=𝟙 _; simp + map_comp f g := by apply HomologicalComplex.Hom.ext; funext n; change K.X n ◁ (f≫g)=(K.X n ◁ f)≫(K.X n ◁ g); simp + +instance : (functor K).Additive where + map_add := by + intros + apply HomologicalComplex.Hom.ext + funext n + exact MonoidalPreadditive.whiskerLeft_add _ _ + +noncomputable def unitIso : (functor K).obj (ModuleCat.of R R) ≅ K := + (NatIso.mapHomologicalComplex (rightUnitorNatIso (ModuleCat.{0} R)) c).app K ≪≫ + (Functor.mapHomologicalComplexIdIso _ _).app K + +noncomputable def homologyFunctor (n : ℕ) : ModuleCat.{0} R ⥤ ModuleCat.{0} R := + functor K ⋙ HomologicalComplex.homologyFunctor _ c n + +instance (n : ℕ) : (homologyFunctor K n).Additive := by + unfold homologyFunctor + infer_instance + +noncomputable def homologyUnitIso (n : ℕ) : + (homologyFunctor K n).obj (ModuleCat.of R R) ≅ K.homology n := + (HomologicalComplex.homologyFunctor _ c n).mapIso (unitIso K) + +lemma shortExact [∀n,Module.Flat R (K.X n)] {S : ShortComplex (ModuleCat.{0} R)} + (hS : S.ShortExact) : (S.map (functor K)).ShortExact := by + rw [HomologicalComplex.shortExact_iff_degreewise_shortExact] + intro n + change (S.map (tensorLeft (K.X n))).ShortExact + exact hS.map_of_exact _ + +lemma free_finite [Nontrivial R] [IsNoetherianRing R] (A : ModuleCat.{0} R) + [Module.Free R A] [Module.Finite R A] (n : ℕ) + [Module.Finite R (K.homology n)] : Module.Finite R ((homologyFunctor K n).obj A) := by + have : Module.Finite R ((homologyFunctor K n).obj (ModuleCat.of R R)) := + Module.Finite.equiv (homologyUnitIso K n).symm.toLinearEquiv + exact AdditiveFinite.finite _ _ + +lemma free_isZero [Nontrivial R] [IsNoetherianRing R] (A : ModuleCat.{0} R) + [Module.Free R A] [Module.Finite R A] (n : ℕ) + (h : IsZero (K.homology n)) : IsZero ((homologyFunctor K n).obj A) := by + exact AdditiveFinite.isZero _ _ (h.of_iso (homologyUnitIso K n)) + +end TensorCoefficient + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FullGroupStability.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FullGroupStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..25700bfd99543e3ab3ff6e38c0d1427057648129 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FullGroupStability.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.HomologyAdditive + +namespace OAI + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable + +attribute [local instance 1200] Rep.hV2 + +namespace TrivialHomology +variable {G H K : Type} [Group G] [Group H] [Group K] +noncomputable abbrev map (f : G →* H) (q : ℕ) := + groupHomology.map f (TransitiveInduction.trivialMap f) q + +@[simp] lemma map_id (q : ℕ) : map (MonoidHom.id G) q=𝟙 _ := by + exact groupHomology.map_id (A:=Rep.trivial ℤ G ℤ) (n:=q) + +lemma map_comp (f : G →* H) (g : H →* K) (q : ℕ) : + map (g.comp f) q = map f q ≫ map g q := by + exact groupHomology.map_comp f g (TransitiveInduction.trivialMap f) + (TransitiveInduction.trivialMap g) q + +lemma map_congr (f g : G →* H) (h : f=g) (q : ℕ) : map f q=map g q := by rw [h] + +lemma isIso_equiv (e : G ≃* H) (q : ℕ) : IsIso (map e.toMonoidHom q) := by + refine ⟨⟨map e.symm.toMonoidHom q,?_,?_⟩⟩ + · rw [← map_comp] + have he : e.symm.toMonoidHom.comp e.toMonoidHom=MonoidHom.id G := by ext; simp + rw [he, map_id] + · rw [← map_comp] + have he : e.toMonoidHom.comp e.symm.toMonoidHom=MonoidHom.id H := by ext; simp + rw [he, map_id] +end TrivialHomology + +namespace PolygonPlacement.Configuration +instance empty_subsingleton (a m : ℕ) : Subsingleton (Configuration a m 0) := + ⟨fun _ _ => ext (fun index => Fin.elim0 index)⟩ + +noncomputable def empty (a m : ℕ) : Configuration a m 0 := standardLE a m 0 (by omega) + +noncomputable def emptyIso (a m : ℕ) : column a m 0 ≅ Rep.trivial ℤ (polygonFullGroup a m) ℤ := + Rep.mkIso (Representation.Equiv.mk (Finsupp.uniqueLinearEquiv ℤ ℤ (empty a m)) (by + intro g + apply Finsupp.lhom_ext + intro x z + change (TransitiveInduction.permutationRep g (single x z)) (empty a m)= + (single x z) (empty a m) + rw [TransitiveInduction.permutationRep_single] + congr 2 + exact Subsingleton.elim _ _)) + +@[simp] lemma emptyIso_single (a m : ℕ) (x : Configuration a m 0) (z : ℤ) : + (emptyIso a m).hom.hom (single x z)=z := by + change (single x z) (empty a m)=z + simp [Subsingleton.elim (empty a m) x] +lemma augmentation_pointMap {a m : ℕ} (f : Configuration a m 1) (q : ℕ) : + groupHomology.map (MulAction.stabilizer (polygonFullGroup a m) f).subtype + (TransitiveInduction.pointMap f) q ≫ + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (boundary a m 0) ≫ + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (emptyIso a m).hom = + TrivialHomology.map (MulAction.stabilizer (polygonFullGroup a m) f).subtype q := by + erw [← Functor.map_comp] + erw [groupHomology.functor_map, ← groupHomology.map_comp] + apply groupHomology.map_congr + · rfl + · apply LinearMap.ext + intro z + change (emptyIso a m).hom.hom ((boundary a m 0).hom (single f z))=z + rw [boundary_zero_eq_face] + dsimp only [faceHom] + rw [TransitiveInduction.equivariantMap_single, emptyIso_single] +lemma stabilizer_H1_isIso (a m : ℕ) (hm : 33 ≤ m) (f : Configuration a m 1) : + IsIso (TrivialHomology.map (MulAction.stabilizer (polygonFullGroup a m) f).subtype 1) := by + have first := TransitiveInduction.isIso_map_pointMap f (fun g => transitive f g (by omega)) 1 + have second := boundary_zero_H1_isIso a m hm + have third : IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 1).map + (emptyIso a m).hom) := inferInstance + rw [← augmentation_pointMap f 1] + have composite := IsIso.comp_isIso' first (IsIso.comp_isIso' second third) + exact composite + +noncomputable def standardStabilizerEquiv (a p n : ℕ) : + polygonFullGroup a n ≃* MulAction.stabilizer (polygonFullGroup a (p+n)) (standard a p n) := + (PolygonTracks.stabilizerEquiv a p n).trans (MulEquiv.subgroupCongr (stabilizer_standard a p n).symm) + +lemma standardStabilizerEquiv_subtype (a p n : ℕ) : + (MulAction.stabilizer (polygonFullGroup a (p+n)) (standard a p n)).subtype.comp + (standardStabilizerEquiv a p n).toMonoidHom = PolygonTracks.stabilize a p n := rfl + +lemma stabilize_H1_isIso (a n : ℕ) (hn : 32 ≤ n) : + IsIso (TrivialHomology.map (PolygonTracks.stabilize a 1 n) 1) := by + rw [← standardStabilizerEquiv_subtype a 1 n, TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (standardStabilizerEquiv a 1 n) 1 + have := stabilizer_H1_isIso a (1+n) (by omega) (standard a 1 n) + infer_instance + +end PolygonPlacement.Configuration +end SimpleAmenable + +end + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.TrivialHomology + +attribute [local instance 1200] Rep.hV2 +variable {G H : Type} [Group G] [Group H] + +noncomputable def abelianizationEquiv (G : Type) [Group G] : + groupHomology.H1 (Rep.trivial ℤ G ℤ) ≃+ Additive (Abelianization G) := + (groupHomology.H1AddEquivOfIsTrivial (Rep.trivial ℤ G ℤ)).trans + (TensorProduct.rid ℤ (Additive (Abelianization G))).toAddEquiv + +noncomputable def cycle (g : G) : groupHomology.H1 (Rep.trivial ℤ G ℤ) := + groupHomology.H1π _ ((groupHomology.cycles₁IsoOfIsTrivial _).inv (single g (1:ℤ))) + +@[simp] lemma abelianizationEquiv_cycle (g : G) : + abelianizationEquiv G (cycle g)=Additive.ofMul (Abelianization.of g) := by + change (TensorProduct.rid ℤ (Additive (Abelianization G))) + ((groupHomology.H1AddEquivOfIsTrivial (Rep.trivial ℤ G ℤ)) + (groupHomology.H1π _ ((groupHomology.cycles₁IsoOfIsTrivial _).inv (single g (1:ℤ))))) = _ + rw [groupHomology.H1AddEquivOfIsTrivial_single, TensorProduct.rid_tmul] + simp + +lemma cycle_map (f : G →* H) (g : G) : map f 1 (cycle g)=cycle (f g) := by + unfold cycle + rw [groupHomology.H1π_comp_map_apply] + congr 1 + apply Subtype.ext + change groupHomology.chainsMap₁ f (TransitiveInduction.trivialMap f) (single g (1:ℤ))= + single (f g) (1:ℤ) + simp [groupHomology.chainsMap₁, TransitiveInduction.trivialMap] + +lemma cycle_eq_zero_iff (g : G) : cycle g=0 ↔ g∈_root_.commutator G := by + rw [← (abelianizationEquiv G).map_eq_zero_iff, abelianizationEquiv_cycle] + change Abelianization.of g=1 ↔ _ + change g∈(Abelianization.of : G →* Abelianization G).ker ↔ _ + rw [Abelianization.ker_of] + +lemma commutator_comap_of_mono (f : G →* H) [Mono (map f 1)] : + (_root_.commutator H).comap f=_root_.commutator G := by + ext g + change f g∈_root_.commutator H ↔ g∈_root_.commutator G + rw [← cycle_eq_zero_iff, ← cycle_eq_zero_iff, ← cycle_map] + exact (ModuleCat.mono_iff_injective (map f 1)).mp inferInstance |>.eq_iff' (map_zero _) + +lemma H1_isZero_of_perfect [Group.IsPerfect G] : + IsZero (groupHomology.H1 (Rep.trivial ℤ G ℤ)) := by + have : Group.IsPerfect (Abelianization G) := Group.IsPerfect.ofSurjective + (f:=Abelianization.of) (QuotientGroup.mk'_surjective (_root_.commutator G)) + have : Subsingleton (Abelianization G) := inferInstance + have : Subsingleton (groupHomology.H1 (Rep.trivial ℤ G ℤ)) := + (abelianizationEquiv G).injective.subsingleton + exact ModuleCat.isZero_of_subsingleton _ +end SimpleAmenable.TrivialHomology + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/FullH2.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FullH2.lean new file mode 100644 index 0000000000000000000000000000000000000000..b114f4abd9064a2bf53394a304fb2b96de477009 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/FullH2.lean @@ -0,0 +1,167 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.RegularAugmentation + +namespace OAI + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.PolygonPlacement.Configuration + +attribute [local instance 1200] Rep.hV2 +lemma columnAugmentation_H1_isIso (a p n : ℕ) (hn : 32 ≤ n) (hm : 3*p+1 < p+n) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a (p+n)) 1).map + (TransitiveInduction.augmentation (polygonFullGroup a (p+n)) (Configuration a (p+n) p))) := by + have pointIso := TransitiveInduction.isIso_map_pointMap (standard a p n) + (fun f => transitive _ f hm) 1 + have stabilizerIso : IsIso (TrivialHomology.map + (MulAction.stabilizer (polygonFullGroup a (p+n)) (standard a p n)).subtype 1) := by + have := PolygonTracks.stabilize_H1_isIso a p n hn + have := TrivialHomology.isIso_equiv (standardStabilizerEquiv a p n) 1 + have he : TrivialHomology.map (standardStabilizerEquiv a p n).toMonoidHom 1 ≫ + TrivialHomology.map (MulAction.stabilizer (polygonFullGroup a (p+n)) + (standard a p n)).subtype 1 = TrivialHomology.map (PolygonTracks.stabilize a p n) 1 := by + rw [← TrivialHomology.map_comp, standardStabilizerEquiv_subtype] + exact IsIso.of_isIso_fac_left he + exact @IsIso.of_isIso_fac_left _ _ _ _ _ _ _ _ pointIso stabilizerIso + (TransitiveInduction.augmentation_pointMap (standard a p n) 1) + +lemma face_H1_isIso (a m p : ℕ) (hn : p+33 ≤ m) (hm : 3*(p+1)+1 < m) (i : Fin (p+1)) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 1).map (faceHom a m p i)) := by + have hc (t : ℕ) (ht : t ≤ p+1) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 1).map + (TransitiveInduction.augmentation (polygonFullGroup a m) (Configuration a m t))) := by + obtain ⟨n,rfl⟩ : ∃n,m=t+n := ⟨m-t,by omega⟩ + exact columnAugmentation_H1_isIso a t n (by omega) (by omega) + have := hc p (by omega) + have := hc (p+1) (by omega) + have he := congrArg ((groupHomology.functor ℤ (polygonFullGroup a m) 1).map) + (TransitiveInduction.augmentation_natural (face i) (face_smul i)) + rw [Functor.map_comp] at he + exact IsIso.of_isIso_fac_right he + +lemma boundary_two_H1_isIso (a m : ℕ) (hm : 35 ≤ m) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 1).map (boundary a m 2)) := by + rw [homology_boundary_three a m (by omega) 1] + exact face_H1_isIso a m 2 (by omega) (by omega) 0 + +lemma boundary_five (a m : ℕ) : boundary a m 4 = + faceHom a m 4 0 - faceHom a m 4 1 + faceHom a m 4 2 - faceHom a m 4 3 + faceHom a m 4 4 := by + rw [boundary_sum] + simp only [Fin.sum_univ_succ] + norm_num + abel + +lemma boundary_four_H0_isIso (a m : ℕ) (hm : 16 < m) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 0).map (boundary a m 4)) := by + rw [boundary_five,Functor.map_add,Functor.map_sub,Functor.map_add,Functor.map_sub] + rw [homology_face_eq a m 4 hm 0 1 0, homology_face_eq a m 4 hm 0 2 0, + homology_face_eq a m 4 hm 0 3 0, homology_face_eq a m 4 hm 0 4 0] + simp only [sub_self,zero_add] + exact face_H0_isIso a m 4 hm 0 + +lemma boundary_zero_H2_isIso (a m : ℕ) (hm : 35 ≤ m) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 2).map (boundary a m 0)) := by + have := boundary_zero_epi a m (by omega) + have : IsIso (BoundedHomologyEdge.Hmap 0 (boundary a m 2)) := + boundary_two_H0_isIso a m (by omega) + have : IsIso (BoundedHomologyEdge.Hmap 1 (boundary a m 2)) := + boundary_two_H1_isIso a m hm + have : IsIso (BoundedHomologyEdge.Hmap 0 (boundary a m 4)) := + boundary_four_H0_isIso a m (by omega) + exact BoundedHomologyEdge.chain_H2_isIso (boundary a m 0) (boundary a m 1) + (boundary a m 2) (boundary a m 3) (boundary a m 4) + (boundary_square a m 0) (boundary_square a m 1) (boundary_square a m 2) + (boundary_square a m 3) (boundary_exact a m 0 (by omega) (by omega)) + (boundary_exact a m 1 (by omega) (by omega)) + (boundary_exact a m 2 (by omega) (by omega)) + (homology_boundary_two_zero a m (by omega) 2) +lemma stabilizer_H2_isIso (a m : ℕ) (hm : 35 ≤ m) (f : Configuration a m 1) : + IsIso (TrivialHomology.map (MulAction.stabilizer (polygonFullGroup a m) f).subtype 2) := by + have first := TransitiveInduction.isIso_map_pointMap f (fun g => transitive f g (by omega)) 2 + have second := boundary_zero_H2_isIso a m hm + have third : IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 2).map + (emptyIso a m).hom) := inferInstance + rw [← augmentation_pointMap f 2] + have composite := IsIso.comp_isIso' first (IsIso.comp_isIso' second third) + exact composite + +lemma stabilize_H2_isIso (a n : ℕ) (hn : 34 ≤ n) : + IsIso (TrivialHomology.map (PolygonTracks.stabilize a 1 n) 2) := by + rw [← standardStabilizerEquiv_subtype a 1 n, TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (standardStabilizerEquiv a 1 n) 2 + have := stabilizer_H2_isIso a (1+n) (by omega) (standard a 1 n) + infer_instance +end SimpleAmenable.PolygonPlacement.Configuration + +end + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep +namespace SimpleAmenable + +attribute [local instance 1200] Rep.hV2 + +namespace TrivialHomology +variable (G : Type) [Group G] +lemma abelianization_fg [Module.Finite ℤ (groupHomology (Rep.trivial ℤ G ℤ) 1)] : + Group.FG (Abelianization G) := by + let e : groupHomology (Rep.trivial ℤ G ℤ) 1 ≃ₗ[ℤ] Additive (Abelianization G) := + (abelianizationEquiv G).toIntLinearEquiv + have : Module.Finite ℤ (Additive (Abelianization G)) := + Module.Finite.of_surjective e.toLinearMap e.surjective + have : AddGroup.FG (Additive (Abelianization G)) := + Module.Finite.iff_addGroup_fg.mp inferInstance + exact GroupFG.iff_add_fg.mpr inferInstance + +lemma abelianization_ring_noetherian + [Module.Finite ℤ (groupHomology (Rep.trivial ℤ G ℤ) 1)] : + IsNoetherianRing (MonoidAlgebra ℤ (Abelianization G)) := by + have := abelianization_fg G + have : Algebra.FiniteType ℤ (MonoidAlgebra ℤ (Abelianization G)) := + MonoidAlgebra.finiteType_iff_group_fg.mpr inferInstance + exact Algebra.FiniteType.isNoetherianRing ℤ _ +end TrivialHomology + +namespace PolygonTracks +noncomputable def abelianKernelEquiv (a m : ℕ) (hm : 5 ≤ m) : + (Abelianization.of : polygonFullGroup a m →* Abelianization (polygonFullGroup a m)).ker ≃* + polygonAlternatingGroup a m := + MulEquiv.subgroupCongr ((Abelianization.ker_of (polygonFullGroup a m)).trans (polygonFullGroup_commutator_eq a m hm)) + +lemma finite_alternating_H2_of_full (a m : ℕ) (hm : 205 < m) + [Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 1)] + [Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 2)] : + Module.Finite ℤ (groupHomology.H2 (IntegralHomology.coefficients (polygonAlternatingGroup a m))) := by + let f : polygonFullGroup a m →* Abelianization (polygonFullGroup a m) := Abelianization.of + let e := abelianKernelEquiv a m (by omega) + have : IsNoetherianRing (MonoidAlgebra ℤ (Abelianization (polygonFullGroup a m))) := + TrivialHomology.abelianization_ring_noetherian _ + have : Group.IsPerfect (polygonAlternatingGroup a m) := polygonAlternatingGroup_perfect a m (by omega) + have : Group.IsPerfect f.ker := Group.IsPerfect.ofSurjective (f:=e.symm.toMonoidHom) e.symm.surjective + have ha : ∀g : polygonFullGroup a m, + TrivialHomology.map (QuotientRegular.conjugate f g).toMonoidHom 2 = 𝟙 _ := by + intro g + have := TrivialHomology.isIso_equiv e 2 + apply (cancel_mono (TrivialHomology.map e.toMonoidHom 2)).mp + rw [Category.id_comp, ← TrivialHomology.map_comp] + have he : e.toMonoidHom.comp (QuotientRegular.conjugate f g).toMonoidHom = + (fullConjugation a m g).comp e.toMonoidHom := by + apply MonoidHom.ext + intro x + apply Subtype.ext + rfl + rw [he,TrivialHomology.map_comp] + have hg : TrivialHomology.map (fullConjugation a m g) 2=𝟙 _ := by + apply ModuleCat.hom_ext + exact fullAction_trivial a m hm g + rw [hg,Category.comp_id] + have : Module.Finite ℤ (groupHomology (Rep.trivial ℤ f.ker ℤ) 2) := + QuotientRegular.finite_kernel_H2 f (QuotientGroup.mk'_surjective _) + (TrivialHomology.H1_isZero_of_perfect) ha + have := TrivialHomology.isIso_equiv e 2 + exact Module.Finite.of_surjective (TrivialHomology.map e.toMonoidHom 2).hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) +end PolygonTracks +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/GlobalTangentChain.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/GlobalTangentChain.lean new file mode 100644 index 0000000000000000000000000000000000000000..74367a0462a0e87e4227060963a8b12d9d081342 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/GlobalTangentChain.lean @@ -0,0 +1,121 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.LabelShiftedCharts +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RectangularBound + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section GlobalTangentChain + +theorem translated_rectangle_window {a k : ℕ} {r : CutRing} + (p : Fin 2 → ℤ) (z : CutRing × CutRing) (l v : Fin 2 → CutRing) + (hl : ∀ j, p j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < p j+k) + (hv : ∀ j, p j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < p j+k) : + ResolvedBy (fun i => (InitialCoverSystem.primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives k (fun j => pointLabel z j+p j)) i).val) + (spatialTranslate z (coordinateRectangle a l v)).val := by + rw [spatialTranslate_coordinateRectangle] + have hL j : pointLabel z j+p j ≤ endpointLabel (l j+pointCoordinate z j) ∧ + endpointLabel (l j+pointCoordinate z j) < pointLabel z j+p j+k := by + simp only [endpointLabel_add,pointLabel] + have hh := hl j + omega + have hV j : pointLabel z j+p j ≤ endpointLabel (v j+pointCoordinate z j) ∧ + endpointLabel (v j+pointCoordinate z j) < pointLabel z j+p j+k := by + simp only [endpointLabel_add,pointLabel] + have hh := hv j + omega + intro x y he + exact and_congr + (coordinateInterval_window k _ 0 _ _ (hL 0) (hV 0) x y he) + (coordinateInterval_window k _ 1 _ _ (hL 1) (hV 1) x y he) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem all_rectangle_control_to_chart (hlarge : 20 ≤ m+1) + (g : ∀ n, B.CoordinateWindowLaw n) + (k : ℕ) (p : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k p u) + (d : Fin 2) (e : Fin 5) (z : CutRing × CutRing) (l v : Fin 2 → CutRing) + (hl : ∀ j, p j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < p j+k) + (hv : ∀ j, p j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < p j+k) + (n : ℕ) (q : Fin 2 → ℤ) (W : polygonAlgebra a) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) W.val) + (hinc : W ≤ spatialTranslate z (coordinateRectangle a l v)) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (g n) q W)) : + SmallControlled B.c f (B.fullGeometricSector (by omega) + (translatedTemplate (tangentChartTemplate a k p d (signedShortSteps u e)) z) + (h d e z) (spatialTranslate z (coordinateRectangle a l v))) := by + apply B.control_trans hlarge f _ _ hf + (B.fullGeometricSector_supported (by omega) _ _ _ + (tangentChart_rectangle_resolved p d _ z l v hl hv)) hc + rw [B.tangentChartSector_eq_window (by omega) k p u h k le_rfl (g k) d e z l v hl hv] + exact B.all_window_control (by omega) g n k q (fun j => pointLabel z j+p j) + W _ hinc hW (translated_rectangle_window p z l v hl hv) + +theorem tangent_chain_unbounded (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (g : ∀ n, B.CoordinateWindowLaw n) + (k : ℕ) (p : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k p u) + (l v : Fin 2 → CutRing) + (hl : ∀ j, p j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < p j+k) + (hv : ∀ j, p j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < p j+k) + (hlv : ∀ j, ordinary (l j) ≤ ordinary (v j)) + (hlen : ∀ j, ordinary (v j)-ordinary (l j) < 1) + (hbox : ∀ j, -ordinary r < ordinary (l j) ∧ ordinary (v j) < ordinary r) + (hbox' : ∀ (d : Fin 2) (e : Fin 5) (j : Fin 2), + -ordinary r < ordinary (l j)-ordinary (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) ∧ + ordinary (v j)-ordinary (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) < ordinary r) + (n : ℕ) (q : Fin 2 → ℤ) (W : polygonAlgebra a) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) W.val) + (d : Fin 2) (T : ℕ) (z : ℕ → CutRing × CutRing) (e : ℕ → Fin 5) + (hz : ∀ i, i < T → z (i+1) = z i+tangentOffset a d (signedShortSteps u (e i))) + (hinc : ∀ i, i < T → W ≤ spatialTranslate (z i) (coordinateRectangle a l v)) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (g n) q W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (x : BoundedRelationCover M (alternatingGenerator a r m hm)) (hx : x ∈ f.range) : + B.tangentSign (by omega) k p u h d (z 0) true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z 0) true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.tangentSign (by omega) k p u h d (z T) true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z T) true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + have hstep i (hi : i < T) : + B.tangentSign (by omega) k p u h d (z i) true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z i) true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.tangentSign (by omega) k p u h d (z (i+1)) true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z (i+1)) true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + rw [hz i hi] + exact B.tangentSign_step_action hlarge hr k p u h d (e i) (z i) l v hl hv hlv hlen hbox + (hbox' d (e i)) f hf + (B.all_rectangle_control_to_chart hlarge g k p u h d (e i) (z i) l v hl hv n q W hW (hinc i hi) f hf hc) + I s x hx + have he t (ht : t ≤ T) : + B.tangentSign (by omega) k p u h d (z 0) true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z 0) true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.tangentSign (by omega) k p u h d (z t) true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z t) true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + induction t with + | zero => rfl + | succ t ih => exact (ih (by omega)).trans (hstep t (by omega)) + exact he T le_rfl + +end InitialCoverSystem +end GlobalTangentChain + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/GroupoidComponentHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/GroupoidComponentHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b6a23d571a0dceba55555bc6ffb51c4b194f5f0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/GroupoidComponentHomology.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.GroupNerveCoordinates +import OAI.GroupTheory.SimpleAmenable.Simplicial.PiFiber + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite +namespace GroupoidComponentHomology +open FreeChains ComponentTranslation SimpleAmenable + +variable {C:Type} [Groupoid.{0} C] +noncomputable def inclusion (U:C) : SingleObj (Aut U) ⥤ C := + SingleObj.functor (Aut.toEnd U) +@[simp] lemma inclusion_obj (U:C) (x:SingleObj (Aut U)) : (inclusion U).obj x=U := rfl +@[simp] lemma inclusion_map (U:C) {x y:SingleObj (Aut U)} (f:x⟶y) : + (inclusion U).map f=f.hom := rfl +instance inclusion_faithful (U:C) : (inclusion U).Faithful where + map_injective h := Iso.ext h +noncomputable instance inclusion_full (U:C) : (inclusion U).Full where + map_surjective f := ⟨(Groupoid.isoEquivHom U U).symm f,rfl⟩ +noncomputable def fiberInclusion {p:Skeleton C} (U:Fiber p) : SingleObj (Aut U.obj) ⥤ Fiber p := + (property p).lift (inclusion U.obj) (fun _=>U.property) +instance fiberInclusion_faithful {p:Skeleton C} (U:Fiber p) : (fiberInclusion U).Faithful where + map_injective h := Iso.ext (congrArg (fun f : (fiberInclusion U).obj _ ⟶ (fiberInclusion U).obj _ => f.hom) h) +noncomputable instance fiberInclusion_full {p:Skeleton C} (U:Fiber p) : (fiberInclusion U).Full where + map_surjective f := ⟨(Groupoid.isoEquivHom U.obj U.obj).symm f.hom,rfl⟩ +instance fiberInclusion_essSurj {p:Skeleton C} (U:Fiber p) : (fiberInclusion U).EssSurj where + mem_essImage V := ⟨SingleObj.star _,⟨fiberIso p U V⟩⟩ +noncomputable instance fiberInclusion_isEquivalence {p:Skeleton C} (U:Fiber p) : + (fiberInclusion U).IsEquivalence := ⟨inferInstance,inferInstance,inferInstance⟩ +noncomputable def fiberIsoHomology {p:Skeleton C} (U:Fiber p) (q:ℕ) : + groupHomology (Rep.trivial ℤ (Aut U.obj) ℤ) q ≅ (nerve (Fiber p)).homology Z q := by + haveI := NerveHomotopy.homologyMap_isIso (fiberInclusion U) Z q + exact (GroupNerveCoordinates.homologyIso (Aut U.obj) q).symm ≪≫ + asIso (SSet.homologyMap (nerveMap (fiberInclusion U)) Z q) +end GroupoidComponentHomology + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory +namespace TranslationFiltered + +variable (P:Type) [CommMonoid P] +instance regular_filtered : IsFiltered (ActionCategory P P) where + cocone_objs x y := ⟨(x.back*y.back:P),⟨y.back, by change y.back*x.back=x.back*y.back; exact mul_comm _ _⟩,⟨x.back,rfl⟩,trivial⟩ + cocone_maps {x y} f g := by + refine ⟨(x.back*y.back:P),⟨x.back,rfl⟩,?_⟩ + apply Functor.Elements.Hom.ext + change x.back*f.hom=x.back*g.hom + have h:f.hom*x.back=g.hom*x.back:=f.map_val.trans g.map_val.symm + simpa only [mul_comm] using h + nonempty := inferInstance +abbrev Q := Algebra.GrothendieckGroup P +noncomputable instance completed_action : MulAction P (Q P) := + MulAction.compHom (Q P) Algebra.GrothendieckGroup.of +lemma common_target (x y:Q P) : ∃ r s:P, + Algebra.GrothendieckGroup.of r*x=Algebra.GrothendieckGroup.of s*y := by + let f:=Localization.monoidOf (⊤:Submonoid P) + let t:=f.sec (x*y⁻¹) + refine ⟨t.2.val,t.1,?_⟩ + calc + _ = ((x*y⁻¹)*f t.2)*y := by change f t.2*x=_; simp [mul_assoc,mul_comm,mul_left_comm] + _ = _ := congrArg (fun q:Q P => q*y) (f.sec_spec (x*y⁻¹)) +noncomputable instance completed_filtered : IsFiltered (ActionCategory P (Q P)) where + cocone_objs x y := by + obtain ⟨r,s,h⟩:=common_target P x.back y.back + exact ⟨(Algebra.GrothendieckGroup.of r*x.back:Q P),⟨r,rfl⟩,⟨s,h.symm⟩,trivial⟩ + cocone_maps {x y} f g := by + have he : Algebra.GrothendieckGroup.of f.hom=Algebra.GrothendieckGroup.of g.hom := by + apply mul_right_cancel (b:=x.back) + exact f.map_val.trans g.map_val.symm + obtain ⟨c,hc⟩ := (Localization.monoidOf (⊤:Submonoid P)).exists_of_eq he + refine ⟨(Algebra.GrothendieckGroup.of c.val*y.back:Q P),⟨c.val,rfl⟩,?_⟩ + exact Functor.Elements.Hom.ext hc + nonempty := inferInstance +end TranslationFiltered + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/HomologyAdditive.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/HomologyAdditive.lean new file mode 100644 index 0000000000000000000000000000000000000000..f428f762066491bc5b17781a0f305271a274037c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/HomologyAdditive.lean @@ -0,0 +1,274 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TransitiveCanonical +import OAI.GroupTheory.SimpleAmenable.Homology.BoundedHomologyEdge + +namespace OAI + +section + +open CategoryTheory Representation Rep Finsupp +universe u +namespace HomologyAdditive +variable {k G H : Type u} [CommRing k] [Group G] [Group H] + +lemma chainsMap_add (f : G →* H) {A : Rep.{u} k G} {B : Rep.{u} k H} + (φ ψ : A ⟶ Rep.res f B) : + groupHomology.chainsMap f (φ+ψ) = groupHomology.chainsMap f φ + groupHomology.chainsMap f ψ := by + apply HomologicalComplex.hom_ext + intro n + apply ModuleCat.hom_ext + apply Finsupp.lhom_ext + intro x a + change (groupHomology.chainsMap f (φ+ψ)).f n (single x a) = + (groupHomology.chainsMap f φ).f n (single x a) + + (groupHomology.chainsMap f ψ).f n (single x a) + rw [groupHomology.chainsMap_f_single, groupHomology.chainsMap_f_single, + groupHomology.chainsMap_f_single] + change single _ (φ.hom a + ψ.hom a)=_ + exact Finsupp.single_add _ _ _ + +instance additive (n : ℕ) : (groupHomology.functor k G n).Additive where + map_add {A B φ ψ} := by + change HomologicalComplex.homologyMap (groupHomology.chainsMap (MonoidHom.id G) (φ+ψ)) n = _ + rw [chainsMap_add, HomologicalComplex.homologyMap_add] + rfl + +end HomologyAdditive + +end + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable + +namespace ConfigurationChains +variable {V : Type*} + +lemma faceSum_ofFn (n : ℕ) (f : Fin (n+1) → V) : + faceSum (List.ofFn f) = ∑i : Fin (n+1), + Finsupp.single (List.ofFn (fun j => f (i.succAbove j))) ((-1:ℤ)^i.val) := by + induction n with + | zero => simp [List.ofFn_succ, faceSum] + | succ n ih => + rw [List.ofFn_succ, faceSum, ih] + conv_rhs => rw [Fin.sum_univ_succ] + simp only [Fin.val_zero, pow_zero, Fin.val_succ, pow_succ, Fin.zero_succAbove, + map_sum, cone_single] + rw [sub_eq_add_neg, ← Finset.sum_neg_distrib] + congr 1 + apply Finset.sum_congr rfl + intro i hi + rw [← Finsupp.single_neg] + congr 1 + · simp [List.ofFn_succ] + · ring + +noncomputable def boundaryRep {G : Type*} [Monoid G] [MulAction G V] + {R : V → V → Prop} (hR : ∀g : G,∀v w,R v w → R (g • v) (g • w)) (n : ℕ) : + Rep.of (representation hR (n+1)) ⟶ Rep.of (representation hR n) := + Rep.ofHom ⟨degreeBoundary R n, by + intro g + apply LinearMap.ext + intro x + exact (representation_boundary hR g n x).symm⟩ +end ConfigurationChains + +namespace PolygonPlacement.Configuration +attribute [local instance 1200] Rep.hV2 +variable {a m p : ℕ} + +noncomputable abbrev column (a m p : ℕ) := + Rep.of (TransitiveInduction.permutationRep + (G:=polygonFullGroup a m) (X:=Configuration a m p)) + +noncomputable def face (i : Fin (p+1)) (f : Configuration a m (p+1)) : + Configuration a m p := + ⟨fun j => f (i.succAbove j),fun j k hjk => f.property (by + intro h + exact hjk (Fin.succAbove_right_injective h))⟩ + +@[simp] lemma face_apply (i : Fin (p+1)) (f : Configuration a m (p+1)) (j : Fin p) : + face i f j=f (i.succAbove j) := rfl + +@[simp] lemma face_smul (i : Fin (p+1)) (g : polygonFullGroup a m) + (f : Configuration a m (p+1)) : face i (g • f)=g • face i f := rfl + +noncomputable def faceHom (a m p : ℕ) (i : Fin (p+1)) : + column a m (p+1) ⟶ column a m p := + TransitiveInduction.equivariantMap (face i) (face_smul i) + +noncomputable def boundary (a m p : ℕ) : column a m (p+1) ⟶ column a m p := + (representationIso a m (p+1)).hom ≫ + ConfigurationChains.boundaryRep (fun g v w h => (apart_smul_iff g v w).mpr h) p ≫ + (representationIso a m p).inv + +lemma boundary_chain (c : Configuration a m (p+1) →₀ ℤ) : + chainEquiv a m p ((boundary a m p).hom c) = + ConfigurationChains.degreeBoundary (@Apart a m) p (chainEquiv a m (p+1) c) := by + change chainEquiv a m p ((chainEquiv a m p).symm _) = _ + exact (chainEquiv a m p).apply_symm_apply _ + +lemma boundary_sum (a m p : ℕ) : boundary a m p = + ∑i : Fin (p+1), ((-1:ℤ)^i.val) • faceHom a m p i := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply Finsupp.lhom_ext + intro c z + apply (chainEquiv a m p).injective + change (chainEquiv a m p) ((boundary a m p).hom (Finsupp.single c z)) = _ + rw [boundary_chain] + apply Subtype.ext + change ConfigurationChains.boundary (chainEquiv a m (p+1) (Finsupp.single c z)).val = _ + rw [chainEquiv_single_val, ConfigurationChains.boundary_single, + ConfigurationChains.faceSum_ofFn] + simp only [Finset.smul_sum] + change _ = (chainEquiv a m p + ((∑i : Fin (p+1), ((-1:ℤ)^i.val) • faceHom a m p i).hom (Finsupp.single c z))).val + simp only [Rep.sum_hom, Rep.smul_hom, Representation.IntertwiningMap.sum_apply, + Representation.IntertwiningMap.smul_apply, map_sum, map_smul, Submodule.coe_sum, + Submodule.coe_smul] + apply Finset.sum_congr rfl + intro i hi + change z • Finsupp.single _ ((-1:ℤ)^i.val) = + ((-1:ℤ)^i.val) • ((chainEquiv a m p) + ((faceHom a m p i).hom (Finsupp.single c z))).val + dsimp only [faceHom] + rw [TransitiveInduction.equivariantMap_single] + rw [chainEquiv_single_val] + simp [Finsupp.smul_single, mul_comm, face] + +noncomputable def facePermutation (i j : Fin (p+1)) : Equiv.Perm (Fin (p+1)) := + (finSuccEquiv' i).trans (finSuccEquiv' j).symm + +@[simp] lemma facePermutation_apply (i j : Fin (p+1)) (k : Fin p) : + facePermutation i j (i.succAbove k)=j.succAbove k := by + simp [facePermutation] + +lemma permHom_centralizes (f : Configuration a m p) (σ : Equiv.Perm (Fin p)) + (h : MulAction.stabilizer (polygonFullGroup a m) f) : + permHom f.val f.property σ * h.val = h.val * permHom f.val f.property σ := by + apply Subtype.ext + apply Equiv.ext + intro x + have hh (i : Fin p) (y : GenericSquare a) : h.val.val (f i y)=f i y := + congrArg (fun t : Configuration a m p => t i y) h.property + have hs : SupportedIn (permHom f.val f.property σ).val (Set.range (bank f.val f.property)) := by + intro x hx + apply perm_fixed + intro i hi + obtain ⟨y,rfl⟩ := hi + exact hx ⟨(i,y),rfl⟩ + have he := supported_fixer_commute (f:=h.val.val) (by + rintro x ⟨⟨i,y⟩,rfl⟩ + exact hh i y) hs + exact congrArg (fun e : Equiv.Perm (TrackPoint a m) => e x) he.symm.eq + +lemma permHom_face (f : Configuration a m (p+1)) (i j : Fin (p+1)) : + permHom f.val f.property (facePermutation i j) • face i f=face j f := by + apply ext + intro k + apply PolygonPlacement.ext + intro x + change (permHom f.val f.property (facePermutation i j)).val (f (i.succAbove k) x) = + f (j.succAbove k) x + rw [permHom_apply, facePermutation_apply] + +lemma homology_face_eq (a m p : ℕ) (hm : 3*(p+1)+1 < m) (q : ℕ) + (i j : Fin (p+1)) : + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (faceHom a m p i) = + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (faceHom a m p j) := by + have hm' : p+1 ≤ m := by omega + let f : Configuration a m (p+1) := + ⟨fun k => PolygonPlacement.standard (Fin.castLE hm' k),fun k l hkl => + standard_apart (fun he => hkl (Fin.castLE_injective hm' he))⟩ + exact TransitiveInduction.map_equivariant_eq_of_centralizer (face j) (face i) + (face_smul j) (face_smul i) f (fun h => transitive f h hm) + (permHom f.val f.property (facePermutation j i)) + (permHom_centralizes f _) (permHom_face f j i) q + +lemma boundary_two (a m : ℕ) : boundary a m 1 = faceHom a m 1 0 - faceHom a m 1 1 := by + rw [boundary_sum, Fin.sum_univ_two] + simp [sub_eq_add_neg] + +lemma boundary_three (a m : ℕ) : boundary a m 2 = + faceHom a m 2 0 - faceHom a m 2 1 + faceHom a m 2 2 := by + rw [boundary_sum, Fin.sum_univ_succ, Fin.sum_univ_two] + norm_num + abel + +lemma homology_boundary_two_zero (a m : ℕ) (hm : 7 < m) (q : ℕ) : + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (boundary a m 1)=0 := by + rw [boundary_two, Functor.map_sub, homology_face_eq a m 1 hm q 1 0, sub_self] + +lemma homology_boundary_three (a m : ℕ) (hm : 10 < m) (q : ℕ) : + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (boundary a m 2)= + (groupHomology.functor ℤ (polygonFullGroup a m) q).map (faceHom a m 2 0) := by + rw [boundary_three, Functor.map_add, Functor.map_sub, + homology_face_eq a m 2 hm q 1 0, homology_face_eq a m 2 hm q 2 0, sub_self, zero_add] + +noncomputable def standardLE (a m p : ℕ) (hp : p ≤ m) : Configuration a m p := + ⟨fun k => PolygonPlacement.standard (Fin.castLE hp k),fun _ _ hkl => + standard_apart (fun he => hkl (Fin.castLE_injective hp he))⟩ + +lemma boundary_square (a m p : ℕ) : boundary a m (p+1) ≫ boundary a m p=0 := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply LinearMap.ext + intro c + apply (chainEquiv a m p).injective + change chainEquiv a m p ((boundary a m p).hom ((boundary a m (p+1)).hom c)) = + chainEquiv a m p 0 + rw [boundary_chain, boundary_chain, ConfigurationChains.degreeBoundary_square, map_zero] + +lemma boundary_exact (a m p : ℕ) (hm : 33 ≤ m) (hp : p ≤ 2) : + (ShortComplex.mk (boundary a m (p+1)) (boundary a m p) (boundary_square a m p)).Exact := by + apply (ShortComplex.exact_map_iff_of_faithful _ (forget₂ (Rep.{0} ℤ (polygonFullGroup a m)) + (ModuleCat.{0} ℤ))).mp + rw [ShortComplex.moduleCat_exact_iff] + intro x hx + change (boundary a m p).hom x=0 at hx + have hc : ConfigurationChains.degreeBoundary (@Apart a m) p (chainEquiv a m (p+1) x)=0 := by + rw [← boundary_chain, hx, map_zero] + obtain ⟨y,hy⟩ := (configuration_lowDegree_exact hm hp _).mp hc + refine ⟨(chainEquiv a m (p+2)).symm y,?_⟩ + apply (chainEquiv a m (p+1)).injective + change chainEquiv a m (p+1) ((boundary a m (p+1)).hom _) = _ + rw [boundary_chain, LinearEquiv.apply_symm_apply, hy] + +lemma boundary_zero_eq_face (a m : ℕ) : boundary a m 0=faceHom a m 0 0 := by + rw [boundary_sum] + simp + +lemma boundary_zero_epi (a m : ℕ) (hm : 0 < m) : Epi (boundary a m 0) := by + rw [boundary_zero_eq_face, Rep.epi_iff_surjective] + change Function.Surjective (Finsupp.mapDomain (face (0:Fin 1))) + apply Finsupp.mapDomain_surjective + intro f + refine ⟨standardLE a m 1 (by omega),?_⟩ + apply ext + intro i + exact Fin.elim0 i + +lemma face_H0_isIso (a m p : ℕ) (hm : 3*(p+1)+1 < m) (i : Fin (p+1)) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 0).map (faceHom a m p i)) := by + let f := standardLE a m (p+1) (by omega : p+1 ≤ m) + exact TransitiveInduction.isIso_map_equivariant_H0 (face i) (face_smul i) f + (fun h => transitive f h hm) (fun h => transitive _ h (by omega)) + +lemma boundary_two_H0_isIso (a m : ℕ) (hm : 10 < m) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 0).map (boundary a m 2)) := by + rw [homology_boundary_three a m hm 0] + exact face_H0_isIso a m 2 hm 0 +lemma boundary_zero_H1_isIso (a m : ℕ) (hm : 33 ≤ m) : + IsIso ((groupHomology.functor ℤ (polygonFullGroup a m) 1).map (boundary a m 0)) := by + let boundaryEpi := boundary_zero_epi a m (by omega) + let boundaryIso : IsIso (BoundedHomologyEdge.Hmap 0 (boundary a m 2)) := + boundary_two_H0_isIso a m (by omega) + exact BoundedHomologyEdge.chain_H1_isIso (boundary a m 0) (boundary a m 1) + (boundary a m 2) (boundary_square a m 0) (boundary_square a m 1) + (boundary_exact a m 0 hm (by omega)) (boundary_exact a m 1 hm (by omega)) + (homology_boundary_two_zero a m (by omega) 1) + +end PolygonPlacement.Configuration +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralHomologyFunctorial.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralHomologyFunctorial.lean new file mode 100644 index 0000000000000000000000000000000000000000..92b773de8bf99e9e0497572ecff85ca1a21c3340 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralHomologyFunctorial.lean @@ -0,0 +1,192 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.IntegralTransgressionFinite + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section IntegralHomologyFunctorial +open Classical CategoryTheory Finsupp groupHomology +namespace IntegralHomology +variable {E F G : Type} [Group E] [Group F] [Group G] + +lemma chainsMap2_eq (f : E →* F) : + (chainsMap₂ f (coefficientMap f)).hom=mapC2 f := by + apply Finsupp.lhom_ext + intro xy n + simp [chainsMap₂,coefficientMap,mapC2] + +lemma cyclesMap2_val (f : E →* F) (x : cycles₂ (coefficients E)) : + (mapCycles₂ f (coefficientMap f) x).val=mapC2 f x.val := by + rw [coe_mapCycles₂] + exact LinearMap.congr_fun (chainsMap2_eq f) x.val + +theorem mapH2_inner (c : E) : mapH2 (MulAut.conj c).toMonoidHom=LinearMap.id := by + apply LinearMap.ext + intro z + induction z using H2_induction_on with + | h x => + change groupHomology.map (MulAut.conj c).toMonoidHom _ 2 (H2π (coefficients E) x)= + H2π (coefficients E) x + rw [H2π_comp_map_apply] + apply (H2π_eq_iff _ _).mpr + change ∃y, d₃₂ (coefficients E) y= + (mapCycles₂ (MulAut.conj c).toMonoidHom (coefficientMap _) x).val-x.val + rw [cyclesMap2_val] + refine ⟨-prism2 c x.val,?_⟩ + have ht := LinearMap.congr_fun (prism_identity c) x.val + change d₃₂ (coefficients E) (prism2 c x.val) + prism1 c (d₂₁ (coefficients E) x.val) = + x.val-mapC2 (MulAut.conj c).toMonoidHom x.val at ht + have hx : d₂₁ (coefficients E) x.val=0 := x.property + rw [hx,map_zero,add_zero] at ht + rw [map_neg,ht] + abel + +@[simp] theorem mapH2_id : mapH2 (MonoidHom.id E)=LinearMap.id := by + have he : coefficientMap (MonoidHom.id E)=𝟙 (coefficients E) := rfl + unfold mapH2 + rw [he,groupHomology.map_id] + rfl + +theorem mapH2_comp (f : E →* F) (g : F →* G) : + mapH2 (g.comp f)=(mapH2 g).comp (mapH2 f) := by + have he : coefficientMap (g.comp f)=coefficientMap f ≫ (Rep.resFunctor f).map (coefficientMap g) := by + apply Rep.hom_ext + ext + rfl + unfold mapH2 + rw [he,groupHomology.map_comp] + rfl + +theorem mapH2_conjugate (c : F) (f : E →* F) : + mapH2 ((MulAut.conj c).toMonoidHom.comp f)=mapH2 f := by + rw [mapH2_comp,mapH2_inner,LinearMap.id_comp] + +end IntegralHomology +end IntegralHomologyFunctorial + +section ConfigurationChains +open Classical Finsupp +namespace ConfigurationChains +variable {V : Type*} +abbrev Chain (V : Type*) := List V →₀ ℤ + +noncomputable def cone (v : V) : Chain V →ₗ[ℤ] Chain V := + Finsupp.lmapDomain ℤ ℤ (List.cons v) + +@[simp] theorem cone_single (v : V) (l : List V) (n : ℤ) : + cone v (single l n)=single (v::l) n := by + simp [cone] + +noncomputable def faceSum : List V → Chain V + | [] => 0 + | v::l => single l 1-cone v (faceSum l) + +noncomputable def boundary : Chain V →ₗ[ℤ] Chain V := + Finsupp.linearCombination ℤ faceSum + +@[simp] theorem boundary_single (l : List V) (n : ℤ) : + boundary (single l n)=n • faceSum l := by + simp [boundary] + +theorem boundary_cone (v : V) (c : Chain V) : + boundary (cone v c)=c-cone v (boundary c) := by + induction c using Finsupp.induction with + | zero => simp + | @single_add l n c hl hn ih => + simp only [map_add,cone_single,boundary_single,faceSum,smul_sub,map_smul,ih] + rw [Finsupp.smul_single,smul_eq_mul,mul_one] + abel + +@[simp] theorem boundary_faceSum (l : List V) : boundary (faceSum l)=0 := by + induction l with + | nil => simp [faceSum] + | cons v l ih => simp [faceSum,boundary_cone,ih] + +@[simp] theorem boundary_boundary (c : Chain V) : boundary (boundary c)=0 := by + induction c using Finsupp.induction with + | zero => simp + | @single_add l n c hl hn ih => simp [ih] + +noncomputable def vertices (c : Chain V) : Finset V := c.support.biUnion List.toFinset + +@[simp] theorem vertices_zero : vertices (0 : Chain V)=∅ := by simp [vertices] + +theorem mem_vertices {c : Chain V} {v : V} : v∈vertices c ↔ ∃l∈c.support,v∈l := by + simp [vertices] + +theorem vertices_single_subset (l : List V) (n : ℤ) : + vertices (single l n)⊆l.toFinset := by + intro v hv + obtain ⟨s,hs,hv⟩ := mem_vertices.mp hv + have he : s=l := Finset.mem_singleton.mp (Finsupp.support_single_subset hs) + simpa [he] using hv + +theorem vertices_add_subset (c d : Chain V) : vertices (c+d)⊆vertices c∪vertices d := by + intro v hv + obtain ⟨l,hl,hv⟩ := mem_vertices.mp hv + rcases Finset.mem_union.mp (Finsupp.support_add hl) with hl|hl + · exact Finset.mem_union.mpr (Or.inl (mem_vertices.mpr ⟨l,hl,hv⟩)) + · exact Finset.mem_union.mpr (Or.inr (mem_vertices.mpr ⟨l,hl,hv⟩)) + +@[simp] theorem vertices_neg (c : Chain V) : vertices (-c)=vertices c := by + simp [vertices] + +theorem vertices_sub_subset (c d : Chain V) : vertices (c-d)⊆vertices c∪vertices d := by + simpa [sub_eq_add_neg] using vertices_add_subset c (-d) + +theorem cone_support_subset (v : V) (c : Chain V) : + (cone v c).support⊆c.support.image (List.cons v) := by + exact Finsupp.mapDomain_support + +theorem vertices_cone_subset (v : V) (c : Chain V) : + vertices (cone v c)⊆insert v (vertices c) := by + intro x hx + obtain ⟨l,hl,hx⟩ := mem_vertices.mp hx + obtain ⟨s,hs,rfl⟩ := Finset.mem_image.mp (cone_support_subset v c hl) + rcases List.mem_cons.mp hx with rfl|hx + · exact Finset.mem_insert_self _ _ + · exact Finset.mem_insert_of_mem (mem_vertices.mpr ⟨s,hs,hx⟩) + +theorem faceSum_support {l s : List V} (hs : s∈(faceSum l).support) : + s.Sublist l ∧ s.length+1=l.length := by + induction l generalizing s with + | nil => simp [faceSum] at hs + | cons v l ih => + have hu := Finsupp.support_sub hs + rcases Finset.mem_union.mp hu with hs|hs + · have he : s=l := Finset.mem_singleton.mp (Finsupp.support_single_subset hs) + subst s + exact ⟨List.sublist_cons_self _ _,by simp⟩ + · obtain ⟨t,ht,rfl⟩ := Finset.mem_image.mp (cone_support_subset v _ hs) + obtain ⟨hts,htl⟩ := ih ht + exact ⟨hts.cons_cons _,by simp; omega⟩ + +theorem faceSum_support_card (l : List V) : (faceSum l).support.card≤l.length := by + induction l with + | nil => simp [faceSum] + | cons v l ih => + calc + (faceSum (v::l)).support.card ≤ + ((single l (1:ℤ)).support∪(cone v (faceSum l)).support).card := + Finset.card_le_card Finsupp.support_sub + _ ≤ (single l (1:ℤ)).support.card+(cone v (faceSum l)).support.card := Finset.card_union_le _ _ + _ ≤ 1+(faceSum l).support.card := by + have hc := Finset.card_le_card (cone_support_subset v (faceSum l)) + have hi := Finset.card_image_le (s:=(faceSum l).support) (f:=List.cons v) + simp only [Finsupp.support_single _ (by decide : (1:ℤ)≠0),Finset.card_singleton] + omega + _ ≤ (v::l).length := by simp; omega + +end ConfigurationChains +end ConfigurationChains + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralTransgressionFinite.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralTransgressionFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd4ed05cf1cf5bf9123feb0d91504bc80b4de4b0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralTransgressionFinite.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FiniteCentralKernel +import OAI.GroupTheory.SimpleAmenable.Homology.IntegralTransgressionHomology + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section IntegralTransgressionFinite +open Classical +namespace IntegralTransgression +open groupHomology CategoryTheory +variable {H E : Type} [Group H] [Group E] +variable (q : H →* E) (hq : Function.Surjective q) (hc : q.ker ≤ Subgroup.center H) + + theorem onCycles_kills_homology_kernel : + (H2π (coefficients E)).hom.ker ≤ (onCycles q hq hc).ker := by + intro x hx + have hb := (H2π_eq_zero_iff x).mp hx + obtain ⟨y,hy⟩ := hb + change onChains q hq hc x.val=0 + rw [←hy] + exact LinearMap.congr_fun (onChains_d3 q hq hc) y + +theorem cycles_to_h2_surjective : Function.Surjective (H2π (coefficients E)) := by + intro x + induction x using H2_induction_on with + | h x => exact ⟨x,rfl⟩ + +noncomputable def transgression : H2 (coefficients E) →ₗ[ℤ] Additive (Kernel q hc) := +by + let f : cycles₂ (coefficients E) →ₗ[ℤ] H2 (coefficients E) := (H2π (coefficients E)).hom + have hf : Function.Surjective f := cycles_to_h2_surjective + have hk : f.ker ≤ (onCycles q hq hc).ker := onCycles_kills_homology_kernel q hq hc + exact factorThrough f hf (onCycles q hq hc) hk + +@[simp] theorem transgression_cycle (x : cycles₂ (coefficients E)) : + transgression q hq hc (H2π (coefficients E) x)=onCycles q hq hc x := + factorThrough_apply _ _ _ _ x + +theorem transgression_surjective [Group.IsPerfect H] : + Function.Surjective (transgression q hq hc) := by + intro k + obtain ⟨x,hx⟩ := onCycles_surjective q hq hc k + exact ⟨H2π (coefficients E) x,(transgression_cycle q hq hc x).trans hx⟩ + +include hq hc in + +theorem kernel_fg [Group.IsPerfect H] [Module.Finite ℤ (H2 (coefficients E))] : + Group.FG q.ker := by + have : Module.Finite ℤ (Additive (Kernel q hc)) := + Module.Finite.of_surjective (transgression q hq hc) (transgression_surjective q hq hc) + have : AddGroup.FG (Additive (Kernel q hc)) := Module.Finite.iff_addGroup_fg.mp inferInstance + have : Group.FG (Kernel q hc) := GroupFG.iff_add_fg.mpr inferInstance + exact this + +end IntegralTransgression +end IntegralTransgressionFinite + +section HomologyFinitePresentation + +theorem universalKernel_fg_of_integral_h2 {E : Type} [Group E] [Group.IsPerfect E] + [Module.Finite ℤ (groupHomology.H2 (IntegralTransgression.coefficients E))] : + Group.FG (universalProjection E).ker := + IntegralTransgression.kernel_fg (universalProjection E) + (universalProjection_surjective E) (universalProjection_central E) + +theorem finitelyPresented_of_central_cover_h2 {H E : Type} [Group H] [Group E] + [Group.IsPerfect E] [Group.IsFinitelyPresented H] + [Module.Finite ℤ (groupHomology.H2 (IntegralTransgression.coefficients E))] + (q : H →* E) (hq : Function.Surjective q) (hc : q.ker ≤ Subgroup.center H) : + Group.IsFinitelyPresented E := by + have := universalKernel_fg_of_integral_h2 (E:=E) + exact finitelyPresented_of_central_cover q hq hc + +end HomologyFinitePresentation + +section IntegralHomologyConjugation +open Classical CategoryTheory Finsupp groupHomology +namespace IntegralHomology + +abbrev coefficients (E : Type) [Group E] := IntegralTransgression.coefficients E + +variable {E F : Type} [Group E] [Group F] + +noncomputable def coefficientMap (f : E →* F) : coefficients E ⟶ Rep.res f (coefficients F) := + Rep.ofHom ⟨LinearMap.id,fun _ => rfl⟩ + +noncomputable def mapH2 (f : E →* F) : H2 (coefficients E) →ₗ[ℤ] H2 (coefficients F) := + (groupHomology.map f (coefficientMap f) 2).hom + +noncomputable def mapC2 (f : E →* F) : (E×E →₀ ℤ) →ₗ[ℤ] (F×F →₀ ℤ) := + Finsupp.lmapDomain ℤ ℤ (Prod.map f f) + +@[simp] theorem mapC2_single (f : E →* F) (x y : E) (n : ℤ) : + mapC2 f (single (x,y) n)=single (f x,f y) n := by + simp [mapC2] + +noncomputable def prism1 (c : E) : (E →₀ ℤ) →ₗ[ℤ] (E×E →₀ ℤ) := + Finsupp.linearCombination ℤ (fun x => single (c,x) 1 - single (MulAut.conj c x,c) 1) + +noncomputable def prism2 (c : E) : (E×E →₀ ℤ) →ₗ[ℤ] (E×E×E →₀ ℤ) := + Finsupp.linearCombination ℤ (fun xy => + single (c,xy.1,xy.2) 1 - single (MulAut.conj c xy.1,c,xy.2) 1 + + single (MulAut.conj c xy.1,MulAut.conj c xy.2,c) 1) + +@[simp] theorem prism1_single (c x : E) (n : ℤ) : + prism1 c (single x n)=single (c,x) n-single (MulAut.conj c x,c) n := by + simp [prism1,smul_sub,Finsupp.smul_single] + +@[simp] theorem prism2_single (c x y : E) (n : ℤ) : + prism2 c (single (x,y) n)=single (c,x,y) n-single (MulAut.conj c x,c,y) n+ + single (MulAut.conj c x,MulAut.conj c y,c) n := by + simp [prism2,smul_sub,smul_add,Finsupp.smul_single] + +lemma boundary2_single (x y : E) (n : ℤ) : + d₂₁ (coefficients E) (single (x,y) n)=single y n-single (x*y) n+single x n := by + rw [d₂₁_single] + rfl + +lemma boundary3_single (x y z : E) (n : ℤ) : + d₃₂ (coefficients E) (single (x,y,z) n)= + single (y,z) n-single (x*y,z) n+single (x,y*z) n-single (x,y) n := by + rw [d₃₂_single] + rfl + +theorem prism_identity (c : E) : + (d₃₂ (coefficients E)).hom.comp (prism2 c) + + (prism1 c).comp (d₂₁ (coefficients E)).hom = + LinearMap.id - mapC2 (MulAut.conj c).toMonoidHom := by + apply Finsupp.lhom_ext + intro xy n + rcases xy with ⟨x,y⟩ + change d₃₂ (coefficients E) (prism2 c (single (x,y) n)) + + prism1 c (d₂₁ (coefficients E) (single (x,y) n)) = + single (x,y) n-mapC2 (MulAut.conj c).toMonoidHom (single (x,y) n) + rw [prism2_single, map_add, map_sub, boundary3_single, boundary3_single, + boundary3_single, boundary2_single, map_add, map_sub, prism1_single, + prism1_single, prism1_single, mapC2_single] + simp only [MulEquiv.toMonoidHom_eq_coe,MonoidHom.coe_coe,MulAut.conj_apply,mul_assoc, + inv_mul_cancel_left,inv_mul_cancel,mul_one] + abel + +end IntegralHomology +end IntegralHomologyConjugation + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralTransgressionHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralTransgressionHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..98fb27c861059cc6e8d77e2ec3f22b3494da295d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/IntegralTransgressionHomology.lean @@ -0,0 +1,161 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.VerticalStringResolution + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section IntegralTransgressionHomology +open Classical +open scoped TensorProduct +namespace IntegralTransgression +open groupHomology +variable {H E : Type} [Group H] [Group E] + +abbrev coefficients (E : Type) [Group E] := Rep.trivial ℤ E ℤ + +theorem d2_surjective [Group.IsPerfect E] : + Function.Surjective (d₂₁ (coefficients E)) := by + intro z + let c : cycles₁ (coefficients E) := (cycles₁IsoOfIsTrivial (coefficients E)).inv z + have hz : H1π (coefficients E) c = 0 := by + apply (H1AddEquivOfIsTrivial (coefficients E)).injective + have : Group.IsPerfect (Abelianization E) := + Group.IsPerfect.ofSurjective (f := Abelianization.of) (QuotientGroup.mk'_surjective (commutator E)) + have : Subsingleton (Abelianization E) := inferInstance + have : Subsingleton (Additive (Abelianization E) ⊗[ℤ] ℤ) := inferInstance + exact Subsingleton.elim _ _ + have h := (H1π_eq_zero_iff c).mp hz + exact h + +variable (q : H →* E) (hq : Function.Surjective q) (hc : q.ker ≤ Subgroup.center H) + +noncomputable def onChains : (E × E →₀ ℤ) →ₗ[ℤ] Additive (Kernel q hc) := + Finsupp.linearCombination ℤ (fun xy : E×E => Additive.ofMul (factor q hq hc xy.1 xy.2)) + +@[simp] theorem onChains_single (x y : E) (n : ℤ) : + onChains q hq hc (Finsupp.single (x,y) n)= n • Additive.ofMul (factor q hq hc x y) := by + simp only [onChains,Finsupp.linearCombination_single] + +theorem additive_cocycle (x y z : E) : + Additive.ofMul (factor q hq hc y z) - Additive.ofMul (factor q hq hc (x*y) z) + + Additive.ofMul (factor q hq hc x (y*z)) - Additive.ofMul (factor q hq hc x y)=0 := by + have he : Additive.ofMul (factor q hq hc x y) + Additive.ofMul (factor q hq hc (x*y) z) = + Additive.ofMul (factor q hq hc y z) + Additive.ofMul (factor q hq hc x (y*z)) := + congrArg Additive.ofMul (factor_cocycle q hq hc x y z) + calc + _ = (Additive.ofMul (factor q hq hc y z) + Additive.ofMul (factor q hq hc x (y*z))) - + (Additive.ofMul (factor q hq hc x y) + Additive.ofMul (factor q hq hc (x*y) z)) := by abel + _ = 0 := sub_eq_zero.mpr he.symm + +theorem onChains_d3 : + (onChains q hq hc).comp (d₃₂ (coefficients E)).hom = 0 := by + apply Finsupp.lhom_ext + intro xyz n + rcases xyz with ⟨x,y,z⟩ + change onChains q hq hc (d₃₂ (coefficients E) (Finsupp.single (x,y,z) n)) = 0 + rw [d₃₂_single (A := coefficients E) (x,y,z) n] + change onChains q hq hc ((Finsupp.single (y,z) n - Finsupp.single (x*y,z) n) + + Finsupp.single (x,y*z) n - Finsupp.single (x,y) n)=0 + rw [(onChains q hq hc).map_sub, (onChains q hq hc).map_add, + (onChains q hq hc).map_sub] + simp only [onChains_single] + simpa only [zsmul_sub,zsmul_add,zsmul_zero] using + congrArg (fun v : Additive (Kernel q hc) => (n : ℤ) • v) (additive_cocycle q hq hc x y z) + +noncomputable def onCycles : cycles₂ (coefficients E) →ₗ[ℤ] Additive (Kernel q hc) := + (onChains q hq hc).comp (cycles₂ (coefficients E)).subtype + +end IntegralTransgression +end IntegralTransgressionHomology + +section IntegralTransgressionSurjective +open Classical +namespace IntegralTransgression +open groupHomology + +noncomputable def factorThrough {R : Type*} [CommRing R] {M N P : Type*} [AddCommGroup M] [AddCommGroup N] + [AddCommGroup P] [Module R M] [Module R N] [Module R P] (f : M →ₗ[R] N) (hf : Function.Surjective f) + (g : M →ₗ[R] P) (hg : f.ker ≤ g.ker) : N →ₗ[R] P := + (f.ker.liftQ g hg).comp (f.quotKerEquivOfSurjective hf).symm.toLinearMap + +@[simp] theorem factorThrough_apply {R : Type*} [CommRing R] {M N P : Type*} [AddCommGroup M] [AddCommGroup N] + [AddCommGroup P] [Module R M] [Module R N] [Module R P] (f : M →ₗ[R] N) (hf : Function.Surjective f) + (g : M →ₗ[R] P) (hg : f.ker ≤ g.ker) (x : M) : + factorThrough f hf g hg (f x)=g x := by + simp [factorThrough] + +variable {H E : Type} [Group H] [Group E] +variable (q : H →* E) (hq : Function.Surjective q) (hc : q.ker ≤ Subgroup.center H) + +theorem onCycles_surjective [Group.IsPerfect H] : + Function.Surjective (onCycles q hq hc) := by + let : Group.IsPerfect E := Group.IsPerfect.ofSurjective (f := q) hq + let R := (onCycles q hq hc).range + let Q := Additive (Kernel q hc) ⧸ R + let u : (E×E →₀ ℤ) →ₗ[ℤ] Q := R.mkQ.comp (onChains q hq hc) + have hu : (d₂₁ (coefficients E)).hom.ker ≤ u.ker := by + intro x hx + change R.mkQ (onChains q hq hc x)=0 + apply (Submodule.Quotient.mk_eq_zero R).mpr + exact ⟨⟨x,hx⟩,rfl⟩ + let b : (E →₀ ℤ) →ₗ[ℤ] Q := + factorThrough (d₂₁ (coefficients E)).hom d2_surjective u hu + have hb (x : E×E →₀ ℤ) : b (d₂₁ (coefficients E) x)=u x := + factorThrough_apply _ _ _ _ x + have hp (x y : E) : + R.mkQ (Additive.ofMul (factor q hq hc x y)) = + b (Finsupp.single y 1) - b (Finsupp.single (x*y) 1) + b (Finsupp.single x 1) := by + have ht := hb (Finsupp.single (x,y) 1) + change b (d₂₁ (coefficients E) (Finsupp.single (x,y) (1:ℤ))) = + R.mkQ (onChains q hq hc (Finsupp.single (x,y) 1)) at ht + rw [d₂₁_single (A:=coefficients E) (x,y) (1:ℤ)] at ht + change b (Finsupp.single y 1 - Finsupp.single (x*y) 1 + Finsupp.single x 1) = + R.mkQ (onChains q hq hc (Finsupp.single (x,y) 1)) at ht + simpa only [map_add,map_sub,onChains_single,one_smul] using ht.symm + have hb1 : b (Finsupp.single 1 1)=0 := by + simpa using (hp 1 1).symm + let t : H →* Multiplicative Q := + { toFun := fun h => Multiplicative.ofAdd + (R.mkQ (Additive.ofMul (remainder q hq hc h)) + b (Finsupp.single (q h) 1)) + map_one' := by + apply Multiplicative.toAdd.injective + change R.mkQ (Additive.ofMul (remainder q hq hc 1)) + b (Finsupp.single (q 1) 1)=0 + simp [hb1] + map_mul' h k := by + apply Multiplicative.toAdd.injective + change R.mkQ (Additive.ofMul (remainder q hq hc (h*k))) + + b (Finsupp.single (q (h*k)) 1) = + (R.mkQ (Additive.ofMul (remainder q hq hc h)) + b (Finsupp.single (q h) 1)) + + (R.mkQ (Additive.ofMul (remainder q hq hc k)) + b (Finsupp.single (q k) 1)) + rw [remainder_mul] + change R.mkQ (Additive.ofMul (remainder q hq hc h) + + Additive.ofMul (remainder q hq hc k) + Additive.ofMul (factor q hq hc (q h) (q k))) + + b (Finsupp.single (q (h*k)) 1) = _ + rw [map_add,map_add,hp,map_mul] + abel } + have ht (h : H) : t h=1 := by + let : Group.IsPerfect t.range := Group.IsPerfect.range t + have : Subsingleton t.range := inferInstance + exact congrArg Subtype.val (Subsingleton.elim (⟨t h,h,rfl⟩ : t.range) 1) + intro k + have hz : R.mkQ k=0 := by + have he := congrArg Multiplicative.toAdd (ht (inclusion q hc k.toMul)) + change R.mkQ (Additive.ofMul (remainder q hq hc (inclusion q hc k.toMul))) + + b (Finsupp.single (q (inclusion q hc k.toMul)) 1)=0 at he + have hk : q (inclusion q hc k.toMul)=1 := k.toMul.property + simpa only [remainder_inclusion,ofMul_toMul,hk,hb1,add_zero] using he + exact (Submodule.Quotient.mk_eq_zero R).mp hz + +end IntegralTransgression +end IntegralTransgressionSurjective + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/InwardTemplateResolutions.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/InwardTemplateResolutions.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e5020db8d5f9fa857a9a3746559c631dc67ad81 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/InwardTemplateResolutions.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CrossingCellActions +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentInwardModel + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InwardTemplateResolutions +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +omit [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem concurrent_margin_resolved (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) : + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (A.concurrentPrimitives t u) i).val) + (A.geometry.marginPolygon t u).val := by + intro x y hh + exact translatedTemplate_resolved (Sum.elim + (fun j : Fin 4 => (⟨j.val+1,by omega⟩,A.geometry.anchors t j)) + (coordinateWindowPrimitives A.geometry.window A.geometry.start)) + (coordinateRectangle a (A.geometry.margins t).lower (A.geometry.margins t).upper) + (fun x y hh => A.geometry.margin_resolved t x y (fun i => hh (Sum.inr i))) u x y hh + +omit [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem concurrent_positive_resolved (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (j : Fin 4) : + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (A.concurrentPrimitives t u) i).val) + (A.geometry.positiveDecision t u j).val := by + intro x y hh + exact hh (Sum.inl j) + +omit [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem concurrent_inward_resolved (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (z : ℝ × ℝ) : + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (A.concurrentPrimitives t u) i).val) + (A.geometry.inwardMargin t u z).val := by + intro x y hh + have hgate k : x ∈ (A.geometry.inwardGate t u z k).val ↔ y ∈ (A.geometry.inwardGate t u z k).val := by + dsimp only [ConcurrentGeometry.inwardGate] + split_ifs + · exact A.concurrent_positive_resolved t u (axisDirection k) x y hh + · exact not_congr (A.concurrent_positive_resolved t u (axisDirection k) x y hh) + · exact Iff.rfl + exact and_congr (and_congr (A.concurrent_margin_resolved t u x y hh) (hgate 0)) (hgate 1) + +omit [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem concurrent_localDecision_resolved (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (z : ℝ × ℝ) (j : Fin 4) (c : CutRing) : + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (A.concurrentPrimitives t u) i).val) + (A.geometry.localDecision t u z j c).val := by + intro x y hh + dsimp only [ConcurrentGeometry.localDecision] + split_ifs + · exact not_congr (A.concurrent_positive_resolved t u j x y hh) + · exact Iff.rfl + · exact Iff.rfl + +end InitialCoverSystem.PatchAtlas + +theorem polygonBooleanPullback_resolved {a : ℕ} {ι κ : Type*} [Finite κ] + (U : ι → polygonAlgebra a) (V : κ → polygonAlgebra a) + (h : ∀ i, ResolvedBy (fun j => (U j).val) (V i).val) (S : Set (κ → Bool)) : + ResolvedBy (fun j => (U j).val) (polygonBooleanPullback V S).val := by + intro x y hxy + have he : polygonAssignment V x=polygonAssignment V y := + (polygonAssignment_eq_iff V x y).mpr (fun i => h i x y hxy) + change polygonAssignment V x ∈ S ↔ polygonAssignment V y ∈ S + rw [he] + +end InwardTemplateResolutions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/LabelRelabel.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/LabelRelabel.lean new file mode 100644 index 0000000000000000000000000000000000000000..16676112901951fcd3bf75433fbca33ad049f31a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/LabelRelabel.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.LabelledMonoidal + +namespace OAI + +section +open CategoryTheory MonoidalCategory +namespace SimpleAmenable.PolygonObject.Labelled + +variable {a n m : ℕ} +abbrev Reduced (g : Fin n → CutRing × CutRing) : Prop := + ∀ i, orbitRepresentative (g i)=g i +variable (f : (Fin n → CutRing × CutRing) → (Fin m → CutRing × CutRing)) + (hf : ∀g, Reduced g → Reduced (f g)) +noncomputable def relabel : Labelled a n ⥤ Labelled a m where + obj U := ⟨U.polygon,fun k => f (U.label k),fun k => hf _ (U.reduced k)⟩ + map g := ⟨g.arrow,g.positional,fun x => congrArg f (g.labelled x)⟩ + map_id _ := Hom.ext _ _ rfl + map_comp _ _ := Hom.ext _ _ rfl +noncomputable def relabelUnit : 𝟙_ (Labelled a m) ⟶ (relabel f hf).obj (𝟙_ (Labelled a n)) where + arrow := 𝟙 _ + positional _ := rfl + labelled x := by + change Point PolygonObject.empty at x + exact isEmptyElim x +noncomputable def relabelTensor (U V : Labelled a n) : + (relabel f hf).obj U ⊗ (relabel f hf).obj V ⟶ (relabel f hf).obj (U ⊗ V) where + arrow := 𝟙 _ + positional _ := rfl + labelled x := by + change f ((sum U V).label x.val.1) = + (sum ((relabel f hf).obj U) ((relabel f hf).obj V)).label x.val.1 + obtain ⟨y,rfl⟩ := (sumPointEquiv U.polygon V.polygon).surjective x + cases y <;> simp only [relabel,sumPointEquiv_inl,sumPointEquiv_inr,Fin.addCases_left,Fin.addCases_right] +noncomputable instance relabelMonoidal : (relabel (a:=a) f hf).Monoidal := + Functor.CoreMonoidal.toMonoidal { + εIso := asIso (relabelUnit f hf) + μIso U V := asIso (relabelTensor f hf U V) + μIso_hom_natural_left := by + intros; apply Hom.ext + change _ ≫ 𝟙 _ = 𝟙 _ ≫ _ + simp only [Category.comp_id] + rfl + μIso_hom_natural_right := by + intros; apply Hom.ext + change _ ≫ 𝟙 _ = 𝟙 _ ≫ _ + simp only [Category.comp_id] + rfl + associativity := by + intros; apply Hom.ext + change sumArrow (𝟙 _) (𝟙 _) ≫ 𝟙 _ ≫ _ = _ ≫ sumArrow (𝟙 _) (𝟙 _) ≫ 𝟙 _ + simp only [sumArrow_id,Category.id_comp,Category.comp_id] + rfl + left_unitality := by + intros; apply Hom.ext + change _ = sumArrow (𝟙 _) (𝟙 _) ≫ 𝟙 _ ≫ _ + simp only [sumArrow_id,Category.id_comp] + rfl + right_unitality := by + intros; apply Hom.ext + change _ = sumArrow (𝟙 _) (𝟙 _) ≫ 𝟙 _ ≫ _ + simp only [sumArrow_id,Category.id_comp] + rfl } +noncomputable instance relabelBraided : (relabel (a:=a) f hf).Braided where + braided U V := by + apply Hom.ext + change 𝟙 _ ≫ sumSwap U.polygon V.polygon = sumSwap U.polygon V.polygon ≫ 𝟙 _ + simp only [Category.id_comp,Category.comp_id] +@[simp] lemma relabel_map_arrow {U V : Labelled a n} (g:U⟶V) : + ((relabel f hf).map g).arrow=g.arrow := rfl +@[simp] lemma relabel_ε_arrow : (Functor.LaxMonoidal.ε (relabel (a:=a) f hf)).arrow=𝟙 _ := rfl +@[simp] lemma relabel_μ_arrow (U V : Labelled a n) : + (Functor.LaxMonoidal.μ (relabel f hf) U V).arrow=𝟙 _ := rfl +end SimpleAmenable.PolygonObject.Labelled + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedBlockDifferentials.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedBlockDifferentials.lean new file mode 100644 index 0000000000000000000000000000000000000000..a95bcae48c510f9a39428bb8de6c4a62757ab672 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedBlockDifferentials.lean @@ -0,0 +1,202 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.MarkedGradedFinite +import OAI.GroupTheory.SimpleAmenable.Homology.MarkedPrimitiveFaces +import OAI.GroupTheory.SimpleAmenable.Homology.RegularTotalFiniteDifferentials + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial SimplicialObject Opposite AlgebraicTopology HomologicalComplex +namespace MarkedH1 +open FreeChains ComponentTranslation IntervalBar.Diagram RegularLabels RegularCoordinates MonoidNerveCoordinates RegularFiniteFaces + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +@[reassoc] lemma imageP00 (a:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,0),rfl⟩,![],a,![]⟩ ≫ (gradedIso 0).hom = P10 a := image00 a +@[reassoc] lemma imageP01 (a b:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,1),rfl⟩,![a],b,![]⟩ ≫ (gradedIso 1).hom = P21 a b := image01 a b +@[reassoc] lemma imageP10 (a b:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,0),rfl⟩,![],a,![b]⟩ ≫ (gradedIso 1).hom = P20 a b := image10 a b +@[reassoc] lemma imageP02 (a b d:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩ ≫ (gradedIso 2).hom = P32 a b d := image02 a b d +@[reassoc] lemma imageP11 (a b d:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,1),rfl⟩,![a],b,![d]⟩ ≫ (gradedIso 2).hom = -P31 a b d := image11 a b d +@[reassoc] lemma imageP20 (a b d:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,0),rfl⟩,![],a,![d,b]⟩ ≫ (gradedIso 2).hom = -P30 a b d := image20 a b d +@[reassoc] lemma imageP03 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,3),rfl⟩,![a,b,d],e,![]⟩ ≫ (gradedIso 3).hom = P43 a b d e := image03 a b d e +@[reassoc] lemma imageP12 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,2),rfl⟩,![a,b],d,![e]⟩ ≫ (gradedIso 3).hom = P42 a b d e := image12 a b d e +@[reassoc] lemma imageP21 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,1),rfl⟩,![a],b,![e,d]⟩ ≫ (gradedIso 3).hom = -P41 a b d e := image21 a b d e +@[reassoc] lemma imageP30 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(3,0),rfl⟩,![],a,![e,d,b]⟩ ≫ (gradedIso 3).hom = -P40 a b d e := image30 a b d e +@[reassoc] lemma map_arrow_T (r p:Skeleton C) : + (homologyDiagram (C:=C) 1).map (arrow r p) = T r p (r*p) rfl := rfl +omit [SymmetricCategory C] in +lemma T_comp_congr {M:A} (r p q q':Skeleton C) (h:r*p=q) (h':r*p=q') + (e:q=q') (f:∀s:Skeleton C,H s ⟶ M) : T r p q h ≫ f q = T r p q' h' ≫ f q' := by + cases e + rfl +lemma compat01 (a b:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,1),rfl⟩,![a],b,![]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 1 0 ≫ (gradedIso 0).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,1),rfl⟩,![a],b,![]⟩ ≫ (gradedIso 1).hom ≫ (homologyRow (C:=C) 1).d 2 1 := by + erw [imageP01_assoc] + erw [Pd_2_1] + erw [block_d01_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP00 b] + erw [imageP00 (a*b)] + simp only [map_arrow_T] + try erw [mul_comm b a] + try abel +lemma compat10 (a b:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,0),rfl⟩,![],a,![b]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 1 0 ≫ (gradedIso 0).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,0),rfl⟩,![],a,![b]⟩ ≫ (gradedIso 1).hom ≫ (homologyRow (C:=C) 1).d 2 1 := by + erw [imageP10_assoc] + erw [Pd_2_0] + erw [block_d10_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP00 a] + erw [imageP00 (b*a)] + simp only [map_arrow_T] + erw [T_comp_congr b a (b*a) (a*b) rfl (mul_comm _ _) (mul_comm _ _) (fun t=>P10 t)] + try erw [mul_comm b a] + try abel +lemma compat02 (a b d:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 2 1 ≫ (gradedIso 1).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩ ≫ (gradedIso 2).hom ≫ (homologyRow (C:=C) 1).d 3 2 := by + erw [imageP02_assoc] + erw [Pd_3_2] + erw [block_d02_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP01 b d] + erw [imageP01 (a*b) d] + erw [imageP01 a (b*d)] + simp only [map_arrow_T] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm d b] + try abel +lemma compat11 (a b d:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,1),rfl⟩,![a],b,![d]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 2 1 ≫ (gradedIso 1).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,1),rfl⟩,![a],b,![d]⟩ ≫ (gradedIso 2).hom ≫ (homologyRow (C:=C) 1).d 3 2 := by + erw [imageP11_assoc] + erw [Preadditive.neg_comp,Pd_3_1] + erw [block_d11_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP01 a b] + erw [imageP01 a (d*b)] + erw [imageP10 b d] + erw [imageP10 (a*b) d] + simp only [map_arrow_T] + erw [T_comp_congr d b (d*b) (b*d) rfl (mul_comm _ _) (mul_comm _ _) (fun t=>P21 a t)] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm d b] + try abel +lemma compat20 (a b d:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,0),rfl⟩,![],a,![d,b]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 2 1 ≫ (gradedIso 1).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,0),rfl⟩,![],a,![d,b]⟩ ≫ (gradedIso 2).hom ≫ (homologyRow (C:=C) 1).d 3 2 := by + erw [imageP20_assoc] + erw [Preadditive.neg_comp,Pd_3_0] + erw [block_d20_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP10 a b] + erw [imageP10 a (d*b)] + erw [imageP10 (b*a) d] + simp only [map_arrow_T] + erw [T_comp_congr b a (b*a) (a*b) rfl (mul_comm _ _) (mul_comm _ _) (fun t=>P20 t d)] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm d b] + try abel +lemma compat03 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,3),rfl⟩,![a,b,d],e,![]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 3 2 ≫ (gradedIso 2).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,3),rfl⟩,![a,b,d],e,![]⟩ ≫ (gradedIso 3).hom ≫ (homologyRow (C:=C) 1).d 4 3 := by + erw [imageP03_assoc] + erw [Pd_4_3] + erw [block_d03_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP02 b d e] + erw [imageP02 (a*b) d e] + erw [imageP02 a (b*d) e] + erw [imageP02 a b (d*e)] + simp only [map_arrow_T] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm e a] + try erw [mul_comm d b] + try erw [mul_comm e b] + try erw [mul_comm e d] + try abel +lemma compat12 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,2),rfl⟩,![a,b],d,![e]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 3 2 ≫ (gradedIso 2).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,2),rfl⟩,![a,b],d,![e]⟩ ≫ (gradedIso 3).hom ≫ (homologyRow (C:=C) 1).d 4 3 := by + erw [imageP12_assoc] + erw [Pd_4_2] + erw [block_d12_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP02 a b d] + erw [imageP02 a b (e*d)] + erw [imageP11 b d e] + erw [imageP11 (a*b) d e] + erw [imageP11 a (b*d) e] + simp only [map_arrow_T] + repeat erw [Preadditive.comp_neg] + erw [T_comp_congr e d (e*d) (d*e) rfl (mul_comm _ _) (mul_comm _ _) (fun t=>P32 a b t)] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm e a] + try erw [mul_comm d b] + try erw [mul_comm e b] + try erw [mul_comm e d] + try abel +lemma compat21 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,1),rfl⟩,![a],b,![e,d]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 3 2 ≫ (gradedIso 2).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,1),rfl⟩,![a],b,![e,d]⟩ ≫ (gradedIso 3).hom ≫ (homologyRow (C:=C) 1).d 4 3 := by + erw [imageP21_assoc] + erw [Preadditive.neg_comp,Pd_4_1] + erw [block_d21_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP11 a b d] + erw [imageP11 a b (e*d)] + erw [imageP11 a (d*b) e] + erw [imageP20 b d e] + erw [imageP20 (a*b) d e] + simp only [map_arrow_T] + repeat erw [Preadditive.comp_neg] + erw [T_comp_congr d b (d*b) (b*d) rfl (mul_comm _ _) (mul_comm _ _) (fun t=>P31 a t e)] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm e a] + try erw [mul_comm d b] + try erw [mul_comm e b] + try erw [mul_comm e d] + try abel +lemma compat30 (a b d e:Skeleton C) : + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(3,0),rfl⟩,![],a,![e,d,b]⟩ ≫ ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 3 2 ≫ (gradedIso 2).hom = + totalInj (homologyDiagram (C:=C) 1) ⟨⟨(3,0),rfl⟩,![],a,![e,d,b]⟩ ≫ (gradedIso 3).hom ≫ (homologyRow (C:=C) 1).d 4 3 := by + erw [imageP30_assoc] + erw [Preadditive.neg_comp,Pd_4_0] + erw [block_d30_assoc] + simp only [Preadditive.add_comp,Preadditive.neg_comp,Category.assoc] + erw [imageP20 a b d] + erw [imageP20 a b (e*d)] + erw [imageP20 a (d*b) e] + erw [imageP20 (b*a) d e] + simp only [map_arrow_T] + repeat erw [Preadditive.comp_neg] + erw [T_comp_congr b a (b*a) (a*b) rfl (mul_comm _ _) (mul_comm _ _) (fun t=>P30 t d e)] + try erw [mul_comm b a] + try erw [mul_comm d a] + try erw [mul_comm e a] + try erw [mul_comm d b] + try erw [mul_comm e b] + try erw [mul_comm e d] + try abel +end MarkedH1 + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedGradedFinite.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedGradedFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..8377353db0f692b6b57edfa6b855ce5ec5e28eaf --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedGradedFinite.lean @@ -0,0 +1,314 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.MarkedSigns + +namespace OAI + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace MarkedH1 +open FreeChains ComponentTranslation + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +omit [SymmetricCategory C] in +lemma primitive_transport {n:ℕ} {a b:Σ_:Fin n,Fin n→Skeleton C} (e:a=b) : + eqToHom (congrArg (fun z:Σ_:Fin n,Fin n→Skeleton C=>H (z.2 z.1)) e.symm) ≫ + primitive a.2 a.1 = primitive b.2 b.1 := by + subst b + simp +def s00 (a:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 0 := ⟨⟨(0,0),rfl⟩,![],a,![]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words00 (a:Skeleton C) : DoubleCoordinates.words _ 0 (s00 a)=⟨0,![a]⟩ := by + dsimp [s00,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j + rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label00 (a:Skeleton C) : (labelIso (s00 a)).hom = (-1:ℤ)^0 • 𝟙 (H a) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s00] + rw [show MarkedSigns.exponent 0 0=0 from by decide] + change ((-1:ℤ)^0 • 𝟙 (H a)) ≫ eqToHom (rfl: H a=H a) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive00 (a:Skeleton C) : + primitive (DoubleCoordinates.words _ 0 (s00 a)).2 (DoubleCoordinates.words _ 0 (s00 a)).1 = + primitive ![a] 0 := by + have hh:=primitive_transport (words00 a) + change (𝟙 (H a)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image00 (a:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,0),rfl⟩,![],a,![]⟩ ≫ + (gradedIso 0).hom = primitive ![a] 0 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s00 a) ≫ _ = _ + rw [totalInj_gradedIso,label00,primitive00] + norm_num + try exact Category.id_comp _ +def s10 (a b:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 1 := ⟨⟨(1,0),rfl⟩,![],a,![b]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words10 (a b:Skeleton C) : DoubleCoordinates.words _ 1 (s10 a b)=⟨0,![a,b]⟩ := by + dsimp [s10,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label10 (a b:Skeleton C) : (labelIso (s10 a b)).hom = (-1:ℤ)^2 • 𝟙 (H a) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s10] + rw [show MarkedSigns.exponent 1 0=2 from by decide] + change ((-1:ℤ)^2 • 𝟙 (H a)) ≫ eqToHom (rfl: H a=H a) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive10 (a b:Skeleton C) : + primitive (DoubleCoordinates.words _ 1 (s10 a b)).2 (DoubleCoordinates.words _ 1 (s10 a b)).1 = + primitive ![a,b] 0 := by + have hh:=primitive_transport (words10 a b) + change (𝟙 (H a)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image10 (a b:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,0),rfl⟩,![],a,![b]⟩ ≫ + (gradedIso 1).hom = primitive ![a,b] 0 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s10 a b) ≫ _ = _ + rw [totalInj_gradedIso,label10,primitive10] + norm_num + try exact Category.id_comp _ +def s01 (a b:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 1 := ⟨⟨(0,1),rfl⟩,![a],b,![]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words01 (a b:Skeleton C) : DoubleCoordinates.words _ 1 (s01 a b)=⟨1,![a,b]⟩ := by + dsimp [s01,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label01 (a b:Skeleton C) : (labelIso (s01 a b)).hom = (-1:ℤ)^0 • 𝟙 (H b) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s01] + rw [show MarkedSigns.exponent 0 1=0 from by decide] + change ((-1:ℤ)^0 • 𝟙 (H b)) ≫ eqToHom (rfl: H b=H b) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive01 (a b:Skeleton C) : + primitive (DoubleCoordinates.words _ 1 (s01 a b)).2 (DoubleCoordinates.words _ 1 (s01 a b)).1 = + primitive ![a,b] 1 := by + have hh:=primitive_transport (words01 a b) + change (𝟙 (H b)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image01 (a b:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,1),rfl⟩,![a],b,![]⟩ ≫ + (gradedIso 1).hom = primitive ![a,b] 1 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s01 a b) ≫ _ = _ + rw [totalInj_gradedIso,label01,primitive01] + norm_num + try exact Category.id_comp _ +def s20 (a b d:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 2 := ⟨⟨(2,0),rfl⟩,![],a,![d,b]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words20 (a b d:Skeleton C) : DoubleCoordinates.words _ 2 (s20 a b d)=⟨0,![a,b,d]⟩ := by + dsimp [s20,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label20 (a b d:Skeleton C) : (labelIso (s20 a b d)).hom = (-1:ℤ)^5 • 𝟙 (H a) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s20] + rw [show MarkedSigns.exponent 2 0=5 from by decide] + change ((-1:ℤ)^5 • 𝟙 (H a)) ≫ eqToHom (rfl: H a=H a) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive20 (a b d:Skeleton C) : + primitive (DoubleCoordinates.words _ 2 (s20 a b d)).2 (DoubleCoordinates.words _ 2 (s20 a b d)).1 = + primitive ![a,b,d] 0 := by + have hh:=primitive_transport (words20 a b d) + change (𝟙 (H a)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image20 (a b d:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,0),rfl⟩,![],a,![d,b]⟩ ≫ + (gradedIso 2).hom = -primitive ![a,b,d] 0 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s20 a b d) ≫ _ = _ + rw [totalInj_gradedIso,label20,primitive20] + norm_num + erw [Preadditive.neg_comp, Category.id_comp] + rfl +def s11 (a b d:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 2 := ⟨⟨(1,1),rfl⟩,![a],b,![d]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words11 (a b d:Skeleton C) : DoubleCoordinates.words _ 2 (s11 a b d)=⟨1,![a,b,d]⟩ := by + dsimp [s11,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label11 (a b d:Skeleton C) : (labelIso (s11 a b d)).hom = (-1:ℤ)^3 • 𝟙 (H b) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s11] + rw [show MarkedSigns.exponent 1 1=3 from by decide] + change ((-1:ℤ)^3 • 𝟙 (H b)) ≫ eqToHom (rfl: H b=H b) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive11 (a b d:Skeleton C) : + primitive (DoubleCoordinates.words _ 2 (s11 a b d)).2 (DoubleCoordinates.words _ 2 (s11 a b d)).1 = + primitive ![a,b,d] 1 := by + have hh:=primitive_transport (words11 a b d) + change (𝟙 (H b)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image11 (a b d:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,1),rfl⟩,![a],b,![d]⟩ ≫ + (gradedIso 2).hom = -primitive ![a,b,d] 1 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s11 a b d) ≫ _ = _ + rw [totalInj_gradedIso,label11,primitive11] + norm_num + erw [Preadditive.neg_comp, Category.id_comp] + rfl +def s02 (a b d:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 2 := ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words02 (a b d:Skeleton C) : DoubleCoordinates.words _ 2 (s02 a b d)=⟨2,![a,b,d]⟩ := by + dsimp [s02,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label02 (a b d:Skeleton C) : (labelIso (s02 a b d)).hom = (-1:ℤ)^0 • 𝟙 (H d) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s02] + rw [show MarkedSigns.exponent 0 2=0 from by decide] + change ((-1:ℤ)^0 • 𝟙 (H d)) ≫ eqToHom (rfl: H d=H d) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive02 (a b d:Skeleton C) : + primitive (DoubleCoordinates.words _ 2 (s02 a b d)).2 (DoubleCoordinates.words _ 2 (s02 a b d)).1 = + primitive ![a,b,d] 2 := by + have hh:=primitive_transport (words02 a b d) + change (𝟙 (H d)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image02 (a b d:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩ ≫ + (gradedIso 2).hom = primitive ![a,b,d] 2 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s02 a b d) ≫ _ = _ + rw [totalInj_gradedIso,label02,primitive02] + norm_num + try exact Category.id_comp _ +def s30 (a b d e:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 3 := ⟨⟨(3,0),rfl⟩,![],a,![e,d,b]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words30 (a b d e:Skeleton C) : DoubleCoordinates.words _ 3 (s30 a b d e)=⟨0,![a,b,d,e]⟩ := by + dsimp [s30,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label30 (a b d e:Skeleton C) : (labelIso (s30 a b d e)).hom = (-1:ℤ)^9 • 𝟙 (H a) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s30] + rw [show MarkedSigns.exponent 3 0=9 from by decide] + change ((-1:ℤ)^9 • 𝟙 (H a)) ≫ eqToHom (rfl: H a=H a) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive30 (a b d e:Skeleton C) : + primitive (DoubleCoordinates.words _ 3 (s30 a b d e)).2 (DoubleCoordinates.words _ 3 (s30 a b d e)).1 = + primitive ![a,b,d,e] 0 := by + have hh:=primitive_transport (words30 a b d e) + change (𝟙 (H a)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image30 (a b d e:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(3,0),rfl⟩,![],a,![e,d,b]⟩ ≫ + (gradedIso 3).hom = -primitive ![a,b,d,e] 0 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s30 a b d e) ≫ _ = _ + rw [totalInj_gradedIso,label30,primitive30] + norm_num + erw [Preadditive.neg_comp, Category.id_comp] + rfl +def s21 (a b d e:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 3 := ⟨⟨(2,1),rfl⟩,![a],b,![e,d]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words21 (a b d e:Skeleton C) : DoubleCoordinates.words _ 3 (s21 a b d e)=⟨1,![a,b,d,e]⟩ := by + dsimp [s21,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label21 (a b d e:Skeleton C) : (labelIso (s21 a b d e)).hom = (-1:ℤ)^7 • 𝟙 (H b) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s21] + rw [show MarkedSigns.exponent 2 1=7 from by decide] + change ((-1:ℤ)^7 • 𝟙 (H b)) ≫ eqToHom (rfl: H b=H b) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive21 (a b d e:Skeleton C) : + primitive (DoubleCoordinates.words _ 3 (s21 a b d e)).2 (DoubleCoordinates.words _ 3 (s21 a b d e)).1 = + primitive ![a,b,d,e] 1 := by + have hh:=primitive_transport (words21 a b d e) + change (𝟙 (H b)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image21 (a b d e:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(2,1),rfl⟩,![a],b,![e,d]⟩ ≫ + (gradedIso 3).hom = -primitive ![a,b,d,e] 1 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s21 a b d e) ≫ _ = _ + rw [totalInj_gradedIso,label21,primitive21] + norm_num + erw [Preadditive.neg_comp, Category.id_comp] + rfl +def s12 (a b d e:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 3 := ⟨⟨(1,2),rfl⟩,![a,b],d,![e]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words12 (a b d e:Skeleton C) : DoubleCoordinates.words _ 3 (s12 a b d e)=⟨2,![a,b,d,e]⟩ := by + dsimp [s12,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label12 (a b d e:Skeleton C) : (labelIso (s12 a b d e)).hom = (-1:ℤ)^4 • 𝟙 (H d) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s12] + rw [show MarkedSigns.exponent 1 2=4 from by decide] + change ((-1:ℤ)^4 • 𝟙 (H d)) ≫ eqToHom (rfl: H d=H d) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive12 (a b d e:Skeleton C) : + primitive (DoubleCoordinates.words _ 3 (s12 a b d e)).2 (DoubleCoordinates.words _ 3 (s12 a b d e)).1 = + primitive ![a,b,d,e] 2 := by + have hh:=primitive_transport (words12 a b d e) + change (𝟙 (H d)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image12 (a b d e:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(1,2),rfl⟩,![a,b],d,![e]⟩ ≫ + (gradedIso 3).hom = primitive ![a,b,d,e] 2 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s12 a b d e) ≫ _ = _ + rw [totalInj_gradedIso,label12,primitive12] + norm_num + try exact Category.id_comp _ +def s03 (a b d e:Skeleton C) : DoubleCoordinates.Index (Skeleton C) 3 := ⟨⟨(0,3),rfl⟩,![a,b,d],e,![]⟩ +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma words03 (a b d e:Skeleton C) : DoubleCoordinates.words _ 3 (s03 a b d e)=⟨3,![a,b,d,e]⟩ := by + dsimp [s03,DoubleCoordinates.words,DoubleCoordinates.equiv,DoubleCoordinates.toSplit,MarkedCoordinates.equiv] + refine Sigma.ext rfl ?_ + apply heq_of_eq + funext j + fin_cases j <;> rfl +omit [MonoidalCategory C] [SymmetricCategory C] in +lemma label03 (a b d e:Skeleton C) : (labelIso (s03 a b d e)).hom = (-1:ℤ)^0 • 𝟙 (H e) := by + dsimp only [labelIso,Iso.trans_hom,signIso,s03] + rw [show MarkedSigns.exponent 0 3=0 from by decide] + change ((-1:ℤ)^0 • 𝟙 (H e)) ≫ eqToHom (rfl: H e=H e) = _ + exact Category.comp_id _ +omit [SymmetricCategory C] in +lemma primitive03 (a b d e:Skeleton C) : + primitive (DoubleCoordinates.words _ 3 (s03 a b d e)).2 (DoubleCoordinates.words _ 3 (s03 a b d e)).1 = + primitive ![a,b,d,e] 3 := by + have hh:=primitive_transport (words03 a b d e) + change (𝟙 (H e)) ≫ _ = _ at hh + erw [Category.id_comp] at hh + exact hh +@[reassoc] lemma image03 (a b d e:Skeleton C) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) ⟨⟨(0,3),rfl⟩,![a,b,d],e,![]⟩ ≫ + (gradedIso 3).hom = primitive ![a,b,d,e] 3 := by + change RegularLabels.totalInj (homologyDiagram (C:=C) 1) (s03 a b d e) ≫ _ = _ + rw [totalInj_gradedIso,label03,primitive03] + norm_num + try exact Category.id_comp _ +end MarkedH1 + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedLowHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedLowHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..3f1e5a370161b6aa1cb6a7d413e501001c0b5030 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedLowHomology.lean @@ -0,0 +1,132 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.MarkedBlockDifferentials + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite HomologicalComplex +namespace MarkedH1 +open FreeChains ComponentTranslation IntervalBar.Diagram RegularLabels + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +lemma differential1 : + ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 1 0 ≫ (gradedIso 0).hom = + (gradedIso 1).hom ≫ (homologyRow (C:=C) 1).d 2 1 := by + apply total_hom_ext (homologyDiagram (C:=C) 1) + rintro ⟨⟨⟨h,v⟩,hn⟩,y,p,x⟩ + change h+v=1 at hn + have hh:h≤1:=by omega + interval_cases h + · have hv:v=1:=by omega + subst v + have hy:y=![y 0]:=by ext index; fin_cases index; rfl + have hx:x=![]:=Subsingleton.elim _ _ + rw [hy,hx] + exact compat01 (y 0) (p) + · have hv:v=0:=by omega + subst v + have hy:y=![]:=Subsingleton.elim _ _ + have hx:x=![x 0]:=by ext index; fin_cases index; rfl + rw [hy,hx] + exact compat10 (p) (x 0) +lemma differential2 : + ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 2 1 ≫ (gradedIso 1).hom = + (gradedIso 2).hom ≫ (homologyRow (C:=C) 1).d 3 2 := by + apply total_hom_ext (homologyDiagram (C:=C) 1) + rintro ⟨⟨⟨h,v⟩,hn⟩,y,p,x⟩ + change h+v=2 at hn + have hh:h≤2:=by omega + interval_cases h + · have hv:v=2:=by omega + subst v + have hy:y=![y 0,y 1]:=by ext i; fin_cases i <;> rfl + have hx:x=![]:=Subsingleton.elim _ _ + rw [hy,hx] + exact compat02 (y 0) (y 1) (p) + · have hv:v=1:=by omega + subst v + have hy:y=![y 0]:=by ext index; fin_cases index; rfl + have hx:x=![x 0]:=by ext index; fin_cases index; rfl + rw [hy,hx] + exact compat11 (y 0) (p) (x 0) + · have hv:v=0:=by omega + subst v + have hy:y=![]:=Subsingleton.elim _ _ + have hx:x=![x 0,x 1]:=by ext i; fin_cases i <;> rfl + rw [hy,hx] + exact compat20 (p) (x 1) (x 0) +lemma differential3 : + ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).d 3 2 ≫ (gradedIso 2).hom = + (gradedIso 3).hom ≫ (homologyRow (C:=C) 1).d 4 3 := by + apply total_hom_ext (homologyDiagram (C:=C) 1) + rintro ⟨⟨⟨h,v⟩,hn⟩,y,p,x⟩ + change h+v=3 at hn + have hh:h≤3:=by omega + interval_cases h + · have hv:v=3:=by omega + subst v + have hy:y=![y 0,y 1,y 2]:=by ext i; fin_cases i <;> rfl + have hx:x=![]:=Subsingleton.elim _ _ + rw [hy,hx] + exact compat03 (y 0) (y 1) (y 2) (p) + · have hv:v=2:=by omega + subst v + have hy:y=![y 0,y 1]:=by ext i; fin_cases i <;> rfl + have hx:x=![x 0]:=by ext index; fin_cases index; rfl + rw [hy,hx] + exact compat12 (y 0) (y 1) (p) (x 0) + · have hv:v=1:=by omega + subst v + have hy:y=![y 0]:=by ext index; fin_cases index; rfl + have hx:x=![x 0,x 1]:=by ext i; fin_cases i <;> rfl + rw [hy,hx] + exact compat21 (y 0) (p) (x 1) (x 0) + · have hv:v=0:=by omega + subst v + have hy:y=![]:=Subsingleton.elim _ _ + have hx:x=![x 0,x 1,x 2]:=by ext i; fin_cases i <;> rfl + rw [hy,hx] + exact compat30 (p) (x 2) (x 1) (x 0) +noncomputable def lowHomologyIso : + ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).homology 2 ≅ + (homologyRow (C:=C) 1).homology 3 := + by + let K := (RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c + let L := homologyRow (C:=C) 1 + let e : K.sc' 3 2 1 ≅ L.sc' 4 3 2 := + ShortComplex.isoMk (gradedIso 3) (gradedIso 2) (gradedIso 1) + (differential3 (C:=C)).symm (differential2 (C:=C)).symm + exact (ShortComplex.homologyFunctor A).mapIso + (K.isoSc' 3 2 1 (c.prev_eq' rfl) (c.next_eq' rfl) ≪≫ e ≪≫ + (L.isoSc' 4 3 2 (c.prev_eq' rfl) (c.next_eq' rfl)).symm) +end MarkedH1 + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Opposite +namespace CommMonoidOpposite +open FreeChains + +variable (P:Type) [CommMonoid P] +def functor : (SingleObj P)ᵒᵖ ⥤ SingleObj P where + obj _ := SingleObj.star _ + map f := f.unop + map_id _ := rfl + map_comp _ _ := mul_comm _ _ +instance : (functor P).Faithful where + map_injective h := Quiver.Hom.unop_inj h +instance : (functor P).Full where + map_surjective morphism := ⟨morphism.op,rfl⟩ +instance : (functor P).EssSurj where + mem_essImage _ := ⟨op (SingleObj.star _), ⟨eqToIso (Subsingleton.elim _ _)⟩⟩ +instance : (functor P).IsEquivalence := ⟨inferInstance,inferInstance,inferInstance⟩ +noncomputable def homologyIso (n:ℕ) : + (nerve (SingleObj P)ᵒᵖ).homology Z n ≅ (nerve (SingleObj P)).homology Z n := by + haveI:=NerveHomotopy.homologyMap_isIso (functor P) Z n + exact asIso (SSet.homologyMap (nerveMap (functor P)) Z n) +end CommMonoidOpposite + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedPrimitiveFaces.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedPrimitiveFaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..24c2f6c259fbb3b811b07db4706ce5bcb6cfe3ed --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedPrimitiveFaces.lean @@ -0,0 +1,237 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.MarkedSigns +import OAI.GroupTheory.SimpleAmenable.Homology.Face200 +import OAI.GroupTheory.SimpleAmenable.Homology.Face410 +import OAI.GroupTheory.SimpleAmenable.Simplicial.FirstBarComponentsFinite + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial SimplicialObject Opposite AlgebraicTopology HomologicalComplex +namespace MarkedH1 +open FreeChains ComponentTranslation IntervalBar.Diagram RegularLabels RegularCoordinates MonoidNerveCoordinates RegularFiniteFaces + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] +noncomputable def T (r p s:Skeleton C) (h:r*p=s) : H p ⟶ H s := NerveHomology.map (translate r p s h) 1 +noncomputable def R (n:ℕ) (k:Fin (n+2)) : (homologyRow (C:=C) 1).X (n+1) ⟶ (homologyRow (C:=C) 1).X n := + NerveHomology.map (reindex (SimplexCategory.δ k).toOrderHom) 1 +noncomputable def P10 (a:Skeleton C) : H a ⟶ (homologyRow (C:=C) 1).X 1 := primitive ![a] 0 +noncomputable def P20 (a b:Skeleton C) : H a ⟶ (homologyRow (C:=C) 1).X 2 := primitive ![a,b] 0 +noncomputable def P21 (a b:Skeleton C) : H b ⟶ (homologyRow (C:=C) 1).X 2 := primitive ![a,b] 1 +noncomputable def P30 (a b d:Skeleton C) : H a ⟶ (homologyRow (C:=C) 1).X 3 := primitive ![a,b,d] 0 +noncomputable def P31 (a b d:Skeleton C) : H b ⟶ (homologyRow (C:=C) 1).X 3 := primitive ![a,b,d] 1 +noncomputable def P32 (a b d:Skeleton C) : H d ⟶ (homologyRow (C:=C) 1).X 3 := primitive ![a,b,d] 2 +noncomputable def P40 (a b d e:Skeleton C) : H a ⟶ (homologyRow (C:=C) 1).X 4 := primitive ![a,b,d,e] 0 +noncomputable def P41 (a b d e:Skeleton C) : H b ⟶ (homologyRow (C:=C) 1).X 4 := primitive ![a,b,d,e] 1 +noncomputable def P42 (a b d e:Skeleton C) : H d ⟶ (homologyRow (C:=C) 1).X 4 := primitive ![a,b,d,e] 2 +noncomputable def P43 (a b d e:Skeleton C) : H e ⟶ (homologyRow (C:=C) 1).X 4 := primitive ![a,b,d,e] 3 +@[reassoc] lemma Pface_2_0_0 (a b:Skeleton C) : + P20 a b ≫ R 1 0 = 0 := + face_2_0_0 a b +@[reassoc] lemma Pface_2_0_1 [SymmetricCategory C] (a b:Skeleton C) : + P20 a b ≫ R 1 1 = T b a (a*b) (mul_comm _ _) ≫ P10 (a*b) := + face_2_0_1 a b +@[reassoc] lemma Pface_2_0_2 (a b:Skeleton C) : + P20 a b ≫ R 1 2 = P10 a := + face_2_0_2 a b +@[reassoc] lemma Pface_2_1_0 (a b:Skeleton C) : + P21 a b ≫ R 1 0 = P10 b := + face_2_1_0 a b +@[reassoc] lemma Pface_2_1_1 (a b:Skeleton C) : + P21 a b ≫ R 1 1 = T a b (a*b) rfl ≫ P10 (a*b) := + face_2_1_1 a b +@[reassoc] lemma Pface_2_1_2 (a b:Skeleton C) : + P21 a b ≫ R 1 2 = 0 := + face_2_1_2 a b +@[reassoc] lemma Pface_3_0_0 (a b d:Skeleton C) : + P30 a b d ≫ R 2 0 = 0 := + face_3_0_0 a b d +@[reassoc] lemma Pface_3_0_1 [SymmetricCategory C] (a b d:Skeleton C) : + P30 a b d ≫ R 2 1 = T b a (a*b) (mul_comm _ _) ≫ P20 (a*b) d := + face_3_0_1 a b d +@[reassoc] lemma Pface_3_0_2 (a b d:Skeleton C) : + P30 a b d ≫ R 2 2 = P20 a (b*d) := + face_3_0_2 a b d +@[reassoc] lemma Pface_3_0_3 (a b d:Skeleton C) : + P30 a b d ≫ R 2 3 = P20 a b := + face_3_0_3 a b d +@[reassoc] lemma Pface_3_1_0 (a b d:Skeleton C) : + P31 a b d ≫ R 2 0 = P20 b d := + face_3_1_0 a b d +@[reassoc] lemma Pface_3_1_1 (a b d:Skeleton C) : + P31 a b d ≫ R 2 1 = T a b (a*b) rfl ≫ P20 (a*b) d := + face_3_1_1 a b d +@[reassoc] lemma Pface_3_1_2 [SymmetricCategory C] (a b d:Skeleton C) : + P31 a b d ≫ R 2 2 = T d b (b*d) (mul_comm _ _) ≫ P21 a (b*d) := + face_3_1_2 a b d +@[reassoc] lemma Pface_3_1_3 (a b d:Skeleton C) : + P31 a b d ≫ R 2 3 = P21 a b := + face_3_1_3 a b d +@[reassoc] lemma Pface_3_2_0 (a b d:Skeleton C) : + P32 a b d ≫ R 2 0 = P21 b d := + face_3_2_0 a b d +@[reassoc] lemma Pface_3_2_1 (a b d:Skeleton C) : + P32 a b d ≫ R 2 1 = P21 (a*b) d := + face_3_2_1 a b d +@[reassoc] lemma Pface_3_2_2 (a b d:Skeleton C) : + P32 a b d ≫ R 2 2 = T b d (b*d) rfl ≫ P21 a (b*d) := + face_3_2_2 a b d +@[reassoc] lemma Pface_3_2_3 (a b d:Skeleton C) : + P32 a b d ≫ R 2 3 = 0 := + face_3_2_3 a b d +@[reassoc] lemma Pface_4_0_0 (a b d e:Skeleton C) : + P40 a b d e ≫ R 3 0 = 0 := + face_4_0_0 a b d e +@[reassoc] lemma Pface_4_0_1 [SymmetricCategory C] (a b d e:Skeleton C) : + P40 a b d e ≫ R 3 1 = T b a (a*b) (mul_comm _ _) ≫ P30 (a*b) d e := + face_4_0_1 a b d e +@[reassoc] lemma Pface_4_0_2 (a b d e:Skeleton C) : + P40 a b d e ≫ R 3 2 = P30 a (b*d) e := + face_4_0_2 a b d e +@[reassoc] lemma Pface_4_0_3 (a b d e:Skeleton C) : + P40 a b d e ≫ R 3 3 = P30 a b (d*e) := + face_4_0_3 a b d e +@[reassoc] lemma Pface_4_0_4 (a b d e:Skeleton C) : + P40 a b d e ≫ R 3 4 = P30 a b d := + face_4_0_4 a b d e +@[reassoc] lemma Pface_4_1_0 (a b d e:Skeleton C) : + P41 a b d e ≫ R 3 0 = P30 b d e := + face_4_1_0 a b d e +@[reassoc] lemma Pface_4_1_1 (a b d e:Skeleton C) : + P41 a b d e ≫ R 3 1 = T a b (a*b) rfl ≫ P30 (a*b) d e := + face_4_1_1 a b d e +@[reassoc] lemma Pface_4_1_2 [SymmetricCategory C] (a b d e:Skeleton C) : + P41 a b d e ≫ R 3 2 = T d b (b*d) (mul_comm _ _) ≫ P31 a (b*d) e := + face_4_1_2 a b d e +@[reassoc] lemma Pface_4_1_3 (a b d e:Skeleton C) : + P41 a b d e ≫ R 3 3 = P31 a b (d*e) := + face_4_1_3 a b d e +@[reassoc] lemma Pface_4_1_4 (a b d e:Skeleton C) : + P41 a b d e ≫ R 3 4 = P31 a b d := + face_4_1_4 a b d e +@[reassoc] lemma Pface_4_2_0 (a b d e:Skeleton C) : + P42 a b d e ≫ R 3 0 = P31 b d e := + face_4_2_0 a b d e +@[reassoc] lemma Pface_4_2_1 (a b d e:Skeleton C) : + P42 a b d e ≫ R 3 1 = P31 (a*b) d e := + face_4_2_1 a b d e +@[reassoc] lemma Pface_4_2_2 (a b d e:Skeleton C) : + P42 a b d e ≫ R 3 2 = T b d (b*d) rfl ≫ P31 a (b*d) e := + face_4_2_2 a b d e +@[reassoc] lemma Pface_4_2_3 [SymmetricCategory C] (a b d e:Skeleton C) : + P42 a b d e ≫ R 3 3 = T e d (d*e) (mul_comm _ _) ≫ P32 a b (d*e) := + face_4_2_3 a b d e +@[reassoc] lemma Pface_4_2_4 (a b d e:Skeleton C) : + P42 a b d e ≫ R 3 4 = P32 a b d := + face_4_2_4 a b d e +@[reassoc] lemma Pface_4_3_0 (a b d e:Skeleton C) : + P43 a b d e ≫ R 3 0 = P32 b d e := + face_4_3_0 a b d e +@[reassoc] lemma Pface_4_3_1 (a b d e:Skeleton C) : + P43 a b d e ≫ R 3 1 = P32 (a*b) d e := + face_4_3_1 a b d e +@[reassoc] lemma Pface_4_3_2 (a b d e:Skeleton C) : + P43 a b d e ≫ R 3 2 = P32 a (b*d) e := + face_4_3_2 a b d e +@[reassoc] lemma Pface_4_3_3 (a b d e:Skeleton C) : + P43 a b d e ≫ R 3 3 = T d e (d*e) rfl ≫ P32 a b (d*e) := + face_4_3_3 a b d e +@[reassoc] lemma Pface_4_3_4 (a b d e:Skeleton C) : + P43 a b d e ≫ R 3 4 = 0 := + face_4_3_4 a b d e +end MarkedH1 + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial SimplicialObject Opposite AlgebraicTopology HomologicalComplex +namespace MarkedH1 +open FreeChains ComponentTranslation IntervalBar.Diagram RegularLabels RegularCoordinates MonoidNerveCoordinates RegularFiniteFaces + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] +@[reassoc] lemma Pd_2_0 [SymmetricCategory C] (a b:Skeleton C) : + P20 a b ≫ (homologyRow (C:=C) 1).d 2 1 = -(T b a (a*b) (mul_comm _ _) ≫ P10 (a*b)) + (P10 a) := by + have hd : (homologyRow (C:=C) 1).d 2 1 = (R 1 0) + -(R 1 1) + (R 1 2) := by + calc + _ = ∑k:Fin 3,(-1:ℤ)^k.val • R 1 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_2_0_0,Pface_2_0_1,Pface_2_0_2] + try abel +@[reassoc] lemma Pd_2_1 (a b:Skeleton C) : + P21 a b ≫ (homologyRow (C:=C) 1).d 2 1 = (P10 b) + -(T a b (a*b) rfl ≫ P10 (a*b)) := by + have hd : (homologyRow (C:=C) 1).d 2 1 = (R 1 0) + -(R 1 1) + (R 1 2) := by + calc + _ = ∑k:Fin 3,(-1:ℤ)^k.val • R 1 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_2_1_0,Pface_2_1_1,Pface_2_1_2] + try abel +@[reassoc] lemma Pd_3_0 [SymmetricCategory C] (a b d:Skeleton C) : + P30 a b d ≫ (homologyRow (C:=C) 1).d 3 2 = -(T b a (a*b) (mul_comm _ _) ≫ P20 (a*b) d) + (P20 a (b*d)) + -(P20 a b) := by + have hd : (homologyRow (C:=C) 1).d 3 2 = (R 2 0) + -(R 2 1) + (R 2 2) + -(R 2 3) := by + calc + _ = ∑k:Fin 4,(-1:ℤ)^k.val • R 2 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_3_0_0,Pface_3_0_1,Pface_3_0_2,Pface_3_0_3] + try abel +@[reassoc] lemma Pd_3_1 [SymmetricCategory C] (a b d:Skeleton C) : + P31 a b d ≫ (homologyRow (C:=C) 1).d 3 2 = (P20 b d) + -(T a b (a*b) rfl ≫ P20 (a*b) d) + (T d b (b*d) (mul_comm _ _) ≫ P21 a (b*d)) + -(P21 a b) := by + have hd : (homologyRow (C:=C) 1).d 3 2 = (R 2 0) + -(R 2 1) + (R 2 2) + -(R 2 3) := by + calc + _ = ∑k:Fin 4,(-1:ℤ)^k.val • R 2 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_3_1_0,Pface_3_1_1,Pface_3_1_2,Pface_3_1_3] + try abel +@[reassoc] lemma Pd_3_2 (a b d:Skeleton C) : + P32 a b d ≫ (homologyRow (C:=C) 1).d 3 2 = (P21 b d) + -(P21 (a*b) d) + (T b d (b*d) rfl ≫ P21 a (b*d)) := by + have hd : (homologyRow (C:=C) 1).d 3 2 = (R 2 0) + -(R 2 1) + (R 2 2) + -(R 2 3) := by + calc + _ = ∑k:Fin 4,(-1:ℤ)^k.val • R 2 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_3_2_0,Pface_3_2_1,Pface_3_2_2,Pface_3_2_3] + try abel +@[reassoc] lemma Pd_4_0 [SymmetricCategory C] (a b d e:Skeleton C) : + P40 a b d e ≫ (homologyRow (C:=C) 1).d 4 3 = -(T b a (a*b) (mul_comm _ _) ≫ P30 (a*b) d e) + (P30 a (b*d) e) + -(P30 a b (d*e)) + (P30 a b d) := by + have hd : (homologyRow (C:=C) 1).d 4 3 = (R 3 0) + -(R 3 1) + (R 3 2) + -(R 3 3) + (R 3 4) := by + calc + _ = ∑k:Fin 5,(-1:ℤ)^k.val • R 3 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_4_0_0,Pface_4_0_1,Pface_4_0_2,Pface_4_0_3,Pface_4_0_4] + try abel +@[reassoc] lemma Pd_4_1 [SymmetricCategory C] (a b d e:Skeleton C) : + P41 a b d e ≫ (homologyRow (C:=C) 1).d 4 3 = (P30 b d e) + -(T a b (a*b) rfl ≫ P30 (a*b) d e) + (T d b (b*d) (mul_comm _ _) ≫ P31 a (b*d) e) + -(P31 a b (d*e)) + (P31 a b d) := by + have hd : (homologyRow (C:=C) 1).d 4 3 = (R 3 0) + -(R 3 1) + (R 3 2) + -(R 3 3) + (R 3 4) := by + calc + _ = ∑k:Fin 5,(-1:ℤ)^k.val • R 3 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_4_1_0,Pface_4_1_1,Pface_4_1_2,Pface_4_1_3,Pface_4_1_4] + try abel +@[reassoc] lemma Pd_4_2 [SymmetricCategory C] (a b d e:Skeleton C) : + P42 a b d e ≫ (homologyRow (C:=C) 1).d 4 3 = (P31 b d e) + -(P31 (a*b) d e) + (T b d (b*d) rfl ≫ P31 a (b*d) e) + -(T e d (d*e) (mul_comm _ _) ≫ P32 a b (d*e)) + (P32 a b d) := by + have hd : (homologyRow (C:=C) 1).d 4 3 = (R 3 0) + -(R 3 1) + (R 3 2) + -(R 3 3) + (R 3 4) := by + calc + _ = ∑k:Fin 5,(-1:ℤ)^k.val • R 3 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_4_2_0,Pface_4_2_1,Pface_4_2_2,Pface_4_2_3,Pface_4_2_4] + try abel +@[reassoc] lemma Pd_4_3 (a b d e:Skeleton C) : + P43 a b d e ≫ (homologyRow (C:=C) 1).d 4 3 = (P32 b d e) + -(P32 (a*b) d e) + (P32 a (b*d) e) + -(T d e (d*e) rfl ≫ P32 a b (d*e)) := by + have hd : (homologyRow (C:=C) 1).d 4 3 = (R 3 0) + -(R 3 1) + (R 3 2) + -(R 3 3) + (R 3 4) := by + calc + _ = ∑k:Fin 5,(-1:ℤ)^k.val • R 3 k := AlternatingFaceMapComplex.obj_d_eq _ _ + _ = _ := by simp [Fin.sum_univ_succ,add_assoc] + rw [hd] + simp only [Preadditive.comp_add,Preadditive.comp_neg,Pface_4_3_0,Pface_4_3_1,Pface_4_3_2,Pface_4_3_3,Pface_4_3_4] + try abel +end MarkedH1 + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedSigns.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedSigns.lean new file mode 100644 index 0000000000000000000000000000000000000000..59aaec05fe959013a01bac98202661524bcded15 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/MarkedSigns.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.DoubleCoordinates + +namespace OAI + +section +namespace MarkedSigns + +def exponent (h v:ℕ) : ℕ := h*v+h*(h+3)/2 +lemma triangular_step (h:ℕ) : (h+1)*(h+1+3)/2 = h*(h+3)/2+h+2 := by + have he : (h+1)*(h+1+3)=h*(h+3)+2*(h+2) := by ring + rw [he,Nat.add_mul_div_left] + all_goals omega +lemma vertical_step (h v:ℕ) : exponent h (v+1)=exponent h v+h := by + unfold exponent + ring +lemma horizontal_step (h v:ℕ) : exponent (h+1) v=exponent h v+h+v+2 := by + unfold exponent + rw [triangular_step] + ring +lemma vertical (h v i:ℕ) : + (-1:ℤ)^h*((-1)^i*(-1)^(exponent h v)) = + (-1)^(exponent h (v+1)) * (-1)^i := by + rw [vertical_step,pow_add] + ring +lemma square (n:ℕ) : (-1:ℤ)^n * (-1)^n=1 := by + rw [←mul_pow]; norm_num +lemma horizontal (h v j:ℕ) (hj:j≤h+v+2) : + (-1:ℤ)^j*(-1)^(exponent h v) = + (-1)^(exponent (h+1) v) * (-1)^(h+v+2-j) := by + rw [horizontal_step,pow_add,pow_add,pow_add] + have hs : (-1:ℤ)^(h+v+2)*(-1:ℤ)^(h+v+2-j)=(-1:ℤ)^j := by + have he:h+v+2=j+(h+v+2-j):=by omega + rw [he,pow_add] + have hend : j+(h+v+2-j)-j=h+v+2-j:=by omega + rw [hend,mul_assoc,square,mul_one] + have hpow : (-1:ℤ)^h * (-1)^v * (-1)^2=(-1:ℤ)^(h+v+2) := by rw [pow_add,pow_add] + calc + _ = (-1:ℤ)^(exponent h v)*((-1:ℤ)^j) := by ring + _ = (-1:ℤ)^(exponent h v)*((-1:ℤ)^(h+v+2)*(-1:ℤ)^(h+v+2-j)) := by rw [hs] + _ = _ := by rw [←hpow]; ring +end MarkedSigns + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace MarkedH1 +open FreeChains ComponentTranslation + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +noncomputable abbrev H (p:Skeleton C) : A := (nerve (Fiber p)).homology Z 1 +noncomputable def isColimit (n:ℕ) : + IsColimit (Cofan.mk _ (fun s:Σ_:Fin n,Fin n→Skeleton C => primitive s.2 s.1)) := + Cofan.IsColimit.mk _ (fun t=>desc (fun p i=>t.inj ⟨i,p⟩)) + (fun _ s=>primitive_desc _ s.2 s.1) + (fun t _ hh=>hom_ext (fun p i=>(hh ⟨i,p⟩).trans (primitive_desc (fun p i=>t.inj ⟨i,p⟩) p i).symm)) +noncomputable def signIso (h v:ℕ) (M:A) : M≅M where + hom := (-1:ℤ)^(MarkedSigns.exponent h v) • 𝟙 M + inv := (-1:ℤ)^(MarkedSigns.exponent h v) • 𝟙 M + hom_inv_id := by simp only [Preadditive.zsmul_comp,Preadditive.comp_zsmul,Category.id_comp, + smul_smul,MarkedSigns.square,one_smul] + inv_hom_id := by simp only [Preadditive.zsmul_comp,Preadditive.comp_zsmul,Category.id_comp, + smul_smul,MarkedSigns.square,one_smul] +noncomputable def labelIso {n:ℕ} (s:DoubleCoordinates.Index (Skeleton C) n) : + H s.2.2.1 ≅ H ((DoubleCoordinates.words _ _ s).2 (DoubleCoordinates.words _ _ s).1) := + signIso s.1.val.1 s.1.val.2 _ ≪≫ eqToIso (congrArg H (DoubleCoordinates.center s).symm) +noncomputable def labelDiagramIso (n:ℕ) : + Discrete.functor (fun s:DoubleCoordinates.Index (Skeleton C) n=>H s.2.2.1) ≅ + Discrete.functor (fun s:DoubleCoordinates.Index (Skeleton C) n=> + H ((DoubleCoordinates.words _ _ s).2 (DoubleCoordinates.words _ _ s).1)) := + Discrete.natIso (fun s=>labelIso s.as) +noncomputable def reindexedCofan (n:ℕ) := Cofan.mk _ + (fun s:DoubleCoordinates.Index (Skeleton C) n => primitive + (DoubleCoordinates.words _ _ s).2 (DoubleCoordinates.words _ _ s).1) +noncomputable def labelledCofan (n:ℕ) := (Cocone.precompose (labelDiagramIso (C:=C) n).hom).obj (reindexedCofan n) +noncomputable def labelledIsColimit (n:ℕ) : IsColimit (labelledCofan (C:=C) n) := + (IsColimit.precomposeHomEquiv (labelDiagramIso n) (reindexedCofan n)).symm + ((Cofan.isColimitEquivOfEquiv (DoubleCoordinates.words (Skeleton C) n) _) + (isColimit (C:=C) (n+1))) +noncomputable def gradedIso (n:ℕ) : + ((RegularCoefficient.double (homologyDiagram (C:=C) 1)).total c).X n ≅ + (nerve (IntervalBar.Diagram C (Fin (n+1+1)))).homology Z 1 := + (RegularLabels.totalIsColimit (homologyDiagram (C:=C) 1) n).coconePointUniqueUpToIso + (labelledIsColimit n) +@[reassoc] lemma totalInj_gradedIso {n:ℕ} (s:DoubleCoordinates.Index (Skeleton C) n) : + RegularLabels.totalInj (homologyDiagram (C:=C) 1) s ≫ (gradedIso n).hom = + (labelIso s).hom ≫ primitive (DoubleCoordinates.words _ _ s).2 (DoubleCoordinates.words _ _ s).1 := + (RegularLabels.totalIsColimit (homologyDiagram (C:=C) 1) n).comp_coconePointUniqueUpToIso_hom + (labelledIsColimit n) ⟨s⟩ +end MarkedH1 + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ModelAssembly.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ModelAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..aed8f702b6b2005d16c19d866ce2d35f76e6a26e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ModelAssembly.lean @@ -0,0 +1,254 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.DiagonalResolution + +namespace OAI + +section + +open CategoryTheory Limits Opposite +namespace ModelAssembly + +open DiagonalResolution +variable (X : Dᵒᵖ ⥤ Type) + +abbrev projection : X.Elementsᵒᵖ ⥤ D := (Functor.Elements.π X).leftOp + +noncomputable def assembly : (D ⥤ A) ⥤ A := + (Functor.whiskeringLeft _ _ _).obj (projection X) ⋙ colim + +instance assembly_additive : (assembly X).Additive := by + unfold assembly + infer_instance + +instance assembly_preservesColimits : PreservesColimitsOfSize.{0,0} (assembly X) := by + unfold assembly + infer_instance +noncomputable def freeCocone (d : D) : Cocone (projection X ⋙ free d) where + pt := ∐ (fun _ : X.obj (op d) => Z) + ι := + { app e := Sigma.desc (fun f : d ⟶ e.unop.1.unop => + Sigma.ι (fun _ : X.obj (op d) => Z) (X.map f.op e.unop.2)) + naturality e e' f := by + apply Sigma.hom_ext + intro g + simp only [Functor.const_obj_obj,Functor.const_obj_map,Category.comp_id, + Functor.comp_map,projection,Functor.leftOp_map,Functor.Elements.π_map, + free,evaluationLeftAdjoint] + simp only [← Category.assoc,Sigma.ι_comp_desc] + congr 1 + change X.map (g ≫ f.unop.hom.unop).op e'.unop.2 = X.map g.op e.unop.2 + rw [op_comp, X.map_comp] + change X.map g.op (X.map f.unop.hom e'.unop.2) = _ + rw [f.unop.map_val] } + +noncomputable def forward (d : D) : (assembly X).obj (free d) ⟶ ∐ (fun _ : X.obj (op d) => Z) := + colimit.desc _ (freeCocone X d) + +noncomputable def backward (d : D) : (∐ (fun _ : X.obj (op d) => Z)) ⟶ (assembly X).obj (free d) := + Sigma.desc (fun x => Sigma.ι (fun _ : d ⟶ d => Z) (𝟙 d) ≫ + colimit.ι (projection X ⋙ free d) (op (X.elementsMk (op d) x))) + +@[reassoc (attr := simp)] lemma ι_to (d : D) (e : X.Elementsᵒᵖ) : + colimit.ι (projection X ⋙ free d) e ≫ forward X d = (freeCocone X d).ι.app e := by + apply colimit.ι_desc +lemma from_to (d : D) : backward X d ≫ forward X d = 𝟙 _ := by + apply Sigma.hom_ext + intro x + dsimp only [backward] + erw [Sigma.ι_comp_desc_assoc, Category.assoc, ι_to] + change Sigma.ι (fun _ : d ⟶ d => Z) (𝟙 d) ≫ Sigma.desc + (fun f : d ⟶ d => Sigma.ι (fun _ : X.obj (op d) => Z) (X.map f.op x)) = _ + simp +lemma to_from (d : D) : forward X d ≫ backward X d = 𝟙 _ := by + apply colimit.hom_ext + intro e + apply Sigma.hom_ext + intro f + change Sigma.ι (fun _ : d ⟶ e.unop.1.unop => Z) f ≫ + colimit.ι (projection X ⋙ free d) e ≫ forward X d ≫ backward X d = + Sigma.ι (fun _ : d ⟶ e.unop.1.unop => Z) f ≫ colimit.ι (projection X ⋙ free d) e ≫ 𝟙 _ + erw [← Category.assoc (colimit.ι (projection X ⋙ free d) e) (forward X d) + (backward X d), ι_to] + dsimp only [freeCocone] + dsimp only [backward] + erw [Sigma.ι_comp_desc_assoc, Sigma.ι_comp_desc, Category.comp_id] + let k := (show e.unop ⟶ X.elementsMk (op d) (X.map f.op e.unop.2) from + { hom := f.op, map_val := rfl }).op + have h := congrArg (fun g => Sigma.ι (fun _ : d ⟶ d => Z) (𝟙 d) ≫ g) + (colimit.w (projection X ⋙ free d) k) + change Sigma.ι (fun _ : d ⟶ d => Z) (𝟙 d) ≫ + (Sigma.desc (fun g : d ⟶ d => Sigma.ι (fun _ : d ⟶ e.unop.1.unop => Z) (g ≫ f))) ≫ + colimit.ι (projection X ⋙ free d) e = + Sigma.ι (fun _ : d ⟶ d => Z) (𝟙 d) ≫ + colimit.ι (projection X ⋙ free d) (op (X.elementsMk (op d) (X.map f.op e.unop.2))) at h + erw [Sigma.ι_comp_desc_assoc, Category.id_comp] at h + change _ = _ at h + exact h.symm + +noncomputable def freeIso (d : D) : (assembly X).obj (free d) ≅ ∐ (fun _ : X.obj (op d) => Z) where + hom := forward X d + inv := backward X d + hom_inv_id := to_from X d + inv_hom_id := from_to X d + +end ModelAssembly + +end + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalHomotopy + +universe u v +variable {C : Type u} [Category.{v} C] [Preadditive C] [HasCoproducts.{0} C] +abbrev c := ComplexShape.down ℕ +variable {K L : HomologicalComplex₂ C c c} {f g : K ⟶ L} + +@[simp] lemma sign₁ (p q : ℕ) : ComplexShape.ε₁ c c c (p,q)=1 := rfl +@[simp] lemma sign₂ (p q : ℕ) : ComplexShape.ε₂ c c c (p,q)=(-1 : ℤˣ)^p := rfl +@[simp] lemma π_add (p q : ℕ) : ComplexShape.π c c c (p,q)=p+q := rfl + +noncomputable def step (h : Homotopy f g) (n : ℕ) : (K.total c).X n ⟶ (L.total c).X (n+1) := + K.totalDesc (fun p q hpq => (h.hom p (p+1)).f q ≫ L.ιTotal c (p+1) q (n+1) (by + dsimp at hpq ⊢; omega)) + +@[reassoc (attr := simp)] lemma ι_step (h : Homotopy f g) (p q n : ℕ) (hpq : p+q=n) : + K.ιTotal c p q n hpq ≫ step h n = + (h.hom p (p+1)).f q ≫ L.ιTotal c (p+1) q (n+1) (by dsimp; omega) := by + apply ι_totalDesc + +lemma ι_d₁_zero (q n : ℕ) : K.ιTotal c 0 q q (by simp) ≫ K.D₁ c q n=0 := by + rw [ι_D₁] + apply d₁_eq_zero + simp [c] + +lemma ι_d₂_zero (p n : ℕ) : K.ιTotal c p 0 p (by simp) ≫ K.D₂ c p n=0 := by + rw [ι_D₂] + apply d₂_eq_zero + simp [c] + +@[reassoc] lemma ι_d₁_succ (p q n : ℕ) (hpq : p+q=n) : + K.ιTotal c (p+1) q (n+1) (by dsimp; omega) ≫ K.D₁ c (n+1) n = + (K.d (p+1) p).f q ≫ K.ιTotal c p q n hpq := by + rw [ι_D₁, d₁_eq K c (by rfl : c.Rel (p+1) p) q n hpq,sign₁,one_smul] + +@[reassoc] lemma ι_d₂_succ (p q n : ℕ) (hpq : p+q=n) : + K.ιTotal c p (q+1) (n+1) (by dsimp; omega) ≫ K.D₂ c (n+1) n = + ((-1 : ℤˣ)^p) • ((K.X p).d (q+1) q ≫ K.ιTotal c p q n hpq) := by + rw [ι_D₂,d₂_eq K c p (by rfl : c.Rel (q+1) q) n hpq,sign₂] + +@[reassoc] lemma ι_d (p q n m : ℕ) (hpq : p+q=n) : + K.ιTotal c p q n hpq ≫ (K.total c).d n m = K.d₁ c p q m+K.d₂ c p q m := by + change _ ≫ (_+_)=_ + rw [Preadditive.comp_add,ι_D₁,ι_D₂] + +omit [HasCoproducts C] in +lemma comm_zero (h : Homotopy f g) (q : ℕ) : + (f.f 0).f q = (h.hom 0 1).f q ≫ (L.d 1 0).f q +(g.f 0).f q := by + have e := congrArg (fun k : K.X 0 ⟶ L.X 0 => k.f q) (h.comm 0) + simpa only [Homotopy.dNext_zero_chainComplex,Homotopy.prevD_chainComplex, + zero_add, HomologicalComplex.comp_f,HomologicalComplex.add_f_apply] using e + +omit [HasCoproducts C] in +lemma comm_succ (h : Homotopy f g) (p q : ℕ) : + (f.f (p+1)).f q = (K.d (p+1) p).f q ≫ (h.hom p (p+1)).f q + + (h.hom (p+1) (p+2)).f q ≫ (L.d (p+2) (p+1)).f q +(g.f (p+1)).f q := by + have e := congrArg (fun k : K.X (p+1) ⟶ L.X (p+1) => k.f q) (h.comm (p+1)) + simpa only [Homotopy.dNext_succ_chainComplex,Homotopy.prevD_chainComplex, + HomologicalComplex.comp_f,HomologicalComplex.add_f_apply] using e + +noncomputable def hom (h : Homotopy f g) : + ∀ n m, (K.total c).X n ⟶ (L.total c).X m := + fun n => Pi.single (n+1) (step h n) + +@[simp] lemma hom_diag (h : Homotopy f g) (n : ℕ) : hom h n (n+1)=step h n := by + simp [hom] + +@[reassoc] lemma ι_d_rightZero (p : ℕ) : + K.ιTotal c (p+1) 0 (p+1) (by simp) ≫ (K.total c).d (p+1) p = + (K.d (p+1) p).f 0 ≫ K.ιTotal c p 0 p (by simp) := by + rw [ι_d,d₁_eq K c (by rfl : c.Rel (p+1) p) 0 p (by simp),sign₁,one_smul, + d₂_eq_zero K c (p+1) 0 p (by simp [c]),add_zero] + +@[reassoc] lemma ι_d_leftZero (q : ℕ) : + K.ιTotal c 0 (q+1) (q+1) (by simp) ≫ (K.total c).d (q+1) q = + (K.X 0).d (q+1) q ≫ K.ιTotal c 0 q q (by simp) := by + rw [ι_d,d₁_eq_zero K c 0 (q+1) q (by simp [c]),zero_add, + d₂_eq K c 0 (by rfl : c.Rel (q+1) q) q (by simp),sign₂,pow_zero,one_smul] + +@[reassoc] lemma ι_d_both (p q n : ℕ) (hpq : p+q+1=n) : + K.ιTotal c (p+1) (q+1) (n+1) (by dsimp; omega) ≫ (K.total c).d (n+1) n = + (K.d (p+1) p).f (q+1) ≫ K.ιTotal c p (q+1) n (by dsimp; omega) + + ((-1 : ℤˣ)^(p+1)) • ((K.X (p+1)).d (q+1) q ≫ K.ιTotal c (p+1) q n (by dsimp; omega)) := by + rw [ι_d,d₁_eq K c (by rfl : c.Rel (p+1) p) (q+1) n (by dsimp; omega), + d₂_eq K c (p+1) (by rfl : c.Rel (q+1) q) n (by dsimp; omega),sign₁,one_smul,sign₂] + +lemma total_comm_zero (h : Homotopy f g) : + (total.map f c).f 0 = dNext 0 (hom h) + prevD 0 (hom h) + + (total.map g c).f 0 := by + rw [Homotopy.dNext_zero_chainComplex,Homotopy.prevD_chainComplex,hom_diag,zero_add] + apply total.hom_ext + intro p q hpq + obtain ⟨rfl,rfl⟩ := Nat.add_eq_zero_iff.mp hpq + simp only [Preadditive.comp_add,←Category.assoc,ι_step,ιTotal_map] + rw [Category.assoc,ι_d_rightZero,←Category.assoc,comm_zero h 0,Preadditive.add_comp] + +lemma neg_pow_smul_succ {A : Type*} [AddCommGroup A] (p : ℕ) (a : A) : + ((-1 : ℤˣ)^(p+1)) • a = - (((-1 : ℤˣ)^p) • a) := by + rw [pow_succ',mul_smul,Units.neg_smul,one_smul] + +lemma total_comm_succ (h : Homotopy f g) (n : ℕ) : + (total.map f c).f (n+1) = (K.total c).d (n+1) n ≫ step h n + + step h (n+1) ≫ (L.total c).d (n+2) (n+1) + (total.map g c).f (n+1) := by + apply total.hom_ext + intro p q hpq + change p+q=n+1 at hpq + cases p with + | zero => + cases q with + | zero => omega + | succ q => + have : q=n := by omega + subst q + simp only [Preadditive.comp_add,←Category.assoc,ι_d_leftZero,ι_step,ιTotal_map] + simp only [Category.assoc,ι_step,ι_d_both 0 n (n+1) (by omega)] + simp only [Preadditive.comp_add,Linear.comp_units_smul] + rw [←Category.assoc, ←Category.assoc, ←(h.hom 0 1).comm] + rw [comm_zero h (n+1),Preadditive.add_comp] + simp only [Nat.zero_add, pow_one, Units.neg_smul, one_smul, Category.assoc] + abel + | succ p => + cases q with + | zero => + have : p=n := by omega + subst p + simp only [Preadditive.comp_add,←Category.assoc,ι_d_rightZero,ι_step,ιTotal_map] + simp only [Category.assoc,ι_step,ι_d_rightZero] + rw [comm_succ h n 0] + simp only [Preadditive.add_comp,Category.assoc] + | succ q => + have hn : p+q+1=n := by omega + simp only [Preadditive.comp_add,←Category.assoc, + ι_d_both p q n hn,Preadditive.add_comp,Linear.units_smul_comp, + ι_step,ιTotal_map] + simp only [Category.assoc,ι_step,ι_d_both (p+1) q (n+1) (by omega)] + simp only [Preadditive.comp_add,Linear.comp_units_smul] + rw [←Category.assoc, ←Category.assoc, ←(h.hom (p+1) (p+2)).comm] + rw [comm_succ h p (q+1)] + simp only [Preadditive.add_comp,Category.assoc,neg_pow_smul_succ,neg_neg] + abel + +noncomputable def total (h : Homotopy f g) : Homotopy (total.map f c) (total.map g c) where + hom := hom h + zero i j hij := by + have hne : i+1 ≠ j := by simpa [c,eq_comm] using hij + exact Pi.single_eq_of_ne hne.symm _ + comm i := by + cases i with + | zero => exact total_comm_zero h + | succ n => + rw [Homotopy.dNext_succ_chainComplex,Homotopy.prevD_chainComplex,hom_diag,hom_diag] + exact total_comm_succ h n + +end TotalHomotopy + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/NoetherianTor.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/NoetherianTor.lean new file mode 100644 index 0000000000000000000000000000000000000000..0793ea8908fcf19a9081091f81182e201594e2dd --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/NoetherianTor.lean @@ -0,0 +1,292 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.PolygonCoefficientFinite + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section NoetherianTor +open CategoryTheory CategoryTheory.Limits CategoryTheory.MonoidalCategory +universe nt + +namespace NoetherianResolution +variable {R : Type nt} [CommRing R] + +theorem homologyMap_smul {C D : ChainComplex (ModuleCat.{nt} R) ℕ} + (f : C ⟶ D) (r : R) (n : ℕ) : + HomologicalComplex.homologyMap (r • f) n = + r • HomologicalComplex.homologyMap f n := by + exact ShortComplex.homologyMap_smul + ((HomologicalComplex.shortComplexFunctor (ModuleCat R) _ n).map f) r + +noncomputable def annihilatorHomotopy {M : ModuleCat.{nt} R} + (P : ProjectiveResolution M) (r : R) (hr : ∀ x : M, r • x = 0) : + Homotopy (r • 𝟙 P.complex) 0 := by + apply ProjectiveResolution.liftHomotopyZero + apply HomologicalComplex.to_single_hom_ext + ext x + change (P.π.f 0).hom (r • x) = 0 + rw [map_smul] + exact hr (P.π.f 0 x) + +theorem annihilator_homology {M : ModuleCat.{nt} R} + (P : ProjectiveResolution M) (F : ModuleCat.{nt} R ⥤ ModuleCat.{nt} R) + [F.Additive] [Functor.Linear R F] (r : R) (hr : ∀ x : M, r • x = 0) + (n : ℕ) (x : ((F.mapHomologicalComplex _).obj P.complex).homology n) : + r • x = 0 := by + have h := (F.mapHomotopy (annihilatorHomotopy P r hr)).homologyMap_eq n + rw [Functor.map_smul, CategoryTheory.Functor.map_id, Functor.map_zero, + homologyMap_smul, HomologicalComplex.homologyMap_id, + HomologicalComplex.homologyMap_zero] at h + exact DFunLike.congr_fun (ModuleCat.hom_ext_iff.mp h) x + +variable [IsNoetherianRing R] + +theorem finite_tensor_resolution_homology (L M : FGModuleCat.{nt} R) (n : ℕ) : + Module.Finite R + (((((tensoringLeft (ModuleCat R)).obj L.obj).mapHomologicalComplex _).obj + (resolution M).complex).homology n) := by + have : Module.Finite R + (((((tensoringLeft (ModuleCat R)).obj L.obj).mapHomologicalComplex _).obj + (resolution M).complex).X n) := + Module.Finite.tensorProduct R L ((resolution M).complex.X n) + exact finite_homology _ n + +end NoetherianResolution + +theorem module_finite_int_of_augmentation {R : Type*} [Ring R] + {M : Type*} [AddCommGroup M] [Module R M] [Module.Finite R M] + (ε : R →+* ℤ) (h : ∀ (r : R) (x : M), r • x = ε r • x) : + Module.Finite ℤ M := by + obtain ⟨s,hs⟩ := (Module.Finite.fg_top (R := R) (M := M)) + refine ⟨s, ?_⟩ + apply top_unique + intro x hx + have hx' : x ∈ Submodule.span R (s : Set M) := by rw [hs]; trivial + clear hx + induction hx' using Submodule.span_induction with + | mem x hx => exact Submodule.subset_span hx + | zero => exact Submodule.zero_mem _ + | add x y _ _ hx hy => exact Submodule.add_mem _ hx hy + | smul r x _ hx => rw [h]; exact Submodule.smul_mem _ _ hx + +end NoetherianTor + +section AugmentationTor +open CategoryTheory CategoryTheory.Limits CategoryTheory.MonoidalCategory +namespace NoetherianResolution +variable {R : Type} [CommRing R] [IsNoetherianRing R] + +noncomputable abbrev augmentationModule (ε : R →+* ℤ) : ModuleCat R := + (ModuleCat.restrictScalars ε).obj (ModuleCat.of ℤ ℤ) + +instance finite_augmentationModule (ε : R →+* ℤ) : + Module.Finite R (augmentationModule ε) := by + have : Module.Finite ℤ (augmentationModule ε) := inferInstanceAs (Module.Finite ℤ ℤ) + exact Module.Finite.of_restrictScalars_finite ℤ R (augmentationModule ε) + +noncomputable def augmentationResolution (ε : R →+* ℤ) : + ProjectiveResolution (augmentationModule ε) := + resolution (FGModuleCat.of R (augmentationModule ε)) + +noncomputable def augmentationComplex (ε : R →+* ℤ) (L : FGModuleCat R) : + ChainComplex (ModuleCat R) ℕ := + ((((tensoringLeft (ModuleCat R)).obj L.obj).mapHomologicalComplex _).obj + (augmentationResolution ε).complex) + +instance finite_augmentation_homology (ε : R →+* ℤ) (L : FGModuleCat R) (n : ℕ) : + Module.Finite R ((augmentationComplex ε L).homology n) := + finite_tensor_resolution_homology L (FGModuleCat.of R (augmentationModule ε)) n + +theorem augmentation_homology_smul (ε : R →+* ℤ) (L : FGModuleCat R) (n : ℕ) + (r : R) (x : (augmentationComplex ε L).homology n) : + r • x = ε r • x := by + have h0 : ∀ z : augmentationModule ε, (r - (ε r : R)) • z = 0 := by + intro z + change ε (r - (ε r : R)) • z = 0 + simp only [map_sub, map_intCast, Int.cast_id, sub_self, zero_smul] + have h := annihilator_homology (augmentationResolution ε) + ((tensoringLeft (ModuleCat R)).obj L.obj) (r - (ε r : R)) h0 n x + have h' : (r - (ε r : R)) • x = 0 := h + rw [sub_smul, sub_eq_zero] at h' + simpa only [Int.cast_smul_eq_zsmul] using h' + +theorem finite_int_augmentation_homology (ε : R →+* ℤ) (L : FGModuleCat R) (n : ℕ) : + Module.Finite ℤ ((augmentationComplex ε L).homology n) := + module_finite_int_of_augmentation ε (augmentation_homology_smul ε L n) + +theorem finite_int_Tor_augmentation (ε : R →+* ℤ) (L : FGModuleCat R) (n : ℕ) : + Module.Finite ℤ (((Tor (ModuleCat R) n).obj L.obj).obj (augmentationModule ε)) := by + have := finite_int_augmentation_homology ε L n + let e : (((Tor (ModuleCat R) n).obj L.obj).obj (augmentationModule ε)) ≅ + (augmentationComplex ε L).homology n := + (augmentationResolution ε).isoLeftDerivedObj + ((tensoringLeft (ModuleCat R)).obj L.obj) n + exact Module.Finite.of_surjective (e.inv.hom.restrictScalars ℤ) + e.toLinearEquiv.symm.surjective + +end NoetherianResolution +end AugmentationTor + +section RingCoinvariants + +open CategoryTheory CategoryTheory.MonoidalCategory +open scoped TensorProduct +attribute [local instance 1200] Rep.hV2 +namespace RingCoinvariants +variable {G : Type} [CommGroup G] +local notation "R" => MonoidAlgebra ℤ G + +noncomputable abbrev inverseRep (M : ModuleCat R) : Rep ℤ G := + Rep.of ((Representation.ofModule' (k := ℤ) (G := G) M).comp (invMonoidHom : G →* G)) + +noncomputable abbrev moduleRep (M : ModuleCat R) : Rep ℤ G := + Rep.of (Representation.ofModule' (k := ℤ) (G := G) M) + +@[simp] theorem inverseRep_apply (M : ModuleCat R) (g : G) (x : M) : + (inverseRep M).ρ g x = (MonoidAlgebra.single g⁻¹ 1 : R) • x := rfl + +@[simp] theorem moduleRep_apply (M : ModuleCat R) (g : G) (x : M) : + (moduleRep M).ρ g x = (MonoidAlgebra.single g 1 : R) • x := rfl + +noncomputable def forwardTensor (L M : ModuleCat R) : + (↑(inverseRep L) ⊗[ℤ] ↑(moduleRep M)) →ₗ[ℤ] (L ⊗[R] M) := + TensorProduct.lift ((TensorProduct.mk R L M).restrictScalars₁₂ ℤ ℤ) + +theorem forwardTensor_invariant (L M : ModuleCat R) (g : G) : + (forwardTensor L M).comp ((inverseRep L).ρ.tprod (moduleRep M).ρ g) = + forwardTensor L M := by + apply TensorProduct.ext + ext x y + change ((MonoidAlgebra.single g⁻¹ 1 : R) • x) ⊗ₜ[R] + ((MonoidAlgebra.single g 1 : R) • y) = x ⊗ₜ[R] y + rw [TensorProduct.smul_tmul, ← smul_assoc] + simp [MonoidAlgebra.single_mul_single, ← MonoidAlgebra.one_def] + +noncomputable def forward (L M : ModuleCat R) : + ((Rep.coinvariantsTensor ℤ G).obj (inverseRep L)).obj (moduleRep M) →ₗ[ℤ] + (L ⊗[R] M) := + Representation.Coinvariants.lift _ (forwardTensor L M) + (forwardTensor_invariant L M) + +@[simp] theorem forward_mk (L M : ModuleCat R) (x : L) (y : M) : + forward L M (Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) x y) = + x ⊗ₜ[R] y := rfl + +theorem mk_act_left {k H : Type} [CommRing k] [Group H] (A B : Rep k H) + (g : H) (x : A) (y : B) : + Rep.coinvariantsTensorMk A B (A.ρ g⁻¹ x) y = + Rep.coinvariantsTensorMk A B x (B.ρ g y) := by + have h := Representation.Coinvariants.mk_self_apply (A.ρ.tprod B.ρ) g + ((A.ρ g⁻¹ x) ⊗ₜ[k] y) + change Representation.Coinvariants.mk _ + ((A.ρ g (A.ρ g⁻¹ x)) ⊗ₜ[k] (B.ρ g y)) = _ at h + have hx : A.ρ g (A.ρ g⁻¹ x) = x := by + rw [← Module.End.mul_apply, ← map_mul, mul_inv_cancel, map_one, Module.End.one_apply] + rw [hx] at h + exact h.symm + +theorem mk_balanced_group (L M : ModuleCat R) (g : G) (x : L) (y : M) : + Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) + ((MonoidAlgebra.single g 1 : R) • x) y = + Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) + x ((MonoidAlgebra.single g 1 : R) • y) := by + have h := mk_act_left (inverseRep L) (moduleRep M) g x y + change Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) + ((MonoidAlgebra.single (g⁻¹)⁻¹ 1 : R) • x) y = + Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) + x ((MonoidAlgebra.single g 1 : R) • y) at h + simpa only [inv_inv] using h + +noncomputable def backward (L M : ModuleCat R) : + (L ⊗[R] M) →ₗ[ℤ] + ((Rep.coinvariantsTensor ℤ G).obj (inverseRep L)).obj (moduleRep M) := + (TensorProduct.liftAddHom + (LinearMap.toAddMonoidHom'.comp + (Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M)).toAddMonoidHom) + (by + intro r x y + induction r using MonoidAlgebra.induction_on with + | of g => exact mk_balanced_group L M g x y + | add r s hr hs => simpa only [add_smul, map_add, LinearMap.add_apply, AddMonoidHom.add_apply] using congrArg₂ (· + ·) hr hs + | smul n r hr => + simpa only [smul_assoc, map_zsmul, AddMonoidHom.zsmul_apply] using congrArg (n • ·) hr + )).toIntLinearMap + +@[simp] theorem backward_mk (L M : ModuleCat R) (x : L) (y : M) : + backward L M (x ⊗ₜ[R] y) = + Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) x y := rfl + +noncomputable def equiv (L M : ModuleCat R) : + ((Rep.coinvariantsTensor ℤ G).obj (inverseRep L)).obj (moduleRep M) ≃ₗ[ℤ] + (L ⊗[R] M) := by + refine LinearEquiv.ofLinearMap (forward L M) (backward L M) ?_ ?_ + · apply LinearMap.ext + intro z + induction z using TensorProduct.inductionOn with + | tmul x y => rfl + | add x y hx hy => simpa only [map_add] using congrArg₂ (· + ·) hx hy + · apply Representation.Coinvariants.hom_ext + apply TensorProduct.ext + ext x y + rfl + +@[simp] theorem equiv_mk (L M : ModuleCat R) (x : L) (y : M) : + equiv L M (Rep.coinvariantsTensorMk (inverseRep L) (moduleRep M) x y) = + x ⊗ₜ[R] y := rfl + +noncomputable def moduleRepIso (M : ModuleCat R) : + moduleRep M ≅ Rep.ofModuleMonoidAlgebra.obj M := + @Rep.mkIso ℤ G _ _ (moduleRep M) (Rep.ofModuleMonoidAlgebra.obj M) _ _ + (moduleRep M).hV2 (Rep.ofModuleMonoidAlgebra.obj M).hV2 _ _ { + toFun := fun x => x + invFun := fun x => x + left_inv := fun _ => rfl + right_inv := fun _ => rfl + map_add' := fun _ _ => rfl + map_smul' := fun n x => by + change n • x = (algebraMap ℤ R n) • x + exact (IsScalarTower.algebraMap_smul R n x).symm + isIntertwining' := fun g => rfl } + +noncomputable def intRestrictionIso {S : Type} [Ring S] (M : ModuleCat S) : + ModuleCat.of ℤ M ≅ (ModuleCat.restrictScalars (Int.castRingHom S)).obj M := by + let A := ModuleCat.of ℤ M + let B := (ModuleCat.restrictScalars (Int.castRingHom S)).obj M + let e : A ≃ₗ[ℤ] B := { + toFun := fun x => x + invFun := fun x => x + left_inv := fun _ => rfl + right_inv := fun _ => rfl + map_add' := fun _ _ => rfl + map_smul' := fun integer element => by + change integer • element = (integer : S) • (show M from element) + exact (Int.cast_smul_eq_zsmul S integer (show M from element)).symm } + exact e.toModuleIso + +noncomputable def functorIso (L : ModuleCat R) : + Rep.ofModuleMonoidAlgebra ⋙ (Rep.coinvariantsTensor ℤ G).obj (inverseRep L) ≅ + (tensoringLeft (ModuleCat R)).obj L ⋙ + ModuleCat.restrictScalars (Int.castRingHom R) := + NatIso.ofComponents (fun M => + (((Rep.coinvariantsTensor ℤ G).obj (inverseRep L)).mapIso (moduleRepIso M)).symm ≪≫ + (equiv L M).toModuleIso ≪≫ intRestrictionIso (ModuleCat.of R (L ⊗[R] M))) (by + intro M N f + apply Rep.coinvariantsTensor_hom_ext + apply DFunLike.ext + intro x + apply DFunLike.ext + intro y + rfl) +end RingCoinvariants +end RingCoinvariants + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PermutationAugmentation.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PermutationAugmentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b2e23124ad45220f22e73392461facc0668e921 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PermutationAugmentation.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FullGroupStability + +namespace OAI + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.TransitiveInduction + +attribute [local instance 1200] Rep.hV2 +variable {G X Y : Type} [Group G] [MulAction G X] [MulAction G Y] + +noncomputable def augmentation (G X : Type) [Group G] [MulAction G X] : + Rep.of (permutationRep (G:=G) (X:=X)) ⟶ Rep.trivial ℤ G ℤ := + Rep.ofHom ⟨Finsupp.lsum ℤ (fun _ => (LinearMap.id : ℤ →ₗ[ℤ] ℤ)), by + intro g + apply Finsupp.lhom_ext + intro x z + change (Finsupp.lsum ℤ (fun _ : X => (LinearMap.id : ℤ →ₗ[ℤ] ℤ))) + (permutationRep (G:=G) (X:=X) g (single x z))= + (Finsupp.lsum ℤ (fun _ : X => (LinearMap.id : ℤ →ₗ[ℤ] ℤ))) (single x z) + rw [permutationRep_single] + simp⟩ + +@[simp] lemma augmentation_single (x : X) (z : ℤ) : + (augmentation G X).hom (single x z)=z := by simp [augmentation] + +lemma augmentation_natural (f : X → Y) (hf : ∀g : G,∀x,f (g • x)=g • f x) : + equivariantMap f hf ≫ augmentation G Y=augmentation G X := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply Finsupp.lhom_ext + intro x z + change (augmentation G Y).hom ((equivariantMap f hf).hom (single x z))= + (augmentation G X).hom (single x z) + rw [equivariantMap_single, augmentation_single, augmentation_single] +lemma augmentation_pointMap (x : X) (q : ℕ) : + groupHomology.map (MulAction.stabilizer G x).subtype (pointMap x) q ≫ + (groupHomology.functor ℤ G q).map (augmentation G X) = + TrivialHomology.map (MulAction.stabilizer G x).subtype q := by + erw [groupHomology.functor_map, ← groupHomology.map_comp] + apply groupHomology.map_congr + · rfl + · apply LinearMap.ext + intro z + change (augmentation G X).hom (single x z)=z + exact augmentation_single x z +lemma isIso_H0_augmentation (x : X) (ht : ∀y:X,∃g:G,g • x=y) : + IsIso ((groupHomology.functor ℤ G 0).map (augmentation G X)) := by + have pointIso := isIso_map_pointMap x ht 0 + have trivialIso := isIso_map_trivial_H0 (MulAction.stabilizer G x).subtype + exact @IsIso.of_isIso_fac_left _ _ _ _ _ _ _ _ pointIso trivialIso + (augmentation_pointMap x 0) + +lemma map_equivariant_H0_eq (f₀ f₁ : X → Y) + (h₀ : ∀g : G,∀x,f₀ (g • x)=g • f₀ x) + (h₁ : ∀g : G,∀x,f₁ (g • x)=g • f₁ x) + (y : Y) (ht : ∀z:Y,∃g:G,g • y=z) : + (groupHomology.functor ℤ G 0).map (equivariantMap f₀ h₀)= + (groupHomology.functor ℤ G 0).map (equivariantMap f₁ h₁) := by + have := isIso_H0_augmentation y ht + apply (cancel_mono ((groupHomology.functor ℤ G 0).map (augmentation G Y))).1 + rw [← Functor.map_comp, ← Functor.map_comp, augmentation_natural, augmentation_natural] +end SimpleAmenable.TransitiveInduction + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiBinary.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiBinary.lean new file mode 100644 index 0000000000000000000000000000000000000000..e375ddbc8e8a25f96cb8aecd2a9ad9b859192191 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiBinary.lean @@ -0,0 +1,31 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.PiFiber + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace PiSSet + +noncomputable def binaryIso (X:Fin 2→SSet) : obj X ≅ X 0⊗X 1 where + hom := {app _:=↾fun z=>(z 0,z 1) + naturality _ _ _:=rfl} + inv := {app _:=↾fun z=>Fin.cases z.1 (Fin.cases z.2 (fun i=>i.elim0)) + naturality _ _ _:=by apply ConcreteCategory.hom_ext; intro z; funext i; fin_cases i <;> rfl} + hom_inv_id:=by apply NatTrans.ext; funext p; apply ConcreteCategory.hom_ext; intro z; funext i; fin_cases i <;> rfl + inv_hom_id:=by ext p z <;> rfl +@[simp] lemma binaryIso_fst (X:Fin 2→SSet) : (binaryIso X).hom ≫ CartesianMonoidalCategory.fst _ _=proj X 0 := rfl +@[simp] lemma binaryIso_snd (X:Fin 2→SSet) : (binaryIso X).hom ≫ CartesianMonoidalCategory.snd _ _=proj X 1 := rfl +end PiSSet +namespace PiFiber + +variable (C:Type) [Groupoid.{0} C] +lemma binary_inclusion (p:Fin 2→Skeleton C) : + inclusion C (Fin 2) p ≫ (PiSSet.binaryIso (fun _:Fin 2=>nerve C)).hom = + (PiSSet.binaryIso (fun i=>nerve (ComponentTranslation.Fiber (p i)))).hom ≫ + (nerveMap (ComponentTranslation.property (p 0)).ι⊗ₘnerveMap (ComponentTranslation.property (p 1)).ι) := rfl +end PiFiber + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiH1Coproduct.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiH1Coproduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcae7e617734a1221dc754600241767fc549b0af --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiH1Coproduct.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.PiFiber + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace PiSSet +open FreeChains + +variable {n:ℕ} (X:Fin n→SSet) (x:∀i,(X i).obj (op ⦋0⦌)) +noncomputable def h1Cocone : Cofan (fun i=>(X i).homology Z 1) := + Cofan.mk ((obj X).homology Z 1) (fun i=>SSet.homologyMap (incl X x i) Z 1) +lemma incl_proj_h1 (i j:Fin n) : + SSet.homologyMap (incl X x i) Z 1 ≫ SSet.homologyMap (proj X j) Z 1= + if h:i=j then eqToHom (congrArg (fun i=>(X i).homology Z 1) h) else 0 := by + classical + rw [←SSet.homologyMap_comp] + by_cases h:i=j + · subst j; simp + · rw [incl_other X x h,ConnectedProduct.const_homology_zero _ 1 (by decide)] + simp [h] +lemma h1_decomposition (hX:∀i,(X i).IsConnected) : + ∑ i:Fin n,SSet.homologyMap (proj X i) Z 1 ≫ SSet.homologyMap (incl X x i) Z 1=𝟙 _ := by + classical + apply ModuleCat.hom_ext + apply LinearMap.ext + intro a + apply homology_ext n X hX + intro j + change ((∑ i:Fin n, SSet.homologyMap (proj X i) Z 1 ≫ SSet.homologyMap (incl X x i) Z 1) ≫ + SSet.homologyMap (proj X j) Z 1) a=SSet.homologyMap (proj X j) Z 1 a + rw [Preadditive.sum_comp] + simp_rw [Category.assoc] + rw [Finset.sum_eq_single j] + · rw [incl_proj_h1]; simp + · intro i hi hij; rw [incl_proj_h1]; simp [hij] + · simp +noncomputable def h1IsColimit (hX:∀i,(X i).IsConnected) : IsColimit (h1Cocone X x) where + desc s := ∑ i:Fin n,SSet.homologyMap (proj X i) Z 1 ≫ s.ι.app ⟨i⟩ + fac s j := by + classical + cases j with | mk j => + change SSet.homologyMap (incl X x j) Z 1 ≫ + (∑ i:Fin n,SSet.homologyMap (proj X i) Z 1 ≫ s.ι.app ⟨i⟩)=s.ι.app ⟨j⟩ + rw [Preadditive.comp_sum,Finset.sum_eq_single j] + · rw [←Category.assoc,incl_proj_h1]; simp + · intro i hi hij; rw [←Category.assoc,incl_proj_h1]; simp [Ne.symm hij] + · simp + uniq s f hf := by + dsimp only [h1Cocone, Cofan.mk_pt] at f hf ⊢ + change f = ∑ i:Fin n,SSet.homologyMap (proj X i) Z 1 ≫ s.ι.app ⟨i⟩ + rw [←Category.id_comp f,←h1_decomposition X x hX,Preadditive.sum_comp] + apply Finset.sum_congr rfl + intro i hi + rw [Category.assoc] + exact congrArg (fun g=>SSet.homologyMap (proj X i) Z 1 ≫ g) (hf ⟨i⟩) +end PiSSet + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace MarkedH1 +open FreeChains ComponentTranslation + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +noncomputable def evalIso (n:ℕ) : + (nerve (IntervalBar.Diagram C (Fin (n+1)))).homology Z 1 ≅ + (PiFiber.prod C (Fin n)).homology Z 1 := by + haveI := NerveHomotopy.homologyMap_isIso (IntervalBar.Diagram.eval (C:=C) n) Z 1 + exact asIso (SSet.homologyMap (nerveMap (IntervalBar.Diagram.eval (C:=C) n)) Z 1) ≪≫ + (SSet.homologyFunctor Z 1).mapIso (PiSSet.nervePiIso (fun _:Fin n=>C)) +noncomputable def points {n:ℕ} (p:Fin n→Skeleton C) : + ∀i,(nerve (Fiber (p i))).obj (op ⦋0⦌) := fun i=>nerveEquiv.symm (base (p i)) +noncomputable def primitive {n:ℕ} (p:Fin n→Skeleton C) (i:Fin n) : + (nerve (Fiber (p i))).homology Z 1 ⟶ + (nerve (IntervalBar.Diagram C (Fin (n+1)))).homology Z 1 := + SSet.homologyMap (PiSSet.incl (fun j=>nerve (Fiber (p j))) (points p) i) Z 1 ≫ + SSet.homologyMap (PiFiber.inclusion C (Fin n) p) Z 1 ≫ (evalIso n).inv +omit [SymmetricCategory C] in +lemma hom_ext {n:ℕ} {M:A} + {f g:(nerve (IntervalBar.Diagram C (Fin (n+1)))).homology Z 1 ⟶ M} + (h:∀ (p:Fin n→Skeleton C) (i:Fin n),primitive p i ≫ f=primitive p i ≫ g) : f=g := by + apply (cancel_epi (evalIso n).inv).mp + apply (PiFiber.homologyIsColimit C (Fin n) 1).hom_ext + intro p + apply (PiSSet.h1IsColimit (fun i=>nerve (Fiber (p.as i))) (points p.as) (fun _=>inferInstance)).hom_ext + intro i + exact (Category.assoc _ _ _).symm.trans ((h p.as i.as).trans (Category.assoc _ _ _)) +noncomputable def descCocone {n:ℕ} {M:A} + (f:∀ (p:Fin n→Skeleton C) (i:Fin n),(nerve (Fiber (p i))).homology Z 1 ⟶ M) : + Cocone (PiFiber.diagram C (Fin n) ⋙ SSet.homologyFunctor Z 1) where + pt := M + ι := Discrete.natTrans (fun p => (PiSSet.h1IsColimit (fun i=>nerve (Fiber (p.as i))) (points p.as) (fun _=>inferInstance)).desc + (Cofan.mk M (f p.as))) +noncomputable def desc {n:ℕ} {M:A} + (f:∀ (p:Fin n→Skeleton C) (i:Fin n),(nerve (Fiber (p i))).homology Z 1 ⟶ M) : + (nerve (IntervalBar.Diagram C (Fin (n+1)))).homology Z 1 ⟶ M := + (evalIso n).hom ≫ (PiFiber.homologyIsColimit C (Fin n) 1).desc (descCocone f) +omit [SymmetricCategory C] in +@[reassoc (attr:=simp)] lemma primitive_desc {n:ℕ} {M:A} + (f:∀ (p:Fin n→Skeleton C) (i:Fin n),(nerve (Fiber (p i))).homology Z 1 ⟶ M) + (p:Fin n→Skeleton C) (i:Fin n) : primitive p i ≫ desc f=f p i := by + let coordinateMap : (nerve (Fiber (p i))).homology Z 1 ⟶ + (PiFiber.piece C (Fin n) p).homology Z 1 := + SSet.homologyMap (PiSSet.incl (fun j=>nerve (Fiber (p j))) (points p) i) Z 1 + let inclusionMap : (PiFiber.piece C (Fin n) p).homology Z 1 ⟶ + (PiFiber.prod C (Fin n)).homology Z 1 := + SSet.homologyMap (PiFiber.inclusion C (Fin n) p) Z 1 + let coconeDesc : (PiFiber.prod C (Fin n)).homology Z 1 ⟶ M := + (PiFiber.homologyIsColimit C (Fin n) 1).desc (descCocone f) + change (coordinateMap ≫ inclusionMap ≫ (evalIso n).inv) ≫ + (evalIso n).hom ≫ coconeDesc = f p i + simp only [Category.assoc,Iso.inv_hom_id_assoc] + have h:=(PiFiber.homologyIsColimit C (Fin n) 1).fac (descCocone f) ⟨p⟩ + change inclusionMap ≫ coconeDesc = _ at h + rw [h] + exact (PiSSet.h1IsColimit (fun j=>nerve (Fiber (p j))) (points p) (fun _=>inferInstance)).fac + (Cofan.mk M (f p)) ⟨i⟩ +end MarkedH1 + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiSSet.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiSSet.lean new file mode 100644 index 0000000000000000000000000000000000000000..5cb205663e82e92179dc1f4a3cfd31a87989f0ee --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PiSSet.lean @@ -0,0 +1,204 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.StageCoordinateMaps +import OAI.GroupTheory.SimpleAmenable.Homology.ConstantSplit + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace PiSSet +open FreeChains + +variable {ι:Type} (X:ι→SSet) +noncomputable def obj : SSet where + obj p := ∀i,(X i).obj p + map f := ↾fun s i=>(X i).map f (s i) + map_id p := by apply ConcreteCategory.hom_ext; intro s; funext i; exact congrArg (fun f=>f (s i)) ((X i).map_id p) + map_comp f g := by apply ConcreteCategory.hom_ext; intro s; funext i; exact congrArg (fun f=>f (s i)) ((X i).map_comp f g) +noncomputable def proj (i:ι) : obj X ⟶ X i where + app _ := ↾fun s=>s i + naturality _ _ _ := rfl +noncomputable def lift {Y:SSet} (f:∀i,Y⟶X i) : Y⟶obj X where + app p := ↾fun s i=>(f i).app p s + naturality p q g := by apply ConcreteCategory.hom_ext; intro s; funext i; exact congrArg (fun f=>f s) ((f i).naturality g) +@[simp] lemma lift_proj {Y:SSet} (f:∀i,Y⟶X i) (i:ι) : lift X f ≫ proj X i=f i := rfl +noncomputable def incl (x:∀i,(X i).obj (op ⦋0⦌)) (i:ι) : X i ⟶ obj X := by + classical + exact lift X (fun j=>if h:i=j then eqToHom (congrArg X h) else SSet.const (x j)) +@[simp] lemma incl_self (x:∀i,(X i).obj (op ⦋0⦌)) (i:ι) : incl X x i ≫ proj X i=𝟙 _ := by + classical + simp [incl] +lemma incl_other (x:∀i,(X i).obj (op ⦋0⦌)) {i j:ι} (h:i≠j) : + incl X x i ≫ proj X j=SSet.const (x j) := by + classical + simp [incl,h] +noncomputable def finSuccIso {n:ℕ} (X:Fin (n+1)→SSet) : + obj X ≅ X 0 ⊗ obj (fun i:Fin n=>X i.succ) where + hom := {app _ := ↾fun x=>(x 0,fun i=>x i.succ) + naturality _ _ _ := rfl} + inv := {app _ := ↾fun x=>Fin.cases x.1 x.2 + naturality _ _ _ := by + apply ConcreteCategory.hom_ext; intro x; funext i + cases i using Fin.cases <;> rfl} + hom_inv_id := by + apply NatTrans.ext; funext p; apply ConcreteCategory.hom_ext; intro x; funext i + cases i using Fin.cases <;> rfl + inv_hom_id := by ext p x <;> rfl +noncomputable def finZeroIso (X:Fin 0→SSet) : obj X ≅ ConnectedProduct.one where + hom := { app _ := ↾fun _=>PUnit.unit + naturality _ _ _ := rfl } + inv := { app _ := ↾fun _ i=>Fin.elim0 i + naturality _ _ _ := by apply ConcreteCategory.hom_ext; intro x; funext i; exact i.elim0 } + hom_inv_id := by apply NatTrans.ext; funext p; apply ConcreteCategory.hom_ext; intro x; funext i; exact i.elim0 + inv_hom_id := by ext p x; rfl +lemma fin_connected (n:ℕ) (X:Fin n→SSet) (hX:∀i,(X i).IsConnected) : (obj X).IsConnected := by + induction n with + | zero => exact BarFinitePower.connected_of_iso _ (finZeroIso X) + | succ n ih => + have := hX 0 + have := ih (fun i=>X i.succ) (fun i=>hX i.succ) + exact BarFinitePower.connected_of_iso _ (finSuccIso X) +@[simp] lemma finSucc_fst {n:ℕ} (X:Fin (n+1)→SSet) : + (finSuccIso X).hom ≫ CartesianMonoidalCategory.fst _ _=proj X 0 := rfl +@[simp] lemma finSucc_snd {n:ℕ} (X:Fin (n+1)→SSet) (i:Fin n) : + (finSuccIso X).hom ≫ CartesianMonoidalCategory.snd _ _ ≫ proj (fun j:Fin n=>X j.succ) i=proj X i.succ := rfl +lemma biprod_element_ext {M N:A} (a b:(M ⊞ N : A)) + (hf:(biprod.fst : M ⊞ N ⟶ M) a=(biprod.fst : M ⊞ N ⟶ M) b) + (hs:(biprod.snd : M ⊞ N ⟶ N) a=(biprod.snd : M ⊞ N ⟶ N) b) : a=b := by + have ha:=congrArg (fun f:(M ⊞ N)⟶(M ⊞ N)=>f a) (biprod.total (X:=M) (Y:=N)) + have hb:=congrArg (fun f:(M ⊞ N)⟶(M ⊞ N)=>f b) (biprod.total (X:=M) (Y:=N)) + change (biprod.inl : M ⟶ M ⊞ N) ((biprod.fst : M ⊞ N ⟶ M) a) + + (biprod.inr : N ⟶ M ⊞ N) ((biprod.snd : M ⊞ N ⟶ N) a)=a at ha + change (biprod.inl : M ⟶ M ⊞ N) ((biprod.fst : M ⊞ N ⟶ M) b) + + (biprod.inr : N ⟶ M ⊞ N) ((biprod.snd : M ⊞ N ⟶ N) b)=b at hb + rw [←ha,←hb,hf,hs] +lemma homology_ext (n:ℕ) (X:Fin n→SSet) (hX:∀i,(X i).IsConnected) + (a b:((obj X).homology Z 1 : A)) (h:∀i,SSet.homologyMap (proj X i) Z 1 a=SSet.homologyMap (proj X i) Z 1 b) : a=b := by + induction n with + | zero => + have hz : IsZero ((obj X).homology Z 1) := + IsZero.of_iso (ConnectedProduct.one_homology_zero 1 (by decide)) + ((SSet.homologyFunctor Z 1).mapIso (finZeroIso X)) + have := ModuleCat.isZero_iff_subsingleton.mp hz + exact Subsingleton.elim _ _ + | succ n ih => + have := hX 0 + have := fin_connected n (fun i=>X i.succ) (fun i=>hX i.succ) + have := ConnectedProduct.projection_isIso_arbitrary (X 0) (obj (fun i:Fin n=>X i.succ)) + 1 1 1 (by omega) (by omega) (by intros; omega) (by intros; omega) + let e := (SSet.homologyFunctor Z 1).mapIso (finSuccIso X) + apply e.toLinearEquiv.injective + apply (ConcreteCategory.bijective_of_isIso (ConnectedProduct.projection (X 0) (obj (fun i:Fin n=>X i.succ)) 1)).1 + apply biprod_element_ext + · change (ConnectedProduct.projection (X 0) (obj (fun i:Fin n=>X i.succ)) 1 ≫ biprod.fst) (e.hom a)= + (ConnectedProduct.projection (X 0) (obj (fun i:Fin n=>X i.succ)) 1 ≫ biprod.fst) (e.hom b) + rw [ConnectedProduct.projection,biprod.lift_fst] + change (SSet.homologyMap (finSuccIso X).hom Z 1 ≫ + SSet.homologyMap (CartesianMonoidalCategory.fst _ _) Z 1) a = + (SSet.homologyMap (finSuccIso X).hom Z 1 ≫ + SSet.homologyMap (CartesianMonoidalCategory.fst _ _) Z 1) b + rw [←SSet.homologyMap_comp,finSucc_fst] + exact h 0 + · change (ConnectedProduct.projection (X 0) (obj (fun i:Fin n=>X i.succ)) 1 ≫ biprod.snd) (e.hom a)= + (ConnectedProduct.projection (X 0) (obj (fun i:Fin n=>X i.succ)) 1 ≫ biprod.snd) (e.hom b) + rw [ConnectedProduct.projection,biprod.lift_snd] + apply ih (fun i=>X i.succ) (fun i=>hX i.succ) + intro i + change (SSet.homologyMap (finSuccIso X).hom Z 1 ≫ + SSet.homologyMap (CartesianMonoidalCategory.snd _ _) Z 1 ≫ + SSet.homologyMap (proj (fun i:Fin n=>X i.succ) i) Z 1) a = + (SSet.homologyMap (finSuccIso X).hom Z 1 ≫ + SSet.homologyMap (CartesianMonoidalCategory.snd _ _) Z 1 ≫ + SSet.homologyMap (proj (fun i:Fin n=>X i.succ) i) Z 1) b + rw [←SSet.homologyMap_comp,←SSet.homologyMap_comp,finSucc_snd] + exact h i.succ +noncomputable def homologyPi {n:ℕ} (X:Fin n→SSet) : A := by + letI : Module ℤ (∀i,((X i).homology Z 1 : A)) := Pi.module _ _ ℤ + exact ModuleCat.of ℤ (∀i,((X i).homology Z 1 : A)) +noncomputable def homologyProj (n:ℕ) (X:Fin n→SSet) : + (obj X).homology Z 1 ⟶ homologyPi X := by + letI : Module ℤ (∀i,((X i).homology Z 1 : A)) := Pi.module _ _ ℤ + exact ModuleCat.ofHom (LinearMap.pi (fun i=>(SSet.homologyMap (proj X i) Z 1).hom)) +lemma homologyProj_isIso (n:ℕ) (X:Fin n→SSet) (hX:∀i,(X i).IsConnected) : IsIso (homologyProj n X) := by + classical + apply (ConcreteCategory.isIso_iff_bijective _).mpr + constructor + · intro a b h + apply homology_ext n X hX a b + intro i + exact congrFun h i + · let x : ∀i,(X i).obj (op ⦋0⦌) := fun i=>by + haveI:=hX i + exact Classical.arbitrary _ + intro a + refine ⟨∑ i:Fin n,SSet.homologyMap (incl X x i) Z 1 (a i),?_⟩ + funext j + change SSet.homologyMap (proj X j) Z 1 (∑ i:Fin n,SSet.homologyMap (incl X x i) Z 1 (a i))=a j + rw [map_sum] + rw [Finset.sum_eq_single j] + · simp only [←ModuleCat.comp_apply,←SSet.homologyMap_comp,incl_self,SSet.homologyMap_id,ModuleCat.id_apply] + · intro i hi hij + rw [←ModuleCat.comp_apply,←SSet.homologyMap_comp,incl_other X x hij, + ConnectedProduct.const_homology_zero _ 1 (by decide)] + rfl + · simp +end PiSSet + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace ComponentTranslation +open FreeChains + +variable {C:Type} [Groupoid.{0} C] [MonoidalCategory C] [SymmetricCategory C] +abbrev P (C:Type) [Category.{0} C] := Skeleton C +noncomputable def repr (p:P C) : C := (fromSkeleton C).obj p +omit [MonoidalCategory C] [SymmetricCategory C] in +@[simp] lemma repr_component (p:P C) : toSkeleton (repr p)=p := toSkeleton_fromSkeleton_obj p +abbrev property (p:P C) : ObjectProperty C := fun U=>toSkeleton U=p +abbrev Fiber (p:P C) := (property p).FullSubcategory +noncomputable def reprMul (r s:P C) : repr r ⊗ repr s ≅ repr (r*s) := + Skeleton.isoOfEq (by simp [Skeleton.toSkeleton_tensorObj]) +noncomputable def reprOne : repr (1:P C) ≅ 𝟙_ C := + Skeleton.isoOfEq (by simp [Skeleton.one_eq]) +noncomputable def translate (r p q:P C) (h:r*p=q) : Fiber p ⥤ Fiber q := + (property q).lift ((property p).ι ⋙ tensorLeft (repr r)) (fun U=>by + change toSkeleton (repr r ⊗ U.obj)=q + rw [Skeleton.toSkeleton_tensorObj,repr_component,U.property,h]) +noncomputable def translateOne (p:P C) (h:(1:P C)*p=p) : translate 1 p p h ⟶ 𝟭 (Fiber p) := by + let α : tensorLeft (repr (1:P C)) ⟶ 𝟭 C := + (tensoringLeft C).map (reprOne (C:=C)).hom ≫ (leftUnitorNatIso C).hom + exact { app U := ObjectProperty.homMk (α.app U.obj) + naturality U V f := by apply ObjectProperty.hom_ext; exact α.naturality f.hom } +noncomputable def translateComp {p q t:P C} (r s:P C) (h:r*p=q) (k:s*q=t) + (l:(s*r)*p=t) : translate (s*r) p t l ⟶ translate r p q h ⋙ translate s q t k := by + let α : tensorLeft (repr (s*r)) ⟶ tensorLeft (repr r) ⋙ tensorLeft (repr s) := + (tensoringLeft C).map (reprMul s r).inv ≫ (tensorLeftTensor (repr s) (repr r)).hom + exact { app U := ObjectProperty.homMk (α.app U.obj) + naturality U V f := by apply ObjectProperty.hom_ext; exact α.naturality f.hom } +omit [SymmetricCategory C] in +lemma homology_one (p:P C) (h:(1:P C)*p=p) (j:ℕ) : + SSet.homologyMap (nerveMap (translate 1 p p h)) Z j=𝟙 _ := by + have h:=(NerveHomotopy.ofNatTrans (translateOne p h)).congr_homologyMap Z j + change SSet.homologyMap (nerveMap (translate 1 p p _)) Z j=SSet.homologyMap (𝟙 _) Z j at h + simpa only [SSet.homologyMap_id] using h +omit [SymmetricCategory C] in +lemma homology_comp {p q t:P C} (r s:P C) (h:r*p=q) (k:s*q=t) (l:(s*r)*p=t) (j:ℕ) : + SSet.homologyMap (nerveMap (translate (s*r) p t l)) Z j = + SSet.homologyMap (nerveMap (translate r p q h)) Z j ≫ + SSet.homologyMap (nerveMap (translate s q t k)) Z j := by + have hh:=(NerveHomotopy.ofNatTrans (translateComp r s h k l)).congr_homologyMap Z j + change SSet.homologyMap (nerveMap (translate (s*r) p t l)) Z j = + SSet.homologyMap (nerveMap (translate r p q h) ≫ nerveMap (translate s q t k)) Z j at hh + simpa only [SSet.homologyMap_comp] using hh +noncomputable def homologyDiagram (j:ℕ) : ActionCategory (P C) (P C) ⥤ A where + obj p := (nerve (Fiber p.back)).homology Z j + map {p q} f := SSet.homologyMap (nerveMap (translate f.hom p.back q.back f.map_val)) Z j + map_id p := homology_one p.back _ j + map_comp f g := homology_comp (f.hom:P C) (g.hom:P C) f.map_val g.map_val _ j +end ComponentTranslation + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PointFiberHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PointFiberHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cc46fbb49e1c8a392c23cfe6c35927811df05cb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PointFiberHomology.lean @@ -0,0 +1,172 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.StageHomologyCoordinates +import OAI.GroupTheory.SimpleAmenable.Configurations.FiberAddition +import OAI.GroupTheory.SimpleAmenable.Configurations.CellFiber + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory +namespace SimpleAmenable.PolygonObject.LabelledStage +open IntervalBar.Diagram BarFinitePower FreeChains + +variable {a n : ℕ} {K : Type} [AddCommGroup K] +variable {modK : Module ℤ K} +noncomputable def pointValue (c : GenericSquare a × ReducedLabel n) : + Coefficients a n K →ₗ[ℤ] K where + toFun f := (f c.2).val c.1 + map_add' _ _ := rfl + map_smul' r f := by + let h : Coefficients a n K →+ K := { + toFun f := (f c.2).val c.1 + map_zero' := rfl + map_add' _ _ := rfl } + exact map_intCast_smul h ℤ ℤ r f +namespace Stage +variable (S : Stage a n) +lemma homologyCoefficientIso_stage (j : ℕ) (hj : 0 hc + ((S.label_range c.2).mp ⟨k,Subtype.ext hk⟩))).hom j, + bar₃Map_comp,SSet.homologyMap_comp] + have hz := bar₃_acyclic (C:=FiniteSetGroupoid.Terminal) + (fun x y => ⟨eqToHom (Subsingleton.elim x y)⟩) j hj + rw [hz.eq_of_src (SSet.homologyMap (bar₃Map FiniteSetGroupoid.emptyFunctor) Z j) 0,comp_zero] + apply ModuleCat.hom_ext; apply LinearMap.ext; intro x + change (S.realize (K:=Stage.K j) (S.homologyCoordinates j x) c.2).val c.1 = 0 + erw [S.realize_outside _ _ hc] + rfl +end Stage +end SimpleAmenable.PolygonObject.LabelledStage + +end + +namespace SimpleAmenable.PolygonObject.Labelled.Cell +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical + +variable {a n : ℕ} {K : Type} [AddCommGroup K] +noncomputable def step (P : polygonAlgebra a) (x : K) : BooleanStep a K := + ⟨fun p => if p∈P.val then x else 0,by + obtain ⟨S,hS⟩ := polygon_hasSquareArrangement P.property + refine ⟨S,fun p q h => ?_⟩ + have hh := decide_eq_decide.mp (hS p q h) + simp only [hh]⟩ +@[simp] lemma step_apply (P : polygonAlgebra a) (x : K) (p : GenericSquare a) : + (step P x).val p=if p∈P.val then x else 0 := rfl +@[simp] lemma step_zero (P : polygonAlgebra a) : step P (0:K)=0 := by + apply Subtype.ext; funext p; simp [step] +@[simp] lemma step_add (P : polygonAlgebra a) (x y : K) : step P (x+y)=step P x+step P y := by + apply Subtype.ext; funext p + change (if p∈P.val then x+y else 0) = + (if p∈P.val then x else 0)+(if p∈P.val then y else 0) + split_ifs <;> simp +variable {modK : Module ℤ K} +noncomputable def coefficient (P : polygonAlgebra a) (l : LabelledStage.ReducedLabel n) : + K →ₗ[ℤ] LabelledStage.Coefficients a n K where + toFun x := Finsupp.single l (step P x) + map_add' _ _ := by rw [step_add,Finsupp.single_add] + map_smul' r x := by + let h : K →+ LabelledStage.Coefficients a n K := { + toFun x := Finsupp.single l (step P x) + map_zero' := by rw [step_zero,Finsupp.single_zero] + map_add' _ _ := by rw [step_add,Finsupp.single_add] } + exact map_intCast_smul h ℤ ℤ r x +@[simp] lemma coefficient_apply (P : polygonAlgebra a) (l : LabelledStage.ReducedLabel n) (x : K) : + coefficient (K:=K) (modK:=modK) P l x=Finsupp.single l (step P x) := rfl + +lemma coefficient_ext {T : Type} [AddCommGroup T] {f g : LabelledStage.Coefficients a n K →+ T} + (h : ∀P l x,f (Finsupp.single l (step P x))=g (Finsupp.single l (step P x))) : f=g := by + apply AddMonoidHom.ext; intro v + induction v using Finsupp.induction with + | zero => simp only [map_zero] + | @single_add l s v hl hs ih => + rw [map_add,map_add,ih] + congr 1 + obtain ⟨Q,hQ⟩ := BooleanStep.exists_common (fun _ : Unit => s) + have hsQ := hQ () + have he : s = ∑i:Fin Q.size,step ⟨_,Q.polygon i⟩ ((s.val) (Q.point i)) := by + apply Subtype.ext; funext p + have hv := congrArg (fun w : BooleanStep a K => w.val p) hsQ + change (BooleanStep.inflate (K:=K) Q (BooleanStep.evaluate (K:=K) Q s)).val p=s.val p at hv + rw [BooleanStep.inflate_apply,BooleanStep.evaluate_apply] at hv + rw [←hv] + rw [Submodule.coe_sum,Finset.sum_apply] + simp only [step,Set.mem_ofPred_eq] + rw [Finset.sum_eq_single (Q.color p)] + · simp + · intro index _ hindex + simp [Ne.symm hindex] + · simp + rw [he,Finsupp.single_finsetSum,map_sum,map_sum] + apply Finset.sum_congr rfl; intro i _; exact h _ _ _ +end + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Classical +open IntervalBar.Diagram BarFinitePower FreeChains LabelledStage + +variable {a n : ℕ} (P : polygonAlgebra a) (l : ReducedLabel n) +lemma homology_point (j : ℕ) (hj : 0 h ⟨hh.1,Subtype.ext hh.2⟩)).hom j, + bar₃Map_comp,SSet.homologyMap_comp] + have hz := bar₃_acyclic (C:=FiniteSetGroupoid.Terminal) + (fun x y => ⟨eqToHom (Subsingleton.elim x y)⟩) j hj + rw [hz.eq_of_src (SSet.homologyMap (bar₃Map FiniteSetGroupoid.emptyFunctor) Z j) 0,comp_zero] +lemma homology_coefficient (j : ℕ) (hj : 0 f x) + (congrArg (fun f => SSet.homologyMap (bar₃Map (functor P l)) Z j ≫ f) + (Stage.homologyCoefficientIso_point (a:=a) (n:=n) j hj hj5 (p,k))) + rw [←SSet.homologyMap_comp,←bar₃Map_comp,homology_point P l j hj (p,k)] at h + change _ = (Finsupp.single l (step P x) k).val p + refine h.trans ?_ + by_cases hl:l=k + · subst k + simp only [and_true,Finsupp.single_eq_same,step_apply] + split_ifs <;> rfl + · simp only [hl,and_false,ite_false,Finsupp.single_eq_of_ne (Ne.symm hl)] + rfl +end SimpleAmenable.PolygonObject.Labelled.Cell + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PolygonCoefficientFinite.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PolygonCoefficientFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..63eb5c07d6f6e6b1417f2902ad1a99b42ddf20df --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PolygonCoefficientFinite.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PlaneCornerCoordinates + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonCoefficientFinite +open Classical + +noncomputable def planeCornerLinear {a : ℕ} (ha : 0 simp [planeVertexPosition,sub_eq_add_neg] <;> ring + +noncomputable def planeCornerEmbedding {a : ℕ} (ha : 0 ?_⟩ + let F := forget₂ (FGModuleCat.{nr} R) (ModuleCat.{nr} R) + have hi : Epi (F.map e) := inferInstance + have hp : Projective (F.obj M) := ModuleCat.projective_of_free (Module.Free.chooseBasis R M) + obtain ⟨g,hg⟩ := Projective.factors (F.map f) (F.map e) + refine ⟨FGModuleCat.ofHom g.hom, ?_⟩ + apply F.map_injective + exact hg + +theorem finitePresentation (M : FGModuleCat.{nr} R) : Nonempty (ProjectivePresentation M) := by + obtain ⟨n,f,hf⟩ := Module.Finite.exists_fin' R M + have hp : Projective (FGModuleCat.of R (Fin n → R)) := fg_projective_of_free _ + have he : Epi (FGModuleCat.ofHom f) := by + apply ConcreteCategory.epi_of_surjective + exact hf + exact ⟨⟨FGModuleCat.of R (Fin n → R),FGModuleCat.ofHom f⟩⟩ + +noncomputable local instance : EnoughProjectives (FGModuleCat.{nr} R) where + presentation := finitePresentation + +omit [IsNoetherianRing R] in +theorem forget_projective (M : FGModuleCat.{nr} R) [Projective M] : Projective M.obj := by + obtain ⟨n,f,hf⟩ := Module.Finite.exists_fin' R M + let q : FGModuleCat.of R (Fin n → R) ⟶ M := FGModuleCat.ofHom f + have he : Epi q := ConcreteCategory.epi_of_surjective q hf + obtain ⟨s,hs⟩ := Projective.factors (𝟙 M) q + have hlin : f.comp s.hom.hom = LinearMap.id := by + exact congrArg (fun g => g.hom.hom) hs + have hp : Module.Projective R M := + Module.Projective.of_split s.hom.hom f hlin + exact ModuleCat.projective_of_categoryTheory_projective M.obj + +noncomputable local instance : + (forget₂ (FGModuleCat.{nr} R) (ModuleCat.{nr} R)).PreservesProjectiveObjects where + projective_obj {X} h := by + let := h + exact forget_projective X + +noncomputable def resolution (M : FGModuleCat.{nr} R) : ProjectiveResolution M.obj := + (forget₂ (FGModuleCat.{nr} R) (ModuleCat.{nr} R)).mapProjectiveResolution + (ProjectiveResolution.of M) + +instance finite_resolution (M : FGModuleCat.{nr} R) (n : ℕ) : + Module.Finite R ((resolution M).complex.X n) := + inferInstanceAs (Module.Finite R ((ProjectiveResolution.of M).complex.X n)) + +theorem finite_short_homology (S : ShortComplex (ModuleCat.{nr} R)) + [Module.Finite R S.X₂] : Module.Finite R S.homology := by + have : Module.Finite R (LinearMap.ker S.g.hom) := + Module.Finite.of_injective (LinearMap.ker S.g.hom).subtype Subtype.val_injective + have : Module.Finite R S.moduleCatLeftHomologyData.H := by + exact Module.Finite.of_surjective (LinearMap.range S.moduleCatToCycles).mkQ + (LinearMap.range S.moduleCatToCycles).mkQ_surjective + exact Module.Finite.of_surjective S.moduleCatHomologyIso.inv.hom + S.moduleCatHomologyIso.toLinearEquiv.symm.surjective + +theorem finite_homology (C : ChainComplex (ModuleCat.{nr} R) ℕ) (n : ℕ) + [Module.Finite R (C.X n)] : Module.Finite R (C.homology n) := by + have : Module.Finite R (C.sc n).X₂ := ‹Module.Finite R (C.X n)› + exact finite_short_homology (C.sc n) + +end NoetherianResolution +end NoetherianResolution + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PolygonHomologyAction.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PolygonHomologyAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7f5f8d133b805ea8067c368b3af6d29974cac4d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PolygonHomologyAction.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonAlternatingStabilization + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonHomologyAction + +open Classical Set +namespace PolygonTracks +variable {a k n : ℕ} + +theorem stabilize_fix_outside (g : polygonFullGroup a n) (x : TrackPoint a (k+n)) + (hx : x∉Set.range (rightIncl a k n)) : (stabilize a k n g).val x=x := by + obtain ⟨y,rfl⟩ := (join a k n).surjective x + cases y with + | inl y => exact stabilize_left g y + | inr y => exact False.elim (hx ⟨y,rfl⟩) + +theorem conjugate_stabilize_eq (f c : polygonFullGroup a (k+n)) + (hc : ∀x : TrackPoint a n,c.val (rightIncl a k n x)=f.val (rightIncl a k n x)) + (g : polygonFullGroup a n) : + f*stabilize a k n g*f⁻¹=c*stabilize a k n g*c⁻¹ := by + apply Subtype.ext + apply Equiv.ext + intro y + obtain ⟨x,rfl⟩ := f.val.surjective y + change f.val ((stabilize a k n g).val (f.val.symm (f.val x)))= + c.val ((stabilize a k n g).val (c.val.symm (f.val x))) + rw [f.val.symm_apply_apply] + by_cases hx : x∈Set.range (rightIncl a k n) + · obtain ⟨z,rfl⟩ := hx + rw [←hc z,c.val.symm_apply_apply] + change f.val ((stabilize a k n g).val (z.1.natAdd k,z.2))= + c.val ((stabilize a k n g).val (z.1.natAdd k,z.2)) + rw [stabilize_right] + exact (hc (g.val z)).symm + · have hz : c.val.symm (f.val x)∉Set.range (rightIncl a k n) := by + rintro ⟨z,hz⟩ + have hg : f.val (rightIncl a k n z)=f.val x := by + rw [←hc z,hz,c.val.apply_symm_apply] + exact hx ⟨z,f.val.injective hg⟩ + rw [stabilize_fix_outside g x hx,stabilize_fix_outside g _ hz,c.val.apply_symm_apply] + +noncomputable def fullConjugation (a m : ℕ) (f : polygonFullGroup a m) : + polygonAlternatingGroup a m →* polygonAlternatingGroup a m := + (MulAut.conj f).toMonoidHom.restrict (fun g hg => + (polygonAlternatingGroup_normal a m).conj_mem g hg f) + +@[simp] theorem fullConjugation_val (f : polygonFullGroup a (k+n)) + (g : polygonAlternatingGroup a (k+n)) : + (fullConjugation a (k+n) f g).val=f*g.val*f⁻¹ := rfl + +theorem conjugation_stabilize_inner (f : polygonFullGroup a (k+n)) (hm : 6*n+7 TrivialHomology.map (successorStabilize a n) j) + +lemma successor_H1_isIso (a n : ℕ) (hn : 32 ≤ n) : + IsIso (TrivialHomology.map (successorStabilize a n) 1) := by + unfold successorStabilize + rw [TrivialHomology.map_comp] + have := PolygonPlacement.Configuration.stabilize_H1_isIso a n hn + have := TrivialHomology.isIso_equiv (castFull a (Nat.add_comm 1 n)) 1 + infer_instance + +lemma successor_H2_isIso (a n : ℕ) (hn : 34 ≤ n) : + IsIso (TrivialHomology.map (successorStabilize a n) 2) := by + unfold successorStabilize + rw [TrivialHomology.map_comp] + have := PolygonPlacement.Configuration.stabilize_H2_isIso a n hn + have := TrivialHomology.isIso_equiv (castFull a (Nat.add_comm 1 n)) 2 + infer_instance +lemma fullH1_eventuallyConstant (a : ℕ) : + (fullHomologySequence a 1).IsEventuallyConstantFrom 32 := by + apply Functor.isEventuallyConstantFrom_of_succ + intro n hn + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H1_isIso a n hn +lemma fullH2_eventuallyConstant (a : ℕ) : + (fullHomologySequence a 2).IsEventuallyConstantFrom 34 := by + apply Functor.isEventuallyConstantFrom_of_succ + intro n hn + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H2_isIso a n hn + +lemma fullH1_colimit_ι_isIso (a m : ℕ) (hm : 32 ≤ m) : + IsIso (colimit.ι (fullHomologySequence a 1) m) := + (fullH1_eventuallyConstant a).isIso_ι_of_isColimit' + (colimit.isColimit _) m (homOfLE hm) + +lemma fullH2_colimit_ι_isIso (a m : ℕ) (hm : 34 ≤ m) : + IsIso (colimit.ι (fullHomologySequence a 2) m) := + (fullH2_eventuallyConstant a).isIso_ι_of_isColimit' + (colimit.isColimit _) m (homOfLE hm) +noncomputable def fullH1_colimitIso (a m : ℕ) (hm : 32 ≤ m) : + groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 1 ≅ + colimit (fullHomologySequence a 1) := by + haveI := fullH1_colimit_ι_isIso a m hm + let e := asIso (colimit.ι (fullHomologySequence a 1) m) + exact e +noncomputable def fullH2_colimitIso (a m : ℕ) (hm : 34 ≤ m) : + groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 2 ≅ + colimit (fullHomologySequence a 2) := by + haveI := fullH2_colimit_ι_isIso a m hm + let e := asIso (colimit.ι (fullHomologySequence a 2) m) + exact e +lemma finite_fullH1_iff_colimit (a m : ℕ) (hm : 32 ≤ m) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 1) ↔ + Module.Finite ℤ (colimit (fullHomologySequence a 1) : ModuleCat ℤ) := by + have h := FixedStageReturn.finite_stage_iff_colimit (fullHomologySequence a 1) 32 m + (fun n hn => by + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H1_isIso a n hn) hm + exact h +lemma finite_fullH2_iff_colimit (a m : ℕ) (hm : 34 ≤ m) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ (polygonFullGroup a m) ℤ) 2) ↔ + Module.Finite ℤ (colimit (fullHomologySequence a 2) : ModuleCat ℤ) := by + have h := FixedStageReturn.finite_stage_iff_colimit (fullHomologySequence a 2) 34 m + (fun n hn => by + dsimp only [fullHomologySequence] + erw [Functor.ofSequence_map_homOfLE_succ] + exact successor_H2_isIso a n hn) hm + exact h +end SimpleAmenable.PolygonTracks + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/PowerEquivalence.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PowerEquivalence.lean new file mode 100644 index 0000000000000000000000000000000000000000..15266a0174916842759df9bd304d467f713f6ceb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/PowerEquivalence.lean @@ -0,0 +1,104 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FilteredHomology + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory +namespace StageProductColimit + +variable {C D : Type} [Category.{0} C] [Category.{0} D] (κ ι : Type) +noncomputable instance (F : C ⥤ D) [F.Full] : (powerMap κ F).Full where + map_surjective f := ⟨fun i => F.preimage (f i),by funext i; exact F.map_preimage (f i)⟩ +noncomputable instance (F : C ⥤ D) [F.EssSurj] : (powerMap κ F).EssSurj where + mem_essImage X := ⟨fun i => F.objPreimage (X i),⟨{ + hom i := (F.objObjPreimageIso (X i)).hom + inv i := (F.objObjPreimageIso (X i)).inv + hom_inv_id := by funext i; exact Iso.hom_inv_id _ + inv_hom_id := by funext i; exact Iso.inv_hom_id _ }⟩⟩ +noncomputable instance (F : C ⥤ D) [F.IsEquivalence] : (powerMap κ F).IsEquivalence where + +def uncurry : (κ → ι → C) ⥤ (κ × ι → C) where + obj U i := U i.1 i.2 + map f i := f i.1 i.2 +def curry : (κ × ι → C) ⥤ (κ → ι → C) where + obj U i j := U (i,j) + map f i j := f (i,j) +noncomputable def curryEquiv : (κ → ι → C) ≌ (κ × ι → C) where + functor := uncurry κ ι + inverse := curry κ ι + unitIso := NatIso.ofComponents (fun _ => Iso.refl _) (by + intros + simp only [Iso.refl_hom] + erw [Category.id_comp, Category.comp_id] + rfl) + counitIso := NatIso.ofComponents (fun _ => Iso.refl _) (by + intros + simp only [Iso.refl_hom] + erw [Category.id_comp, Category.comp_id] + rfl) + functor_unitIso_comp := by + intro X + funext i + change 𝟙 (X i.1 i.2) ≫ 𝟙 (X i.1 i.2) = 𝟙 (X i.1 i.2) + exact Category.id_comp _ +instance : (uncurry (C:=C) κ ι).IsEquivalence := (curryEquiv κ ι).isEquivalence_functor +end StageProductColimit +namespace IntervalBar.Diagram +open StageProductColimit MonoidalCategory + +variable {C D : Type} [Groupoid.{0} C] [Groupoid.{0} D] + [MonoidalCategory C] [MonoidalCategory D] [SymmetricCategory C] [SymmetricCategory D] +noncomputable def eval₂ (m n:ℕ) : Diagram (Diagram C (Fin (n+1))) (Fin (m+1)) ⥤ + (Fin m × Fin n → C) := eval m ⋙ powerMap (Fin m) (eval n) ⋙ uncurry (Fin m) (Fin n) +noncomputable def eval₃ (l m n:ℕ) : Diagram (Diagram (Diagram C (Fin (n+1))) (Fin (m+1))) + (Fin (l+1)) ⥤ (Fin l × (Fin m × Fin n) → C) := + eval l ⋙ powerMap (Fin l) (eval₂ m n) ⋙ uncurry (Fin l) (Fin m × Fin n) +noncomputable instance (m n:ℕ) : (eval₂ (C:=C) m n).IsEquivalence := by + dsimp [eval₂]; infer_instance +noncomputable instance (l m n:ℕ) : (eval₃ (C:=C) l m n).IsEquivalence := by + dsimp [eval₃]; infer_instance +lemma eval₂_natural (F : C ⥤ D) [F.Braided] (m n:ℕ) : + map (I:=Fin (m+1)) (map (I:=Fin (n+1)) F) ⋙ eval₂ m n = + eval₂ m n ⋙ powerMap (Fin m × Fin n) F := rfl +lemma eval₃_natural (F : C ⥤ D) [F.Braided] (l m n:ℕ) : + map (I:=Fin (l+1)) (map (I:=Fin (m+1)) (map (I:=Fin (n+1)) F)) ⋙ eval₃ l m n = + eval₃ l m n ⋙ powerMap (Fin l × (Fin m × Fin n)) F := rfl +end IntervalBar.Diagram + +end + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits +namespace ColimitTransfer + +universe u v w z +variable {J : Type u} [Category.{v} J] {C : Type w} [Category.{z} C] +noncomputable def ofIsos {F G : J ⥤ C} (s : Cocone F) (t : Cocone G) + (u : F ⟶ G) [IsIso u] (f : s.pt ⟶ t.pt) [IsIso f] + (comm : ∀j,s.ι.app j ≫ f=u.app j ≫ t.ι.app j) (ht : IsColimit t) : IsColimit s := by + let e := asIso u + have hnat (j:J) : (((Cocone.precompose e.inv).obj s).ι.app j) ≫ f=t.ι.app j := by + change ((inv u).app j ≫ s.ι.app j) ≫ f = _ + rw [Category.assoc,comm] + simp + exact (IsColimit.equivOfNatIsoOfIso e s t (Cocone.ext (asIso f) hnat)).symm ht +noncomputable abbrev H (q:ℕ) : Cat.{0,0} ⥤ ModuleCat ℤ := + nerveFunctor ⋙ SSet.homologyFunctor (ModuleCat.of ℤ ℤ) q +noncomputable def ofEquivalences {J : Type} [Category.{0} J] {F G : J ⥤ Cat.{0,0}} + (s : Cocone F) (t : Cocone G) (u : F ⟶ G) (f : s.pt ⟶ t.pt) + [∀j,(u.app j).toFunctor.IsEquivalence] [f.toFunctor.IsEquivalence] + (comm : ∀j,s.ι.app j ≫ f=u.app j ≫ t.ι.app j) (q:ℕ) + (ht : IsColimit ((H q).mapCocone t)) : IsColimit ((H q).mapCocone s) := by + haveI (j:J) : IsIso ((Functor.whiskerRight u (H q)).app j) := by + change IsIso (SSet.homologyMap (nerveMap (u.app j).toFunctor) (ModuleCat.of ℤ ℤ) q) + infer_instance + haveI : IsIso (Functor.whiskerRight u (H q)) := (NatTrans.isIso_iff_isIso_app _).mpr (fun _ => inferInstance) + haveI : IsIso ((H q).map f) := by + change IsIso (SSet.homologyMap (nerveMap f.toFunctor) (ModuleCat.of ℤ ℤ) q) + infer_instance + apply ofIsos ((H q).mapCocone s) ((H q).mapCocone t) (Functor.whiskerRight u (H q)) ((H q).map f) _ ht + intro j + exact (Functor.map_comp _ _ _).symm.trans ((congrArg (H q).map (comm j)).trans (Functor.map_comp _ _ _)) +end ColimitTransfer + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductChains.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..419d87059637cc56ddd6726fa6a500a9fee1ac88 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductChains.lean @@ -0,0 +1,186 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.CoefficientUCT + +namespace OAI + +section + +section + +open CategoryTheory Limits MonoidalCategory SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace ProductChains + +open FreeChains +lemma sum_f {K L : ChainComplex A ℕ} {ι : Type} (s : Finset ι) (f : ι → (K ⟶ L)) (q : ℕ) : + (∑ i∈s,f i).f q=∑ i∈s,(f i).f q := map_sum (HomologicalComplex.Hom.fAddMonoidHom q) f s +abbrev D := SimplexCategory × SimplexCategory +variable (X Y : SSet) +def product : Dᵒᵖ ⥤ Type where + obj a := X.obj (op a.unop.1) × Y.obj (op a.unop.2) + map f := ↾fun z => (X.map f.unop.1.op z.1,Y.map f.unop.2.op z.2) + map_id _ := by ext z <;> simp + map_comp f g := by ext z <;> simp + +noncomputable def twoFree : HomologicalComplex₂ A c c := + AlternatingFaceMapComplex.obj (EilenbergZilber.bisimplicial (product X Y ⋙ ModuleCat.free ℤ) ⋙ + alternatingFaceMapComplex A) + +noncomputable def freeIso : EilenbergZilber.twoComplex (product X Y) ≅ twoFree X Y := + (alternatingFaceMapComplex (ChainComplex A ℕ)).mapIso + (Functor.isoWhiskerRight + ((Functor.curry.mapIso (Functor.isoWhiskerLeft + (CategoryTheory.prodOpEquiv SimplexCategory (D:=SimplexCategory)).inverse + (Functor.isoWhiskerLeft (product X Y) FreeChains.naturalIso)))) + (alternatingFaceMapComplex A)) + +noncomputable def rowIso (p : ℕ) : + (TensorProductHomology.bicomplex (complex X) (complex Y)).X p ≅ (twoFree X Y).X p := by + refine HomologicalComplex.Hom.isoOfComponents + (fun q => Functor.Monoidal.μIso (ModuleCat.free ℤ) (X.obj (op ⦋p⦌)) (Y.obj (op ⦋q⦌))) ?_ + intro q q' h + obtain rfl : q=q'+1 := h.symm + change Functor.LaxMonoidal.μ (ModuleCat.free ℤ) (X.obj (op ⦋p⦌)) (Y.obj (op ⦋q'+1⦌)) ≫ + (AlternatingFaceMapComplex.obj ((EilenbergZilber.bisimplicial (product X Y ⋙ ModuleCat.free ℤ)).obj (op ⦋p⦌))).d (q'+1) q' = + (tensorLeft ((ModuleCat.free ℤ).obj (X.obj (op ⦋p⦌)))).map ((AlternatingFaceMapComplex.obj (Y ⋙ ModuleCat.free ℤ)).d (q'+1) q') ≫ + Functor.LaxMonoidal.μ (ModuleCat.free ℤ) (X.obj (op ⦋p⦌)) (Y.obj (op ⦋q'⦌)) + simp only [AlternatingFaceMapComplex.obj_d_eq, + Functor.map_sum,Functor.map_zsmul,Preadditive.sum_comp,Preadditive.zsmul_comp] + refine (Preadditive.comp_sum _ _ _).trans ?_ + apply Finset.sum_congr rfl + intro _ _ + refine (Preadditive.comp_zsmul _ _ _).trans ?_ + congr 1 + simp [EilenbergZilber.bisimplicial,product,SimplicialObject.δ] + rfl + +noncomputable def tensorIso : + TensorProductHomology.bicomplex (complex X) (complex Y) ≅ twoFree X Y := by + refine HomologicalComplex.Hom.isoOfComponents (rowIso X Y) ?_ + intro p p' h + obtain rfl : p=p'+1 := h.symm + apply HomologicalComplex.Hom.ext + funext q + change Functor.LaxMonoidal.μ (ModuleCat.free ℤ) (X.obj (op ⦋p'+1⦌)) (Y.obj (op ⦋q⦌)) ≫ + ((twoFree X Y).d (p'+1) p').f q = + (tensorRight ((ModuleCat.free ℤ).obj (Y.obj (op ⦋q⦌)))).map ((complex X).d (p'+1) p') ≫ + Functor.LaxMonoidal.μ (ModuleCat.free ℤ) (X.obj (op ⦋p'⦌)) (Y.obj (op ⦋q⦌)) + simp only [twoFree,complex,AlternatingFaceMapComplex.obj_d_eq, + sum_f,HomologicalComplex.zsmul_f_apply, + Functor.map_sum,Functor.map_zsmul,Preadditive.sum_comp,Preadditive.zsmul_comp] + refine (Preadditive.comp_sum _ _ _).trans ?_ + apply Finset.sum_congr rfl + intro _ _ + refine (Preadditive.comp_zsmul _ _ _).trans ?_ + congr 1 + simp [EilenbergZilber.bisimplicial,product,SimplicialObject.δ] + rfl + +noncomputable def homologyIso (n : ℕ) : + SSet.homology (EilenbergZilber.diag ⋙ product X Y) Z n ≅ + ((TensorProductHomology.bicomplex (complex X) (complex Y)).total c).homology n := + EilenbergZilber.homologyIso (product X Y) n ≪≫ + (homologyFunctor _ c n).mapIso + (total.mapIso (freeIso X Y ≪≫ (tensorIso X Y).symm) c) + +end ProductChains + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex HomologicalComplex₂ +namespace ChainTensor +open FreeChains +attribute [local instance] preservesBinaryBiproducts_of_preservesBiproducts + +instance leftAdditive (K : ChainComplex A ℕ) : (tensorLeft K).Additive where + map_add {L M} f g := by + apply HomologicalComplex.Hom.ext + funext n + apply total.hom_ext + intro p q hpq + change ιMapBifunctor K L (curriedTensor A) c p q n hpq ≫ + (mapBifunctorMap (𝟙 K) (f+g) (curriedTensor A) c).f n = + ιMapBifunctor K L (curriedTensor A) c p q n hpq ≫ + ((mapBifunctorMap (𝟙 K) f (curriedTensor A) c).f n + (mapBifunctorMap (𝟙 K) g (curriedTensor A) c).f n) + simp [Preadditive.comp_add] +instance rightAdditive (K : ChainComplex A ℕ) : (tensorRight K).Additive where + map_add {L M} f g := by + apply HomologicalComplex.Hom.ext + funext n + apply total.hom_ext + intro p q hpq + change ιMapBifunctor L K (curriedTensor A) c p q n hpq ≫ + (mapBifunctorMap (f+g) (𝟙 K) (curriedTensor A) c).f n = + ιMapBifunctor L K (curriedTensor A) c p q n hpq ≫ + ((mapBifunctorMap f (𝟙 K) (curriedTensor A) c).f n + (mapBifunctorMap g (𝟙 K) (curriedTensor A) c).f n) + simp [Preadditive.comp_add] +noncomputable def leftDistrib (K L M : ChainComplex A ℕ) : + K ⊗ (L ⊞ M) ≅ (K ⊗ L) ⊞ (K ⊗ M) := (tensorLeft K).mapBiprod L M +noncomputable def rightDistrib (K L M : ChainComplex A ℕ) : + (K ⊞ L) ⊗ M ≅ (K ⊗ M) ⊞ (L ⊗ M) := (tensorRight M).mapBiprod K L +end ChainTensor + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex +namespace AugmentedSplit +open FreeChains +attribute [local instance] preservesBinaryBiproducts_of_preservesBiproducts + +noncomputable abbrev U : ChainComplex A ℕ := 𝟙_ (ChainComplex A ℕ) +variable {K : ChainComplex A ℕ} (e : K ⟶ U) (s : U ⟶ K) (hs : s ≫ e=𝟙 U) +noncomputable abbrev red := kernel e +noncomputable def sc : ShortComplex (ChainComplex A ℕ) := + ShortComplex.mk (kernel.ι e) e (kernel.condition e) +noncomputable def splitting : (sc e).Splitting := + ShortComplex.Splitting.ofExactOfSection (sc e) + ((sc e).exact_of_f_is_kernel (kernelIsKernel e)) s hs (by dsimp [sc]; infer_instance) +noncomputable def iso : K ≅ red e ⊞ U := (splitting e s hs).isoBinaryBiproduct + +lemma flat [∀n,Module.Flat ℤ (K.X n)] (n : ℕ) : Module.Flat ℤ ((red e).X n) := by + have hf : Function.Injective ((kernel.ι e).f n) := + (ModuleCat.mono_iff_injective _).mp inferInstance + have : Module.IsTorsionFree ℤ ((red e).X n) := + hf.moduleIsTorsionFree _ (fun r x => ((kernel.ι e).f n).hom.map_smul r x) + infer_instance + +include s hs in +lemma finite (n : ℕ) [Module.Finite ℤ (K.homology n)] : + Module.Finite ℤ ((red e).homology n) := by + let i := homologyMap (kernel.ι e) n + let r := homologyMap (splitting e s hs).r n + have hi : Function.Injective i := by + apply Function.LeftInverse.injective (f:=i) (g:=r) + intro x + have h : i ≫ r = 𝟙 _ := by + change homologyMap (sc e).f n ≫ homologyMap (splitting e s hs).r n = _ + rw [←homologyMap_comp,(splitting e s hs).f_r,homologyMap_id] + rfl + exact congrArg (fun f => f x) h + exact Module.Finite.of_injective i.hom hi + +lemma uni_isZero (n : ℕ) (hn : n≠0) : IsZero (U.homology n) := by + apply ShortComplex.isZero_homology_of_isZero_X₂ + exact HomologicalComplex.isZero_single_obj_X c 0 _ n hn + +noncomputable def homologyIso (n : ℕ) (hn : n≠0) : K.homology n ≅ (red e).homology n := + (homologyFunctor A c n).mapIso (iso e s hs) ≪≫ + (homologyFunctor A c n).mapBiprod _ _ ≪≫ (isoBiprodZero (uni_isZero n hn)).symm + +include s hs in +lemma vanishing (a : ℕ) (h0 : IsZero ((red e).homology 0)) + (hK : ∀ i, 0 < i → i < a → IsZero (K.homology i)) : + ∀ i, i < a → IsZero ((red e).homology i) := by + intro i hi + by_cases h : i=0 + · simpa [h] using h0 + · exact IsZero.of_iso (hK i (by omega) hi) (homologyIso e s hs i h).symm +end AugmentedSplit + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductHomologyMaps.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductHomologyMaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..2784119c012d728130bcf82f3a9117c708fb8eb3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductHomologyMaps.lean @@ -0,0 +1,58 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.CanonicalProduct + +namespace OAI + +section + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite AlgebraicTopology +namespace ConnectedProduct +open FreeChains AugmentedSplit + +variable (X Y : SSet) (x : X.obj (op ⦋0⦌)) (y : Y.obj (op ⦋0⦌)) (n : ℕ) +lemma projection_inclusion (hn : n≠0) [IsIso (projection X Y n)] : + projection X Y n ≫ inclusion X Y x y n=𝟙 _ := by + apply (cancel_mono (projection X Y n)).mp + simp only [Category.assoc,inclusion_projection X Y x y n hn,Category.comp_id,Category.id_comp] +noncomputable def canonicalIso [IsIso (projection X Y n)] : + (X⊗Y).homology Z n ≅ X.homology Z n ⊞ Y.homology Z n := asIso (projection X Y n) +lemma homologyMap_eq (T : SSet) (f : X⊗Y ⟶ T) (hn : n≠0) + [IsIso (projection X Y n)] : + SSet.homologyMap f Z n = projection X Y n ≫ + biprod.desc (SSet.homologyMap (pairLeft X Y y ≫ f) Z n) + (SSet.homologyMap (pairRight X Y x ≫ f) Z n) := by + rw [SSet.homologyMap_comp,SSet.homologyMap_comp] + have hd : biprod.desc (SSet.homologyMap (pairLeft X Y y) Z n ≫ SSet.homologyMap f Z n) + (SSet.homologyMap (pairRight X Y x) Z n ≫ SSet.homologyMap f Z n) = + inclusion X Y x y n ≫ SSet.homologyMap f Z n := by + apply biprod.hom_ext' <;> simp [inclusion] + rw [hd] + rw [←Category.assoc,projection_inclusion X Y x y n hn,Category.id_comp] +lemma diagonal_homology_projection (f : X ⟶ X⊗X) + (h₁ : f ≫ CartesianMonoidalCategory.fst X X=𝟙 X) + (h₂ : f ≫ CartesianMonoidalCategory.snd X X=𝟙 X) : + SSet.homologyMap f Z n ≫ projection X X n=biprod.lift (𝟙 _) (𝟙 _) := by + apply biprod.hom_ext + · simp only [projection,Category.assoc,biprod.lift_fst,←SSet.homologyMap_comp,h₁,SSet.homologyMap_id] + · simp only [projection,Category.assoc,biprod.lift_snd,←SSet.homologyMap_comp,h₂,SSet.homologyMap_id] +lemma unit_product_homology (μ : X⊗X ⟶ X) + (hl : pairLeft X X x ≫ μ=𝟙 X) (hr : pairRight X X x ≫ μ=𝟙 X) + (hn : n≠0) [IsIso (projection X X n)] : + SSet.homologyMap μ Z n=projection X X n ≫ biprod.desc (𝟙 _) (𝟙 _) := by + rw [homologyMap_eq X X x x n X μ hn,hl,hr,SSet.homologyMap_id] +lemma product_naturality {X' Y' : SSet} (f : X ⟶ X') (g : Y ⟶ Y') : + SSet.homologyMap (f⊗ₘg) Z n ≫ projection X' Y' n= + projection X Y n ≫ biprod.map (SSet.homologyMap f Z n) (SSet.homologyMap g Z n) := by + apply biprod.hom_ext + · simp [projection,Category.assoc,← SSet.homologyMap_comp, + CartesianMonoidalCategory.tensorHom_fst] + · simp [projection,Category.assoc,← SSet.homologyMap_comp, + CartesianMonoidalCategory.tensorHom_snd] +end ConnectedProduct + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductNatural.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductNatural.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2c00312ed09cb13b371d18988235dafe899b0e7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ProductNatural.lean @@ -0,0 +1,172 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.EZNatural +import OAI.GroupTheory.SimpleAmenable.Homology.ProductChains + +namespace OAI + +section + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex HomologicalComplex₂ SimplicialObject Simplicial Opposite AlgebraicTopology +namespace ProductChains +open FreeChains + +variable {X Y X' Y':SSet} +def map (f:X⟶X') (g:Y⟶Y') : product X Y ⟶ product X' Y' where + app d := ↾fun z => (f.app (op d.unop.1) z.1,g.app (op d.unop.2) z.2) + naturality _ _ h := by ext z; exact Prod.ext (congrArg (fun k => k z.1) (f.naturality h.unop.1.op)) (congrArg (fun k => k z.2) (g.naturality h.unop.2.op)) +noncomputable def chainMap (f:X⟶X') : complex X ⟶ complex X' := + (alternatingFaceMapComplex A).map (Functor.whiskerRight f (ModuleCat.free ℤ)) +noncomputable def twoFreeMap (f:X⟶X') (g:Y⟶Y') : twoFree X Y ⟶ twoFree X' Y' := + (alternatingFaceMapComplex (ChainComplex A ℕ)).map + (Functor.whiskerRight (Functor.curry.map + (Functor.whiskerLeft (CategoryTheory.prodOpEquiv SimplexCategory (D:=SimplexCategory)).inverse + (Functor.whiskerRight (map f g) (ModuleCat.free ℤ)))) (alternatingFaceMapComplex A)) +@[reassoc] lemma free_natural (f:X⟶X') (g:Y⟶Y') : + EilenbergZilber.twoMap (map f g) ≫ (freeIso X' Y').hom = + (freeIso X Y).hom ≫ twoFreeMap f g := by + apply HomologicalComplex.Hom.ext; funext p + apply HomologicalComplex.Hom.ext; funext q + exact (FreeChains.naturalIso.hom.naturality ((map f g).app (op (SimplexCategory.mk p,SimplexCategory.mk q)))) +noncomputable def tensorBiMap (f:X⟶X') (g:Y⟶Y') : + TensorProductHomology.bicomplex (complex X) (complex Y) ⟶ + TensorProductHomology.bicomplex (complex X') (complex Y') := + (((curriedTensor A).mapBifunctorHomologicalComplex c c).map (chainMap f)).app (complex Y) ≫ + (((curriedTensor A).mapBifunctorHomologicalComplex c c).obj (complex X')).map (chainMap g) +@[reassoc] lemma tensor_natural (f:X⟶X') (g:Y⟶Y') : + tensorBiMap f g ≫ (tensorIso X' Y').hom = (tensorIso X Y).hom ≫ twoFreeMap f g := by + apply HomologicalComplex.Hom.ext; funext p + apply HomologicalComplex.Hom.ext; funext q + simp only [tensorBiMap,tensorIso,rowIso,twoFreeMap,HomologicalComplex.comp_f, + HomologicalComplex.Hom.isoOfComponents_hom_f] + change (((ModuleCat.free ℤ).map (f.app (op ⦋p⦌))) ▷ ((ModuleCat.free ℤ).obj (Y.obj (op ⦋q⦌))) ≫ + ((ModuleCat.free ℤ).obj (X'.obj (op ⦋p⦌))) ◁ ((ModuleCat.free ℤ).map (g.app (op ⦋q⦌)))) ≫ + Functor.LaxMonoidal.μ (ModuleCat.free ℤ) _ _ = + Functor.LaxMonoidal.μ (ModuleCat.free ℤ) _ _ ≫ + (ModuleCat.free ℤ).map (f.app (op ⦋p⦌) ⊗ₘ g.app (op ⦋q⦌)) + rw [←MonoidalCategory.tensorHom_def] + exact Functor.LaxMonoidal.μ_natural (ModuleCat.free ℤ) _ _ +noncomputable def homologyIsoN (X Y:SSet) (n:ℕ) : + (X⊗Y).homology Z n ≅ ((complex X⊗complex Y).homology n) := + EilenbergZilber.homologyIsoN (product X Y) n ≪≫ + (homologyFunctor A c n).mapIso (total.mapIso (freeIso X Y ≪≫ (tensorIso X Y).symm) c) +@[reassoc] lemma homology_natural (f:X⟶X') (g:Y⟶Y') (n:ℕ) : + SSet.homologyMap (f⊗ₘg) Z n ≫ (homologyIsoN X' Y' n).hom = + (homologyIsoN X Y n).hom ≫ homologyMap (chainMap f⊗ₘchainMap g) n := by + have ht : EilenbergZilber.twoMap (map f g) ≫ + (freeIso X' Y' ≪≫ (tensorIso X' Y').symm).hom = + (freeIso X Y ≪≫ (tensorIso X Y).symm).hom ≫ tensorBiMap f g := by + simp only [Iso.trans_hom,Iso.symm_hom] + rw [←Category.assoc,free_natural,Category.assoc] + apply (cancel_mono (tensorIso X' Y').hom).mp + simp only [Category.assoc,Iso.inv_hom_id,Category.comp_id] + rw [tensor_natural] + simp + have hh := EilenbergZilber.homology_natural (map f g) n + have ht' := congrArg (fun φ => homologyMap (total.map φ c) n) ht + simp only [total.map_comp,homologyMap_comp] at ht' + simp only [homologyIsoN] + + change homologyMap (EilenbergZilber.diagonalMap (map f g)) n ≫ + (EilenbergZilber.homologyIsoN (product X' Y') n).hom ≫ + homologyMap (total.map (freeIso X' Y' ≪≫ (tensorIso X' Y').symm).hom c) n = + (EilenbergZilber.homologyIsoN (product X Y) n).hom ≫ + homologyMap (total.map (freeIso X Y ≪≫ (tensorIso X Y).symm).hom c) n ≫ + homologyMap (total.map (tensorBiMap f g) c) n + rw [reassoc_of% hh,ht'] +end ProductChains + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex +namespace TensorCoefficient + +variable {R:Type} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] + +lemma flatPresentation (A:ModuleCat.{0} R) : + ∃S:ShortComplex (ModuleCat.{0} R),S.X₃=A ∧ S.ShortExact ∧ + Module.Flat R S.X₁ ∧ Module.Flat R S.X₂ := by + let φ : (A→₀R) →ₗ[R] A := Finsupp.linearCombination R (fun x:A => x) + have hφ : Function.Surjective φ := by + intro x; exact ⟨Finsupp.single x 1,by simp [φ]⟩ + let B : ModuleCat R := ModuleCat.of R (A→₀R) + let C : ModuleCat R := ModuleCat.of R φ.ker + let i : C ⟶ B := ModuleCat.ofHom φ.ker.subtype + let p : B ⟶ A := ModuleCat.ofHom φ + have hi : Mono i := (ModuleCat.mono_iff_injective _).mpr Subtype.val_injective + have hp : Epi p := (ModuleCat.epi_iff_surjective _).mpr hφ + have hz : i≫p=0 := by + apply ModuleCat.hom_ext; apply LinearMap.ext; intro x; exact x.property + let S : ShortComplex (ModuleCat R) := ShortComplex.mk i p hz + have he : S.ShortExact := { + mono_f := hi + epi_g := hp + exact := (S.moduleCat_exact_iff).mpr (by intro x hx; exact ⟨⟨x,hx⟩,rfl⟩) } + exact ⟨S,rfl,he,inferInstance,inferInstance⟩ +variable (K:ChainComplex (ModuleCat.{0} R) ℕ) +omit [IsDomain R] [IsPrincipalIdealRing R] in +lemma flat_isZero (A:ModuleCat.{0} R) [Module.Flat R A] (n:ℕ) + (h:IsZero (K.homology n)) : IsZero ((homologyFunctor K n).obj A) := by + exact IsZero.of_iso (Functor.map_isZero (tensorRight A) h) + ((K.sc n).mapHomologyIso (tensorRight A)) +variable [∀n,Module.Flat R (K.X n)] +lemma arbitrary_zero_succ (A:ModuleCat.{0} R) (n:ℕ) + (h0:IsZero (K.homology n)) (h1:IsZero (K.homology (n+1))) : + IsZero ((homologyFunctor K (n+1)).obj A) := by + obtain ⟨S,hA,hS,h1f,h2f⟩ := flatPresentation A + have := h1f; have := h2f + rw [←hA] + exact ((shortExact K hS).homology_exact₃ (n+1) n rfl).isZero_X₂ + ((flat_isZero K S.X₂ (n+1) h1).eq_of_src _ _) + ((flat_isZero K S.X₁ n h0).eq_of_tgt _ _) +lemma arbitrary_zero_zero (A:ModuleCat.{0} R) (h:IsZero (K.homology 0)) : + IsZero ((homologyFunctor K 0).obj A) := by + obtain ⟨S,hA,hS,h1f,h2f⟩ := flatPresentation A + have := h1f; have := h2f + rw [←hA] + have hs := shortExact K hS + have := hs.epi_g + have homology_epi : Epi (homologyMap (S.map (functor K)).g 0) := + epi_homologyMap_of_epi_of_not_rel _ 0 (by intro _; simp [ComplexShape.down_Rel]) + exact @IsZero.of_epi _ _ _ _ _ (homologyMap (S.map (functor K)).g 0) + homology_epi (flat_isZero K S.X₂ 0 h) +end TensorCoefficient + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex HomologicalComplex₂ +namespace TensorProductHomology + +variable {R:Type} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] +lemma arbitrary_isZero (K L:ChainComplex (ModuleCat.{0} R) ℕ) + [∀n,Module.Flat R (K.X n)] (a b n:ℕ) (hn:n exact TensorCoefficient.arbitrary_zero_zero K _ (hK 0 (by omega)) + | succ p => exact TensorCoefficient.arbitrary_zero_succ K _ p (hK p (by omega)) (hK (p+1) (by omega)) +end TensorProductHomology +namespace ChainTensor +open FreeChains + +instance monoidalPreadditive : MonoidalPreadditive (ChainComplex A ℕ) where + whiskerLeft_zero := fun {K L M} => (tensorLeft K).map_zero L M + zero_whiskerRight := fun {K L M} => (tensorRight K).map_zero L M + whiskerLeft_add := fun {K _ _} f g => (tensorLeft K).map_add (f:=f) (g:=g) + add_whiskerRight := fun {K _ _} f g => (tensorRight K).map_add (f:=f) (g:=g) +end ChainTensor + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/QuotientRegular.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/QuotientRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..670e6f82f0c4d8edad7e1a984a6bc6a8b6c0378f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/QuotientRegular.lean @@ -0,0 +1,234 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FullGroupStability + +namespace OAI + +section + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +open SimpleAmenable +namespace QuotientRegular + +attribute [local instance 1200] Rep.hV2 +variable {G Q : Type} [Group G] [Group Q] (f : G →* Q) + +noncomputable abbrev regular : Rep ℤ G := + Rep.res f (Rep.of (Representation.leftRegular ℤ Q)) + +noncomputable def point : Rep.trivial ℤ f.ker ℤ ⟶ Rep.res f.ker.subtype (regular f) := + Rep.ofHom ⟨(MonoidAlgebra.coeffLinearEquiv ℤ).symm.toLinearMap.comp (Finsupp.lsingle (1:Q)),by + intro g + apply LinearMap.ext + intro z + change MonoidAlgebra.single (1:Q) z=Representation.leftRegular ℤ Q (f g.val) (MonoidAlgebra.single (1:Q) z) + rw [g.property] + simp⟩ + +noncomputable def kernelEquivStabilizer : + letI : MulAction G Q := MulAction.compHom Q f + f.ker ≃* MulAction.stabilizer G (1:Q) := by + letI : MulAction G Q := MulAction.compHom Q f + exact MulEquiv.subgroupCongr (by + ext g + change f g=1 ↔ f g*1=1 + simp) + +noncomputable def permutationIso : + letI : MulAction G Q := MulAction.compHom Q f + regular f ≅ Rep.of (TransitiveInduction.permutationRep (G:=G) (X:=Q)) := by + letI : MulAction G Q := MulAction.compHom Q f + refine Rep.mkIso (.mk (MonoidAlgebra.coeffLinearEquiv ℤ) ?_) + intro g + apply MonoidAlgebra.lhom_ext' + intro x + apply LinearMap.ext + intro z + simp [TransitiveInduction.permutationRep] + rfl + +lemma isIso_point (hf : Function.Surjective f) (n : ℕ) : + IsIso (groupHomology.map f.ker.subtype (point f) n) := by + let : MulAction G Q := MulAction.compHom Q f + have ht : ∀q:Q,∃g:G,g • (1:Q)=q := by + intro q + obtain ⟨g,rfl⟩ := hf q + exact ⟨g,mul_one _⟩ + have he : groupHomology.map f.ker.subtype (point f) n ≫ + groupHomology.map (MonoidHom.id G) (permutationIso f).hom n = + TrivialHomology.map (kernelEquivStabilizer f).toMonoidHom n ≫ + groupHomology.map (MulAction.stabilizer G (1:Q)).subtype + (TransitiveInduction.pointMap (1:Q)) n := by + rw [← groupHomology.map_comp, ← groupHomology.map_comp] + apply groupHomology.map_congr + · ext g; rfl + · apply LinearMap.ext; intro z; simp [point,permutationIso,TransitiveInduction.pointMap,TransitiveInduction.trivialMap] + have := TrivialHomology.isIso_equiv (kernelEquivStabilizer f) n + have := TransitiveInduction.isIso_map_pointMap (G:=G) (1:Q) ht n + have : IsIso (groupHomology.map f.ker.subtype (point f) n ≫ + groupHomology.map (B:=Rep.of (TransitiveInduction.permutationRep (G:=G) (X:=Q))) + (MonoidHom.id G) (permutationIso f).hom n) := by + rw [he] + infer_instance + have : IsIso (groupHomology.map + (B:=Rep.of (TransitiveInduction.permutationRep (G:=G) (X:=Q))) + (MonoidHom.id G) (permutationIso f).hom n) := + inferInstanceAs (IsIso ((groupHomology.functor ℤ G n).mapIso (permutationIso f)).hom) + exact IsIso.of_isIso_comp_right _ + (groupHomology.map (B:=Rep.of (TransitiveInduction.permutationRep (G:=G) (X:=Q))) + (MonoidHom.id G) (permutationIso f).hom n) + +noncomputable def right (q : Q) : regular f ⟶ regular f := + Rep.ofHom ⟨MonoidAlgebra.mapDomainLinearMap ℤ ℤ (·*q),by + intro g + apply MonoidAlgebra.lhom_ext' + intro x + apply LinearMap.ext + intro z + simp [Representation.leftRegular, mul_assoc]⟩ + +@[simp] lemma right_single (q x : Q) (z : ℤ) : + (right f q).hom (MonoidAlgebra.single x z)=MonoidAlgebra.single (x*q) z := by + simp [right] + +noncomputable def conjugate (g : G) : f.ker ≃* f.ker := + (MulAut.conjNormal g : f.ker ≃* f.ker) + +lemma right_homology_identity (hf : Function.Surjective f) (n : ℕ) + (hact : ∀g:G,TrivialHomology.map (conjugate f g).toMonoidHom n=𝟙 _) (q : Q) : + (groupHomology.functor ℤ G n).map (right f q)=𝟙 _ := by + obtain ⟨g,rfl⟩ := hf q + have := isIso_point f hf n + apply (cancel_epi (groupHomology.map f.ker.subtype (point f) n)).mp + change _ = groupHomology.map f.ker.subtype (point f) n ≫ 𝟙 (groupHomology (regular f) n) + rw [Category.comp_id] + have hc := HomologyConjugation.map_after_conjugation f.ker.subtype (point f) g n + have he : + groupHomology.map ((MulAut.conj g).toMonoidHom.comp f.ker.subtype) + (point f ≫ (Rep.resFunctor f.ker.subtype).map + (HomologyConjugation.conjugationCoeff g (regular f))) n = + TrivialHomology.map (conjugate f g).toMonoidHom n ≫ + groupHomology.map f.ker.subtype (point f) n ≫ + (groupHomology.functor ℤ G n).map (right f (f g)) := by + dsimp only [groupHomology.functor] + rw [← groupHomology.map_comp, ← groupHomology.map_comp] + apply groupHomology.map_congr + · ext h; rfl + · apply LinearMap.ext + intro z + simp [point,right,TransitiveInduction.trivialMap, + HomologyConjugation.conjugationCoeff,regular,Representation.ofMulAction_def] + rw [he,hact,Category.id_comp] at hc + exact hc + +lemma H1_isZero (hf : Function.Surjective f) + (hz : IsZero (groupHomology (Rep.trivial ℤ f.ker ℤ) 1)) : + IsZero (groupHomology (regular f) 1) := by + have := isIso_point f hf 1 + exact hz.of_iso (asIso (groupHomology.map f.ker.subtype (point f) 1)).symm + +lemma H2_finite_of_regular (hf : Function.Surjective f) + [Module.Finite ℤ (groupHomology (regular f) 2)] : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ f.ker ℤ) 2) := by + have := isIso_point f hf 2 + exact Module.Finite.of_injective (groupHomology.map f.ker.subtype (point f) 2).hom + ((ModuleCat.mono_iff_injective _).mp inferInstance) + +end QuotientRegular + +end + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Finsupp +namespace FiniteFreeRep + +attribute [local instance 1200] Rep.hV2 +variable {k Q : Type} [CommRing k] [Group Q] + +noncomputable def incl (A : Rep.{0} k Q) {n : ℕ} (i : Fin n) : A ⟶ Rep.finsupp (Fin n) A := + Rep.ofHom ⟨Finsupp.lsingle i,by + intro g + apply LinearMap.ext + intro x + simp⟩ + +noncomputable def proj (A : Rep.{0} k Q) {n : ℕ} (i : Fin n) : Rep.finsupp (Fin n) A ⟶ A := + Rep.ofHom ⟨Finsupp.lapply i,by + intro g + apply Finsupp.lhom_ext + intro j x + by_cases h : i=j + · subst j; simp + · simp [h]⟩ + +lemma sum_proj_incl (A : Rep.{0} k Q) (n : ℕ) : + ∑ i:Fin n,proj A i ≫ incl A i=𝟙 (Rep.finsupp (Fin n) A) := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply Finsupp.lhom_ext + intro i x + simp [Rep.sum_hom, incl,proj,Representation.IntertwiningMap.sum_apply] + +lemma functor_isZero (F : Rep.{0} k Q ⥤ ModuleCat k) [F.Additive] + (A : Rep.{0} k Q) (h : IsZero (F.obj A)) (n : ℕ) : IsZero (F.obj (Rep.finsupp (Fin n) A)) := by + apply (IsZero.iff_id_eq_zero _).mpr + rw [← F.map_id, ← sum_proj_incl,F.map_sum] + apply Finset.sum_eq_zero + intro i hi + rw [F.map_comp,h.eq_zero_of_tgt (F.map (proj A i)),zero_comp] + +lemma functor_finite [IsNoetherianRing k] (F : Rep.{0} k Q ⥤ ModuleCat k) [F.Additive] + (A : Rep.{0} k Q) [Module.Finite k (F.obj A)] (n : ℕ) : + Module.Finite k (F.obj (Rep.finsupp (Fin n) A)) := by + let φ : F.obj (Rep.finsupp (Fin n) A) →ₗ[k] (Fin n → F.obj A) := + LinearMap.pi (fun i => (F.map (proj A i)).hom) + apply Module.Finite.of_injective φ + apply (LinearMap.ker_eq_bot).mp + rw [Submodule.eq_bot_iff] + intro x hx + have hp : ∀i:Fin n,(F.map (proj A i)).hom x=0 := fun i => congrFun hx i + have he : ∑ i:Fin n,(F.map (proj A i) ≫ F.map (incl A i))=𝟙 _ := by + simp only [← F.map_comp, ← F.map_sum,sum_proj_incl,F.map_id] + have ht := congrArg (fun t => t.hom x) he + simpa [hp] using ht.symm + +instance finite_free (n : ℕ) : + Module.Finite (MonoidAlgebra k Q) (Rep.free k Q (Fin n)).ρ.asModule := + Module.Finite.of_basis (Representation.freeAsModuleBasis k Q (Fin n)) + +lemma exists_cover (A : Rep.{0} k Q) + [Module.Finite (MonoidAlgebra k Q) A.ρ.asModule] : + ∃n:ℕ,∃e:Rep.free k Q (Fin n) ⟶ A,Epi e := by + obtain ⟨n,φ,hφ⟩ := Module.Finite.exists_fin' (MonoidAlgebra k Q) A.ρ.asModule + let ψ : (Rep.free k Q (Fin n)).ρ.asModule →ₗ[MonoidAlgebra k Q] A.ρ.asModule := + φ.comp ((Finsupp.linearEquivFunOnFinite (MonoidAlgebra k Q) (MonoidAlgebra k Q) (Fin n)).toLinearMap.comp + (Representation.finsuppLEquivFreeAsModule k Q (Fin n)).symm.toLinearMap) + have hψ : Function.Surjective ψ := hφ.comp + ((Finsupp.linearEquivFunOnFinite (MonoidAlgebra k Q) (MonoidAlgebra k Q) (Fin n)).surjective.comp + (Representation.finsuppLEquivFreeAsModule k Q (Fin n)).symm.surjective) + let p : Rep.toModuleMonoidAlgebra.obj (Rep.free k Q (Fin n)) ⟶ Rep.toModuleMonoidAlgebra.obj A := + ModuleCat.ofHom ψ + have : Epi p := (ModuleCat.epi_iff_surjective _).mpr hψ + let e : Rep.free k Q (Fin n) ⟶ A := + (Rep.unitIso _).hom ≫ Rep.ofModuleMonoidAlgebra.map p ≫ (Rep.unitIso _).inv + exact ⟨n,e,by dsimp only [e]; infer_instance⟩ + +lemma finite_kernel {A B : Rep.{0} k Q} (d : A ⟶ B) + [IsNoetherianRing (MonoidAlgebra k Q)] + [Module.Finite (MonoidAlgebra k Q) A.ρ.asModule] : + Module.Finite (MonoidAlgebra k Q) (kernel d).ρ.asModule := by + have : Module.Finite (MonoidAlgebra k Q) (Rep.toModuleMonoidAlgebra.obj A) := + ‹Module.Finite (MonoidAlgebra k Q) A.ρ.asModule› + let p := Rep.toModuleMonoidAlgebra.map (kernel.ι d) + have : Mono p := inferInstanceAs (Mono (Rep.toModuleMonoidAlgebra.map (kernel.ι d))) + exact Module.Finite.of_injective p.hom ((ModuleCat.mono_iff_injective _).mp inferInstance) + +end FiniteFreeRep + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ReducedNatural.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ReducedNatural.lean new file mode 100644 index 0000000000000000000000000000000000000000..327b9ca1a04b8f452961b4ba7be5b44fa0344f6c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ReducedNatural.lean @@ -0,0 +1,188 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.GroupNerveCoordinates +import OAI.GroupTheory.SimpleAmenable.Homology.ReducedTensorFinite +import OAI.GroupTheory.SimpleAmenable.Homology.ReducedTensorTwo + +namespace OAI + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite +namespace ConstantSplit +open FreeChains ProductChains + +variable {X Y:SSet} +@[reassoc] lemma aug_natural (f:X⟶Y) : chainMap f ≫ aug Y=aug X := by + rw [aug,←chainMap_comp] + congr 1 +noncomputable def redMap (f:X⟶Y) : (sc X).X₁ ⟶ (sc Y).X₁ := + kernel.map (aug X) (aug Y) (chainMap f) (𝟙 _) (by simp [aug_natural]) +@[reassoc (attr:=simp)] lemma redMap_inclusion (f:X⟶Y) : redMap f ≫ (sc Y).f=(sc X).f ≫ chainMap f := + kernel.lift_ι _ _ _ +lemma one_positive (n:ℕ) (hn:n≠0) : IsZero ((complex one).homology n) := by + exact IsZero.of_iso (ConnectedProduct.one_homology_zero n hn) + ((homologyFunctor A c n).mapIso (complexIso one)).symm +noncomputable def inclusionIso (X:SSet) (x:X.obj (op ⦋0⦌)) (n:ℕ) (hn:n≠0) : + ((sc X).X₁).homology n ≅ (complex X).homology n where + hom := homologyMap (sc X).f n + inv := homologyMap (splitting X x).r n + hom_inv_id := by erw [←homologyMap_comp,(splitting X x).f_r,homologyMap_id] + inv_hom_id := by + have h:=congrArg (fun f=>homologyMap f n) (splitting X x).id + rw [homologyMap_add,homologyMap_comp,homologyMap_comp,homologyMap_id] at h + have hz : homologyMap (sc X).g n=0 := (one_positive n hn).eq_of_tgt _ _ + rw [hz,zero_comp,add_zero] at h + exact h +lemma redMap_epi (f:X⟶Y) (x:X.obj (op ⦋0⦌)) (y:Y.obj (op ⦋0⦌)) (n:ℕ) (hn:n≠0) + [chainMapEpi : Epi (homologyMap (chainMap f) n)] : Epi (homologyMap (redMap f) n) := by + have h:=congrArg (fun f=>homologyMap f n) (redMap_inclusion f) + erw [homologyMap_comp (redMap f) (sc Y).f, + homologyMap_comp (sc X).f (chainMap f)] at h + have : IsIso (homologyMap (sc X).f n):=(inclusionIso X x n hn).isIso_hom + have : IsIso (homologyMap (sc Y).f n):=(inclusionIso Y y n hn).isIso_hom + have : Epi (homologyMap (redMap f) n ≫ homologyMap (sc Y).f n):=by + erw [h] + exact epi_comp' (inferInstanceAs (Epi (homologyMap (sc X).f n))) chainMapEpi + exact (epi_comp_iff_of_isIso _ (homologyMap (sc Y).f n)).mp inferInstance +lemma red_X_zero (X:SSet) [Subsingleton (X.obj (op ⦋0⦌))] (x:X.obj (op ⦋0⦌)) : + IsZero (((sc X).X₁).X 0) := by + have he : (aug X).f 0 ≫ (sec X x).f 0=𝟙 ((complex X).X 0) := by + change (ModuleCat.free ℤ).map ((SSet.const (Y:=one) PUnit.unit).app (op ⦋0⦌)) ≫ + (ModuleCat.free ℤ).map ((SSet.const (X:=one) x).app (op ⦋0⦌))=𝟙 _ + rw [←Functor.map_comp,←(ModuleCat.free ℤ).map_id (X.obj (op ⦋0⦌))] + congr 1 + ext z + exact Subsingleton.elim _ _ + apply (IsZero.iff_id_eq_zero _).mpr + have : Mono ((sc X).f.f 0) := by change Mono ((kernel.ι (aug X)).f 0); infer_instance + apply (cancel_mono ((sc X).f.f 0)).mp + simp only [Category.id_comp,zero_comp] + have h:=congrArg (fun f=>f.f 0) (sc X).zero + simp only [HomologicalComplex.comp_f,HomologicalComplex.zero_f] at h + have hh:=congrArg (fun f=>f≫(sec X x).f 0) h + change ((sc X).f.f 0 ≫ (aug X).f 0) ≫ (sec X x).f 0 = _ at hh + erw [Category.assoc,he,zero_comp] at hh + change (kernel.ι (aug X)).f 0 ≫ 𝟙 ((complex X).X 0)=0 at hh + rw [Category.comp_id] at hh + exact hh +end ConstantSplit + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite +namespace ConnectedProduct +open FreeChains ProductChains ConstantSplit + +variable (X Y:SSet) [X.IsConnected] [Y.IsConnected] +noncomputable def redInclusion (n:ℕ) : + (((sc X).X₁)⊗((sc Y).X₁)).homology n ⟶ ((X⊗Y).homology Z n : A) := + homologyMap ((sc X).f⊗ₘ(sc Y).f) n ≫ (homologyIsoN X Y n).inv +@[reassoc (attr:=simp)] lemma redInclusion_redProjection (n:ℕ) : + redInclusion X Y n ≫ redProjection X Y n=𝟙 _ := by + simp only [redInclusion,redProjection,ConstantSplit.sc,Category.assoc,Iso.inv_hom_id_assoc] + erw [←homologyMap_comp,tensorHom_comp_tensorHom,(splitting X (point X)).f_r, + (splitting Y (point Y)).f_r,id_tensorHom_id,homologyMap_id] +omit [X.IsConnected] [Y.IsConnected] in +@[reassoc] lemma redInclusion_fst (n:ℕ) : + redInclusion X Y n ≫ SSet.homologyMap (CartesianMonoidalCategory.fst X Y) Z n=0 := by + let f:=SSet.const (X:=Y) (Y:=one) PUnit.unit + have h:=(homology_natural (𝟙 X) f n) + have he : (𝟙 X)⊗ₘf=CartesianMonoidalCategory.fst X Y ≫ pairLeft X one PUnit.unit := by ext d z <;> rfl + rw [he,SSet.homologyMap_comp,chainMap_id] at h + have ht : ((sc X).f⊗ₘ(sc Y).f) ≫ (𝟙 (complex X)⊗ₘchainMap f)=0 := by + change ((sc X).f⊗ₘ(sc Y).f) ≫ (𝟙 (sc X).X₂⊗ₘ(sc Y).g)=0 + rw [tensorHom_comp_tensorHom,Category.comp_id] + rw [(sc Y).zero]; simp + have hh:=congrArg (fun k=>redInclusion X Y n≫k) h + simp only [redInclusion,ConstantSplit.sc,Category.assoc,Iso.inv_hom_id_assoc] at hh + erw [←homologyMap_comp,ht,homologyMap_zero] at hh + have : Mono (SSet.homologyMap (pairLeft X one PUnit.unit) Z n) := by + have he : pairLeft X one PUnit.unit ≫ CartesianMonoidalCategory.fst X one=𝟙 X := by ext d z; rfl + exact (SplitMono.mk _ (by rw [←SSet.homologyMap_comp,he,SSet.homologyMap_id])).mono + have : Mono (SSet.homologyMap (pairLeft X one PUnit.unit) Z n ≫ (homologyIsoN X one n).hom) := inferInstance + apply (cancel_mono (SSet.homologyMap (pairLeft X one PUnit.unit) Z n ≫ (homologyIsoN X one n).hom)).mp + erw [zero_comp] + simp only [redInclusion,ConstantSplit.sc,Category.assoc] + exact hh +omit [X.IsConnected] [Y.IsConnected] in +@[reassoc] lemma redInclusion_snd (n:ℕ) : + redInclusion X Y n ≫ SSet.homologyMap (CartesianMonoidalCategory.snd X Y) Z n=0 := by + let f:=SSet.const (X:=X) (Y:=one) PUnit.unit + have h:=(homology_natural f (𝟙 Y) n) + have he : f⊗ₘ(𝟙 Y)=CartesianMonoidalCategory.snd X Y ≫ pairRight one Y PUnit.unit := by ext d z <;> rfl + rw [he,SSet.homologyMap_comp,chainMap_id] at h + have ht : ((sc X).f⊗ₘ(sc Y).f) ≫ (chainMap f⊗ₘ𝟙 (complex Y))=0 := by + change ((sc X).f⊗ₘ(sc Y).f) ≫ ((sc X).g⊗ₘ𝟙 (sc Y).X₂)=0 + rw [tensorHom_comp_tensorHom,Category.comp_id] + rw [(sc X).zero]; simp + have hh:=congrArg (fun k=>redInclusion X Y n≫k) h + simp only [redInclusion,ConstantSplit.sc,Category.assoc,Iso.inv_hom_id_assoc] at hh + erw [←homologyMap_comp,ht,homologyMap_zero] at hh + have : Mono (SSet.homologyMap (pairRight one Y PUnit.unit) Z n) := by + have he : pairRight one Y PUnit.unit ≫ CartesianMonoidalCategory.snd one Y=𝟙 Y := by ext d z; rfl + exact (SplitMono.mk _ (by rw [←SSet.homologyMap_comp,he,SSet.homologyMap_id])).mono + have : Mono (SSet.homologyMap (pairRight one Y PUnit.unit) Z n ≫ (homologyIsoN one Y n).hom) := inferInstance + apply (cancel_mono (SSet.homologyMap (pairRight one Y PUnit.unit) Z n ≫ (homologyIsoN one Y n).hom)).mp + erw [zero_comp] + simp only [redInclusion,ConstantSplit.sc,Category.assoc] + exact hh +omit [X.IsConnected] [Y.IsConnected] in +@[reassoc (attr:=simp)] lemma redInclusion_projection (n:ℕ) : + redInclusion X Y n ≫ projection X Y n=0 := by + apply biprod.hom_ext <;> simp [projection,redInclusion_fst,redInclusion_snd] +lemma red_projection_recover (n:ℕ) (x:((X⊗Y).homology Z n : A)) + (hx:projection X Y n x=0) : redInclusion X Y n (redProjection X Y n x)=x := by + apply sub_eq_zero.mp + apply projection_joint_zero X Y n + · rw [map_sub,hx,sub_zero] + change (redInclusion X Y n≫projection X Y n) _=0 + rw [redInclusion_projection]; rfl + · rw [map_sub] + change (redInclusion X Y n≫redProjection X Y n) _ - _=0 + rw [redInclusion_redProjection] + exact sub_self _ +variable {X Y} {X' Y':SSet} [X'.IsConnected] [Y'.IsConnected] +omit [X.IsConnected] [Y.IsConnected] [X'.IsConnected] [Y'.IsConnected] in +@[reassoc] lemma redInclusion_natural (f:X⟶X') (g:Y⟶Y') (n:ℕ) : + redInclusion X Y n ≫ SSet.homologyMap (f⊗ₘg) Z n = + homologyMap (redMap f⊗ₘredMap g) n ≫ redInclusion X' Y' n := by + apply (cancel_mono (homologyIsoN X' Y' n).hom).mp + simp only [redInclusion,ConstantSplit.sc,Category.assoc,Iso.inv_hom_id,Category.comp_id] + erw [homology_natural, Iso.inv_hom_id_assoc,←homologyMap_comp,←homologyMap_comp, + tensorHom_comp_tensorHom, tensorHom_comp_tensorHom,redMap_inclusion,redMap_inclusion] + rfl +lemma kernel_map_surjective (f:X⟶X') (g:Y⟶Y') + [Subsingleton (X.obj (op ⦋0⦌))] [Subsingleton (Y.obj (op ⦋0⦌))] + [Subsingleton (X'.obj (op ⦋0⦌))] [Subsingleton (Y'.obj (op ⦋0⦌))] + [Epi (SSet.homologyMap f Z 1)] [Epi (SSet.homologyMap g Z 1)] + (x:((X'⊗Y').homology Z 2 : A)) (hx:projection X' Y' 2 x=0) : + ∃y:((X⊗Y).homology Z 2 : A), projection X Y 2 y=0 ∧ SSet.homologyMap (f⊗ₘg) Z 2 y=x := by + have hf:=FreeChains.complexIso_natural f + have : Epi (homologyMap (chainMap f) 1) := by + have hh:=congrArg (fun k=>homologyMap k 1) hf + simp only [homologyMap_comp] at hh + have : Epi (homologyMap (FreeChains.complexIso X).hom 1 ≫ homologyMap (chainMap f) 1):=by rw [←hh]; infer_instance + exact epi_of_epi (homologyMap (FreeChains.complexIso X).hom 1) _ + have : Epi (homologyMap (chainMap g) 1) := by + have hh:=congrArg (fun k=>homologyMap k 1) (FreeChains.complexIso_natural g) + simp only [homologyMap_comp] at hh + have : Epi (homologyMap (FreeChains.complexIso Y).hom 1 ≫ homologyMap (chainMap g) 1):=by rw [←hh]; infer_instance + exact epi_of_epi (homologyMap (FreeChains.complexIso Y).hom 1) _ + have :=redMap_epi f (point X) (point X') 1 (by decide) + have :=redMap_epi g (point Y) (point Y') 1 (by decide) + have :=ReducedTensorTwo.homology_epi (redMap f) (redMap g) + (red_X_zero X (point X)) (red_X_zero Y (point Y)) + (red_X_zero X' (point X')) (red_X_zero Y' (point Y')) + obtain ⟨y,hy⟩:=((ModuleCat.epi_iff_surjective (homologyMap (redMap f⊗ₘredMap g) 2)).mp inferInstance) (redProjection X' Y' 2 x) + refine ⟨redInclusion X Y 2 y,?_,?_⟩ + · change (redInclusion X Y 2≫projection X Y 2) y=0 + rw [redInclusion_projection]; rfl + · change (redInclusion X Y 2≫SSet.homologyMap (f⊗ₘg) Z 2) y=x + rw [redInclusion_natural] + change redInclusion X' Y' 2 (homologyMap (redMap f⊗ₘredMap g) 2 y)=x + rw [hy,red_projection_recover X' Y' 2 x hx] +end ConnectedProduct + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/ReducedTensorFinite.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ReducedTensorFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..58ba07d6c15877ae311676f5b597853d86fb5a59 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/ReducedTensorFinite.lean @@ -0,0 +1,162 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ConstantSplit + +namespace OAI + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex HomologicalComplex₂ +namespace TensorProductHomology + +variable {R:Type} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] +lemma finite_reduced (K L:ChainComplex (ModuleCat.{0} R) ℕ) + [∀i,Module.Flat R (K.X i)] (n:ℕ) + (hK0:IsZero (K.homology 0)) (hL0:IsZero (L.homology 0)) + (hK:∀i,i + have hz := TensorCoefficient.arbitrary_zero_zero K (L.homology q) hK0 + have zeroHomologySubsingleton := ModuleCat.isZero_iff_subsingleton.mp hz + infer_instance + | succ p => + have rightHomologyFinite := hL q (by omega) + have leftHomologyFinite := hK p (by omega) + have leftSuccessorFinite := hK (p+1) (by omega) + exact TensorCoefficient.finite_coefficient_succ K (L.homology q) p + exact Module.Finite.equiv e.symm.toLinearEquiv +end TensorProductHomology +namespace ConstantSplit +open FreeChains ProductChains + +lemma red_finite (X:SSet) [X.IsConnected] (n:ℕ) [Module.Finite ℤ ((complex X).homology n)] : + Module.Finite ℤ (((sc X).X₁).homology n) := by + let s := splitting X (ConnectedProduct.point X) + have originalHomologyFinite : Module.Finite ℤ (((sc X).X₂).homology n) := + ‹Module.Finite ℤ ((complex X).homology n)› + let f := (homologyMap (sc X).f n).hom + apply Module.Finite.of_injective f + intro x y h + have he := congrArg (fun t => homologyMap t n) s.f_r + rw [homologyMap_comp,homologyMap_id] at he + have he' : Function.LeftInverse (homologyMap s.r n) f := by + intro z + exact congrArg (fun t => t z) he + exact he'.injective h +lemma red_homology_zero (X:SSet) [X.IsConnected] : IsZero (((sc X).X₁).homology 0) := + red_zero X 1 (by intro i hi hi'; omega) 0 (by omega) +end ConstantSplit +namespace ChainTensor +open FreeChains + +variable (S T:ShortComplex (ChainComplex A ℕ)) (s:S.Splitting) (t:T.Splitting) +lemma homology_joint_kernel' (n:ℕ) (x:(S.X₂⊗T.X₂).homology n) + (h0:homologyMap (s.r⊗ₘt.r) n x=0) + (h1:homologyMap (𝟙 S.X₂⊗ₘT.g) n x=0) + (h2:homologyMap (S.g⊗ₘ𝟙 T.X₂) n x=0) : x=0 := by + have hid := congrArg (fun f => homologyMap f n) (splitting_tensor_identity S T s t) + simp only [homologyMap_add,homologyMap_comp,homologyMap_id] at hid + have hh := congrArg (fun f => f x) hid + change homologyMap (S.f⊗ₘT.f) n (homologyMap (s.r⊗ₘt.r) n x) + + homologyMap ((s.r≫S.f)⊗ₘt.s) n (homologyMap (𝟙 S.X₂⊗ₘT.g) n x) + + homologyMap (s.s⊗ₘ𝟙 T.X₂) n (homologyMap (S.g⊗ₘ𝟙 T.X₂) n x) = x at hh + simpa only [h0,h1,h2,map_zero,add_zero] using hh.symm +end ChainTensor + +end + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex SimplicialObject Simplicial Opposite +namespace ConnectedProduct +open FreeChains ProductChains + +attribute [local instance 1200] Submodule.module +variable (X Y:SSet) [X.IsConnected] [Y.IsConnected] +noncomputable def redProjection (n:ℕ) : + ((X⊗Y).homology Z n : A) ⟶ + (((ConstantSplit.sc X).X₁)⊗((ConstantSplit.sc Y).X₁)).homology n := + (homologyIsoN X Y n).hom ≫ homologyMap + ((ConstantSplit.splitting X (point X)).r⊗ₘ(ConstantSplit.splitting Y (point Y)).r) n +lemma projection_joint_zero (n:ℕ) (x:((X⊗Y).homology Z n : A)) + (hx:projection X Y n x=0) (hr:redProjection X Y n x=0) : x=0 := by + have hf : SSet.homologyMap (CartesianMonoidalCategory.fst X Y) Z n x=0 := by + have h := congrArg (fun z => (biprod.fst : X.homology Z n ⊞ Y.homology Z n ⟶ X.homology Z n) z) hx + simp only [map_zero] at h + change (projection X Y n ≫ biprod.fst) x=0 at h + simpa only [projection,biprod.lift_fst] using h + have hg : SSet.homologyMap (CartesianMonoidalCategory.snd X Y) Z n x=0 := by + have h := congrArg (fun z => (biprod.snd : X.homology Z n ⊞ Y.homology Z n ⟶ Y.homology Z n) z) hx + simp only [map_zero] at h + change (projection X Y n ≫ biprod.snd) x=0 at h + simpa only [projection,biprod.lift_snd] using h + let e := homologyIsoN X Y n + have h1 : homologyMap (𝟙 (complex X)⊗ₘConstantSplit.aug Y) n (e.hom x)=0 := by + have hn := homology_natural (𝟙 X) (SSet.const (X:=Y) (Y:=one) PUnit.unit) n + rw [chainMap_id] at hn + have he : (𝟙 X)⊗ₘ(SSet.const (X:=Y) (Y:=one) PUnit.unit) = + CartesianMonoidalCategory.fst X Y ≫ pairLeft X one PUnit.unit := by ext d z <;> rfl + rw [he,SSet.homologyMap_comp] at hn + have hh := congrArg (fun f => f x) hn + change (homologyIsoN X one n).hom + (SSet.homologyMap (pairLeft X one PUnit.unit) Z n + (SSet.homologyMap (CartesianMonoidalCategory.fst X Y) Z n x)) = _ at hh + simpa only [hf,map_zero,ConstantSplit.aug,ConstantSplit.one,e,ModuleCat.comp_apply] using hh.symm + have h2 : homologyMap (ConstantSplit.aug X⊗ₘ𝟙 (complex Y)) n (e.hom x)=0 := by + have hn := homology_natural (SSet.const (X:=X) (Y:=one) PUnit.unit) (𝟙 Y) n + rw [chainMap_id] at hn + have he : (SSet.const (X:=X) (Y:=one) PUnit.unit)⊗ₘ(𝟙 Y) = + CartesianMonoidalCategory.snd X Y ≫ pairRight one Y PUnit.unit := by ext d z <;> rfl + rw [he,SSet.homologyMap_comp] at hn + have hh := congrArg (fun f => f x) hn + change (homologyIsoN one Y n).hom + (SSet.homologyMap (pairRight one Y PUnit.unit) Z n + (SSet.homologyMap (CartesianMonoidalCategory.snd X Y) Z n x)) = _ at hh + simpa only [hg,map_zero,ConstantSplit.aug,ConstantSplit.one,e,ModuleCat.comp_apply] using hh.symm + have hh := ChainTensor.homology_joint_kernel' (ConstantSplit.sc X) (ConstantSplit.sc Y) + (ConstantSplit.splitting X (point X)) (ConstantSplit.splitting Y (point Y)) n + (e.hom x) hr h1 h2 + exact e.toLinearEquiv.injective (hh.trans (map_zero e.toLinearEquiv).symm) +lemma finite_projection_kernel (n:ℕ) + (hX:∀ i,i ⟨positiveDesc K n hn f hf,positiveπ_desc K n hn f hf⟩) +end ChainComplex +namespace ReducedTensorTwo + +section +open FreeChains + +variable (K L:ChainComplex A ℕ) (hK:IsZero (K.X 0)) (hL:IsZero (L.X 0)) +noncomputable abbrev inc (p q n:ℕ) (h:p+q=n) : K.X p ⊗ L.X q ⟶ (K⊗L).X n := + ιMapBifunctor K L (curriedTensor A) c p q n h +include hK hL +lemma total_one_zero : IsZero ((K⊗L).X 1) := by + apply (IsZero.iff_id_eq_zero _).mpr + apply total.hom_ext + intro p q hpq + change inc K L p q 1 hpq ≫ 𝟙 _ = inc K L p q 1 hpq ≫ 0 + have hpq':p+q=1:=hpq + by_cases hp:p=0 + · subst p + exact (Functor.map_isZero (tensorRight (L.X q)) hK).eq_of_src _ _ + · have hq:q=0:=by omega + subst q + exact (Functor.map_isZero (tensorLeft (K.X p)) hL).eq_of_src _ _ +lemma d21_zero : (K⊗L).d 2 1=0 := (total_one_zero K L hK hL).eq_of_tgt _ _ +lemma inc_epi : Epi (inc K L 1 1 2 rfl) where + left_cancellation f g h := by + apply total.hom_ext + intro p q hpq + change inc K L p q 2 hpq ≫ f=inc K L p q 2 hpq ≫ g + have hpq':p+q=2:=hpq + by_cases hp:p=0 + · subst p; exact (Functor.map_isZero (tensorRight (L.X q)) hK).eq_of_src _ _ + · by_cases hq:q=0 + · subst q; exact (Functor.map_isZero (tensorLeft (K.X p)) hL).eq_of_src _ _ + · have he:p=1:=by omega + have he':q=1:=by omega + subst p q + exact h +noncomputable def raw : K.X 1⊗L.X 1 ⟶ (K⊗L).homology 2 := + inc K L 1 1 2 rfl ≫ ChainComplex.positiveπ (K⊗L) 1 (d21_zero K L hK hL) +lemma raw_epi : Epi (raw K L hK hL) := by + have :=inc_epi K L hK hL + dsimp only [raw]; infer_instance +omit hK in +lemma inc21_d : inc K L 2 1 3 rfl ≫ (K⊗L).d 3 2 = + (K.d 2 1 ▷ L.X 1) ≫ inc K L 1 1 2 rfl := by + change ιMapBifunctor K L (curriedTensor A) c _ _ _ _ ≫ (mapBifunctor K L (curriedTensor A) c).d 3 2 = _ + rw [mapBifunctor.d_eq,Preadditive.comp_add,mapBifunctor.ι_D₁,mapBifunctor.ι_D₂, + mapBifunctor.d₁_eq K L (curriedTensor A) c (show c.Rel 2 1 from rfl) 1 2 rfl, + mapBifunctor.d₂_eq K L (curriedTensor A) c 2 (show c.Rel 1 0 from rfl) 2 rfl] + have h:L.d 1 0=0:=hL.eq_of_tgt _ _ + simp [h,ComplexShape.ε₁,ComplexShape.ε₂] +omit hL in +lemma inc12_d : inc K L 1 2 3 rfl ≫ (K⊗L).d 3 2 = + -((K.X 1 ◁ L.d 2 1) ≫ inc K L 1 1 2 rfl) := by + change ιMapBifunctor K L (curriedTensor A) c _ _ _ _ ≫ (mapBifunctor K L (curriedTensor A) c).d 3 2 = _ + rw [mapBifunctor.d_eq,Preadditive.comp_add,mapBifunctor.ι_D₁,mapBifunctor.ι_D₂, + mapBifunctor.d₁_eq K L (curriedTensor A) c (show c.Rel 1 0 from rfl) 2 2 rfl, + mapBifunctor.d₂_eq K L (curriedTensor A) c 1 (show c.Rel 2 1 from rfl) 2 rfl] + have h:K.d 1 0=0:=hK.eq_of_tgt _ _ + simp [h,ComplexShape.ε₁,ComplexShape.ε₂] +lemma d_left_raw : (K.d 2 1 ▷ L.X 1) ≫ raw K L hK hL=0 := by + rw [raw,←Category.assoc,←inc21_d K L hL,Category.assoc,ChainComplex.d_positiveπ,comp_zero] +lemma d_right_raw : (K.X 1 ◁ L.d 2 1) ≫ raw K L hK hL=0 := by + have h:=congrArg (fun f=>f≫ChainComplex.positiveπ (K⊗L) 1 (d21_zero K L hK hL)) (inc12_d K L hK) + simpa only [raw,Category.assoc,ChainComplex.d_positiveπ,comp_zero,Preadditive.neg_comp,neg_eq_zero] using h.symm +end + +open FreeChains + +variable (K L:ChainComplex A ℕ) (hK:IsZero (K.X 0)) (hL:IsZero (L.X 0)) +noncomputable abbrev πK := ChainComplex.positiveπ K 0 (hK.eq_of_tgt (K.d 1 0) 0) +noncomputable abbrev πL := ChainComplex.positiveπ L 0 (hL.eq_of_tgt (L.d 1 0) 0) +noncomputable def leftColimit := isColimitCoforkMapOfIsColimit' (tensorRight (L.X 1)) + (ChainComplex.d_positiveπ K 0 (hK.eq_of_tgt (K.d 1 0) 0)) + (ChainComplex.positiveIsCokernel K 0 (hK.eq_of_tgt (K.d 1 0) 0)) +noncomputable def leftDesc : K.homology 1⊗L.X 1 ⟶ (K⊗L).homology 2 := + (leftColimit K L hK).desc (CokernelCofork.ofπ (raw K L hK hL) (d_left_raw K L hK hL)) +@[reassoc] lemma π_leftDesc : (πK K hK ▷ L.X 1) ≫ leftDesc K L hK hL=raw K L hK hL := + (leftColimit K L hK).fac _ WalkingParallelPair.one +lemma d_leftDesc : (K.homology 1 ◁ L.d 2 1) ≫ leftDesc K L hK hL=0 := by + have : Epi (πK K hK ▷ L.X 2) := Cofork.IsColimit.epi + (isColimitCoforkMapOfIsColimit' (tensorRight (L.X 2)) + (ChainComplex.d_positiveπ K 0 (hK.eq_of_tgt (K.d 1 0) 0)) + (ChainComplex.positiveIsCokernel K 0 (hK.eq_of_tgt (K.d 1 0) 0))) + apply (cancel_epi (πK K hK ▷ L.X 2)).mp + rw [comp_zero,←Category.assoc,←MonoidalCategory.whisker_exchange,Category.assoc,π_leftDesc,d_right_raw] +noncomputable def rightColimit := isColimitCoforkMapOfIsColimit' (tensorLeft (K.homology 1)) + (ChainComplex.d_positiveπ L 0 (hL.eq_of_tgt (L.d 1 0) 0)) + (ChainComplex.positiveIsCokernel L 0 (hL.eq_of_tgt (L.d 1 0) 0)) +noncomputable def generator : K.homology 1⊗L.homology 1 ⟶ (K⊗L).homology 2 := + (rightColimit K L hL).desc (CokernelCofork.ofπ (leftDesc K L hK hL) (d_leftDesc K L hK hL)) +@[reassoc] lemma π_generator : (πK K hK ⊗ₘ πL L hL) ≫ generator K L hK hL=raw K L hK hL := by + rw [MonoidalCategory.tensorHom_def,Category.assoc] + have h : (K.homology 1 ◁ πL L hL) ≫ generator K L hK hL=leftDesc K L hK hL := + (rightColimit K L hL).fac _ WalkingParallelPair.one + rw [h,π_leftDesc] +lemma generator_epi : Epi (generator K L hK hL) := by + have : Epi ((πK K hK ⊗ₘ πL L hL) ≫ generator K L hK hL):=by + rw [π_generator]; exact raw_epi K L hK hL + exact epi_of_epi (πK K hK ⊗ₘ πL L hL) _ +end ReducedTensorTwo + +end + +open CategoryTheory Limits MonoidalCategory HomologicalComplex HomologicalComplex₂ +namespace ChainComplex +open scoped _root_.ChainComplex + +variable {R:Type} [CommRing R] {K L:ChainComplex (ModuleCat.{0} R) ℕ} +@[reassoc] lemma positiveπ_natural (f:K⟶L) (n:ℕ) (hK:K.d (n+1) n=0) (hL:L.d (n+1) n=0) : + positiveπ K n hK ≫ homologyMap f (n+1)=f.f (n+1) ≫ positiveπ L n hL := by + apply (cancel_mono (L.homologyι (n+1))).mp + simp only [positiveπ,Category.assoc,homologyι_naturality,isoHomologyι_inv_hom_id_assoc, + isoHomologyι_inv_hom_id,Category.comp_id,p_opcyclesMap] +end ChainComplex +namespace ModuleCat +open scoped _root_.ModuleCat +lemma tensor_epi {R:Type} [CommRing R] {M N P Q:ModuleCat.{0} R} (f:M⟶N) (g:P⟶Q) + [Epi f] [Epi g] : Epi (f⊗ₘg) := by + apply (_root_.ModuleCat.epi_iff_surjective _).mpr + exact TensorProduct.map_surjective ((_root_.ModuleCat.epi_iff_surjective f).mp inferInstance) + ((_root_.ModuleCat.epi_iff_surjective g).mp inferInstance) +end ModuleCat +namespace ReducedTensorTwo +open FreeChains + +variable {K L K' L':ChainComplex A ℕ} (f:K⟶K') (g:L⟶L') +variable (hK:IsZero (K.X 0)) (hL:IsZero (L.X 0)) (hK':IsZero (K'.X 0)) (hL':IsZero (L'.X 0)) +@[reassoc] lemma inc_natural (p q n:ℕ) (h:p+q=n) : + inc K L p q n h ≫ (f⊗ₘg).f n=(f.f p ⊗ₘg.f q) ≫ inc K' L' p q n h := by + change ιMapBifunctor K L (curriedTensor A) c p q n h ≫ + (mapBifunctorMap f g (curriedTensor A) c).f n=_ + rw [ι_mapBifunctorMap] + change (f.f p ▷ L.X q) ≫ (K'.X p ◁ g.f q) ≫ _ = _ + rw [←Category.assoc,←MonoidalCategory.tensorHom_def] +@[reassoc] lemma raw_natural : raw K L hK hL ≫ homologyMap (f⊗ₘg) 2= + (f.f 1⊗ₘg.f 1) ≫ raw K' L' hK' hL' := by + rw [raw,Category.assoc,ChainComplex.positiveπ_natural,←Category.assoc,inc_natural,Category.assoc] + rfl +@[reassoc] lemma generator_natural : generator K L hK hL ≫ homologyMap (f⊗ₘg) 2= + (homologyMap f 1⊗ₘhomologyMap g 1) ≫ generator K' L' hK' hL' := by + have :=ModuleCat.tensor_epi (πK K hK) (πL L hL) + apply (cancel_epi (πK K hK⊗ₘπL L hL)).mp + rw [π_generator_assoc,raw_natural,←Category.assoc,tensorHom_comp_tensorHom] + rw [ChainComplex.positiveπ_natural f 0 _ (hK'.eq_of_tgt _ _), + ChainComplex.positiveπ_natural g 0 _ (hL'.eq_of_tgt _ _),←tensorHom_comp_tensorHom, + Category.assoc,π_generator] +include hK hL hK' hL' in +lemma homology_epi [Epi (homologyMap f 1)] [Epi (homologyMap g 1)] : + Epi (homologyMap (f⊗ₘg) 2) := by + have :=ModuleCat.tensor_epi (homologyMap f 1) (homologyMap g 1) + have :=generator_epi K' L' hK' hL' + have : Epi (generator K L hK hL ≫ homologyMap (f⊗ₘg) 2):=by rw [generator_natural f g hK hL hK' hL']; infer_instance + exact epi_of_epi (generator K L hK hL) _ +end ReducedTensorTwo + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularAugmentation.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularAugmentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..87d40d22785a6053de54fe6ee4380a4477f0e629 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularAugmentation.lean @@ -0,0 +1,195 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.AlternatingH2 +import OAI.GroupTheory.SimpleAmenable.Homology.QuotientRegular + +namespace OAI + +section + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +open SimpleAmenable +namespace QuotientRegular + +attribute [local instance 1200] Rep.hV2 +variable {G Q : Type} [Group G] [Group Q] + +noncomputable def augment : Rep.leftRegular ℤ Q ⟶ Rep.trivial ℤ Q ℤ := + Rep.ofHom ⟨(MonoidAlgebra.lift ℤ ℤ Q (1:Q →* ℤ)).toLinearMap,by + intro g + apply MonoidAlgebra.lhom_ext' + intro q + apply LinearMap.ext + intro z + simp⟩ + +@[simp] lemma augment_single (q:Q) (z:ℤ) : + (augment (Q:=Q)).hom (MonoidAlgebra.single q z)=z := by + simp [augment,MonoidAlgebra.lift_single] + +instance augment_epi : Epi (augment (Q:=Q)) := by + apply ConcreteCategory.epi_of_surjective + intro z + exact ⟨MonoidAlgebra.single 1 z,augment_single 1 z⟩ + +lemma regular_ext {A : Rep ℤ Q} (t u : Rep.leftRegular ℤ Q ⟶ A) + (h : t.hom (MonoidAlgebra.single 1 1)=u.hom (MonoidAlgebra.single 1 1)) : t=u := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply MonoidAlgebra.lhom_ext' + intro q + apply LinearMap.ext + intro z + have ht := congrArg (fun T => T (MonoidAlgebra.single 1 1)) (t.hom.isIntertwining' q) + have hu := congrArg (fun T => T (MonoidAlgebra.single 1 1)) (u.hom.isIntertwining' q) + have hv : t.hom (MonoidAlgebra.single q 1)=u.hom (MonoidAlgebra.single q 1) := by + change t.hom ((Rep.leftRegular ℤ Q).ρ q (MonoidAlgebra.single 1 1)) = A.ρ q (t.hom (MonoidAlgebra.single 1 1)) at ht + change u.hom ((Rep.leftRegular ℤ Q).ρ q (MonoidAlgebra.single 1 1)) = A.ρ q (u.hom (MonoidAlgebra.single 1 1)) at hu + rw [h] at ht + simpa using ht.trans hu.symm + change t.hom (MonoidAlgebra.single q z)=u.hom (MonoidAlgebra.single q z) + have he : MonoidAlgebra.single q z = z • (MonoidAlgebra.single q 1 : MonoidAlgebra ℤ Q) := by simp + rw [he] + change t.hom.toLinearMap _ = u.hom.toLinearMap _ + rw [LinearMap.map_smul,LinearMap.map_smul] + exact congrArg _ hv + +lemma regular_sum_right (t : Rep.leftRegular ℤ Q ⟶ Rep.leftRegular ℤ Q) : + t = ∑q∈(t.hom (MonoidAlgebra.single 1 1)).coeff.support, + (t.hom (MonoidAlgebra.single 1 1)).coeff q • right (MonoidHom.id Q) q := by + apply regular_ext + simp only [Rep.sum_hom,Rep.zsmul_hom,Representation.IntertwiningMap.sum_apply, + Representation.IntertwiningMap.smul_apply] + change _ = ∑q∈(t.hom (MonoidAlgebra.single 1 1)).coeff.support, + (t.hom (MonoidAlgebra.single 1 1)).coeff q • + (right (MonoidHom.id Q) q).hom (MonoidAlgebra.single 1 1) + have hr (q:Q) : (right (MonoidHom.id Q) q).hom (MonoidAlgebra.single 1 1)= + MonoidAlgebra.single q 1 := by simpa using right_single (MonoidHom.id Q) q 1 1 + simp only [hr,MonoidAlgebra.smul_single,smul_eq_mul,mul_one] + simpa only [Finsupp.sum] using + (MonoidAlgebra.sum_coeff_single (t.hom (MonoidAlgebra.single 1 1))).symm + +lemma map_regular_zero (f : G →* Q) (hf : Function.Surjective f) (n : ℕ) + (hact : ∀g:G,TrivialHomology.map (conjugate f g).toMonoidHom n=𝟙 _) + (t : Rep.leftRegular ℤ Q ⟶ Rep.leftRegular ℤ Q) (ht : t ≫ augment=0) : + (groupHomology.functor ℤ G n).map ((Rep.resFunctor f).map t)=0 := by + let F := Rep.resFunctor f ⋙ groupHomology.functor ℤ G n + have ha : ∑q∈(t.hom (MonoidAlgebra.single 1 1)).coeff.support, + (t.hom (MonoidAlgebra.single 1 1)).coeff q=0 := by + have hh := congrArg (fun s => s.hom (MonoidAlgebra.single 1 1)) ht + simpa [augment,MonoidAlgebra.lift_apply,Finsupp.sum] using hh + change F.map t=0 + rw [regular_sum_right t,F.map_sum] + simp_rw [F.map_zsmul] + have hr : ∀q:Q,F.map (right (MonoidHom.id Q) q)=𝟙 _ := fun q => + right_homology_identity f hf n hact q + simp_rw [hr] + rw [← Finset.sum_smul,ha,zero_smul] + +lemma map_free_zero (f : G →* Q) (hf : Function.Surjective f) (n : ℕ) + (hact : ∀g:G,TrivialHomology.map (conjugate f g).toMonoidHom n=𝟙 _) + (k : ℕ) (t : Rep.free ℤ Q (Fin k) ⟶ Rep.leftRegular ℤ Q) (ht : t ≫ augment=0) : + (groupHomology.functor ℤ G n).map ((Rep.resFunctor f).map t)=0 := by + let F := Rep.resFunctor f ⋙ groupHomology.functor ℤ G n + have hi : ∀i:Fin k,F.map (FiniteFreeRep.incl (Rep.leftRegular ℤ Q) i ≫ t)=0 := by + intro i + exact map_regular_zero f hf n hact _ (by rw [Category.assoc,ht,comp_zero]) + change F.map t=0 + rw [← Category.id_comp t,← FiniteFreeRep.sum_proj_incl (Rep.leftRegular ℤ Q) k, + Preadditive.sum_comp,F.map_sum] + apply Finset.sum_eq_zero + intro i hi' + rw [Category.assoc,F.map_comp,hi,comp_zero] + +end QuotientRegular + +end + +section + +open Classical CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +open SimpleAmenable +namespace QuotientRegular + +attribute [local instance 1200] Rep.hV2 +variable {G Q : Type} [Group G] [Group Q] + +instance finite_regular_module : + Module.Finite (MonoidAlgebra ℤ Q) (Rep.leftRegular ℤ Q).ρ.asModule := by + let p : Rep.free ℤ Q (Fin 1) ⟶ Rep.leftRegular ℤ Q := FiniteFreeRep.proj (Rep.leftRegular ℤ Q) (n:=1) 0 + have : Epi p := ConcreteCategory.epi_of_surjective p (by + intro x + exact ⟨Finsupp.single 0 x,by simp [p,FiniteFreeRep.proj]⟩) + let q := Rep.toModuleMonoidAlgebra.map p + have : Epi q := inferInstanceAs (Epi (Rep.toModuleMonoidAlgebra.map p)) + have : Module.Finite (MonoidAlgebra ℤ Q) + (Rep.toModuleMonoidAlgebra.obj (Rep.free ℤ Q (Fin 1))) := + inferInstanceAs (Module.Finite (MonoidAlgebra ℤ Q) (Rep.free ℤ Q (Fin 1)).ρ.asModule) + exact Module.Finite.of_surjective q.hom ((ModuleCat.epi_iff_surjective _).mp inferInstance) + +lemma H0_finite (f : G →* Q) (hf : Function.Surjective f) : + Module.Finite ℤ (groupHomology (regular f) 0) := by + have : Module.Finite ℤ (groupHomology (Rep.trivial ℤ f.ker ℤ) 0) := + Module.Finite.of_surjective + (groupHomology.H0IsoOfIsTrivial (Rep.trivial ℤ f.ker ℤ)).inv.hom + (groupHomology.H0IsoOfIsTrivial (Rep.trivial ℤ f.ker ℤ)).toLinearEquiv.symm.surjective + have := isIso_point f hf 0 + exact Module.Finite.of_surjective (groupHomology.map f.ker.subtype (point f) 0).hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) + +lemma finite_kernel_H2 (f : G →* Q) (hf : Function.Surjective f) + [IsNoetherianRing (MonoidAlgebra ℤ Q)] + [Module.Finite ℤ (groupHomology (Rep.trivial ℤ G ℤ) 2)] + (hz : IsZero (groupHomology (Rep.trivial ℤ f.ker ℤ) 1)) + (hact : ∀g:G,TrivialHomology.map (conjugate f g).toMonoidHom 2=𝟙 _) : + Module.Finite ℤ (groupHomology (Rep.trivial ℤ f.ker ℤ) 2) := by + let ε := augment (Q:=Q) + have : Module.Finite (MonoidAlgebra ℤ Q) (kernel ε).ρ.asModule := + FiniteFreeRep.finite_kernel ε + obtain ⟨n₂,e₂,he₂⟩ := FiniteFreeRep.exists_cover (kernel ε) + let := he₂ + have : Module.Finite (MonoidAlgebra ℤ Q) (kernel e₂).ρ.asModule := + FiniteFreeRep.finite_kernel e₂ + obtain ⟨n₃,e₃,he₃⟩ := FiniteFreeRep.exists_cover (kernel e₂) + let := he₃ + have : Module.Finite (MonoidAlgebra ℤ Q) (kernel e₃).ρ.asModule := + FiniteFreeRep.finite_kernel e₃ + obtain ⟨n₄,e₄,he₄⟩ := FiniteFreeRep.exists_cover (kernel e₃) + let := he₄ + let T : Rep.{0} ℤ Q ⥤ Rep.{0} ℤ G := Rep.resFunctor f + let F₀ := T ⋙ groupHomology.functor ℤ G 0 + let F₁ := T ⋙ groupHomology.functor ℤ G 1 + have : Module.Finite ℤ (F₀.obj (Rep.leftRegular ℤ Q)) := H0_finite f hf + have : Module.Finite ℤ (groupHomology (T.obj (Rep.free ℤ Q (Fin n₄))) 0) := + FiniteFreeRep.functor_finite F₀ (Rep.leftRegular ℤ Q) n₄ + have hz₃ : IsZero (groupHomology (T.obj (Rep.free ℤ Q (Fin n₃))) 1) := + FiniteFreeRep.functor_isZero F₁ (Rep.leftRegular ℤ Q) (H1_isZero f hf hz) n₃ + have hd : BoundedHomologyEdge.Hmap 2 (T.map e₂ ≫ T.map (kernel.ι ε))=0 := by + rw [← T.map_comp] + exact map_free_zero f hf 2 hact n₂ (e₂ ≫ kernel.ι ε) + (by rw [Category.assoc,kernel.condition,comp_zero]) + let e₀ : Rep.trivial ℤ G ℤ ≅ T.obj (Rep.trivial ℤ Q ℤ) := + Rep.mkIso (.mk (LinearEquiv.refl ℤ ℤ) (by intro g; rfl)) + let eH := (groupHomology.functor ℤ G 2).mapIso e₀ + have : Module.Finite ℤ ((groupHomology.functor ℤ G 2).obj (Rep.trivial ℤ G ℤ)) := + inferInstanceAs (Module.Finite ℤ (groupHomology (Rep.trivial ℤ G ℤ) 2)) + have : Module.Finite ℤ (groupHomology (T.obj (Rep.trivial ℤ Q ℤ)) 2) := + Module.Finite.of_surjective eH.hom.hom eH.toLinearEquiv.surjective + have : Epi (T.map e₄) := (Rep.epi_iff_surjective _).mpr + ((Rep.epi_iff_surjective e₄).mp he₄) + have : Module.Finite ℤ (groupHomology (regular f) 2) := + FiniteHomologyReturn.finite_H2 + ((Rep.shortExact_res f).mpr (BoundedHomologyEdge.kernel_shortExact ε)) + ((Rep.shortExact_res f).mpr (BoundedHomologyEdge.kernel_shortExact e₂)) + ((Rep.shortExact_res f).mpr (BoundedHomologyEdge.kernel_shortExact e₃)) + (T.map e₄) hz₃ hd + exact H2_finite_of_regular f hf + +end QuotientRegular + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularBlock.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularBlock.lean new file mode 100644 index 0000000000000000000000000000000000000000..59d5aefb25288a6a589d1d4b8848b4efec3411fb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularBlock.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.RegularCoefficientDouble +import OAI.GroupTheory.SimpleAmenable.Simplicial.MonoidNerveCoordinates + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace RegularCoefficient +open CoefficientNerve FreeChains + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +noncomputable def block {h v:ℕ} (s:Simplex (SingleObj P) h) (t:Simplex (ActionCategory P P) v) : + F.obj t.right.unop ⟶ ((double F).X h).X v := + single F t ≫ single ((coeffComplex F).X v) s +lemma block_hom_ext {h v:ℕ} {M:A} {f g:((double F).X h).X v ⟶ M} + (hh:∀s t,block F s t ≫ f=block F s t ≫ g) : f=g := by + apply CoefficientNerve.hom_ext + intro s + apply CoefficientNerve.hom_ext + intro t + exact (Category.assoc _ _ _).symm.trans ((hh s t).trans (Category.assoc _ _ _)) +noncomputable def blockDesc {h v:ℕ} {M:A} + (f:∀(_:Simplex (SingleObj P) h) (t:Simplex (ActionCategory P P) v),F.obj t.right.unop ⟶ M) : + ((double F).X h).X v ⟶ M := + CoefficientNerve.desc ((coeffComplex F).X v) (fun s=>CoefficientNerve.desc F (f s)) +@[reassoc (attr:=simp)] lemma block_desc {h v:ℕ} {M:A} + (f:∀(_:Simplex (SingleObj P) h) (t:Simplex (ActionCategory P P) v),F.obj t.right.unop ⟶ M) (s) (t) : + block F s t ≫ blockDesc F f=f s t := by + dsimp only [block,blockDesc] + exact (Category.assoc _ _ _).trans + ((congrArg (fun g => CoefficientNerve.single F t ≫ g) + (CoefficientNerve.single_desc ((coeffComplex F).X v) + (fun s => CoefficientNerve.desc F (f s)) s)).trans + (CoefficientNerve.single_desc F (f s) t)) +noncomputable def totalBlock {h v n:ℕ} (hn:h+v=n) + (s:Simplex (SingleObj P) h) (t:Simplex (ActionCategory P P) v) : + F.obj t.right.unop ⟶ ((double F).total c).X n := + block F s t ≫ (double F).ιTotal c h v n hn +lemma totalBlock_hom_ext {n:ℕ} {M:A} {f g:((double F).total c).X n ⟶ M} + (hh:∀h v (hn:h+v=n) s t,totalBlock F hn s t ≫ f=totalBlock F hn s t ≫ g) : f=g := by + apply HomologicalComplex₂.total.hom_ext + intro h v hn + apply block_hom_ext + intro s t + exact (Category.assoc _ _ _).symm.trans ((hh h v hn s t).trans (Category.assoc _ _ _)) +noncomputable def totalBlockDesc {n:ℕ} {M:A} + (f:∀h v (_:h+v=n) (_:Simplex (SingleObj P) h) (t:Simplex (ActionCategory P P) v),F.obj t.right.unop ⟶ M) : + ((double F).total c).X n ⟶ M := + (double F).totalDesc (fun h v hn=>blockDesc F (f h v hn)) +@[reassoc (attr:=simp)] lemma totalBlock_desc {n:ℕ} {M:A} + (f:∀h v (_:h+v=n) (_:Simplex (SingleObj P) h) (t:Simplex (ActionCategory P P) v),F.obj t.right.unop ⟶ M) + (h v:ℕ) (hn:h+v=n) (s) (t) : + totalBlock F hn s t ≫ totalBlockDesc F f=f h v hn s t := by + dsimp only [totalBlock,totalBlockDesc] + rw [Category.assoc,HomologicalComplex₂.ι_totalDesc,block_desc] +end RegularCoefficient + +namespace RegularLabels +open FreeChains CoefficientNerve RegularCoordinates MonoidNerveCoordinates + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +abbrev W (h v:ℕ) := (Fin v→P) × P × (Fin h→P) +abbrev fiber (p:P) : A := F.obj (ActionCategory.objEquiv P P p) +lemma rightEq {v:ℕ} (p:P) (y:Fin v→P) : + (lift p (ofLabels y)).right.unop = ActionCategory.objEquiv P P p := by + apply (ActionCategory.objEquiv P P).symm.injective + exact lift_right p (ofLabels y) +noncomputable def inj {h v:ℕ} (w:W (P:=P) h v) : + fiber F w.2.1 ⟶ ((RegularCoefficient.double F).X h).X v := + eqToHom (congrArg F.obj (rightEq w.2.1 w.1).symm) ≫ + RegularCoefficient.block F (ofLabels w.2.2) (lift w.2.1 (ofLabels w.1)) +noncomputable def desc {h v:ℕ} {M:A} (f:∀w:W (P:=P) h v,fiber F w.2.1 ⟶ M) : + ((RegularCoefficient.double F).X h).X v ⟶ M := + RegularCoefficient.blockDesc F (fun s t=> f (labels (t ⋙ (ActionCategory.π P P).op),t.right.unop.back,labels s)) +@[reassoc (attr:=simp)] lemma include_desc {h v:ℕ} {M:A} + (f:∀w:W (P:=P) h v,fiber F w.2.1 ⟶ M) (w:W (P:=P) h v) : + inj F w ≫ desc F f=f w := by + dsimp only [inj,desc] + erw [Category.assoc,RegularCoefficient.block_desc] + have hr:=lift_right w.2.1 (ofLabels w.1) + change eqToHom (congrArg (fiber F) hr.symm) ≫ + f (labels (lift w.2.1 (ofLabels w.1) ⋙ (ActionCategory.π P P).op), + (lift w.2.1 (ofLabels w.1)).right.unop.back,labels (ofLabels w.2.2)) = f w + rw [lift_project,labels_ofLabels,labels_ofLabels] + generalize (lift w.2.1 (ofLabels w.1)).right.unop.back = p at * + cases hr + simp +lemma hom_ext {h v:ℕ} {M:A} {f g:((RegularCoefficient.double F).X h).X v ⟶ M} + (hh:∀w:W (P:=P) h v,inj F w ≫ f=inj F w ≫ g) : f=g := by + apply RegularCoefficient.block_hom_ext + intro s t + obtain ⟨x,rfl⟩ := (MonoidNerveCoordinates.equiv P h).symm.surjective s + obtain ⟨⟨p,y⟩,rfl⟩ := (RegularCoordinates.coordinates v).symm.surjective t + obtain ⟨z,rfl⟩ := (MonoidNerveCoordinates.equiv P v).symm.surjective y + change RegularCoefficient.block F (ofLabels x) (lift p (ofLabels z)) ≫ f = + RegularCoefficient.block F (ofLabels x) (lift p (ofLabels z)) ≫ g + exact (cancel_epi (eqToHom (congrArg F.obj (rightEq p z).symm))).mp + (by simpa only [inj,Category.assoc] using hh (z,p,x)) +noncomputable def isColimit (h v:ℕ) : IsColimit (Cofan.mk _ (inj F (h:=h) (v:=v))) := + Cofan.IsColimit.mk _ (fun s=>desc F s.inj) (fun _ _=>include_desc F _ _) + (fun s _ hh=>hom_ext F (fun w=>(hh w).trans (include_desc F s.inj w).symm)) +end RegularLabels + +end + +namespace MarkedCoordinates +variable {P:Type} {n:ℕ} +abbrev Split (P:Type) (n:ℕ) := Σi:Fin (n+1),(Fin i.val→P) × P × (Fin (n-i.val)→P) +def word (i:Fin (n+1)) (y:Fin i.val→P) (p:P) (x:Fin (n-i.val)→P) : Fin (n+1)→P := + fun j=>if h:j.val < i.val then y ⟨j.val,h⟩ else + if h':j.val = i.val then p else x ⟨n-j.val,by omega⟩ +@[simp] lemma word_center (i:Fin (n+1)) (y:Fin i.val→P) (p:P) (x:Fin (n-i.val)→P) : + word i y p x i=p := by simp [word] +lemma word_left (i:Fin (n+1)) (y:Fin i.val→P) (p:P) (x:Fin (n-i.val)→P) (j:Fin i.val) : + word i y p x ⟨j.val,by omega⟩=y j := by simp [word,j.isLt] +lemma word_right (i:Fin (n+1)) (y:Fin i.val→P) (p:P) (x:Fin (n-i.val)→P) (j:Fin (n-i.val)) : + word i y p x ⟨n-j.val,by omega⟩=x j := by + simp only [word,dite_eq_right (show ¬n-j.val < i.val from by omega),dite_eq_right (show ¬n-j.val = i.val from by omega)] + congr 1 + apply Fin.ext + dsimp + omega +def vertical (w:Fin (n+1)→P) (i:Fin (n+1)) : Fin i.val→P := fun j=>w ⟨j.val,by omega⟩ +def horizontal (w:Fin (n+1)→P) (i:Fin (n+1)) : Fin (n-i.val)→P := fun j=>w ⟨n-j.val,by omega⟩ +lemma word_recover (w:Fin (n+1)→P) (i:Fin (n+1)) : word i (vertical w i) (w i) (horizontal w i)=w := by + funext j + dsimp only [word] + split_ifs with h h' + · rfl + · congr 1; exact Fin.ext h'.symm + · dsimp only [horizontal] + congr 1 + apply Fin.ext + dsimp + omega +lemma vertical_word (i:Fin (n+1)) (y:Fin i.val→P) (p:P) (x:Fin (n-i.val)→P) : + vertical (word i y p x) i=y := by funext j; exact word_left i y p x j +lemma horizontal_word (i:Fin (n+1)) (y:Fin i.val→P) (p:P) (x:Fin (n-i.val)→P) : + horizontal (word i y p x) i=x := by funext j; exact word_right i y p x j +noncomputable def equiv (P:Type) (n:ℕ) : Split P n ≃ (Σ_:Fin (n+1),(Fin (n+1)→P)) where + toFun s := ⟨s.1,word s.1 s.2.1 s.2.2.1 s.2.2.2⟩ + invFun s := ⟨s.1,vertical s.2 s.1,s.2 s.1,horizontal s.2 s.1⟩ + left_inv := by rintro ⟨i,y,p,x⟩; simp only [vertical_word,word_center,horizontal_word] + right_inv := by rintro ⟨i,w⟩; simp only [word_recover] +end MarkedCoordinates + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularCoefficientDouble.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularCoefficientDouble.lean new file mode 100644 index 0000000000000000000000000000000000000000..d473d7034d33a5de7a35928e495bdbade1316d2a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularCoefficientDouble.lean @@ -0,0 +1,150 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TranslationCoefficientAction +import OAI.GroupTheory.SimpleAmenable.Simplicial.ConstantCoefficient +import OAI.GroupTheory.SimpleAmenable.Homology.GroupoidComponentHomology + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace RegularCoefficient +open CoefficientNerve FreeChains + +private lemma iso_transport_cancel {V : Type*} [Category V] {A B C D : V} + (a : A ≅ B) (b : C ≅ D) (f : A ⟶ C) (g : B ⟶ D) + (h : f = a.hom ≫ g ≫ b.inv) : f ≫ b.hom = a.hom ≫ g := by + rw [h] + simp only [Category.assoc, Iso.inv_hom_id, Category.comp_id] + +private lemma inverse_square_of_identity {V : Type*} [Category V] {X Y Z T : V} + (a : X ≅ Y) (b : X ≅ Z) (f : Y ⟶ Z) (g : X ⟶ T) + (h : 𝟙 X ≫ b.hom = a.hom ≫ f) : f ≫ b.inv ≫ g = a.inv ≫ g ≫ 𝟙 T := by + simp only [Category.id_comp] at h + apply (cancel_epi a.hom).mp + simp only [← Category.assoc, ← h, Iso.hom_inv_id, Category.id_comp, Category.comp_id] + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +noncomputable def coeffComplex : ChainComplex (SingleObj P ⥤ A) ℕ := + ExactShapeHomology.complex (representation F ⋙ alternatingFaceMapComplex A) +noncomputable def evalHomology (n:ℕ) (p:SingleObj P) : + (CoefficientNerve.complex F).homology n ≅ ((coeffComplex F).homology n).obj p := + ExactShapeHomology.evaluationHomology (representation F ⋙ alternatingFaceMapComplex A) n p +lemma evalHomology_natural (n:ℕ) {p q:SingleObj P} (f:p⟶q) : + homologyMap (((representation F ⋙ alternatingFaceMapComplex A).map f)) n ≫ + (evalHomology F n q).hom = + (evalHomology F n p).hom ≫ ((coeffComplex F).homology n).map f := by + have h:=ShortComplex.homologyMap_mapNatTrans ((coeffComplex F).sc n) + ((evaluation (SingleObj P) A).map f) + change homologyMap (((representation F ⋙ alternatingFaceMapComplex A).map f)) n = + (evalHomology F n p).hom ≫ ((coeffComplex F).homology n).map f ≫ + (evalHomology F n q).inv at h + exact iso_transport_cancel _ _ _ _ h +noncomputable def homologyZeroIso : (coeffComplex F).homology 0 ≅ + constant (C:=SingleObj P) (colimit F) := + NatIso.ofComponents (fun p=>(evalHomology F 0 p).symm ≪≫ zeroIso F) (by + intro p q f + have h:=evalHomology_natural F 0 f + change homologyMap ((alternatingFaceMapComplex A).map (action F f)) 0 ≫ + (evalHomology F 0 q).hom = (evalHomology F 0 p).hom ≫ ((coeffComplex F).homology 0).map f at h + rw [homology_action_zero] at h + exact inverse_square_of_identity (evalHomology F 0 p) (evalHomology F 0 q) + _ (zeroIso F).hom h) + +lemma positive_isZero (n:ℕ) (hn:n≠0) : IsZero ((coeffComplex F).homology n) := by + apply Functor.isZero + intro p + exact IsZero.of_iso (positive_acyclic F n hn) (evalHomology F n p).symm +noncomputable def double : HomologicalComplex₂ A c c := CoefficientNerve.double (coeffComplex F) +noncomputable def rowZeroIso : TotalFiniteness.row (double F) 0 ≅ complex (constant (C:=SingleObj P) (colimit F)) := + CoefficientNerve.rowIso (coeffComplex F) 0 ≪≫ + (alternatingFaceMapComplex A).mapIso (CoefficientNerve.functor.mapIso (homologyZeroIso F)) +lemma row_positive_isZero (n q:ℕ) (hq:q≠0) : IsZero ((TotalFiniteness.row (double F) q).homology n) := by + apply IsZero.of_iso _ ((homologyFunctor A c n).mapIso (CoefficientNerve.rowIso (coeffComplex F) q)) + exact Functor.map_isZero (CoefficientNerve.functor ⋙ alternatingFaceMapComplex A ⋙ homologyFunctor A c n) + (positive_isZero F q hq) +lemma total_finite [Module.Finite ℤ (colimit F : A)] (n:ℕ) + (h:∀i,i≤n → Module.Finite ℤ ((nerve (SingleObj P)ᵒᵖ).homology Z i : A)) : + Module.Finite ℤ (((double F).total c).homology n) := by + apply TotalFiniteness.finite + intro p q hpq + by_cases hq:q=0 + · subst q + apply (Module.Finite.equiv_iff ((homologyFunctor A c p).mapIso (rowZeroIso F)).symm.toLinearEquiv).mp + exact constant_finite (C:=SingleObj P) (colimit F) p (fun i hi=>h i (by omega)) + · have :=ModuleCat.isZero_iff_subsingleton.mp (row_positive_isZero F p q hq) + infer_instance +end RegularCoefficient + +end + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Simplicial Opposite +namespace RegularCoordinates +open CoefficientNerve RegularTranslation + +variable {P:Type} [CommMonoid P] +abbrev B (n:ℕ) := Simplex (SingleObj P) n +lemma opposite_eqToHom_val {x y:Opposite (C (P:=P))} (h:x=y) : (eqToHom h).unop.hom=(1:P) := by subst y; rfl +lemma single_eqToHom_val {x y:Opposite (SingleObj P)} (h:x=y) : (eqToHom h).unop=(1:P) := by subst y; rfl +noncomputable def lift {n:ℕ} (p:P) (s:B (P:=P) n) : Simplex (C (P:=P)) n where + obj i := op ((ActionCategory.objEquiv P P) ((s.map (homOfLE (Fin.le_last i))).unop * p)) + map {i j} f := (show ((ActionCategory.objEquiv P P) ((s.map (homOfLE (Fin.le_last j))).unop * p)) ⟶ + ((ActionCategory.objEquiv P P) ((s.map (homOfLE (Fin.le_last i))).unop * p)) from + ⟨(s.map f).unop,by + change (s.map f).unop * ((s.map (homOfLE (Fin.le_last j))).unop * p)=_ + rw [←mul_assoc] + have h:=congrArg Quiver.Hom.unop (s.map_comp f (homOfLE (Fin.le_last j))) + change (s.map (f ≫ homOfLE (Fin.le_last j))).unop= + (s.map f).unop * (s.map (homOfLE (Fin.le_last j))).unop at h + rw [←h] + rfl⟩).op + map_id i := by apply Quiver.Hom.unop_inj; apply Functor.Elements.hom_ext; exact congrArg Quiver.Hom.unop (s.map_id i) + map_comp f g := by apply Quiver.Hom.unop_inj; apply Functor.Elements.hom_ext; exact congrArg Quiver.Hom.unop (s.map_comp f g) +lemma lift_right {n:ℕ} (p:P) (s:B (P:=P) n) : (lift p s).right.unop.back=p := by + change (s.map (𝟙 _)).unop * p=p + rw [s.map_id] + exact one_mul _ +lemma lift_project {n:ℕ} (p:P) (s:B (P:=P) n) : lift p s ⋙ (ActionCategory.π P P).op=s := by + apply CategoryTheory.Functor.ext + · intro i j f + apply Quiver.Hom.unop_inj + simp only [unop_comp,single_eqToHom_val,SingleObj.comp_as_mul,one_mul,mul_one] + rfl + · intro i; exact Subsingleton.elim _ _ +lemma lift_recover {n:ℕ} (s:Simplex (C (P:=P)) n) : + lift s.right.unop.back (s ⋙ (ActionCategory.π P P).op)=s := by + apply CategoryTheory.Functor.ext + · intro i j f + apply Quiver.Hom.unop_inj + apply Functor.Elements.hom_ext + simp only [unop_comp,ActionCategory.comp_hom,opposite_eqToHom_val,one_mul,mul_one] + rfl + · intro i + apply unop_injective + apply (ActionCategory.objEquiv P P).symm.injective + exact (s.map (homOfLE (Fin.le_last i))).unop.map_val +noncomputable def coordinates (n:ℕ) : Simplex (C (P:=P)) n ≃ P × B (P:=P) n where + toFun s := (s.right.unop.back,s ⋙ (ActionCategory.π P P).op) + invFun x := lift x.1 x.2 + left_inv := lift_recover + right_inv x := Prod.ext (lift_right x.1 x.2) (lift_project x.1 x.2) +lemma shift_right {n:ℕ} (q:P) (s:Simplex (C (P:=P)) n) : + (ComposableArrows.right (s ⋙ (shift q).op)).unop.back=q*s.right.unop.back := rfl +lemma shift_project {n:ℕ} (q:P) (s:Simplex (C (P:=P)) n) : + (s ⋙ (shift q).op) ⋙ (ActionCategory.π P P).op = s ⋙ (ActionCategory.π P P).op := by + apply CategoryTheory.Functor.ext + · intro i j f + apply Quiver.Hom.unop_inj + simp only [unop_comp,single_eqToHom_val,SingleObj.comp_as_mul,one_mul,mul_one] + rfl + · intro i; exact Subsingleton.elim _ _ +lemma shift_lift {n:ℕ} (q p:P) (s:B (P:=P) n) : + lift p s ⋙ (shift q).op=lift (q*p) s := by + apply (coordinates n).injective + apply Prod.ext + · change (ComposableArrows.right (lift p s ⋙ (shift q).op)).unop.back=(lift (q*p) s).right.unop.back + rw [shift_right,lift_right,lift_right] + · change (lift p s ⋙ (shift q).op) ⋙ (ActionCategory.π P P).op=lift (q*p) s ⋙ (ActionCategory.π P P).op + rw [shift_project,lift_project,lift_project] +end RegularCoordinates + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularLiftFaces.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularLiftFaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..14139926fdf838b70a259f88fc7ea6e3eae5543f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularLiftFaces.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.RegularBlock +import OAI.GroupTheory.SimpleAmenable.Simplicial.MonoidFaceLabels + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial SimplicialObject Opposite +namespace RegularCoordinates +open CoefficientNerve MonoidNerveCoordinates + +variable {P:Type} [CommMonoid P] +lemma trunc_lift {m n:ℕ} (f:⦋m⦌⟶⦋n⦌) (p:P) (s:B (P:=P) n) : + trunc f (lift p s)=lift (tail f s * p) (trunc f s) := by + apply (coordinates m).injective + apply Prod.ext + · change (trunc f (lift p s)).right.unop.back=(lift _ _).right.unop.back + rw [lift_right] + rfl + · change trunc f (lift p s) ⋙ (ActionCategory.π P P).op=lift _ _ ⋙ (ActionCategory.π P P).op + rw [lift_project] + change (SimplexCategory.toCat.map f).toFunctor ⋙ (lift p s ⋙ (ActionCategory.π P P).op)=_ + erw [lift_project] + rfl +noncomputable def arrow (a p:P) : ActionCategory.objEquiv P P p ⟶ ActionCategory.objEquiv P P (a*p) := ⟨a,rfl⟩ +lemma arrow_one (p:P) : arrow (1:P) p=eqToHom (congrArg (ActionCategory.objEquiv P P) (one_mul p).symm) := by + apply Functor.Elements.Hom.ext + exact (RegularTranslation.eqToHom_val _).symm +end RegularCoordinates +namespace RegularLabels +open CoefficientNerve RegularCoordinates MonoidNerveCoordinates + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ FreeChains.A) +noncomputable def singleLabel {n:ℕ} (p:P) (y:Fin n→P) : fiber F p ⟶ Obj F n := + eqToHom (congrArg F.obj (rightEq p y).symm) ≫ single F (lift p (ofLabels y)) +lemma singleLabel_map_general {m n:ℕ} (f:⦋m⦌⟶⦋n⦌) (p:P) (y:Fin n→P) : + singleLabel F p y ≫ map F f = + F.map (arrow (tail f (ofLabels y)) p) ≫ + singleLabel F (tail f (ofLabels y)*p) (labels (trunc f (ofLabels y))) := by + dsimp only [singleLabel] + rw [←eqToHom_map F (rightEq p y).symm, + ←eqToHom_map F (rightEq (tail f (ofLabels y)*p) (labels (trunc f (ofLabels y)))).symm] + simp only [Category.assoc,single_map,←F.map_comp_assoc] + apply weighted_eq F (by rw [trunc_lift,ofLabels_labels]) + apply Functor.Elements.Hom.ext + simp only [ActionCategory.comp_hom,RegularTranslation.eqToHom_val,one_mul,mul_one] + rfl +noncomputable def faceWeight {n:ℕ} (k:Fin (n+2)) (y:Fin (n+1)→P) : P := + if k=Fin.last (n+1) then y (Fin.last n) else 1 +lemma tail_face {n:ℕ} (k:Fin (n+2)) (y:Fin (n+1)→P) : + tail (SimplexCategory.δ k) (ofLabels y)=faceWeight k y := by + dsimp only [faceWeight] + split_ifs with h + · subst k + exact (tail_face_last_val (ofLabels y)).trans (congrFun (labels_ofLabels y) (Fin.last n)) + · exact tail_face_val (ofLabels y) k h +@[reassoc] lemma singleLabel_face {n:ℕ} (k:Fin (n+2)) (p:P) (y:Fin (n+1)→P) : + singleLabel F p y ≫ (simplicial F).δ k = + F.map (arrow (faceWeight k y) p) ≫ + singleLabel F (faceWeight k y*p) (faceLabels k y) := by + change singleLabel F p y ≫ map F (SimplexCategory.δ k)=_ + rw [singleLabel_map_general,tail_face] + congr 2 + exact (labels_face (ofLabels y) k).trans (congrArg (faceLabels k) (labels_ofLabels y)) +@[reassoc] lemma singleLabel_action (a p:P) {n:ℕ} (y:Fin n→P) : + singleLabel F p y ≫ (RegularCoefficient.action F a).app (op ⦋n⦌) = + F.map (arrow a p) ≫ singleLabel F (a*p) y := by + dsimp only [singleLabel] + rw [←eqToHom_map F (rightEq p y).symm,←eqToHom_map F (rightEq (a*p) y).symm] + erw [Category.assoc,RegularCoefficient.single_action] + erw [←F.map_comp_assoc,←F.map_comp_assoc] + apply weighted_eq F (shift_lift a p (ofLabels y)) + apply Functor.Elements.Hom.ext + simp only [ActionCategory.comp_hom,RegularTranslation.eqToHom_val,one_mul,mul_one] + rfl +end RegularLabels + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularTotalDifferential.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularTotalDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e030952948c87602dbcb54880bbb81f44dd7f16 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularTotalDifferential.lean @@ -0,0 +1,241 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.DoubleCoordinates +import OAI.GroupTheory.SimpleAmenable.Homology.RegularLiftFaces +import OAI.GroupTheory.SimpleAmenable.Simplicial.RegularBlockFaces + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace RegularLabels +open FreeChains RegularCoordinates MonoidNerveCoordinates + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +@[reassoc] lemma totalInj_d_parts {n:ℕ} (s:DoubleCoordinates.Index P (n+1)) : + totalInj F s ≫ ((RegularCoefficient.double F).total c).d (n+1) n = + inj F s.2 ≫ (RegularCoefficient.double F).d₁ c s.1.val.1 s.1.val.2 n + + inj F s.2 ≫ (RegularCoefficient.double F).d₂ c s.1.val.1 s.1.val.2 n := by + dsimp only [totalInj] + rw [Category.assoc,HomologicalComplex₂.total_d,Preadditive.comp_add, + HomologicalComplex₂.ι_D₁,HomologicalComplex₂.ι_D₂,Preadditive.comp_add] +@[reassoc] lemma totalInj_d_hor (h:ℕ) (y:Fin 0→P) (p:P) (x:Fin (h+1)→P) : + totalInj F ⟨⟨(h+1,0),rfl⟩,y,p,x⟩ ≫ ((RegularCoefficient.double F).total c).d (h+1) h = + ∑k:Fin (h+2),(-1:ℤ)^k.val • (F.map (arrow (faceWeight k x) p) ≫ + totalInj F ⟨⟨(h,0),rfl⟩,y,faceWeight k x*p,faceLabels k x⟩) := by + rw [totalInj_d_parts] + rw [HomologicalComplex₂.d₂_eq_zero _ _ _ _ _ (by simp)] + rw [HomologicalComplex₂.d₁_eq _ _ (show c.Rel (h+1) h from rfl) 0 h rfl] + simp only [comp_zero,add_zero,show c.ε₁ c c (h+1,0) = 1 from rfl,one_smul] + change inj F (y,p,x) ≫ ((RegularCoefficient.double F).d (h+1) h).f 0 ≫ + (RegularCoefficient.double F).ιTotal c h 0 h rfl = _ + rw [inj_dH_assoc] + simp only [Preadditive.sum_comp,Preadditive.zsmul_comp,Category.assoc,totalInj] + rfl +@[reassoc] lemma totalInj_d_ver (v:ℕ) (y:Fin (v+1)→P) (p:P) (x:Fin 0→P) : + totalInj F ⟨⟨(0,v+1),by omega⟩,y,p,x⟩ ≫ ((RegularCoefficient.double F).total c).d (v+1) v = + ∑k:Fin (v+2),(-1:ℤ)^k.val • (F.map (arrow (faceWeight k y) p) ≫ + totalInj F ⟨⟨(0,v),by omega⟩,faceLabels k y,faceWeight k y*p,x⟩) := by + rw [totalInj_d_parts] + rw [HomologicalComplex₂.d₁_eq_zero _ _ _ _ _ (by simp)] + rw [HomologicalComplex₂.d₂_eq _ _ 0 (show c.Rel (v+1) v from rfl) v (by change 0+v=v; omega)] + simp only [comp_zero,zero_add,show c.ε₂ c c (0,v+1) = 1 from rfl,one_smul] + change inj F (y,p,x) ≫ ((RegularCoefficient.double F).X 0).d (v+1) v ≫ + (RegularCoefficient.double F).ιTotal c 0 v v (by change 0+v=v; omega) = _ + rw [inj_dV_assoc] + simp only [Preadditive.sum_comp,Preadditive.zsmul_comp,Category.assoc,totalInj] +@[reassoc] lemma totalInj_d_both (h v:ℕ) (y:Fin (v+1)→P) (p:P) (x:Fin (h+1)→P) : + totalInj F ⟨⟨(h+1,v+1),by omega⟩,y,p,x⟩ ≫ + ((RegularCoefficient.double F).total c).d (h+v+2) (h+v+1) = + (∑k:Fin (h+2),(-1:ℤ)^k.val • (F.map (arrow (faceWeight k x) p) ≫ + totalInj F ⟨⟨(h,v+1),by omega⟩,y,faceWeight k x*p,faceLabels k x⟩)) + + (-1:ℤ)^(h+1) • (∑k:Fin (v+2),(-1:ℤ)^k.val • (F.map (arrow (faceWeight k y) p) ≫ + totalInj F ⟨⟨(h+1,v),by omega⟩,faceLabels k y,faceWeight k y*p,x⟩)) := by + rw [totalInj_d_parts] + rw [HomologicalComplex₂.d₁_eq _ _ (show c.Rel (h+1) h from rfl) (v+1) (h+v+1) (by change h+(v+1)=h+v+1; omega)] + rw [HomologicalComplex₂.d₂_eq _ _ (h+1) (show c.Rel (v+1) v from rfl) (h+v+1) (by change (h+1)+v=h+v+1; omega)] + simp only [show c.ε₁ c c (h+1,v+1) = 1 from rfl,one_smul] + change inj F (y,p,x) ≫ ((RegularCoefficient.double F).d (h+1) h).f (v+1) ≫ + (RegularCoefficient.double F).ιTotal c h (v+1) (h+v+1) (by change h+(v+1)=h+v+1; omega) + + inj F (y,p,x) ≫ ((ComplexShape.ε₂ c c c (h+1,v+1)) • + (((RegularCoefficient.double F).X (h+1)).d (v+1) v ≫ + (RegularCoefficient.double F).ιTotal c (h+1) v (h+v+1) (by change (h+1)+v=h+v+1; omega))) = _ + rw [Units.smul_def] + change _ + inj F (y,p,x) ≫ ((-1:ℤ)^(h+1) • _) = _ + rw [Preadditive.comp_zsmul,inj_dH_assoc,inj_dV_assoc] + simp only [Preadditive.sum_comp,Preadditive.zsmul_comp,Category.assoc,totalInj] +end RegularLabels + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace RegularLabels +open FreeChains RegularCoordinates MonoidNerveCoordinates + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +lemma totalInj_transport {h v n:ℕ} (hn:h+v=n) (y:Fin v→P) (x:Fin h→P) {p q:P} (e:p=q) : + eqToHom (congrArg (fiber F) e) ≫ totalInj F ⟨⟨(h,v),hn⟩,y,q,x⟩ = + totalInj F ⟨⟨(h,v),hn⟩,y,p,x⟩ := by + subst q + simp +@[reassoc] lemma one_totalInj {h v n:ℕ} (hn:h+v=n) (y:Fin v→P) (p:P) (x:Fin h→P) : + F.map (arrow 1 p) ≫ totalInj F ⟨⟨(h,v),hn⟩,y,1*p,x⟩ = + totalInj F ⟨⟨(h,v),hn⟩,y,p,x⟩ := by + rw [arrow_one,eqToHom_map] + exact totalInj_transport F hn y x (one_mul p).symm +end RegularLabels +namespace RegularFiniteFaces +open RegularLabels RegularCoordinates MonoidNerveCoordinates +variable {P:Type} [CommMonoid P] +@[simp] lemma labels1_0 (a:P) : faceLabels (0:Fin 2) ![a]=![] := by + funext j + fin_cases j +@[simp] lemma weight1_0 (a:P) : faceWeight (0:Fin 2) ![a]=1 := by + simp [faceWeight] +@[simp] lemma labels1_1 (a:P) : faceLabels (1:Fin 2) ![a]=![] := by + funext j + fin_cases j +@[simp] lemma weight1_1 (a:P) : faceWeight (1:Fin 2) ![a]=a := by + simp [faceWeight] +@[simp] lemma labels2_0 (a b:P) : faceLabels (0:Fin 3) ![a,b]=![b] := by + funext j + fin_cases j + rfl +@[simp] lemma weight2_0 (a b:P) : faceWeight (0:Fin 3) ![a,b]=1 := by + simp [faceWeight] +@[simp] lemma labels2_1 (a b:P) : faceLabels (1:Fin 3) ![a,b]=![(a*b)] := by + funext j + fin_cases j + rfl +@[simp] lemma weight2_1 (a b:P) : faceWeight (1:Fin 3) ![a,b]=1 := by + simp [faceWeight] +@[simp] lemma labels2_2 (a b:P) : faceLabels (2:Fin 3) ![a,b]=![a] := by + funext j + fin_cases j + rfl +@[simp] lemma weight2_2 (a b:P) : faceWeight (2:Fin 3) ![a,b]=b := by + simp [faceWeight] +@[simp] lemma labels3_0 (a b d:P) : faceLabels (0:Fin 4) ![a,b,d]=![b,d] := by + funext j + fin_cases j <;> rfl +@[simp] lemma weight3_0 (a b d:P) : faceWeight (0:Fin 4) ![a,b,d]=1 := by + simp [faceWeight] +@[simp] lemma labels3_1 (a b d:P) : faceLabels (1:Fin 4) ![a,b,d]=![(a*b),d] := by + funext j + fin_cases j <;> rfl +@[simp] lemma weight3_1 (a b d:P) : faceWeight (1:Fin 4) ![a,b,d]=1 := by + simp [faceWeight] +@[simp] lemma labels3_2 (a b d:P) : faceLabels (2:Fin 4) ![a,b,d]=![a,(b*d)] := by + funext j + fin_cases j <;> rfl +@[simp] lemma weight3_2 (a b d:P) : faceWeight (2:Fin 4) ![a,b,d]=1 := by + simp [faceWeight] +@[simp] lemma labels3_3 (a b d:P) : faceLabels (3:Fin 4) ![a,b,d]=![a,b] := by + funext j + fin_cases j <;> rfl +@[simp] lemma weight3_3 (a b d:P) : faceWeight (3:Fin 4) ![a,b,d]=d := by + simp [faceWeight] +end RegularFiniteFaces + +end + +section + +namespace FilteredEdge +open FilteredFiniteness + +universe u +variable {R : Type u} [CommRing R] [IsNoetherianRing R] +variable {D A B C : Type u} [AddCommGroup D] [Module R D] + [AddCommGroup A] [Module R A] [AddCommGroup B] [Module R B] + [AddCommGroup C] [Module R C] +structure Data where + s : D →ₗ[R] A + d : A →ₗ[R] B + e : B →ₗ[R] C + ds : d.comp s = 0 + ed : e.comp d = 0 + FD : ℤ → Submodule R D + FA : ℤ → Submodule R A + FB : ℤ → Submodule R B + FC : ℤ → Submodule R C + monoA : Monotone FA + monoB : Monotone FB +namespace Data +variable (K : Data (R:=R) (D:=D) (A:=A) (B:=B) (C:=C)) +def current : FilteredFiniteness.Data (R:=R) (A:=A) (B:=B) (C:=C) := + ⟨K.d,K.e,K.ed,K.FA,K.FB,K.FC,K.monoB⟩ +def previous : FilteredFiniteness.Data (R:=R) (A:=D) (B:=A) (C:=B) := + ⟨K.s,K.d,K.ds,K.FD,K.FA,K.FB,K.monoA⟩ +variable (p : ℤ) +def inputs (k : ℤ) : Submodule R A := K.FA k ⊓ (K.FB p).comap K.d +def boundaryCycle (k : ℤ) : K.inputs p k →ₗ[R] K.current.Z₂ p := + (K.d.comp (K.inputs p k).subtype).codRestrict _ (fun x => by + refine ⟨x.property.2,?_⟩ + change K.e (K.d x.val) ∈ K.FC (p-2) + have he : K.e (K.d x.val)=0 := congrArg (fun f : A →ₗ[R] C => f x.val) K.ed + rw [he]; exact Submodule.zero_mem _) +def boundaryMap (k : ℤ) : K.inputs p k →ₗ[R] K.current.E₂ p := + ((K.current.B₂ p).comap (K.current.Z₂ p).subtype).mkQ.comp (K.boundaryCycle p k) +def tower (k : ℤ) : Submodule R (K.current.E₂ p) := LinearMap.range (K.boundaryMap p k) +omit [IsNoetherianRing R] in +lemma tower_mono : Monotone (K.tower p) := by + intro k l hkl y hy + obtain ⟨x,rfl⟩ := hy + exact ⟨⟨x.val, K.monoA hkl x.property.1,x.property.2⟩,rfl⟩ +omit [IsNoetherianRing R] in +lemma tower_start : K.tower p (p+1)=⊥ := by + apply le_antisymm _ bot_le + rintro y ⟨x,rfl⟩ + apply (Submodule.mem_bot R).mpr + apply (Submodule.Quotient.mk_eq_zero _).mpr + change K.d x.val∈K.current.B₂ p + exact (show (K.FA (p+1)).map K.d ⊓ K.FB p ≤ K.current.B₂ p from le_sup_right) + ⟨⟨x.val,x.property.1,rfl⟩,x.property.2⟩ +def inputLeading (k : ℤ) (hk : p≤k-2) : K.inputs p k →ₗ[R] K.previous.E₂ k := + ((K.previous.B₂ k).comap (K.previous.Z₂ k).subtype).mkQ.comp + (((K.inputs p k).subtype).codRestrict _ (fun x => + ⟨x.property.1,K.monoB hk x.property.2⟩)) +omit [IsNoetherianRing R] in +lemma lower_of_leading_zero (k : ℤ) (hk : p≤k-2) (x : K.inputs p k) + (hx : K.inputLeading p k hk x=0) : + K.boundaryMap p k x∈K.tower p (k-1) := by + have hx' : x.val∈K.previous.B₂ k := (Submodule.Quotient.mk_eq_zero ((K.previous.B₂ k).comap (K.previous.Z₂ k).subtype)).mp hx + obtain ⟨y,hy,z,hz,hyz⟩ := Submodule.mem_sup.mp hx' + obtain ⟨w,hw,hwz⟩ := hz.1 + have hd : K.d z = 0 := by + rw [←hwz] + exact congrArg (fun f : D →ₗ[R] B => f w) K.ds + have hxy : K.d y=K.d x.val := by + rw [←hyz,map_add,hd,add_zero] + refine ⟨⟨y,hy.1,?_⟩,?_⟩ + · change K.d y∈K.FB p + rw [hxy]; exact x.property.2 + · change Submodule.Quotient.mk _ = Submodule.Quotient.mk _ + congr 1 + apply Subtype.ext + exact hxy +lemma finite_tower_step (k : ℤ) (hk : p≤k-2) + [Module.Finite R (K.tower p (k-1))] + [Module.Finite R (K.previous.E₂ k)] : Module.Finite R (K.tower p k) := by + let S : Submodule R (K.tower p k) := (K.tower p (k-1)).submoduleOf (K.tower p k) + have : Module.Finite R S := Module.Finite.equiv + (Submodule.submoduleOfEquivOfLe (K.tower_mono p (by omega : k-1≤k))).symm + let f : K.inputs p k →ₗ[R] K.tower p k ⧸ S := + S.mkQ.comp (K.boundaryMap p k).rangeRestrict + have hf : Function.Surjective f := (Submodule.mkQ_surjective S).comp + (by rintro ⟨y,x,rfl⟩; exact ⟨x,rfl⟩) + have hker : LinearMap.ker (K.inputLeading p k hk) ≤ LinearMap.ker f := by + intro x hx + change f x=0 + apply (Submodule.Quotient.mk_eq_zero S).mpr + exact K.lower_of_leading_zero p k hk x hx + have : Module.Finite R (K.tower p k ⧸ S) := + finite_of_ker_le f (K.inputLeading p k hk) hf hker + exact Module.Finite.of_submodule_quotient S +end Data +end FilteredEdge + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularTotalFiniteDifferentials.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularTotalFiniteDifferentials.lean new file mode 100644 index 0000000000000000000000000000000000000000..585f061389c4fa4ab25f32dbbe37e549e8cb7934 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RegularTotalFiniteDifferentials.lean @@ -0,0 +1,163 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.RegularTotalDifferential + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace RegularLabels +open FreeChains RegularCoordinates MonoidNerveCoordinates RegularFiniteFaces + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ A) +@[reassoc] lemma block_d01 (a b:P) : + totalInj F ⟨⟨(0,1),rfl⟩,![a],b,![]⟩ ≫ ((RegularCoefficient.double F).total c).d 1 0 = + (totalInj F ⟨⟨(0,0),rfl⟩,![],b,![]⟩) + -(F.map (arrow a b) ≫ totalInj F ⟨⟨(0,0),rfl⟩,![],(a*b),![]⟩) := by + rw [totalInj_d_ver] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels1_0 a] + try erw [labels1_1 a] + try erw [weight1_0 a] + try erw [weight1_1 a] + try erw [one_totalInj F (h:=0) (v:=0) rfl ![] b ![]] + try abel +@[reassoc] lemma block_d10 (a b:P) : + totalInj F ⟨⟨(1,0),rfl⟩,![],a,![b]⟩ ≫ ((RegularCoefficient.double F).total c).d 1 0 = + (totalInj F ⟨⟨(0,0),rfl⟩,![],a,![]⟩) + -(F.map (arrow b a) ≫ totalInj F ⟨⟨(0,0),rfl⟩,![],(b*a),![]⟩) := by + rw [totalInj_d_hor] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels1_0 b] + try erw [labels1_1 b] + try erw [weight1_0 b] + try erw [weight1_1 b] + try erw [one_totalInj F (h:=0) (v:=0) rfl ![] a ![]] + try abel +@[reassoc] lemma block_d02 (a b d:P) : + totalInj F ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩ ≫ ((RegularCoefficient.double F).total c).d 2 1 = + (totalInj F ⟨⟨(0,1),rfl⟩,![b],d,![]⟩) + -(totalInj F ⟨⟨(0,1),rfl⟩,![(a*b)],d,![]⟩) + (F.map (arrow b d) ≫ totalInj F ⟨⟨(0,1),rfl⟩,![a],(b*d),![]⟩) := by + rw [totalInj_d_ver] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels2_0 a b] + try erw [labels2_1 a b] + try erw [labels2_2 a b] + try erw [weight2_0 a b] + try erw [weight2_1 a b] + try erw [weight2_2 a b] + try erw [one_totalInj F (h:=0) (v:=1) rfl ![b] d ![]] + try erw [one_totalInj F (h:=0) (v:=1) rfl ![(a*b)] d ![]] + try abel +@[reassoc] lemma block_d11 (a b d:P) : + totalInj F ⟨⟨(1,1),rfl⟩,![a],b,![d]⟩ ≫ ((RegularCoefficient.double F).total c).d 2 1 = + (totalInj F ⟨⟨(0,1),rfl⟩,![a],b,![]⟩) + -(F.map (arrow d b) ≫ totalInj F ⟨⟨(0,1),rfl⟩,![a],(d*b),![]⟩) + -(totalInj F ⟨⟨(1,0),rfl⟩,![],b,![d]⟩) + (F.map (arrow a b) ≫ totalInj F ⟨⟨(1,0),rfl⟩,![],(a*b),![d]⟩) := by + rw [totalInj_d_both] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels1_0 d] + try erw [labels1_1 d] + try erw [labels1_0 a] + try erw [labels1_1 a] + try erw [weight1_0 d] + try erw [weight1_1 d] + try erw [weight1_0 a] + try erw [weight1_1 a] + try erw [one_totalInj F (h:=0) (v:=1) rfl ![a] b ![]] + try erw [one_totalInj F (h:=1) (v:=0) rfl ![] b ![d]] + try abel +@[reassoc] lemma block_d20 (a b d:P) : + totalInj F ⟨⟨(2,0),rfl⟩,![],a,![b,d]⟩ ≫ ((RegularCoefficient.double F).total c).d 2 1 = + (totalInj F ⟨⟨(1,0),rfl⟩,![],a,![d]⟩) + -(totalInj F ⟨⟨(1,0),rfl⟩,![],a,![(b*d)]⟩) + (F.map (arrow d a) ≫ totalInj F ⟨⟨(1,0),rfl⟩,![],(d*a),![b]⟩) := by + rw [totalInj_d_hor] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels2_0 b d] + try erw [labels2_1 b d] + try erw [labels2_2 b d] + try erw [weight2_0 b d] + try erw [weight2_1 b d] + try erw [weight2_2 b d] + try erw [one_totalInj F (h:=1) (v:=0) rfl ![] a ![d]] + try erw [one_totalInj F (h:=1) (v:=0) rfl ![] a ![(b*d)]] + try abel +@[reassoc] lemma block_d03 (a b d e:P) : + totalInj F ⟨⟨(0,3),rfl⟩,![a,b,d],e,![]⟩ ≫ ((RegularCoefficient.double F).total c).d 3 2 = + (totalInj F ⟨⟨(0,2),rfl⟩,![b,d],e,![]⟩) + -(totalInj F ⟨⟨(0,2),rfl⟩,![(a*b),d],e,![]⟩) + (totalInj F ⟨⟨(0,2),rfl⟩,![a,(b*d)],e,![]⟩) + -(F.map (arrow d e) ≫ totalInj F ⟨⟨(0,2),rfl⟩,![a,b],(d*e),![]⟩) := by + rw [totalInj_d_ver] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels3_0 a b d] + try erw [labels3_1 a b d] + try erw [labels3_2 a b d] + try erw [labels3_3 a b d] + try erw [weight3_0 a b d] + try erw [weight3_1 a b d] + try erw [weight3_2 a b d] + try erw [weight3_3 a b d] + try erw [one_totalInj F (h:=0) (v:=2) rfl ![b,d] e ![]] + try erw [one_totalInj F (h:=0) (v:=2) rfl ![(a*b),d] e ![]] + try erw [one_totalInj F (h:=0) (v:=2) rfl ![a,(b*d)] e ![]] + try abel +@[reassoc] lemma block_d12 (a b d e:P) : + totalInj F ⟨⟨(1,2),rfl⟩,![a,b],d,![e]⟩ ≫ ((RegularCoefficient.double F).total c).d 3 2 = + (totalInj F ⟨⟨(0,2),rfl⟩,![a,b],d,![]⟩) + -(F.map (arrow e d) ≫ totalInj F ⟨⟨(0,2),rfl⟩,![a,b],(e*d),![]⟩) + -(totalInj F ⟨⟨(1,1),rfl⟩,![b],d,![e]⟩) + (totalInj F ⟨⟨(1,1),rfl⟩,![(a*b)],d,![e]⟩) + -(F.map (arrow b d) ≫ totalInj F ⟨⟨(1,1),rfl⟩,![a],(b*d),![e]⟩) := by + rw [totalInj_d_both] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels1_0 e] + try erw [labels1_1 e] + try erw [labels2_0 a b] + try erw [labels2_1 a b] + try erw [labels2_2 a b] + try erw [weight1_0 e] + try erw [weight1_1 e] + try erw [weight2_0 a b] + try erw [weight2_1 a b] + try erw [weight2_2 a b] + try erw [one_totalInj F (h:=0) (v:=2) rfl ![a,b] d ![]] + try erw [one_totalInj F (h:=1) (v:=1) rfl ![b] d ![e]] + try erw [one_totalInj F (h:=1) (v:=1) rfl ![(a*b)] d ![e]] + try abel +@[reassoc] lemma block_d21 (a b d e:P) : + totalInj F ⟨⟨(2,1),rfl⟩,![a],b,![d,e]⟩ ≫ ((RegularCoefficient.double F).total c).d 3 2 = + (totalInj F ⟨⟨(1,1),rfl⟩,![a],b,![e]⟩) + -(totalInj F ⟨⟨(1,1),rfl⟩,![a],b,![(d*e)]⟩) + (F.map (arrow e b) ≫ totalInj F ⟨⟨(1,1),rfl⟩,![a],(e*b),![d]⟩) + (totalInj F ⟨⟨(2,0),rfl⟩,![],b,![d,e]⟩) + -(F.map (arrow a b) ≫ totalInj F ⟨⟨(2,0),rfl⟩,![],(a*b),![d,e]⟩) := by + rw [totalInj_d_both] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels2_0 d e] + try erw [labels2_1 d e] + try erw [labels2_2 d e] + try erw [labels1_0 a] + try erw [labels1_1 a] + try erw [weight2_0 d e] + try erw [weight2_1 d e] + try erw [weight2_2 d e] + try erw [weight1_0 a] + try erw [weight1_1 a] + try erw [one_totalInj F (h:=1) (v:=1) rfl ![a] b ![e]] + try erw [one_totalInj F (h:=1) (v:=1) rfl ![a] b ![(d*e)]] + try erw [one_totalInj F (h:=2) (v:=0) rfl ![] b ![d,e]] + try abel +@[reassoc] lemma block_d30 (a b d e:P) : + totalInj F ⟨⟨(3,0),rfl⟩,![],a,![b,d,e]⟩ ≫ ((RegularCoefficient.double F).total c).d 3 2 = + (totalInj F ⟨⟨(2,0),rfl⟩,![],a,![d,e]⟩) + -(totalInj F ⟨⟨(2,0),rfl⟩,![],a,![(b*d),e]⟩) + (totalInj F ⟨⟨(2,0),rfl⟩,![],a,![b,(d*e)]⟩) + -(F.map (arrow e a) ≫ totalInj F ⟨⟨(2,0),rfl⟩,![],(e*a),![b,d]⟩) := by + rw [totalInj_d_hor] + simp only [Fin.sum_univ_succ,Fin.sum_univ_zero] + norm_num + try erw [labels3_0 b d e] + try erw [labels3_1 b d e] + try erw [labels3_2 b d e] + try erw [labels3_3 b d e] + try erw [weight3_0 b d e] + try erw [weight3_1 b d e] + try erw [weight3_2 b d e] + try erw [weight3_3 b d e] + try erw [one_totalInj F (h:=2) (v:=0) rfl ![] a ![d,e]] + try erw [one_totalInj F (h:=2) (v:=0) rfl ![] a ![(b*d),e]] + try erw [one_totalInj F (h:=2) (v:=0) rfl ![] a ![b,(d*e)]] + try abel +end RegularLabels + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RelabelCoefficients.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RelabelCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b4d72e36c61e0a0d0e0173f2017f2bdc7c71f95 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RelabelCoefficients.lean @@ -0,0 +1,72 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.PointFiberHomology +import OAI.GroupTheory.SimpleAmenable.Configurations.CellRelabel + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical +namespace SimpleAmenable.PolygonObject.LabelledStage + +variable {a n m : ℕ} {K : Type} [AddCommGroup K] +def labelMap (f : (Fin n → CutRing × CutRing) → (Fin m → CutRing × CutRing)) + (hf : ∀g,Labelled.Reduced g → Labelled.Reduced (f g)) : ReducedLabel n → ReducedLabel m := + fun l => ⟨f l.val,hf l.val l.property⟩ +variable (f : (Fin n → CutRing × CutRing) → (Fin m → CutRing × CutRing)) + (hf : ∀g,Labelled.Reduced g → Labelled.Reduced (f g)) +noncomputable def relabelCoefficients : Coefficients a n K →ₗ[ℤ] Coefficients a m K where + toFun := Finsupp.mapDomain (labelMap f hf) + map_add' _ _ := Finsupp.mapDomain_add + map_smul' r x := by + let h : Coefficients a n K →+ Coefficients a m K := { + toFun := Finsupp.mapDomain (labelMap f hf) + map_zero' := Finsupp.mapDomain_zero + map_add' _ _ := Finsupp.mapDomain_add } + exact map_intCast_smul h ℤ ℤ r x +@[simp] lemma relabelCoefficients_single (l : ReducedLabel n) (s : BooleanStep a K) : + relabelCoefficients (a:=a) (K:=K) f hf (Finsupp.single l s)=Finsupp.single (labelMap f hf l) s := + Finsupp.mapDomain_single +end SimpleAmenable.PolygonObject.LabelledStage + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Classical +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open IntervalBar.Diagram BarFinitePower FreeChains Labelled + +variable {a n m : ℕ} +variable (f : (Fin n → CutRing × CutRing) → (Fin m → CutRing × CutRing)) + (hf : ∀g, Reduced g → Reduced (f g)) +lemma homologyCoefficientIso_relabel (j : ℕ) (hj : 0 k x) + (Cell.homology_coefficient P l j hj hj5) + change (SSet.homologyMap (bar₃Map (Cell.functor P l)) Z j ≫ + (homologyCoefficientIso j hj hj5).hom) x = Finsupp.single l (Cell.step P x) at he + change ((homologyCoefficientIso j hj hj5).inv ≫ + SSet.homologyMap (bar₃Map (relabel f hf)) Z j ≫ (homologyCoefficientIso j hj hj5).hom) + (Finsupp.single l (Cell.step P x)) = _ + conv_lhs => rw [←he] + change (SSet.homologyMap (bar₃Map (Cell.functor P l)) Z j ≫ + (homologyCoefficientIso j hj hj5).hom ≫ (homologyCoefficientIso j hj hj5).inv ≫ + SSet.homologyMap (bar₃Map (relabel f hf)) Z j ≫ + (homologyCoefficientIso j hj hj5).hom) x = _ + rw [Iso.hom_inv_id_assoc,←Category.assoc,←SSet.homologyMap_comp,←bar₃Map_comp, + bar₃Map_eq_of_monoidalNatTrans (Cell.relabelIso f hf P l).hom j] + erw [Cell.homology_coefficient P (labelMap f hf l) j hj hj5] + exact (relabelCoefficients_single f hf l (Cell.step P x)).symm +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RestrictedPolygon.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RestrictedPolygon.lean new file mode 100644 index 0000000000000000000000000000000000000000..06c96e8e2b12de3ce501c90936831189f0d6132a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RestrictedPolygon.lean @@ -0,0 +1,23 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.PolygonStringSimplicial +import OAI.GroupTheory.SimpleAmenable.Simplicial.RestrictedNerve + +namespace OAI + +section + +section +open CategoryTheory +namespace SimpleAmenable.PolygonObject + +noncomputable def stringResolutionHomologyIso (a j : ℕ) : + (SimplicialDiagonal.diagonal.obj (stringDoubleNerve a)).homology DiagonalResolution.Z j ≅ + (nerve (PolygonObject a)).homology DiagonalResolution.Z j := + RestrictedNerve.homologyIso (positionalProperty a) j +end SimpleAmenable.PolygonObject + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/RingGroupHomology.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RingGroupHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..53037604ce62b3bdc213cca55310612dd7ca82e5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/RingGroupHomology.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.NoetherianTor + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section RingGroupHomology + +open CategoryTheory CategoryTheory.Limits CategoryTheory.MonoidalCategory +open scoped TensorProduct +attribute [local instance 1200] Rep.hV2 +namespace RingCoinvariants +variable {G : Type} [CommGroup G] +local notation "R" => MonoidAlgebra ℤ G + +noncomputable def augmentation : R →+* ℤ := + (MonoidAlgebra.lift ℤ ℤ G (1 : G →* ℤ)).toRingHom + +@[simp] theorem augmentation_of (g : G) : + augmentation (MonoidAlgebra.of ℤ G g) = 1 := + MonoidAlgebra.lift_of _ _ + +noncomputable def augmentationTrivialIso : + Rep.ofModuleMonoidAlgebra.obj (NoetherianResolution.augmentationModule + (augmentation (G := G))) ≅ Rep.trivial ℤ G ℤ := by + refine (moduleRepIso _).symm ≪≫ Rep.mkIso ?_ + refine { (LinearEquiv.refl ℤ ℤ) with isIntertwining' := ?_ } + intro g + apply LinearMap.ext + intro x + change augmentation (MonoidAlgebra.of ℤ G g) • x = x + rw [augmentation_of, one_smul] + +instance : (Rep.ofModuleMonoidAlgebra (k := ℤ) (G := G)).Additive where + map_add := by intros; rfl + +variable [IsNoetherianRing (MonoidAlgebra ℤ G)] + +noncomputable def groupResolution : ProjectiveResolution (Rep.trivial ℤ G ℤ) := by + let Q := Rep.ofModuleMonoidAlgebra.mapProjectiveResolution + (NoetherianResolution.augmentationResolution (augmentation (G := G))) + exact { + complex := Q.complex + projective := Q.projective + π := Q.π ≫ (ChainComplex.single₀ (Rep ℤ G)).map augmentationTrivialIso.hom } + +noncomputable def complexIso (L : FGModuleCat R) : + (groupResolution (G := G)).complex.coinvariantsTensorObj (inverseRep L.obj) ≅ + ((ModuleCat.restrictScalars (Int.castRingHom R)).mapHomologicalComplex _).obj + (NoetherianResolution.augmentationComplex augmentation L) := + (CategoryTheory.Functor.mapHomologicalComplexCompIso (functorIso L.obj) + (ComplexShape.down ℕ)).app + (NoetherianResolution.augmentationResolution (augmentation (G := G))).complex + +theorem finite_groupHomology_inverse (L : FGModuleCat R) (n : ℕ) : + Module.Finite ℤ (groupHomology (inverseRep L.obj) n) := by + classical + let C := NoetherianResolution.augmentationComplex (augmentation (G := G)) L + let F := ModuleCat.restrictScalars (Int.castRingHom R) + let := NoetherianResolution.finite_int_augmentation_homology augmentation L n + let e0 : ModuleCat.of ℤ (C.homology n) ≅ F.obj (C.homology n) := intRestrictionIso _ + have : Module.Finite ℤ (F.obj (C.homology n)) := + Module.Finite.of_surjective e0.hom.hom e0.toLinearEquiv.surjective + let e1 : ((F.mapHomologicalComplex _).obj C).homology n ≅ + F.obj (C.homology n) := (C.sc n).mapHomologyIso F + have : Module.Finite ℤ (((F.mapHomologicalComplex _).obj C).homology n) := + Module.Finite.of_surjective e1.inv.hom e1.toLinearEquiv.symm.surjective + let e2 := HomologicalComplex.homologyMapIso (complexIso L) n + have : Module.Finite ℤ (((groupResolution (G := G)).complex.coinvariantsTensorObj + (inverseRep L.obj)).homology n) := + Module.Finite.of_surjective e2.inv.hom e2.toLinearEquiv.symm.surjective + let e3 := groupHomologyIso (inverseRep L.obj) n (groupResolution (G := G)) + exact Module.Finite.of_surjective e3.inv.hom e3.toLinearEquiv.symm.surjective + +end RingCoinvariants +end RingGroupHomology + +section FiniteAbelianHomology + +open CategoryTheory +attribute [local instance 1200] Rep.hV2 +namespace RingCoinvariants +variable {G : Type} [CommGroup G] [IsNoetherianRing (MonoidAlgebra ℤ G)] + +noncomputable def inverseHomologyIso (A : Rep ℤ G) (n : ℕ) : + groupHomology (inverseRep (ModuleCat.of (MonoidAlgebra ℤ G) A.ρ.asModule)) n ≅ + groupHomology A n := by + let e : (inverseRep (ModuleCat.of (MonoidAlgebra ℤ G) A.ρ.asModule)) ≃+ A := { + toFun := fun x => x + invFun := fun x => x + left_inv := fun _ => rfl + right_inv := fun _ => rfl + map_add' := fun _ _ => rfl } + refine groupHomology.mapIso + (A := inverseRep (ModuleCat.of (MonoidAlgebra ℤ G) A.ρ.asModule)) (B := A) + (MulEquiv.inv G) (e.toIntLinearEquiv) ?_ n + intro g + apply DFunLike.ext + intro x + change A.ρ.asAlgebraHom (MonoidAlgebra.single g⁻¹ 1) x = A.ρ g⁻¹ x + rw [Representation.asAlgebraHom_single_one] + +theorem finite_groupHomology (A : Rep ℤ G) + [Module.Finite (MonoidAlgebra ℤ G) A.ρ.asModule] (n : ℕ) : + Module.Finite ℤ (groupHomology A n) := by + let L := FGModuleCat.of (MonoidAlgebra ℤ G) A.ρ.asModule + have := finite_groupHomology_inverse L n + let e := inverseHomologyIso A n + exact Module.Finite.of_surjective e.hom.hom e.toLinearEquiv.surjective + +end RingCoinvariants +end FiniteAbelianHomology + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/StageCoefficients.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/StageCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..305bb3706e894feac8b261163b959eaf2e36a926 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/StageCoefficients.lean @@ -0,0 +1,140 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.StageRealization +import OAI.GroupTheory.SimpleAmenable.Configurations.StageOrder +import OAI.GroupTheory.SimpleAmenable.Homology.BooleanStepCoefficients + +namespace OAI + +section + +section +open CategoryTheory Classical Set +namespace SimpleAmenable.PolygonObject.LabelledStage + +variable {a n:ℕ} {K:Type} [AddCommGroup K] +noncomputable abbrev Coefficients (a n:ℕ) (K:Type) [AddCommGroup K] := + ReducedLabel n →₀ BooleanStep a K +namespace Stage +variable (S:Stage a n) +noncomputable def label (j:Fin S.support.card) : ReducedLabel n := ⟨S.L j,S.L_reduced j⟩ +lemma label_injective : Function.Injective S.label := fun _ _ equality => S.L_injective (congrArg Subtype.val equality) +lemma label_mem_support (j:Fin S.support.card) : S.label j∈S.support := + (S.label_mem _ _).mp ⟨j,rfl⟩ +lemma label_range (l:ReducedLabel n) : (∃j,S.label j=l) ↔ l∈S.support := by + simpa only [label,Subtype.ext_iff] using S.label_mem l.val l.property +noncomputable def realize : (Fin S.partition.size × Fin S.support.card → K) →ₗ[ℤ] Coefficients a n K := + ∑j:Fin S.support.card, + (Finsupp.lsingle (S.label j)).comp + ((BooleanStep.inflate (K:=K) S.partition).comp (LinearMap.funLeft ℤ K (fun i => (i,j)))) +lemma realize_at_label (v:Fin S.partition.size × Fin S.support.card → K) (j:Fin S.support.card) : + (S.realize (K:=K) v) (S.label j) = BooleanStep.inflate (K:=K) S.partition (fun i => v (i,j)) := by + simp only [realize,LinearMap.sum_apply,LinearMap.comp_apply,Finsupp.lsingle_apply,Finsupp.finsetSum_apply] + rw [Finset.sum_eq_single j] + · rw [Finsupp.single_eq_same]; rfl + · intro k hk hkj + exact Finsupp.single_eq_of_ne (fun e => hkj (S.label_injective e.symm)) + · intro h; exact False.elim (h (Finset.mem_univ _)) +lemma realize_outside (v:Fin S.partition.size × Fin S.support.card → K) (l:ReducedLabel n) + (hl:l∉S.support) : (S.realize (K:=K) v) l=0 := by + simp only [realize,LinearMap.sum_apply,LinearMap.comp_apply,Finsupp.lsingle_apply,Finsupp.finsetSum_apply] + apply Finset.sum_eq_zero; intro j hj + exact Finsupp.single_eq_of_ne (fun e => hl (e.symm ▸ S.label_mem_support j)) +noncomputable def coefficientEvaluate : Coefficients a n K →ₗ[ℤ] (Fin S.partition.size × Fin S.support.card → K) where + toFun f c := (f (S.label c.2)).val (S.partition.point c.1) + map_add' _ _ := rfl + map_smul' _ _ := rfl +lemma coefficientEvaluate_realize : + (S.coefficientEvaluate (K:=K)).comp S.realize=LinearMap.id := by + apply LinearMap.ext; intro v; funext c + change (S.realize (K:=K) v (S.label c.2)).val (S.partition.point c.1)=v c + rw [realize_at_label,BooleanStep.inflate_apply,S.partition.color_point] +lemma realize_injective : Function.Injective (S.realize (K:=K)) := by + intro v w h + have hh := congrArg (S.coefficientEvaluate (K:=K)) h + change ((S.coefficientEvaluate (K:=K)).comp S.realize) v=((S.coefficientEvaluate (K:=K)).comp S.realize) w at hh + simpa only [coefficientEvaluate_realize,LinearMap.id_apply] using hh + +def Admissible (f:Coefficients a n K) : Prop := + f.support ⊆ S.support ∧ ∀l p q,S.partition.color p=S.partition.color q → (f l).val p=(f l).val q +lemma realize_admissible (v:Fin S.partition.size × Fin S.support.card → K) : S.Admissible (S.realize (K:=K) v) := by + constructor + · intro l hl + by_contra hn + exact (Finsupp.mem_support_iff.mp hl) (S.realize_outside v l hn) + · intro l p q hpq + by_cases hl:l∈S.support + · obtain ⟨j,rfl⟩ := (S.label_range l).mpr hl + rw [S.realize_at_label,BooleanStep.inflate_apply,BooleanStep.inflate_apply,hpq] + · rw [S.realize_outside v l hl]; rfl +lemma realize_coefficientEvaluate (f:Coefficients a n K) (hf:S.Admissible f) : + S.realize (K:=K) (S.coefficientEvaluate (K:=K) f)=f := by + apply Finsupp.ext; intro l + by_cases hl:l∈S.support + · obtain ⟨j,rfl⟩ := (S.label_range l).mpr hl + rw [realize_at_label] + apply Subtype.ext; funext p + exact hf.2 _ _ _ (S.partition.color_point (S.partition.color p)) + · rw [realize_outside _ _ _ hl] + exact (Finsupp.notMem_support_iff.mp (fun h => hl (hf.1 h))).symm +lemma admissible_mono {T:Stage a n} (h:S≤T) {f:Coefficients a n K} (hf:S.Admissible f) : + T.Admissible f := ⟨hf.1.trans h.2,fun l p q hpq => hf.2 l p q (h.1 p q hpq)⟩ +variable {S} +noncomputable def coefficientRefinement {T:Stage a n} (_h:S≤T) : + (Fin S.partition.size × Fin S.support.card →K) →ₗ[ℤ] (Fin T.partition.size × Fin T.support.card →K) := + (T.coefficientEvaluate (K:=K)).comp S.realize +lemma realize_refinement {T:Stage a n} (h:S≤T) : + (T.realize (K:=K)).comp (coefficientRefinement h)=S.realize (K:=K) := by + apply LinearMap.ext; intro v + exact T.realize_coefficientEvaluate _ (S.admissible_mono h (S.realize_admissible v)) +lemma exists_coefficient_stage (f:Coefficients a n K) : ∃S:Stage a n,S.Admissible f := by + obtain ⟨P,hP⟩ := BooleanStep.exists_common (fun l:f.support => f l.val) + refine ⟨⟨P,f.support⟩,Subset.rfl,?_⟩ + intro l p q hpq + by_cases hl:l∈f.support + · have h := congrArg Subtype.val (hP ⟨l,hl⟩) + exact (congrFun h p).symm.trans ((congrArg (fun i => (BooleanStep.evaluate (K:=K) P (f l)) i) hpq).trans (congrFun h q)) + · rw [Finsupp.notMem_support_iff.mp hl]; rfl +end Stage +end SimpleAmenable.PolygonObject.LabelledStage + +end + +section +open CategoryTheory Limits Classical Set +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage + +variable {a n:ℕ} (K:Type) [AddCommGroup K] +noncomputable def coefficientDiagram : Stage a n ⥤ ModuleCat ℤ where + obj S := ModuleCat.of ℤ (Fin S.partition.size × Fin S.support.card→K) + map h := ModuleCat.ofHom (coefficientRefinement (K:=K) (leOfHom h)) + map_id S := by + apply ModuleCat.hom_ext + exact coefficientEvaluate_realize S + map_comp {S T U} h k := by + apply ModuleCat.hom_ext + apply LinearMap.ext; intro v + change U.coefficientEvaluate (K:=K) (S.realize (K:=K) v) = + U.coefficientEvaluate (K:=K) (T.realize (K:=K) (coefficientRefinement (K:=K) (leOfHom h) v)) + exact congrArg (U.coefficientEvaluate (K:=K)) (LinearMap.congr_fun (realize_refinement (K:=K) (leOfHom h)) v).symm +noncomputable def coefficientCocone : Cocone (coefficientDiagram (a:=a) (n:=n) K) where + pt := ModuleCat.of ℤ (Coefficients a n K) + ι := { + app S := ModuleCat.ofHom (S.realize (K:=K)) + naturality _ _ h := ModuleCat.hom_ext (realize_refinement (K:=K) (leOfHom h)) } + +noncomputable def coefficientIsColimit : IsColimit (coefficientCocone (a:=a) (n:=n) K) := by + apply isColimitOfReflects (CategoryTheory.forget (ModuleCat ℤ)) + apply Types.FilteredColimit.isColimitOf' + · intro f + obtain ⟨S,hS⟩ := exists_coefficient_stage f + exact ⟨S,S.coefficientEvaluate (K:=K) f,(S.realize_coefficientEvaluate f hS).symm⟩ + · intro S v w h + have hvw := S.realize_injective h + exact ⟨S,𝟙 S,congrArg _ hvw⟩ +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/StageHomologyCoordinates.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/StageHomologyCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..b7fa2643b9511654e434fa610a03cd529bff9a4b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/StageHomologyCoordinates.lean @@ -0,0 +1,133 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.RandomFields.PeriodizationCovariance +import OAI.GroupTheory.SimpleAmenable.Configurations.LabelledStringEquiv +import OAI.GroupTheory.SimpleAmenable.Simplicial.FinitePowerConnected +import OAI.GroupTheory.SimpleAmenable.Homology.StageCoefficients +import OAI.GroupTheory.SimpleAmenable.Simplicial.StageSimplicialColimit + +namespace OAI + +section + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open IntervalBar.Diagram BarFinitePower FreeChains + +attribute [local instance 1200] Pi.module Prod.instModule +variable {a n:ℕ} +noncomputable abbrev E := bar₃ (C:=FiniteSetGroupoid) +lemma E_low_connected : LowConnected E := fun j hj h3 => bar₃_low_zero j hj h3 +noncomputable abbrev K (j:ℕ) : ModuleCat ℤ := E.homology Z j +noncomputable def coefficientVectorIso (S:Stage a n) (j:ℕ) : + ModuleCat.of ℤ (Fin S.partition.size × Fin S.support.card → K j) ≅ + (coefficientDiagram (a:=a) (n:=n) (K j)).obj S := + (AddEquiv.refl (Fin S.partition.size × Fin S.support.card → K j)).toIntLinearEquiv.toModuleIso +noncomputable def homologyCoordinates (S:Stage a n) (j:ℕ) : + (bar₃ (C:=S.Obj)).homology Z j ⟶ (coefficientDiagram (a:=a) (n:=n) (K j)).obj S := + SSet.homologyMap S.finiteProductComparison Z j ≫ coordinates _ E j ≫ (S.coefficientVectorIso j).hom +lemma homologyCoordinates_isIso (S:Stage a n) (j:ℕ) (hj:0 hl ((S.label_range (T.label c.2)).mp ⟨b,Subtype.ext hb⟩)) j hj] + erw [S.realize_outside _ _ hl] + rfl +noncomputable def homologyCoordinateIso (j:ℕ) (hj:0 by + haveI := S.homologyCoordinates_isIso j hj hj5 + exact asIso (C := ModuleCat ℤ) (X := (bar₃ (C:=S.Obj)).homology Z j) + (Y := (coefficientDiagram (a:=a) (n:=n) (K j)).obj S) + (S.homologyCoordinates j)) (fun h => homologyCoordinates_refinement (leOfHom h) j hj) + +noncomputable def homologyCoefficientIso (j:ℕ) (hj:0 (SquareStep.orbitLift (l i)).toAdd,by + intro i + change orbitRepresentative (((l i).toAdd.1:CutRing)*cutTau,((l i).toAdd.2:CutRing)*cutTau)=_ + simp [orbitRepresentative,cutTau] + rfl⟩ + left_inv l := by + apply Subtype.ext; funext i + exact l.property i + right_inv l := by + funext i + change Multiplicative.ofAdd ((((l i).toAdd.1:CutRing)*cutTau).im, + (((l i).toAdd.2:CutRing)*cutTau).im) = l i + simp [cutTau] + +noncomputable def trajectoryCoefficientEquiv (a n:ℕ) (K:Type) [AddCommGroup K] : + Coefficients a n K ≃ₗ[ℤ] + ((Fin n → Multiplicative (ℤ×ℤ)) →₀ (SquareStep a ⊗[ℤ] K)) := + (Finsupp.mapRange.linearEquiv (BooleanStep.tensorEquiv (a:=a) (K:=K)).symm).trans + (Finsupp.domLCongr (reducedLabelEquiv n)) +end SimpleAmenable.PolygonObject.LabelledStage + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory +open scoped TensorProduct +namespace SimpleAmenable.PolygonObject +open IntervalBar.Diagram LabelledStage FreeChains + +noncomputable def trajectoryHomologyIso (a p j:ℕ) (hj:0 apply Subsingleton.elim +lemma trajectoryRows_low_zero (a p j:ℕ) (hj:0 + have he : Fin.cast h (i.castAdd (l+n))=(i.castAdd l).castAdd n := Fin.ext rfl + rw [he,stabilize_apply_head,stabilize_apply_head] + exact he.symm + | right i => + rw [stabilize_apply_tail] + induction i using Fin.addCases with + | left i => + have he : Fin.cast h ((i.castAdd n).natAdd k)=(i.natAdd k).castAdd n := Fin.ext rfl + rw [he,stabilize_apply_head,stabilize_apply_head] + exact he.symm + | right i => + have he : Fin.cast h ((i.natAdd l).natAdd k)=i.natAdd (k+l) := by + apply Fin.ext + simp only [Fin.val_cast,Fin.val_natAdd] + omega + rw [he,stabilize_apply_tail,stabilize_apply_tail] + apply Fin.ext + simp only [Fin.val_cast,Fin.val_natAdd] + omega +lemma stabilize_zero_bijective (n:ℕ) : Function.Bijective (stabilize 0 n) := by + refine ⟨stabilize_injective 0 n,?_⟩ + intro g + have hg : g ∈ (stabilize 0 n).range := by + rw [stabilize_range] + exact Subsingleton.elim _ _ + exact hg +lemma stabilize_H1_isIso (k n:ℕ) (hn:32≤n) : + IsIso (TrivialHomology.map (stabilize k n) 1) := by + induction k with + | zero => + exact TrivialHomology.isIso_equiv + (MulEquiv.ofBijective (stabilize 0 n) (stabilize_zero_bijective n)) 1 + | succ k ih => + rw [show k+1=1+k by omega,stabilize_add,TrivialHomology.map_comp,TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (castGroup (Nat.add_assoc 1 k n).symm) 1 + have := stabilize_one_H1_isIso (k+n) (by omega) + have := ih + infer_instance +end + +attribute [local instance 1200] Rep.hV2 +lemma columnAugmentation_H1_isIso (p n : ℕ) (hn : 32 ≤ n) : + IsIso ((groupHomology.functor ℤ (G (p+n)) 1).map + (TransitiveInduction.augmentation (G (p+n)) (Configuration (p+n) p))) := by + have pointIso := TransitiveInduction.isIso_map_pointMap (standard p n) + (fun f => transitive _ f) 1 + have subtypeIso : IsIso (TrivialHomology.map + (MulAction.stabilizer (G (p+n)) (standard p n)).subtype 1) := by + have := stabilize_H1_isIso p n hn + have := TrivialHomology.isIso_equiv (standardStabilizerEquiv p n) 1 + have he : TrivialHomology.map (standardStabilizerEquiv p n).toMonoidHom 1 ≫ + TrivialHomology.map (MulAction.stabilizer (G (p+n)) + (standard p n)).subtype 1 = TrivialHomology.map (stabilize p n) 1 := by + rw [← TrivialHomology.map_comp, standardStabilizerEquiv_subtype] + exact IsIso.of_isIso_fac_left he + exact @IsIso.of_isIso_fac_left _ _ _ _ _ _ _ _ pointIso subtypeIso + (TransitiveInduction.augmentation_pointMap (standard p n) 1) + +lemma face_H1_isIso (m p : ℕ) (hn : p+33 ≤ m) (i : Fin (p+1)) : + IsIso ((groupHomology.functor ℤ (G m) 1).map (faceHom m p i)) := by + have hc (t : ℕ) (ht : t ≤ p+1) : + IsIso ((groupHomology.functor ℤ (G m) 1).map + (TransitiveInduction.augmentation (G m) (Configuration m t))) := by + obtain ⟨n,rfl⟩ : ∃n,m=t+n := ⟨m-t,by omega⟩ + exact columnAugmentation_H1_isIso t n (by omega) + have := hc p (by omega) + have := hc (p+1) (by omega) + have he := congrArg ((groupHomology.functor ℤ (G m) 1).map) + (TransitiveInduction.augmentation_natural (face i) (face_smul i)) + rw [Functor.map_comp] at he + exact IsIso.of_isIso_fac_right he + +lemma boundary_two_H1_isIso (m : ℕ) (hm : 35 ≤ m) : + IsIso ((groupHomology.functor ℤ (G m) 1).map (boundary m 2)) := by + rw [homology_boundary_three m (by omega) 1] + exact face_H1_isIso m 2 (by omega) 0 + +lemma boundary_five (m : ℕ) : boundary m 4 = + faceHom m 4 0 - faceHom m 4 1 + faceHom m 4 2 - faceHom m 4 3 + faceHom m 4 4 := by + rw [boundary_sum] + simp only [Fin.sum_univ_succ] + norm_num + abel + +lemma boundary_four_H0_isIso (m : ℕ) (hm : 16 < m) : + IsIso ((groupHomology.functor ℤ (G m) 0).map (boundary m 4)) := by + rw [boundary_five,Functor.map_add,Functor.map_sub,Functor.map_add,Functor.map_sub] + rw [homology_face_eq m 4 (by omega) 0 1 0, homology_face_eq m 4 (by omega) 0 2 0, + homology_face_eq m 4 (by omega) 0 3 0, homology_face_eq m 4 (by omega) 0 4 0] + simp only [sub_self,zero_add] + exact face_H0_isIso m 4 hm 0 +lemma boundary_zero_H2_isIso (m : ℕ) (hm : 35 ≤ m) : + IsIso ((groupHomology.functor ℤ (G m) 2).map (boundary m 0)) := by + have := boundary_zero_epi m (by omega) + have boundaryTwoH0 : IsIso (BoundedHomologyEdge.Hmap 0 (boundary m 2)) := + boundary_two_H0_isIso m (by omega) + have boundaryTwoH1 : IsIso (BoundedHomologyEdge.Hmap 1 (boundary m 2)) := + boundary_two_H1_isIso m hm + have boundaryFourH0 : IsIso (BoundedHomologyEdge.Hmap 0 (boundary m 4)) := + boundary_four_H0_isIso m (by omega) + exact BoundedHomologyEdge.chain_H2_isIso (boundary m 0) (boundary m 1) + (boundary m 2) (boundary m 3) (boundary m 4) + (boundary_square m 0) (boundary_square m 1) (boundary_square m 2) + (boundary_square m 3) (boundary_exact m 0 (by omega) (by omega)) + (boundary_exact m 1 (by omega) (by omega)) + (boundary_exact m 2 (by omega) (by omega)) + (homology_boundary_two_zero m (by omega) 2) +lemma stabilizer_H2_isIso (m : ℕ) (hm : 35 ≤ m) (f : Configuration m 1) : + IsIso (TrivialHomology.map (MulAction.stabilizer (G m) f).subtype 2) := by + have pointIso := TransitiveInduction.isIso_map_pointMap f (fun g => transitive f g) 2 + have boundaryIso := boundary_zero_H2_isIso m hm + erw [← augmentation_pointMap f 2] + have lastIso : IsIso ((groupHomology.functor ℤ (G m) 2).map (emptyIso m).hom) := inferInstance + have tailIso := IsIso.comp_isIso' boundaryIso lastIso + exact IsIso.comp_isIso' pointIso tailIso + +lemma stabilize_one_H2_isIso (n : ℕ) (hn : 34 ≤ n) : + IsIso (TrivialHomology.map (stabilize 1 n) 2) := by + rw [← standardStabilizerEquiv_subtype 1 n, TrivialHomology.map_comp] + have := TrivialHomology.isIso_equiv (standardStabilizerEquiv 1 n) 2 + have := stabilizer_H2_isIso (1+n) (by omega) (standard 1 n) + infer_instance +end SimpleAmenable.SymmetricConfiguration + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TensorJoint.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TensorJoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..661e30fe07600d0d0a0151a7016dfcc7d96bb586 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TensorJoint.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.FreeChains + +namespace OAI + +section + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex +namespace ChainTensor +open FreeChains + +variable (S T:ShortComplex (ChainComplex A ℕ)) (s:S.Splitting) (t:T.Splitting) +lemma splitting_tensor_identity : + (s.r⊗ₘt.r) ≫ (S.f⊗ₘT.f) + + (𝟙 S.X₂⊗ₘT.g) ≫ ((s.r≫S.f)⊗ₘt.s) + + (S.g⊗ₘ𝟙 T.X₂) ≫ (s.s⊗ₘ𝟙 T.X₂) = 𝟙 (S.X₂⊗T.X₂) := by + have tensor_add {sourceLeft targetLeft sourceRight targetRight : ChainComplex A ℕ} + (left : sourceLeft ⟶ targetLeft) (right₁ right₂ : sourceRight ⟶ targetRight) : + left ⊗ₘ (right₁ + right₂) = left ⊗ₘ right₁ + left ⊗ₘ right₂ := by + apply HomologicalComplex.Hom.ext + funext degree + apply mapBifunctor.hom_ext + intro leftDegree rightDegree totalDegree + change ιMapBifunctor sourceLeft sourceRight (curriedTensor A) c leftDegree rightDegree degree totalDegree ≫ + (mapBifunctorMap left (right₁ + right₂) (curriedTensor A) c).f degree = + ιMapBifunctor sourceLeft sourceRight (curriedTensor A) c leftDegree rightDegree degree totalDegree ≫ + ((mapBifunctorMap left right₁ (curriedTensor A) c).f degree + + (mapBifunctorMap left right₂ (curriedTensor A) c).f degree) + simp [Preadditive.comp_add] + have add_tensor {sourceLeft targetLeft sourceRight targetRight : ChainComplex A ℕ} + (left₁ left₂ : sourceLeft ⟶ targetLeft) (right : sourceRight ⟶ targetRight) : + (left₁ + left₂) ⊗ₘ right = left₁ ⊗ₘ right + left₂ ⊗ₘ right := by + apply HomologicalComplex.Hom.ext + funext degree + apply mapBifunctor.hom_ext + intro leftDegree rightDegree totalDegree + change ιMapBifunctor sourceLeft sourceRight (curriedTensor A) c leftDegree rightDegree degree totalDegree ≫ + (mapBifunctorMap (left₁ + left₂) right (curriedTensor A) c).f degree = + ιMapBifunctor sourceLeft sourceRight (curriedTensor A) c leftDegree rightDegree degree totalDegree ≫ + ((mapBifunctorMap left₁ right (curriedTensor A) c).f degree + + (mapBifunctorMap left₂ right (curriedTensor A) c).f degree) + simp [Preadditive.comp_add] + simp only [tensorHom_comp_tensorHom,Category.id_comp,Category.comp_id] + rw [←tensor_add,t.id,←add_tensor,s.id,id_tensorHom_id] +include s t in +lemma homology_joint_kernel (n:ℕ) (hz:IsZero ((S.X₁⊗T.X₁).homology n)) + (x:(S.X₂⊗T.X₂).homology n) + (h1:homologyMap (𝟙 S.X₂⊗ₘT.g) n x=0) + (h2:homologyMap (S.g⊗ₘ𝟙 T.X₂) n x=0) : x=0 := by + have hm : homologyMap ((s.r⊗ₘt.r) ≫ (S.f⊗ₘT.f)) n=0 := by + rw [homologyMap_comp,hz.eq_of_src (homologyMap (S.f⊗ₘT.f) n) 0,comp_zero] + have hid := congrArg (fun f => homologyMap f n) (splitting_tensor_identity S T s t) + simp only [homologyMap_add] at hid + rw [hm,homologyMap_comp,homologyMap_comp,homologyMap_id] at hid + have hh := congrArg (fun f => f x) hid + change 0 + homologyMap ((s.r≫S.f)⊗ₘt.s) n (homologyMap (𝟙 S.X₂⊗ₘT.g) n x) + + homologyMap (s.s⊗ₘ𝟙 T.X₂) n (homologyMap (S.g⊗ₘ𝟙 T.X₂) n x) = x at hh + simpa only [h1,h2,map_zero,add_zero] using hh.symm +end ChainTensor + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TensorSplit.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TensorSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c1ffcd8822edf42860f6219756d1da6a0002da0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TensorSplit.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ProductChains + +namespace OAI + +section + +section +open CategoryTheory Limits MonoidalCategory HomologicalComplex +namespace TensorSplit +open FreeChains AugmentedSplit +attribute [local instance] preservesBinaryBiproducts_of_preservesBiproducts + +variable {K L : ChainComplex A ℕ} (e : K ⟶ U) (s : U ⟶ K) (hs : s ≫ e=𝟙 U) + (f : L ⟶ U) (t : U ⟶ L) (ht : t ≫ f=𝟙 U) +noncomputable def decompose : + K ⊗ L ≅ ((red e ⊗ red f) ⊞ red e) ⊞ (red f ⊞ U) := + (AugmentedSplit.iso e s hs ⊗ᵢ AugmentedSplit.iso f t ht) ≪≫ + ChainTensor.rightDistrib _ _ _ ≪≫ + biprod.mapIso + (ChainTensor.leftDistrib _ _ _ ≪≫ biprod.mapIso (Iso.refl _) (ρ_ _)) + (ChainTensor.leftDistrib _ _ _ ≪≫ biprod.mapIso (λ_ _) (λ_ _)) + +noncomputable def additiveIso [∀n,Module.Flat ℤ (K.X n)] + (a b n : ℕ) (hn : 0 AugmentedSplit.flat e i + have hf' : ∀i,i≤n → Module.Finite ℤ ((red f).homology i) := fun i hi => by + have := hf i hi + exact AugmentedSplit.finite f t ht i + have hz : IsZero ((red e ⊗ red f).homology n) := + TensorProductHomology.isZero (red e) (red f) a b n hab hK hL hf' + let H := homologyFunctor A c n + exact H.mapIso (decompose e s hs f t ht) ≪≫ H.mapBiprod _ _ ≪≫ + biprod.mapIso (H.mapBiprod _ _ ≪≫ (isoZeroBiprod hz).symm) + (H.mapBiprod _ _ ≪≫ (isoBiprodZero (AugmentedSplit.uni_isZero n (by omega))).symm) ≪≫ + biprod.mapIso (AugmentedSplit.homologyIso e s hs n (by omega)).symm + (AugmentedSplit.homologyIso f t ht n (by omega)).symm +end TensorSplit + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TorusCoefficientFinite.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TorusCoefficientFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..20726522653c7ccec0e932a5ee05b3f376222b9c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TorusCoefficientFinite.lean @@ -0,0 +1,129 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.RingGroupHomology +import OAI.GroupTheory.SimpleAmenable.RandomFields.PeriodizationCovariance + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section TorusCoefficientFinite + +open Classical +namespace SquareStep + +abbrev OrbitGroupRing := MonoidAlgebra ℤ (Multiplicative (ℤ×ℤ)) + +noncomputable def orbitGroupRing : PolygonGroupRing →+* OrbitGroupRing := + MonoidAlgebra.mapDomainRingHom ℤ orbitProjection + +noncomputable def periodizeModule {a : ℕ} : + (PlaneStep.representation a).asModule →ₛₗ[orbitGroupRing] + (orbitRepresentation a).asModule where + toFun := periodize + map_add' := periodize.map_add + map_smul' r x := by + change PlaneStep a at x + change periodize ((PlaneStep.representation a).asAlgebraHom r x) = + (orbitRepresentation a).asAlgebraHom (orbitGroupRing r) (periodize x) + induction r using MonoidAlgebra.induction_linear with + | zero => simp + | add r s hr hs => simp [hr,hs] + | single g c => + simp only [orbitGroupRing,MonoidAlgebra.mapDomainRingHom_apply, + MonoidAlgebra.mapDomain_single,Representation.asAlgebraHom_single, + LinearMap.smul_apply,map_smul] + congr 1 + change periodize (PlaneStep.translate g.toAdd x) = + orbitRepresentation a (orbitProjection g) (periodize x) + rw [← representation_reduce] + exact periodize_translate x g.toAdd + +theorem periodizeModule_surjective {a : ℕ} : + Function.Surjective (periodizeModule (a := a)) := periodize_surjective + +theorem orbit_coefficient_finite {a : ℕ} (ha : 0 MonoidAlgebra ℤ G + +noncomputable def trivialTensorEquiv (ρ : Representation ℤ G M) : + (ρ.asModule ⊗[ℤ] K) ≃ₗ[ℤ] (ρ.tprod (Representation.trivial ℤ G K)).asModule := + (TensorProduct.congr ρ.asModuleEquiv (LinearEquiv.refl ℤ K)).trans + (ρ.tprod (Representation.trivial ℤ G K)).asModuleEquiv.symm + +noncomputable def trivialTensorMap (ρ : Representation ℤ G M) : + (ρ.asModule ⊗[ℤ] K) →ₗ[R] (ρ.tprod (Representation.trivial ℤ G K)).asModule := + MonoidAlgebra.equivariantOfLinearOfComm (trivialTensorEquiv ρ).toLinearMap (by + intro g x + induction x using TensorProduct.inductionOn with + | add x y hx hy => simp only [smul_add,map_add,hx,hy] + | tmul x y => + apply (ρ.tprod (Representation.trivial ℤ G K)).asModuleEquiv.injective + simp [trivialTensorEquiv,TensorProduct.smul_tmul'] + rfl) + +theorem finite_trivialTensor (ρ : Representation ℤ G M) + [Module.Finite R ρ.asModule] [Module.Finite ℤ K] : + Module.Finite R (ρ.tprod (Representation.trivial ℤ G K)).asModule := by + let : Module.Finite R (ρ.asModule ⊗[ℤ] K) := finite_tensor ℤ R ρ.asModule K + exact Module.Finite.of_surjective (trivialTensorMap ρ) (trivialTensorEquiv ρ).surjective + +end RingCoinvariants +end TensorCoefficientFinite + +section PolygonCoefficientHomology + +attribute [local instance 1200] Rep.hV2 Representation.instModuleAsModule TensorProduct.instModule +namespace SquareStep + +noncomputable def coefficientRep (a : ℕ) (K : Type) [AddCommGroup K] [Module ℤ K] : + Rep ℤ (Multiplicative (ℤ×ℤ)) := + Rep.of ((orbitRepresentation a).tprod (Representation.trivial ℤ _ K)) + +theorem coefficient_homology_finite {a : ℕ} (ha : 0 hφ p q) + have := ConeCoordinates.cone_subsingleton_of_iso (rowMap φ q) p + let e := (homologyFunctor (ModuleCat.{u} R) c p).mapIso (rowConeIso φ q) ≪≫ + ConcreteHomology.iso _ p + exact e.toLinearEquiv.injective.subsingleton +lemma cone_zero (hφ : ∀ p q,IsIso (homologyMap (φ.f p) q)) (n : ℕ) : + Subsingleton (ConcreteHomology.H (homotopyCofiber (total.map φ c)) n) := by + have := TotalFiniteness.subsingleton (TotalCone.B φ) n (fun p q _ => rowCone_zero φ hφ p q) + let e := (ConcreteHomology.functor (R:=R) n).mapIso (TotalCone.iso φ) ≪≫ + (ConcreteHomology.iso ((TotalCone.B φ).total c) n).symm + exact e.toLinearEquiv.injective.subsingleton +lemma total_homology_isIso (hφ : ∀ p q,IsIso (homologyMap (φ.f p) q)) (n : ℕ) : + IsIso (homologyMap (total.map φ c) n) := by + have := cone_zero φ hφ n + have := cone_zero φ hφ (n+1) + have : IsIso ((ConcreteHomology.functor n).map (total.map φ c)) := + (ConcreteCategory.isIso_iff_bijective _).mpr + ⟨ConeCoordinates.injective_of_cone_zero _ n,ConeCoordinates.surjective_of_cone_zero _ n⟩ + exact (NatIso.isIso_map_iff (ConcreteHomology.naturalIso (R:=R) n) (total.map φ c)).mpr inferInstance +end TotalComparison + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalFiltration.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalFiltration.lean new file mode 100644 index 0000000000000000000000000000000000000000..436ea4deb636ce68a3aadd6ea7759b3b2d3bddac --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalFiltration.lean @@ -0,0 +1,197 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ConcreteHomology +import OAI.GroupTheory.SimpleAmenable.Homology.TotalProjection + +namespace OAI + +section + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalProjection + +universe u +variable {R : Type u} [CommRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) + +lemma projection_eq_zero (p q n : ℕ) (h : p+q≠n) : projection K p q n = 0 := by + apply total.hom_ext + intro i j hij + rw [inclusion_projection_of_ne] + · simp + · intro h' + obtain ⟨rfl,rfl⟩ := Prod.mk.inj h' + exact h hij + +lemma element_ext {n : ℕ} {x y : (K.total c).X n} + (h : ∀ i : Index n,proj K n i x = proj K n i y) : x=y := by + have hx := congrArg (fun f : (K.total c).X n ⟶ (K.total c).X n => f x) + (sum_projection_inclusion K n) + have hy := congrArg (fun f : (K.total c).X n ⟶ (K.total c).X n => f y) + (sum_projection_inclusion K n) + simp only [ModuleCat.hom_sum,LinearMap.sum_apply,ModuleCat.comp_apply,ModuleCat.id_apply] at hx hy + rw [←hx,←hy] + exact Finset.sum_congr rfl (fun i _ => congrArg (inclusion K n i) (h i)) + +def filtration (n : ℕ) (p : ℤ) : Submodule R ((K.total c).X n) where + carrier := { x | ∀ i : Index n, p ≤ (i.val.1:ℤ) → proj K n i x=0 } + zero_mem' := by simp + add_mem' := by intro x y hx hy i hi; simp [map_add,hx i hi,hy i hi] + smul_mem' := by intro r x hx i hi; simp [map_smul,hx i hi] + +lemma filtration_mono (n : ℕ) : Monotone (filtration K n) := by + intro p q hpq x hx i hi + exact hx i (hpq.trans hi) + +lemma filtration_zero (n : ℕ) : filtration K n 0=⊥ := by + apply le_antisymm _ bot_le + intro x hx + apply (Submodule.mem_bot R).mpr + apply element_ext K + intro i + simpa using hx i (by omega) + +lemma filtration_top (n : ℕ) : filtration K n (n+1)=⊤ := by + apply top_unique + intro x _ i hi + have hs := Finset.HasAntidiagonal.mem_antidiagonal.mp i.property + omega + +lemma entry_zero {n p q : ℕ} {k : ℤ} {x : (K.total c).X n} + (hx : x∈filtration K n k) (hp : k≤(p:ℤ)) : projection K p q n x=0 := by + by_cases h : p+q=n + · exact hx ⟨(p,q),Finset.HasAntidiagonal.mem_antidiagonal.mpr h⟩ hp + · rw [projection_eq_zero K p q n h]; rfl + +lemma inclusion_mem {p q n : ℕ} (h : p+q=n) (x : (K.X p).X q) {k : ℤ} + (hp : (p:ℤ) f x) he + +lemma d_filtration {n m : ℕ} {k : ℤ} {x : (K.total c).X n} + (hx : x∈filtration K n k) : (K.total c).d n m x∈filtration K m k := by + by_cases h : m+1=n + · subst n + intro i hi + obtain ⟨⟨p,q⟩,hpq⟩ := i + have hpq' : p+q=m := Finset.HasAntidiagonal.mem_antidiagonal.mp hpq + subst m + have hd := congrArg (fun f : (K.total c).X (p+q+1) ⟶ (K.X p).X q => f x) + (d_projection K p q) + change projection K p q (p+q) ((K.total c).d (p+q+1) (p+q) x)=0 + simp only [ModuleCat.comp_apply] at hd + rw [hd] + change (projection K (p+1) q (p+q+1) ≫ (K.d (p+1) p).f q + + ((-1 : ℤˣ)^p) • (projection K p (q+1) (p+q+1) ≫ (K.X p).d (q+1) q)).hom x=0 + simp only [ModuleCat.hom_add,LinearMap.add_apply,ModuleCat.hom_comp,LinearMap.comp_apply,Units.smul_def,ModuleCat.hom_zsmul,LinearMap.smul_apply, + entry_zero K hx (by dsimp at hi; omega : k≤((p+1:ℕ):ℤ)),entry_zero K hx hi,map_zero,smul_zero,add_zero] + · rw [(K.total c).shape n m (by exact h)] + exact (filtration K m k).zero_mem + +noncomputable def filteredData (n : ℕ) : FilteredFiniteness.Data + (R:=R) (A:=(K.total c).X (n+1)) (B:=(K.total c).X n) (C:=(K.total c).X (n-1)) where + d := ((K.total c).d (n+1) n).hom + e := ((K.total c).d n (n-1)).hom + de := by exact ModuleCat.hom_ext_iff.mp ((K.total c).d_comp_d (n+1) n (n-1)) + FA := filtration K (n+1) + FB := filtration K n + FC := filtration K (n-1) + monoB := filtration_mono K n + +end TotalProjection + +end + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace E2Leading + +universe u +variable {R : Type u} [CommRing R] +open TotalProjection +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) + +lemma d_entry (p q : ℕ) (x : (K.total c).X (p+q+1)) : + projection K p q (p+q) ((K.total c).d (p+q+1) (p+q) x) = + (K.d (p+1) p).f q (projection K (p+1) q (p+q+1) x) + + ((-1 : ℤˣ)^p) • (K.X p).d (q+1) q (projection K p (q+1) (p+q+1) x) := by + have h := congrArg (fun f : (K.total c).X (p+q+1) ⟶ (K.X p).X q => f.hom x) + (d_projection K p q) + simpa only [ModuleCat.hom_add,ModuleCat.hom_comp,LinearMap.comp_apply,LinearMap.add_apply, + Units.smul_def,ModuleCat.hom_zsmul,LinearMap.smul_apply] using h + +lemma d_entry' (p q n m : ℕ) (hn : p+q+1=n) (hm : p+q=m) (x : (K.total c).X n) : + projection K p q m ((K.total c).d n m x) = + (K.d (p+1) p).f q (projection K (p+1) q n x) + + ((-1 : ℤˣ)^p) • (K.X p).d (q+1) q (projection K p (q+1) n x) := by + subst n; subst m; exact d_entry K p q x + +lemma z₂_top_cycle (p q : ℕ) (x : (filteredData K (p+q)).Z₂ ((p:ℤ)+1)) : + (K.X p).d q (q-1) (projection K p q (p+q) x)=0 := by + cases q with + | zero => rw [(K.X p).shape 0 (0-1) (by decide)]; rfl + | succ q => + rw [show q+1-1=q by omega] + have hd := d_entry K p q x.val + have hz : projection K p q (p+q) ((K.total c).d (p+q+1) (p+q) x.val)=0 := by + apply entry_zero K x.property.2 + omega + have hf : projection K (p+1) q (p+q+1) x.val=0 := entry_zero K x.property.1 (by omega) + rw [hz,hf,map_zero,zero_add] at hd + have hs : ((-1 : ℤˣ)^p) • (K.X p).d (q+1) q (projection K p (q+1) (p+q+1) x.val)=0 := hd.symm + have hh := congrArg (fun z => (((-1 : ℤˣ)^p)⁻¹) • z) hs + rw [inv_smul_smul,smul_zero] at hh + exact hh + +noncomputable def topCycle (p q : ℕ) : (filteredData K (p+q)).Z₂ ((p:ℤ)+1) →ₗ[R] + ConcreteHomology.Cycles (K.X p) q := + ((projection K p q (p+q)).hom.comp ((filteredData K (p+q)).Z₂ ((p:ℤ)+1)).subtype).codRestrict + _ (z₂_top_cycle K p q) + +noncomputable def row (q : ℕ) : ChainComplex (ModuleCat.{u} R) ℕ := + ((ConcreteHomology.functor q).mapHomologicalComplex c).obj K + +lemma z₂_top_horizontal (p q : ℕ) (x : (filteredData K (p+q)).Z₂ ((p:ℤ)+1)) : + (row K q).d p (p-1) (ConcreteHomology.π (K.X p) q (topCycle K p q x))=0 := by + cases p with + | zero => rw [(row K q).shape 0 (0-1) (by decide)]; rfl + | succ p => + change ((ConcreteHomology.functor q).map (K.d (p+1) p)).hom + (ConcreteHomology.π (K.X (p+1)) q (topCycle K (p+1) q x))=0 + rw [ConcreteHomology.map_π] + apply (ConcreteHomology.π_eq_zero (K.X p) q _).mpr + have hd := d_entry' K p q (p+1+q) (p+1+q-1) (by omega) (by omega) x.val + have hz : projection K p q (p+1+q-1) ((K.total c).d (p+1+q) (p+1+q-1) x.val)=0 := by + apply entry_zero K x.property.2 + omega + rw [hz] at hd + refine ⟨- ((-1 : ℤˣ)^p) • (projection K p (q+1) (p+1+q) x.val),?_⟩ + apply Subtype.ext + rw [ConcreteHomology.cyclesMap_val] + change (K.X p).d (q+1) q (- ((-1 : ℤˣ)^p) • (projection K p (q+1) (p+1+q) x.val))= + (K.d (p+1) p).f q (projection K (p+1) q (p+1+q) x.val) + simp only [Units.smul_def,map_zsmul,Units.val_neg,neg_smul,map_neg] + simpa only [Units.smul_def] using (eq_neg_of_add_eq_zero_left hd.symm).symm + +noncomputable def topRowCycle (p q : ℕ) : (filteredData K (p+q)).Z₂ ((p:ℤ)+1) →ₗ[R] + ConcreteHomology.Cycles (row K q) p := + ((ConcreteHomology.π (K.X p) q).comp (topCycle K p q)).codRestrict _ (z₂_top_horizontal K p q) + +noncomputable def lead (p q : ℕ) : (filteredData K (p+q)).Z₂ ((p:ℤ)+1) →ₗ[R] + ConcreteHomology.H (row K q) p := + (ConcreteHomology.π (row K q) p).comp (topRowCycle K p q) + +end E2Leading + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalFiniteness.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalFiniteness.lean new file mode 100644 index 0000000000000000000000000000000000000000..8516ed019a728a0a8c073e52332cbaad40f557a9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalFiniteness.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.EilenbergZilber +import OAI.GroupTheory.SimpleAmenable.Homology.E2Boundary + +namespace OAI + +section + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalFiniteness + +universe u +variable {R : Type u} [CommRing R] +abbrev c := ComplexShape.down ℕ +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) + +noncomputable def row (q : ℕ) : ChainComplex (ModuleCat.{u} R) ℕ := + ((homologyFunctor (ModuleCat.{u} R) c q).mapHomologicalComplex c).obj K + +noncomputable def rowIso (q : ℕ) : row K q ≅ E2Leading.row K q := + (NatIso.mapHomologicalComplex (ConcreteHomology.naturalIso q) c).app K + +noncomputable def rowHomologyIso (p q : ℕ) : (row K q).homology p ≅ + ModuleCat.of R (ConcreteHomology.H (E2Leading.row K q) p) := + (homologyFunctor _ c p).mapIso (rowIso K q) ≪≫ ConcreteHomology.iso _ _ + +lemma finite [IsNoetherianRing R] (n : ℕ) + (hfinite : ∀ p q, p+q=n → Module.Finite R ((row K q).homology p)) : + Module.Finite R ((K.total c).homology n) := by + apply E2Leading.finite_total K n + intro p q hpq + have := hfinite p q hpq + exact Module.Finite.equiv (rowHomologyIso K p q).toLinearEquiv + +end TotalFiniteness + +namespace EilenbergZilber +open DiagonalResolution ModelAssembly +variable (X : Dᵒᵖ ⥤ Type) + +lemma finite_diagonal (n : ℕ) + (hfinite : ∀ p q, p+q=n → Module.Finite ℤ + ((TotalFiniteness.row (twoComplex X) q).homology p)) : + Module.Finite ℤ (SSet.homology (C := A) (diag ⋙ X) Z n) := by + have := TotalFiniteness.finite (twoComplex X) n hfinite + exact Module.Finite.equiv (homologyIso X n).symm.toLinearEquiv + +end EilenbergZilber + +end + +section + +namespace FilteredFiniteness.Data + +universe u +variable {R : Type u} [CommRing R] +variable {A B C : Type u} [AddCommGroup A] [Module R A] + [AddCommGroup B] [Module R B] [AddCommGroup C] [Module R C] +variable (K : FilteredFiniteness.Data (R:=R) (A:=A) (B:=B) (C:=C)) + +lemma subsingleton_H (N : ℕ) (hzero : K.FB 0=⊥) (htop : K.FB (N+1)=⊤) + (hzeroE : ∀ p : ℕ, p≤N → Subsingleton (K.E₂ (p+1))) : Subsingleton K.H := by + have hz : K.filtration 0=⊥ := by + apply le_antisymm _ bot_le + rintro y ⟨x,rfl⟩ + have hx : x=0 := by + apply Subtype.ext; apply Subtype.ext + exact (Submodule.mem_bot R).mp (hzero ▸ x.property) + rw [hx,map_zero] + exact Submodule.zero_mem _ + have hf : ∀ p : ℕ, p≤N+1 → K.filtration p=⊥ := by + intro p hp + induction p with + | zero => exact hz + | succ p ih => + have hl := ih (by omega) + have := hzeroE p (by omega) + apply le_antisymm _ bot_le + rintro y ⟨x,rfl⟩ + have he : K.lead ((p:ℤ)+1) x=0 := Subsingleton.elim _ _ + have hh := K.lower_of_lead_zero x he + change K.π x.val∈K.filtration (((p+1:ℕ):ℤ)-1) at hh + have hidx : ((p+1:ℕ):ℤ)-1=(p:ℤ) := by omega + rw [hidx,hl] at hh + exact hh + apply subsingleton_of_forall_eq 0 + intro y + obtain ⟨z,rfl⟩ := Submodule.mkQ_surjective (LinearMap.range K.dCycles) y + have hy : K.π z∈K.filtration ((N+1:ℕ):ℤ) := by + refine ⟨⟨z,?_⟩,rfl⟩ + change z.val∈K.FB ((N+1:ℕ):ℤ) + rw [Nat.cast_add,Nat.cast_one,htop]; trivial + rw [hf (N+1) le_rfl] at hy + exact hy +end FilteredFiniteness.Data + +open CategoryTheory HomologicalComplex HomologicalComplex₂ +namespace E2Leading + +universe u +variable {R : Type u} [CommRing R] +open TotalProjection +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) + +lemma subsingleton_E₂ (p q : ℕ) [Subsingleton (ConcreteHomology.H (row K q) p)] : + Subsingleton ((filteredData K (p+q)).E₂ ((p:ℤ)+1)) := by + apply subsingleton_of_forall_eq 0 + intro y + obtain ⟨x,rfl⟩ := Submodule.mkQ_surjective _ y + exact (Submodule.Quotient.mk_eq_zero _).mpr + (lead_zero_boundary K p q x (Subsingleton.elim _ _)) + +lemma subsingleton_total_concrete (n : ℕ) + (hzero : ∀ p q, p+q=n → Subsingleton (ConcreteHomology.H (row K q) p)) : + Subsingleton (ConcreteHomology.H (K.total c) n) := by + change Subsingleton (filteredData K n).H + apply FilteredFiniteness.Data.subsingleton_H _ n (filtration_zero K n) (filtration_top K n) + intro p hp + have hn : p+(n-p)=n := Nat.add_sub_of_le hp + have := hzero p (n-p) hn + have h := subsingleton_E₂ K p (n-p) + rwa [hn] at h +end E2Leading + +namespace TotalFiniteness + +universe u +variable {R : Type u} [CommRing R] +variable (K : HomologicalComplex₂ (ModuleCat.{u} R) c c) +lemma subsingleton (n : ℕ) + (hzero : ∀ p q, p+q=n → Subsingleton ((row K q).homology p)) : + Subsingleton ((K.total c).homology n) := by + have : Subsingleton (ConcreteHomology.H (K.total c) n) := by + apply E2Leading.subsingleton_total_concrete K n + intro p q hpq + have := hzero p q hpq + exact (rowHomologyIso K p q).toLinearEquiv.symm.injective.subsingleton + exact (ConcreteHomology.iso (K.total c) n).toLinearEquiv.injective.subsingleton +end TotalFiniteness + +namespace EilenbergZilber +open DiagonalResolution ModelAssembly +variable (X : Dᵒᵖ ⥤ Type) +lemma subsingleton_diagonal (n : ℕ) + (hzero : ∀ p q, p+q=n → Subsingleton + ((TotalFiniteness.row (twoComplex X) q).homology p)) : + Subsingleton (SSet.homology (C:=A) (diag ⋙ X) Z n) := by + have := TotalFiniteness.subsingleton (twoComplex X) n hzero + exact (homologyIso X n).toLinearEquiv.injective.subsingleton +end EilenbergZilber + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalProjection.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ac2f6f1f92d17f611c132479ef77251d39179bc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalProjection.lean @@ -0,0 +1,281 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ModelAssembly + +namespace OAI + +section + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalProjection + +universe u v +variable {C : Type u} [Category.{v} C] [Preadditive C] [HasCoproducts.{0} C] +abbrev c := ComplexShape.down ℕ +variable (K : HomologicalComplex₂ C c c) + +noncomputable def projection (p q n : ℕ) : (K.total c).X n ⟶ (K.X p).X q := + K.totalDesc (fun i j _ => if hi : i=p then if hj : j=q then + eqToHom (by subst i; subst j; rfl) else 0 else 0) + +@[reassoc (attr := simp)] lemma inclusion_projection (p q n : ℕ) (h : p+q=n) : + K.ιTotal c p q n h ≫ projection K p q n = 𝟙 _ := by + simp [projection] + +@[reassoc] lemma inclusion_projection_of_ne (i j p q n : ℕ) (h : i+j=n) + (hne : (i,j) ≠ (p,q)) : + K.ιTotal c i j n h ≫ projection K p q n = 0 := by + simp only [projection,ι_totalDesc] + split_ifs with hi hj + · exact False.elim (hne (Prod.ext hi hj)) + all_goals rfl + +abbrev Index (n : ℕ) := ↥(Finset.HasAntidiagonal.antidiagonal n) +noncomputable abbrev inclusion (n : ℕ) (i : Index n) := + K.ιTotal c i.val.1 i.val.2 n (Finset.HasAntidiagonal.mem_antidiagonal.mp i.property) +noncomputable abbrev proj (n : ℕ) (i : Index n) := projection K i.val.1 i.val.2 n + +lemma sum_projection_inclusion (n : ℕ) : + (∑ i : Index n,proj K n i ≫ inclusion K n i) = 𝟙 _ := by + apply total.hom_ext + intro p q hpq + let j : Index n := ⟨(p,q),Finset.HasAntidiagonal.mem_antidiagonal.mpr hpq⟩ + rw [Preadditive.comp_sum] + rw [Finset.sum_eq_single j] + · change K.ιTotal c p q n hpq ≫ (proj K n j ≫ inclusion K n j) = _ + simp [j,←Category.assoc] + · intro i _ hij + rw [←Category.assoc,inclusion_projection_of_ne] + · simp + · exact fun h => hij (Subtype.ext h.symm) + · simp + +lemma hom_ext {A : C} {n : ℕ} {f g : A ⟶ (K.total c).X n} + (h : ∀ i : Index n,f ≫ proj K n i = g ≫ proj K n i) : f=g := by + rw [←Category.comp_id f,←Category.comp_id g,←sum_projection_inclusion K n] + simp only [Preadditive.comp_sum,←Category.assoc,h] + +@[reassoc] lemma D₁_projection (p q : ℕ) : + K.D₁ c (p+q+1) (p+q) ≫ projection K p q (p+q) = + projection K (p+1) q (p+q+1) ≫ (K.d (p+1) p).f q := by + apply total.hom_ext + intro i j hij + change i+j=p+q+1 at hij + cases i with + | zero => + have hj : j=p+q+1 := by omega + subst j + rw [←Category.assoc,TotalHomotopy.ι_d₁_zero,zero_comp, + inclusion_projection_of_ne_assoc K 0 (p+q+1) (p+1) q _ _ (by intro h; have := congrArg Prod.fst h; omega),zero_comp] + | succ i => + rw [←Category.assoc,TotalHomotopy.ι_d₁_succ i j (p+q) (by omega),Category.assoc] + by_cases hi : i=p + · subst i + have : j=q := by omega + subst j + simp + · rw [inclusion_projection_of_ne K i j p q _ _ (by intro h; exact hi (congrArg Prod.fst h)),comp_zero, + inclusion_projection_of_ne_assoc K (i+1) j (p+1) q _ _ (by intro h; have := congrArg Prod.fst h; omega),zero_comp] + +@[reassoc] lemma D₂_projection (p q : ℕ) : + K.D₂ c (p+q+1) (p+q) ≫ projection K p q (p+q) = + ((-1 : ℤˣ)^p) • (projection K p (q+1) (p+q+1) ≫ (K.X p).d (q+1) q) := by + apply total.hom_ext + intro i j hij + change i+j=p+q+1 at hij + cases j with + | zero => + have hi : i=p+q+1 := by omega + subst i + rw [←Category.assoc,TotalHomotopy.ι_d₂_zero,zero_comp,Linear.comp_units_smul,←Category.assoc, + inclusion_projection_of_ne K (p+q+1) 0 p (q+1) _ _ (by intro h; have := congrArg Prod.snd h; omega),zero_comp,smul_zero] + | succ j => + rw [←Category.assoc,TotalHomotopy.ι_d₂_succ i j (p+q) (by omega)] + simp only [Linear.units_smul_comp,Linear.comp_units_smul,Category.assoc] + by_cases hi : i=p + · subst i + have : j=q := by omega + subst j + simp + · rw [inclusion_projection_of_ne K i j p q _ _ (by intro h; exact hi (congrArg Prod.fst h)),comp_zero,smul_zero, + inclusion_projection_of_ne_assoc K i (j+1) p (q+1) _ _ (by intro h; exact hi (congrArg Prod.fst h)),zero_comp,smul_zero] + +@[reassoc] lemma d_projection (p q : ℕ) : + (K.total c).d (p+q+1) (p+q) ≫ projection K p q (p+q) = + projection K (p+1) q (p+q+1) ≫ (K.d (p+1) p).f q + + ((-1 : ℤˣ)^p) • (projection K p (q+1) (p+q+1) ≫ (K.X p).d (q+1) q) := by + change (K.D₁ _ _ _ + K.D₂ _ _ _) ≫ _ = _ + rw [Preadditive.add_comp,D₁_projection,D₂_projection] + +end TotalProjection + +end + +section + +namespace FilteredFiniteness + +universe u +variable {R : Type u} [CommRing R] +variable {A B C E : Type u} [AddCommGroup A] [Module R A] + [AddCommGroup B] [Module R B] [AddCommGroup C] [Module R C] + [AddCommGroup E] [Module R E] + +lemma finite_of_ker_le [IsNoetherianRing R] (f : A →ₗ[R] B) (g : A →ₗ[R] E) + (hf : Function.Surjective f) (hker : LinearMap.ker g ≤ LinearMap.ker f) + [Module.Finite R E] : Module.Finite R B := by + have : Module.Finite R (LinearMap.range g) := + Module.Finite.of_injective (LinearMap.range g).subtype Subtype.val_injective + have : Module.Finite R (A ⧸ LinearMap.ker g) := + Module.Finite.equiv g.quotKerEquivRange.symm + let φ := (LinearMap.ker g).liftQ f hker + exact Module.Finite.of_surjective φ (by + intro b + obtain ⟨a,rfl⟩ := hf b + exact ⟨(LinearMap.ker g).mkQ a,rfl⟩) + +structure Data where + d : A →ₗ[R] B + e : B →ₗ[R] C + de : e.comp d=0 + FA : ℤ → Submodule R A + FB : ℤ → Submodule R B + FC : ℤ → Submodule R C + monoB : Monotone FB + +namespace Data +variable (K : Data (R:=R) (A:=A) (B:=B) (C:=C)) + +def dCycles : A →ₗ[R] LinearMap.ker K.e := + K.d.codRestrict _ (fun x => by + change K.e (K.d x)=0 + exact congrArg (fun f : A →ₗ[R] C => f x) K.de) + +abbrev H := LinearMap.ker K.e ⧸ LinearMap.range K.dCycles + +def π : LinearMap.ker K.e →ₗ[R] K.H := (LinearMap.range K.dCycles).mkQ + +def cycles (p : ℤ) : Submodule R (LinearMap.ker K.e) := + (K.FB p).comap (LinearMap.ker K.e).subtype + +def πp (p : ℤ) : K.cycles p →ₗ[R] K.H := K.π.comp (K.cycles p).subtype + +def filtration (p : ℤ) : Submodule R K.H := LinearMap.range (K.πp p) + +lemma filtration_mono : Monotone K.filtration := by + intro p q hpq y hy + obtain ⟨x,rfl⟩ := hy + exact ⟨⟨x.val,K.monoB hpq x.property⟩,rfl⟩ + +def Z₂ (p : ℤ) : Submodule R B := K.FB p ⊓ (K.FC (p-2)).comap K.e + +def B₂ (p : ℤ) : Submodule R B := + (K.FB (p-1) ⊓ (K.FC (p-2)).comap K.e) ⊔ ((K.FA (p+1)).map K.d ⊓ K.FB p) + +lemma B₂_le_Z₂ (p : ℤ) : K.B₂ p ≤ K.Z₂ p := by + apply sup_le + · exact inf_le_inf (K.monoB (by omega)) le_rfl + · intro x hx + obtain ⟨y,hy,rfl⟩ := hx.1 + refine ⟨hx.2,?_⟩ + change K.e (K.d y) ∈ K.FC (p-2) + have he : K.e (K.d y)=0 := congrArg (fun f : A →ₗ[R] C => f y) K.de + rw [he] + exact (K.FC _).zero_mem + +abbrev E₂ (p : ℤ) := K.Z₂ p ⧸ (K.B₂ p).comap (K.Z₂ p).subtype + +def lead (p : ℤ) : K.cycles p →ₗ[R] K.E₂ p := + ((K.B₂ p).comap (K.Z₂ p).subtype).mkQ.comp + (((LinearMap.ker K.e).subtype.comp (K.cycles p).subtype).codRestrict _ (fun x => by + refine ⟨x.property,?_⟩ + change K.e x.val.val∈K.FC (p-2) + rw [x.val.property] + exact (K.FC _).zero_mem)) + +lemma lead_eq_zero {p : ℤ} (x : K.cycles p) : + K.lead p x=0 ↔ x.val.val∈K.B₂ p := by + exact Submodule.Quotient.mk_eq_zero ((K.B₂ p).comap (K.Z₂ p).subtype) + +lemma lower_of_lead_zero {p : ℤ} (x : K.cycles p) (hx : K.lead p x=0) : + K.πp p x∈K.filtration (p-1) := by + obtain ⟨y,hy,z,hz,hyz⟩ := Submodule.mem_sup.mp ((K.lead_eq_zero x).mp hx) + obtain ⟨a,ha,haz⟩ := hz.1 + have hza : K.e z=0 := by + rw [←haz] + exact congrArg (fun f : A →ₗ[R] C => f a) K.de + have hey : K.e y=0 := by + have he := congrArg K.e hyz + rw [map_add,hza,add_zero,x.val.property] at he + exact he + let y' : K.cycles (p-1) := ⟨⟨y,hey⟩,hy.1⟩ + refine ⟨y',?_⟩ + change K.π ⟨y,hey⟩=K.π x.val + apply (Submodule.Quotient.eq _).mpr + refine ⟨-a,?_⟩ + apply Subtype.ext + change K.d (-a)=y-x.val.val + rw [map_neg,haz,←hyz] + abel + +variable [IsNoetherianRing R] + +lemma finite_step (p : ℤ) [Module.Finite R (K.filtration (p-1))] + [Module.Finite R (K.E₂ p)] : Module.Finite R (K.filtration p) := by + let S : Submodule R (K.filtration p) := + (K.filtration (p-1)).submoduleOf (K.filtration p) + have : Module.Finite R S := Module.Finite.equiv + (Submodule.submoduleOfEquivOfLe (K.filtration_mono (by omega : p-1≤p))).symm + let f : K.cycles p →ₗ[R] (K.filtration p ⧸ S) := S.mkQ.comp (K.πp p).rangeRestrict + have hf : Function.Surjective f := (Submodule.mkQ_surjective S).comp + (by rintro ⟨y,x,rfl⟩; exact ⟨x,rfl⟩) + have hk : LinearMap.ker (K.lead p) ≤ LinearMap.ker f := by + intro x hx + change f x=0 + apply (Submodule.Quotient.mk_eq_zero S).mpr + exact K.lower_of_lead_zero x hx + have : Module.Finite R (K.filtration p ⧸ S) := finite_of_ker_le f (K.lead p) hf hk + exact Module.Finite.of_submodule_quotient S + +lemma finite_H (N : ℕ) (hzero : K.FB 0=⊥) (htop : K.FB (N+1)=⊤) + (hfinite : ∀ p : ℕ, p≤N → Module.Finite R (K.E₂ (p+1))) : Module.Finite R K.H := by + have hz : K.filtration 0=⊥ := by + apply le_antisymm _ bot_le + rintro y ⟨x,rfl⟩ + have hx : x=0 := by + apply Subtype.ext; apply Subtype.ext + exact (Submodule.mem_bot R).mp (hzero ▸ x.property) + rw [hx,map_zero] + exact Submodule.zero_mem _ + have hfg : ∀ p : ℕ, p≤N+1 → Module.Finite R (K.filtration p) := by + intro p hp + induction p with + | zero => rw [Nat.cast_zero,hz]; infer_instance + | succ p ih => + have := ih (by omega) + have := hfinite p (by omega) + have he : (p:ℤ)+1-1=(p:ℤ) := by omega + have : Module.Finite R (K.filtration ((p:ℤ)+1-1)) := by rw [he]; infer_instance + exact K.finite_step (p+1) + have hh : K.filtration (N+1)=⊤ := by + apply top_le_iff.mp + intro y _ + obtain ⟨z,rfl⟩ := Submodule.mkQ_surjective (LinearMap.range K.dCycles) y + exact ⟨⟨z,by change z.val∈K.FB (N+1); rw [htop]; trivial⟩,rfl⟩ + have := hfg (N+1) le_rfl + exact Module.Finite.of_surjective (K.filtration ((N+1:ℕ):ℤ)).subtype (by + intro x + refine ⟨⟨x,?_⟩,rfl⟩ + have he : ((N+1:ℕ):ℤ)=(N:ℤ)+1 := by omega + rw [he,hh] + trivial) + +end Data +end FilteredFiniteness + +end + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalSingle.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalSingle.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b6e6eeeda64477d218d174a5062ae3784ce7314 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TotalSingle.lean @@ -0,0 +1,210 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ModelAssembly +import OAI.GroupTheory.SimpleAmenable.Homology.BiResolution + +namespace OAI + +section + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalHomotopy + +universe u v +variable {C : Type u} [Category.{v} C] [Preadditive C] [HasZeroObject C] [HasCoproducts.{0} C] + +noncomputable def equiv {K L : HomologicalComplex₂ C c c} (e : HomotopyEquiv K L) : + HomotopyEquiv (K.total c) (L.total c) where + hom := HomologicalComplex₂.total.map e.hom c + inv := HomologicalComplex₂.total.map e.inv c + homotopyHomInvId := by simpa using total e.homotopyHomInvId + homotopyInvHomId := by simpa using total e.homotopyInvHomId + +noncomputable abbrev single (K : ChainComplex C ℕ) : HomologicalComplex₂ C c c := (ChainComplex.single₀ (ChainComplex C ℕ)).obj K + +noncomputable def singleIn (K : ChainComplex C ℕ) : K ⟶ (single K).total c where + f n := (single K).ιTotal c 0 n n (by simp) + comm' i j h := by + change j+1=i at h + subst i + exact ι_d_leftZero (K := single K) j + +noncomputable def singleOutF (K : ChainComplex C ℕ) (n : ℕ) : + ((single K).total c).X n ⟶ K.X n := + (single K).totalDesc (fun p q hpq => if hp : p=0 then by + subst p + have hq : q=n := by simpa using hpq + subst q + exact 𝟙 _ + else 0) +@[reassoc, simp] lemma singleIn_out (K : ChainComplex C ℕ) (n : ℕ) : + (singleIn K).f n ≫ singleOutF K n = 𝟙 _ := by + dsimp only [singleIn, singleOutF] + erw [ι_totalDesc] + simp +@[reassoc, simp] lemma singleOut_in (K : ChainComplex C ℕ) (n : ℕ) : + singleOutF K n ≫ (singleIn K).f n = 𝟙 _ := by + apply HomologicalComplex₂.total.hom_ext + intro p q hpq + simp only [←Category.assoc,singleOutF,ι_totalDesc] + split_ifs with hp + · subst p + have : q=n := by simpa using hpq + subst q + dsimp only [singleIn] + erw [Category.id_comp, Category.comp_id] + · have hz : IsZero (((single K).X p).X q) := by + exact ((eval C c q).map_isZero + (isZero_single_obj_X c 0 K p hp)) + exact hz.eq_of_src _ _ + +instance singleIn_isIso (K : ChainComplex C ℕ) : IsIso (singleIn K) := by + have (n : ℕ) : IsIso ((singleIn K).f n) := + ⟨⟨singleOutF K n, singleIn_out K n, singleOut_in K n⟩⟩ + exact HomologicalComplex.Hom.isIso_of_components (singleIn K) + +noncomputable def singleIso (K : ChainComplex C ℕ) : (single K).total c ≅ K := + (asIso (singleIn K)).symm + +end TotalHomotopy + +end + +section + +open CategoryTheory Limits SimplicialObject Simplicial Opposite AlgebraicTopology +open HomologicalComplex HomologicalComplex₂ +namespace BiResolution + +open DiagonalResolution SSet.Augmented.StandardSimplex +abbrev c := ComplexShape.down ℕ + +noncomputable def pointAugmentation (d : D) : point d ⟶ (SimplicialObject.const A).obj Z where + app q := Sigma.desc (fun _ : q.unop ⟶ d.2 => 𝟙 Z) + naturality q q' f := by apply Sigma.hom_ext; intro g; simp [point] + +noncomputable def pointAugmented (d : D) : SimplicialObject.Augmented A where + left := point d + right := Z + hom := pointAugmentation d + +noncomputable def pointExtra (d : D) : (pointAugmented d).ExtraDegeneracy where + s' := Sigma.ι (fun _ : ⦋0⦌ ⟶ d.2 => Z) (zeroSimplex d.2) + s n := Sigma.desc (fun f : ⦋n⦌ ⟶ d.2 => Sigma.ι (fun _ : ⦋n+1⦌ ⟶ d.2 => Z) (shift f)) + s'_comp_ε := by exact Sigma.ι_comp_desc _ _ + s₀_comp_δ₁ := by + apply Sigma.hom_ext + intro f + dsimp only [pointAugmented,pointAugmentation,SimplicialObject.δ,point] + simp only [Sigma.ι_comp_desc_assoc,Sigma.ι_comp_desc,Quiver.Hom.unop_op,shift_δ₁,Category.id_comp] + s_comp_δ₀ n := by + apply Sigma.hom_ext + intro f + dsimp only [pointAugmented,pointAugmentation,SimplicialObject.δ,point] + simp only [Sigma.ι_comp_desc_assoc,Sigma.ι_comp_desc,Quiver.Hom.unop_op,shift_δ₀,Category.comp_id] + s_comp_δ n i := by + apply Sigma.hom_ext + intro f + dsimp only [pointAugmented,pointAugmentation,SimplicialObject.δ,point] + simp only [Sigma.ι_comp_desc_assoc,Sigma.ι_comp_desc,Quiver.Hom.unop_op,shift_δ_succ] + s_comp_σ n i := by + apply Sigma.hom_ext + intro f + dsimp only [pointAugmented,pointAugmentation,SimplicialObject.σ,point] + simp only [Sigma.ι_comp_desc_assoc,Sigma.ι_comp_desc,Quiver.Hom.unop_op,shift_σ_succ] + +noncomputable def complexAt (d : D) : HomologicalComplex₂ A c c := + AlternatingFaceMapComplex.obj (chainsAt d ⋙ alternatingFaceMapComplex A) + +noncomputable def complexAtIso (d : D) : + (((alternatingFaceMapComplex A).mapHomologicalComplex c).obj + (AlternatingFaceMapComplex.obj (chainsAt d))) ≅ complexAt d := + eqToIso (congrArg (fun F => F.obj (chainsAt d)) + (map_alternatingFaceMapComplex (alternatingFaceMapComplex A))) + +noncomputable def complexAtEquiv (d : D) : HomotopyEquiv (complexAt d) + (TotalHomotopy.single (AlternatingFaceMapComplex.obj (point d))) := + (HomotopyEquiv.ofIso (complexAtIso d).symm).trans + (((alternatingFaceMapComplex A).mapHomotopyEquiv (extra d).homotopyEquiv).trans + (HomotopyEquiv.ofIso ((HomologicalComplex.singleMapHomologicalComplex + (alternatingFaceMapComplex A) c 0).app (point d)))) + +noncomputable def totalAtEquiv (d : D) : HomotopyEquiv ((complexAt d).total c) + ((ChainComplex.single₀ A).obj Z) := + (TotalHomotopy.equiv (complexAtEquiv d)).trans + ((HomotopyEquiv.ofIso (TotalHomotopy.singleIso _)).trans (pointExtra d).homotopyEquiv) + +end BiResolution + +end + +open CategoryTheory Limits HomologicalComplex HomologicalComplex₂ +namespace TotalFunctor + +universe u v u' v' +variable {C : Type u} [Category.{v} C] [Preadditive C] [HasCoproducts.{0} C] + {E : Type u'} [Category.{v'} E] [Preadditive E] [HasCoproducts.{0} E] +open TotalHomotopy +variable (F : C ⥤ E) [F.Additive] +noncomputable abbrev map₂ (K : HomologicalComplex₂ C c c) : HomologicalComplex₂ E c c := + ((F.mapHomologicalComplex c).mapHomologicalComplex c).obj K + +noncomputable def comparisonF (K : HomologicalComplex₂ C c c) (n : ℕ) : + ((map₂ F K).total c).X n ⟶ F.obj ((K.total c).X n) := + (map₂ F K).totalDesc (fun p q hpq => F.map (K.ιTotal c p q n hpq)) + +@[reassoc (attr := simp)] lemma ι_comparisonF (K : HomologicalComplex₂ C c c) + (p q n : ℕ) (hpq : p+q=n) : + (map₂ F K).ιTotal c p q n hpq ≫ comparisonF F K n = F.map (K.ιTotal c p q n hpq) := by + apply ι_totalDesc + +noncomputable def comparison (K : HomologicalComplex₂ C c c) : + (map₂ F K).total c ⟶ (F.mapHomologicalComplex c).obj (K.total c) where + f := comparisonF F K + comm' i j h := by + change j+1=i at h + subst i + apply total.hom_ext + intro p q hpq + change p+q=j+1 at hpq + cases p with + | zero => + have hq : q=j+1 := by omega + subst q + simp only [←Category.assoc,Functor.mapHomologicalComplex_obj_d] + rw [ι_comparisonF,←F.map_comp,ι_d_leftZero,ι_d_leftZero, + F.map_comp,Category.assoc,ι_comparisonF] + rfl + | succ p => + cases q with + | zero => + have hp : p=j := by omega + subst p + simp only [←Category.assoc,Functor.mapHomologicalComplex_obj_d] + rw [ι_comparisonF,←F.map_comp,ι_d_rightZero,ι_d_rightZero, + F.map_comp,Category.assoc,ι_comparisonF] + rfl + | succ q => + have h : p+q+1=j := by omega + simp only [←Category.assoc,Functor.mapHomologicalComplex_obj_d] + rw [ι_comparisonF,←F.map_comp,ι_d_both p q j h,ι_d_both p q j h] + simp only [F.map_add,F.map_units_smul,F.map_comp,Preadditive.add_comp, + Linear.units_smul_comp,Category.assoc,ι_comparisonF] + rfl + +instance comparisonF_isIso [PreservesColimitsOfSize.{0,0} F] + (K : HomologicalComplex₂ C c c) (n : ℕ) : IsIso (comparisonF F K n) := by + change IsIso (sigmaComparison F (fun ij : {ij : ℕ×ℕ // ij.1+ij.2=n} => (K.X ij.1.1).X ij.1.2)) + infer_instance + +instance comparison_isIso [PreservesColimitsOfSize.{0,0} F] + (K : HomologicalComplex₂ C c c) : IsIso (comparison F K) := by + have (n : ℕ) : IsIso ((comparison F K).f n) := comparisonF_isIso F K n + exact HomologicalComplex.Hom.isIso_of_components _ + +noncomputable def iso [PreservesColimitsOfSize.{0,0} F] (K : HomologicalComplex₂ C c c) : + (F.mapHomologicalComplex c).obj (K.total c) ≅ (map₂ F K).total c := + (asIso (comparison F K)).symm + +end TotalFunctor + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TrajectoryDifferential.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TrajectoryDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..658eeb67da4254a6b91b55c81077c058ff48c63d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TrajectoryDifferential.lean @@ -0,0 +1,86 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.Supplemental +import OAI.GroupTheory.SimpleAmenable.Configurations.TrajectoryCoordinates + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory AlgebraicTopology +open scoped BigOperators TensorProduct +namespace SimpleAmenable.PolygonObject.LabelledStage +open Labelled IntervalBar.Diagram FreeChains + +attribute [local instance 1200] Rep.hV2 Representation.instModuleAsModule TensorProduct.instModule +variable {a n : ℕ} {K : Type} [AddCommGroup K] +noncomputable def coefficientDifferential (a n : ℕ) (K : Type) [AddCommGroup K] : + Coefficients a (n+1) K →ₗ[ℤ] Coefficients a n K := + ∑ i : Fin (n+2), (-1:ℤ)^(i:ℕ) • reindexCoefficients (a:=a) (K:=K) (faceFunctor i) +lemma chainCoordinates_d : + (chainCoordinates a n K).toLinearMap.comp (coefficientDifferential a n K) = + (groupHomology.inhomogeneousChains.d (SquareStep.coefficientRep a K) n).hom.comp + (chainCoordinates a (n+1) K).toLinearMap := by + classical + apply Finsupp.lhom_ext' + intro l + apply LinearMap.ext + intro v + change chainCoordinates a n K (coefficientDifferential a n K (Finsupp.single l v)) = + groupHomology.inhomogeneousChains.d (SquareStep.coefficientRep a K) n + (chainCoordinates a (n+1) K (Finsupp.single l v)) + simp only [coefficientDifferential,LinearMap.sum_apply,LinearMap.smul_apply, + map_sum,map_smul,chainCoordinates_single] + rw [Fin.sum_univ_succ] + simp only [Fin.val_zero,pow_zero,chainCoordinates_zero_face,Fin.val_succ, + chainCoordinates_succ_face] + erw [one_smul] + exact (groupHomology.inhomogeneousChains.d_single (A:=SquareStep.coefficientRep a K) + n (signedLabelEquiv (n+1) l) ((BooleanStep.tensorEquiv (a:=a) (K:=K)).symm v)).symm +noncomputable def trajectoryRep (a j : ℕ) := + @SquareStep.coefficientRep a (Stage.K j) inferInstance (AddCommGroup.toIntModule _) +noncomputable def trajectoryRow (a j : ℕ) : SimplicialObject (ModuleCat ℤ) := + RestrictedNerve.stringBarRows (positionalProperty a) ⋙ SSet.homologyFunctor Z j +noncomputable def rowCoordinateIso (a n j : ℕ) (hj : 0 rowCoordinateIso a n j hj hj5) ?_ + rintro n m rfl + symm + change _ ≫ (stringCoefficientIso a m j hj hj5).hom ≫ + ModuleCat.ofHom (chainCoordinates a m (Stage.K j)).toLinearMap = + ((stringCoefficientIso a (m+1) j hj hj5).hom ≫ + ModuleCat.ofHom (chainCoordinates a (m+1) (Stage.K j)).toLinearMap) ≫ _ + erw [←Category.assoc,trajectoryRow_d,Category.assoc,groupHomology.inhomogeneousChains.d_def] + apply ModuleCat.hom_ext + exact congrArg + (fun linear => LinearMap.comp linear (stringCoefficientIso a (m+1) j hj hj5).hom.hom) + (chainCoordinates_d (a:=a) (n:=m) (K:=Stage.K j)) +end SimpleAmenable.PolygonObject.LabelledStage + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TrajectoryTensor.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TrajectoryTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..35b3e999ea9bc467032a2ad54a9c964d4449b68e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TrajectoryTensor.lean @@ -0,0 +1,47 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.TorusCoefficientFinite +import OAI.GroupTheory.SimpleAmenable.Homology.TranslationCoefficients + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory +open scoped TensorProduct +namespace SimpleAmenable.PolygonObject.LabelledStage + +variable {a : ℕ} {K : Type} [AddCommGroup K] +lemma tensorEquiv_translation (u : CutRing × CutRing) (v : SquareStep a ⊗[ℤ] K) : + (BooleanStep.tensorEquiv (a:=a) (K:=K)) + ((SquareStep.coefficientRep a K).ρ (SquareStep.orbitProjection (Multiplicative.ofAdd u)) v) = + stepTranslate (K:=K) u ((BooleanStep.tensorEquiv (a:=a) (K:=K)) v) := by + induction v using TensorProduct.inductionOn with + | add left right left_eq right_eq => + let action : (SquareStep a ⊗[ℤ] K) →ₗ[ℤ] (SquareStep a ⊗[ℤ] K) := + (SquareStep.coefficientRep a K).ρ (SquareStep.orbitProjection (Multiplicative.ofAdd u)) + change BooleanStep.tensorEquiv (a:=a) (K:=K) (action (left + right)) = _ + change BooleanStep.tensorEquiv (a:=a) (K:=K) (action left) = _ at left_eq + change BooleanStep.tensorEquiv (a:=a) (K:=K) (action right) = _ at right_eq + simp only [map_add,left_eq,right_eq] + | tmul f k => + change (BooleanStep.tensorMap (a:=a) (K:=K)) + (SquareStep.orbitRepresentation a (SquareStep.orbitProjection (Multiplicative.ofAdd u)) f ⊗ₜ[ℤ] k) = _ + rw [←SquareStep.representation_reduce] + apply Subtype.ext + funext p + rfl +lemma tensorEquiv_symm_translation (u : CutRing × CutRing) (v : BooleanStep a K) : + (BooleanStep.tensorEquiv (a:=a) (K:=K)).symm (stepTranslate (K:=K) u v) = + (SquareStep.coefficientRep a K).ρ (SquareStep.orbitProjection (Multiplicative.ofAdd u)) + ((BooleanStep.tensorEquiv (a:=a) (K:=K)).symm v) := by + apply (BooleanStep.tensorEquiv (a:=a) (K:=K)).injective + rw [LinearEquiv.apply_symm_apply,tensorEquiv_translation,LinearEquiv.apply_symm_apply] +@[simp] lemma stepTranslate_zero (v : BooleanStep a K) : stepTranslate (K:=K) 0 v=v := by + apply Subtype.ext + funext p + change v.val (SimpleAmenable.translate a (-0) p)=v.val p + simp +end SimpleAmenable.PolygonObject.LabelledStage + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TransitiveCanonical.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TransitiveCanonical.lean new file mode 100644 index 0000000000000000000000000000000000000000..41a385fb8fbbb69136187066c5fde674571a44f0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TransitiveCanonical.lean @@ -0,0 +1,122 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.TransitiveInduction +import OAI.GroupTheory.SimpleAmenable.Simplicial.ConjugationNatural + +namespace OAI + +open CategoryTheory CategoryTheory.Limits Representation Rep Finsupp +namespace SimpleAmenable.TransitiveInduction +variable {G X Y : Type} [Group G] [MulAction G X] [MulAction G Y] + +lemma pointMap_factorization (x : X) (ht : ∀y : X, ∃g : G, g • x=y) : + pointMap (G:=G) x = + CanonicalShapiro.indUnit (MulAction.stabilizer G x).subtype + (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) ≫ + (Rep.resFunctor.{0,0,0,0} (MulAction.stabilizer G x).subtype).map (iso x ht).hom := by + apply Rep.hom_ext + apply Representation.IntertwiningMap.ext + apply LinearMap.ext + intro z + change Finsupp.single x z = + toPermutation x ((CanonicalShapiro.indUnit _ _).hom z) + rw [CanonicalShapiro.indUnit_apply, toPermutation_mk] + simp +lemma isIso_map_pointMap (x : X) (ht : ∀y : X, ∃g : G, g • x=y) (q : ℕ) : + IsIso (groupHomology.map (MulAction.stabilizer G x).subtype (pointMap x) q) := by + rw [pointMap_factorization x ht] + have hn : groupHomology.map (MulAction.stabilizer G x).subtype + (CanonicalShapiro.indUnit _ (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) ≫ + (Rep.resFunctor.{0,0,0,0} (MulAction.stabilizer G x).subtype).map (iso x ht).hom) q = + groupHomology.map (MulAction.stabilizer G x).subtype + (CanonicalShapiro.indUnit _ (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ)) q ≫ + (groupHomology.functor ℤ G q).map (iso x ht).hom := + groupHomology.map_comp (C:=Rep.of (permutationRep (G:=G) (X:=X))) + (MulAction.stabilizer G x).subtype (MonoidHom.id G) + (CanonicalShapiro.indUnit _ (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ)) + (iso x ht).hom q + rw [hn] + have first := CanonicalShapiro.isIso_map_indUnit (MulAction.stabilizer G x) + (Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) q + have second : IsIso ((groupHomology.functor ℤ G q).map (iso x ht).hom) := inferInstance + have composite := IsIso.comp_isIso' first second + exact composite + +noncomputable def equivariantMap (f : X → Y) (hf : ∀g : G,∀x,f (g • x)=g • f x) : + Rep.of (permutationRep (G:=G) (X:=X)) ⟶ + Rep.of (permutationRep (G:=G) (X:=Y)) := + Rep.ofHom ⟨Finsupp.lmapDomain ℤ ℤ f, by + intro g + apply Finsupp.lhom_ext + intro x z + simp [permutationRep, hf]⟩ + +@[simp] lemma equivariantMap_single (f : X → Y) (hf : ∀g : G,∀x,f (g • x)=g • f x) + (x : X) (z : ℤ) : (equivariantMap f hf).hom (Finsupp.single x z) = + Finsupp.single (f x) z := by + simp [equivariantMap] + +def stabilizerMap (f : X → Y) (hf : ∀g : G,∀x,f (g • x)=g • f x) (x : X) : + MulAction.stabilizer G x →* MulAction.stabilizer G (f x) := + (MulAction.stabilizer G x).inclusion (by + intro g hg + change g • f x=f x + rw [← hf, hg]) + +noncomputable def trivialMap {K L : Type} [Group K] [Group L] (f : K →* L) : + Rep.trivial ℤ K ℤ ⟶ Rep.res f (Rep.trivial ℤ L ℤ) := + Rep.ofHom ⟨LinearMap.id, fun _ => rfl⟩ +lemma pointMap_natural (f : X → Y) (hf : ∀g : G,∀x,f (g • x)=g • f x) (x : X) (q : ℕ) : + groupHomology.map (MulAction.stabilizer G x).subtype (pointMap x) q ≫ + (groupHomology.functor ℤ G q).map (equivariantMap f hf) = + groupHomology.map (A:=Rep.trivial ℤ (MulAction.stabilizer G x) ℤ) (B:=Rep.trivial ℤ (MulAction.stabilizer G (f x)) ℤ) (stabilizerMap f hf x) (trivialMap (stabilizerMap f hf x)) q ≫ + groupHomology.map (MulAction.stabilizer G (f x)).subtype (pointMap (f x)) q := by + rw [groupHomology.functor_map] + erw [← groupHomology.map_comp, ← groupHomology.map_comp] + apply groupHomology.map_congr + · rfl + · apply LinearMap.ext + intro z + change (equivariantMap f hf).hom (Finsupp.single x z) = Finsupp.single (f x) z + exact equivariantMap_single f hf x z + +lemma isIso_map_trivial_H0 {K L : Type} [Group K] [Group L] (f : K →* L) : + IsIso (groupHomology.map f (trivialMap f) 0) := by + have he : (groupHomology.H0IsoOfIsTrivial (Rep.trivial ℤ K ℤ)).inv ≫ + groupHomology.map f (trivialMap f) 0 = + (groupHomology.H0IsoOfIsTrivial (Rep.trivial ℤ L ℤ)).inv := by + rw [groupHomology.H0IsoOfIsTrivial_inv_eq_π, + groupHomology.H0π_comp_map, groupHomology.H0IsoOfIsTrivial_inv_eq_π] + change 𝟙 _ ≫ _ = _ + exact Category.id_comp _ + exact IsIso.of_isIso_fac_left he +lemma map_equivariant_eq_of_centralizer + (f₀ f₁ : X → Y) (h₀ : ∀g : G,∀x,f₀ (g • x)=g • f₀ x) + (h₁ : ∀g : G,∀x,f₁ (g • x)=g • f₁ x) + (x : X) (ht : ∀y : X, ∃g : G,g • x=y) (c : G) + (hc : ∀h : MulAction.stabilizer G x,c*h.val=h.val*c) + (hx : c • f₀ x=f₁ x) (q : ℕ) : + (groupHomology.functor ℤ G q).map (equivariantMap f₁ h₁) = + (groupHomology.functor ℤ G q).map (equivariantMap f₀ h₀) := by + let := isIso_map_pointMap x ht q + apply (cancel_epi (groupHomology.map (MulAction.stabilizer G x).subtype (pointMap x) q)).1 + rw [groupHomology.functor_map, groupHomology.functor_map] + erw [← groupHomology.map_comp, ← groupHomology.map_comp] + apply HomologyConjugation.map_eq_of_centralizer _ _ _ c hc + intro z + change (equivariantMap f₁ h₁).hom (Finsupp.single x z) = + permutationRep c ((equivariantMap f₀ h₀).hom (Finsupp.single x z)) + rw [equivariantMap_single, equivariantMap_single, permutationRep_single, hx] +lemma isIso_map_equivariant_H0 (f : X → Y) (hf : ∀g : G,∀x,f (g • x)=g • f x) + (x : X) (htx : ∀y:X,∃g:G,g • x=y) + (hty : ∀y:Y,∃g:G,g • f x=y) : + IsIso ((groupHomology.functor ℤ G 0).map (equivariantMap f hf)) := by + have sourceIso := isIso_map_pointMap x htx 0 + have targetIso := isIso_map_pointMap (f x) hty 0 + have trivialIso := isIso_map_trivial_H0 (stabilizerMap f hf x) + have composite := IsIso.comp_isIso' trivialIso targetIso + exact @IsIso.of_isIso_fac_left _ _ _ _ _ _ _ _ sourceIso composite + (pointMap_natural f hf x 0) + +end SimpleAmenable.TransitiveInduction + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TranslationCoefficientAction.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TranslationCoefficientAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..07560c93a06d03f3256506ea0b14b7fe43ec33af --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TranslationCoefficientAction.lean @@ -0,0 +1,117 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.Coefficient +import OAI.GroupTheory.SimpleAmenable.Simplicial.CoefficientNaturality + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite +namespace RegularTranslation + +variable {P:Type} [CommMonoid P] +abbrev C := ActionCategory P P +lemma eqToHom_val {x y:C (P:=P)} (h:x=y) : (eqToHom h).hom=(1:P) := by subst y; rfl +noncomputable def shift (p:P) : C (P:=P) ⥤ C (P:=P) where + obj x := (p*x.back:P) + map f := ⟨f.hom,by change f.hom*(p*_)=_; rw [mul_left_comm]; exact congrArg (p*·) f.map_val⟩ + map_id _ := rfl + map_comp _ _ := rfl +lemma shift_one : shift (1:P)=𝟭 (C (P:=P)) := by + apply CategoryTheory.Functor.ext + · intro x y f; apply Functor.Elements.hom_ext + simp only [ActionCategory.comp_hom,eqToHom_val,one_mul,mul_one]; rfl + · intro x; apply (ActionCategory.objEquiv P P).symm.injective; exact one_mul _ +lemma shift_mul (p q:P) : shift (p*q)=shift p ⋙ shift q := by + apply CategoryTheory.Functor.ext + · intro x y f; apply Functor.Elements.hom_ext + simp only [ActionCategory.comp_hom,eqToHom_val,one_mul,mul_one]; rfl + · intro x; apply (ActionCategory.objEquiv P P).symm.injective + change (p*q)*x.back=q*(p*x.back) + simp only [mul_assoc,mul_left_comm] +noncomputable def forward (p:P) : 𝟭 (C (P:=P)) ⟶ shift p where + app x := ⟨p,rfl⟩ + naturality x y f := by apply Functor.Elements.hom_ext; exact mul_comm _ _ +end RegularTranslation +namespace RegularCoefficient +open CoefficientNerve RegularTranslation + +private lemma comp_step {V : Type*} [Category V] {A B C D E : V} + {i : A ⟶ B} {f : B ⟶ C} {g : C ⟶ D} {a : A ⟶ E} + {j : E ⟶ C} {k : E ⟶ D} + (hf : i ≫ f = a ≫ j) (hg : j ≫ g = k) : i ≫ f ≫ g = a ≫ k := by + rw [← Category.assoc, hf, Category.assoc, hg] + +private lemma comp_pair {V : Type*} [Category V] {A B C D E F : V} + {i : A ⟶ B} {f : B ⟶ C} {g : C ⟶ D} {a : A ⟶ E} + {j : E ⟶ C} {b : E ⟶ F} {k : F ⟶ D} + (h₁ : i ≫ f = a ≫ j) (h₂ : j ≫ g = b ≫ k) : + i ≫ f ≫ g = (a ≫ b) ≫ k := by + rw [← Category.assoc, h₁, Category.assoc, h₂, ← Category.assoc] + +variable {P:Type} [CommMonoid P] {R:Type} [CommRing R] +variable (F:ActionCategory P P ⥤ ModuleCat.{0} R) +noncomputable def action (p:P) : simplicial F ⟶ simplicial F := + mapNat (Functor.whiskerRight (forward p) F) ≫ post (shift p) F +@[reassoc] lemma single_action (p:P) {n:ℕ} (s:Simplex (ActionCategory P P) n) : + single F s ≫ (action F p).app (op ⦋n⦌)=F.map ((forward p).app s.right.unop) ≫ single F (s ⋙ (shift p).op) := by + simp only [action,NatTrans.comp_app] + exact comp_step (single_mapNat (Functor.whiskerRight (forward p) F) s) + (single_post (shift p) F n s) +lemma action_one : action F (1:P)=𝟙 _ := by + apply NatTrans.ext; funext n + apply hom_ext; intro s + change single F s ≫ (action F 1).app (op ⦋n.unop.len⦌)=single F s ≫ 𝟙 _ + rw [single_action,Category.comp_id] + conv_rhs => rw [←Category.id_comp (single F s),←F.map_id s.right.unop] + apply weighted_eq F (by rw [shift_one]; rfl) + apply Functor.Elements.hom_ext + simp only [ActionCategory.comp_hom,eqToHom_val,one_mul] + rfl +lemma action_mul (p q:P) : action F (p*q)=action F p ≫ action F q := by + apply NatTrans.ext; funext n + apply hom_ext; intro s + change single F s ≫ (action F (p*q)).app (op ⦋n.unop.len⦌)= + single F s ≫ (action F p).app (op ⦋n.unop.len⦌) ≫ (action F q).app (op ⦋n.unop.len⦌) + have hc := comp_pair (single_action F p s) (single_action F q (s ⋙ (shift p).op)) + refine (single_action F (p*q) s).trans (Eq.trans ?_ hc.symm) + rw [← F.map_comp] + apply weighted_eq F (by rw [shift_mul]; rfl) + apply Functor.Elements.hom_ext + simp only [ActionCategory.comp_hom,eqToHom_val,one_mul] + exact mul_comm p q +noncomputable def representation : SingleObj P ⥤ SimplicialObject (ModuleCat.{0} R) where + obj _ := simplicial F + map p := action F p + map_id _ := action_one F + map_comp p q := by change action F (q*p)=_; rw [mul_comm q p]; exact action_mul F p q +end RegularCoefficient + +end + +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits Simplicial Opposite HomologicalComplex AlgebraicTopology +namespace ChainComplex +open scoped _root_.ChainComplex + +variable {R:Type} [CommRing R] {K L:ChainComplex (ModuleCat.{0} R) ℕ} +@[reassoc] lemma zeroπ_natural (f:K⟶L) : f.f 0 ≫ zeroπ L=zeroπ K ≫ homologyMap f 0 := by + simp only [zeroπ,Category.assoc,_root_.ChainComplex.isoHomologyι₀_inv_naturality,HomologicalComplex.p_opcyclesMap_assoc] +end ChainComplex +namespace RegularCoefficient +open CoefficientNerve RegularTranslation + +variable {P:Type} [CommMonoid P] (F:ActionCategory P P ⥤ ModuleCat.{0} ℤ) +lemma zeroι_action (p:P) (x:ActionCategory P P) : + zeroι F x ≫ homologyMap ((alternatingFaceMapComplex _).map (action F p)) 0=zeroι F x := by + dsimp only [zeroι] + erw [Category.assoc,←ChainComplex.zeroπ_natural,←Category.assoc] + change (single F (ComposableArrows.mk₀ (op x)) ≫ (action F p).app (op ⦋0⦌)) ≫ _ = _ + erw [single_action,Category.assoc] + exact zeroι_naturality F ((forward p).app x) +lemma homology_action_zero (p:P) : + homologyMap ((alternatingFaceMapComplex _).map (action F p)) 0=𝟙 _ := by + apply (zeroIsColimit F).hom_ext + intro x + exact (zeroι_action F p x).trans (Category.comp_id _).symm +end RegularCoefficient + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/TranslationCoefficients.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TranslationCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2c70f59c1987141acb364e5e8dcc997a5fd7421 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/TranslationCoefficients.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.PointFiberHomology +import OAI.GroupTheory.SimpleAmenable.Configurations.TranslationFiber +import OAI.GroupTheory.SimpleAmenable.Simplicial.TranslationFiberMonoidal + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Classical +namespace SimpleAmenable.PolygonObject.LabelledStage + +variable {a n : ℕ} {K : Type} [AddCommGroup K] +noncomputable def stepTranslate (u : CutRing × CutRing) : BooleanStep a K →ₗ[ℤ] BooleanStep a K where + toFun f := ⟨fun p => f.val (SimpleAmenable.translate a (-u) p), + squareArrangement_translate f.property (-u)⟩ + map_add' _ _ := rfl + map_smul' _ _ := rfl +@[simp] lemma stepTranslate_apply (u : CutRing × CutRing) (f : BooleanStep a K) (p : GenericSquare a) : + (stepTranslate (K:=K) u f).val p = f.val (SimpleAmenable.translate a (-u) p) := rfl +variable (d : (Fin n → CutRing × CutRing) → CutRing × CutRing) +noncomputable def translateCoefficients : Coefficients a n K →ₗ[ℤ] Coefficients a n K := + Finsupp.lsum ℤ (fun l : ReducedLabel n => (Finsupp.lsingle l).comp (stepTranslate (d l.val))) +@[simp] lemma translateCoefficients_single (l : ReducedLabel n) (s : BooleanStep a K) : + translateCoefficients (K:=K) d (Finsupp.single l s)= + Finsupp.single l (stepTranslate (K:=K) (d l.val) s) := Finsupp.lsum_single _ _ _ _ +lemma translateCoefficients_at (f : Coefficients a n K) (l : ReducedLabel n) : + translateCoefficients (K:=K) d f l=stepTranslate (K:=K) (d l.val) (f l) := by + induction f using Finsupp.induction with + | zero => simp + | single_add k s f hk hs ih => + simp only [map_add,Finsupp.add_apply,ih] + congr 1 + rw [translateCoefficients_single] + by_cases h:k=l + · subst l; simp only [Finsupp.single_eq_same] + · simp only [Finsupp.single_eq_of_ne (Ne.symm h),map_zero] +end SimpleAmenable.PolygonObject.LabelledStage + +end + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Classical +namespace SimpleAmenable.PolygonObject.LabelledStage.Stage +open IntervalBar.Diagram BarFinitePower FreeChains Labelled + +variable {a n : ℕ} +variable (d : (Fin n → CutRing × CutRing) → CutRing × CutRing) +lemma translation_evaluation_homology (j : ℕ) + (c : GenericSquare a × (Fin n → CutRing × CutRing)) : + SSet.homologyMap (bar₃Map (translateFunctor d ⋙ PointFiber.evaluation ⋙ project _ c)) Z j = + SSet.homologyMap (bar₃Map (PointFiber.evaluation ⋙ project _ (SimpleAmenable.translate a (-d c.2) c.1,c.2))) Z j := + (bar₃Map_eq_of_monoidalNatTrans (PointFiber.translationEvaluationIso d c).hom j).symm +lemma homologyCoefficientIso_translate_point (j : ℕ) (hj : 0 k x) + (homologyCoefficientIso_translate_point d j hj hj5 (p,l)) + change _ = (translateCoefficients (a:=a) (K:=K j) d ((homologyCoefficientIso j hj hj5).hom x) l).val p + rw [translateCoefficients_at,stepTranslate_apply] + exact h +end SimpleAmenable.PolygonObject.LabelledStage.Stage + +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/UniformConcurrentMesh.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/UniformConcurrentMesh.lean new file mode 100644 index 0000000000000000000000000000000000000000..461d656f2d710789cc2dbce965a1b76661cb855f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/UniformConcurrentMesh.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.WindowRectangles + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section UniformConcurrentMesh + +noncomputable def lineIntersectionCoefficient (a : ℕ) (i j : Fin 4) : ℝ := + ((|ordinary (lineNormal a i).1|+|ordinary (lineNormal a i).2|+ + |ordinary (lineNormal a j).1|+|ordinary (lineNormal a j).2|)/ + |ordinary (lineDet a i j)|)* + max (|ordinary (lineNormal a i).1|+|ordinary (lineNormal a i).2|) + (|ordinary (lineNormal a j).1|+|ordinary (lineNormal a j).2|) + +noncomputable def lineIntersectionConstant (a : ℕ) : ℝ := + 1+∑ i : Fin 4, ∑ j : Fin 4, lineIntersectionCoefficient a i j + +theorem lineIntersectionCoefficient_nonneg (a : ℕ) (i j : Fin 4) : + 0≤lineIntersectionCoefficient a i j := by + unfold lineIntersectionCoefficient + positivity + +theorem lineIntersectionConstant_ge_one (a : ℕ) : 1≤lineIntersectionConstant a := by + unfold lineIntersectionConstant + have h : 0≤∑ i : Fin 4, ∑ j : Fin 4, lineIntersectionCoefficient a i j := + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => lineIntersectionCoefficient_nonneg a i j)) + linarith + +theorem lineIntersectionCoefficient_le (a : ℕ) (i j : Fin 4) : + lineIntersectionCoefficient a i j≤lineIntersectionConstant a := by + have h₁ := Finset.single_le_sum (fun k (_ : k ∈ (Finset.univ : Finset (Fin 4))) => + lineIntersectionCoefficient_nonneg a i k) (Finset.mem_univ j) + have h₂ := Finset.single_le_sum (fun k (_ : k ∈ (Finset.univ : Finset (Fin 4))) => + Finset.sum_nonneg (fun l (_ : l ∈ (Finset.univ : Finset (Fin 4))) => + lineIntersectionCoefficient_nonneg a k l)) (Finset.mem_univ i) + unfold lineIntersectionConstant + linarith + +theorem exists_uniform_concurrent_mesh (a : ℕ) (r : CutRing) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ, 201≤n ∧ symmetricWindowLength r≤n ∧ + 200/(n:ℝ)<ε ∧ + ∀ i j : Fin 4, lineIntersectionCoefficient a i j*(200/(n:ℝ))<ε := by + obtain ⟨N,hN⟩ := exists_nat_gt (200*lineIntersectionConstant a/ε) + let n := max 201 (max N (symmetricWindowLength r)) + have hn : 201≤n := le_max_left _ _ + have hNN : N≤n := (le_max_left _ _).trans (le_max_right _ _) + have hn' : 0<(n:ℝ) := by exact_mod_cast (show 0 hP c⟩ + map f := ⟨(Functor.const (Fin (n+1))).map f⟩ + map_id _ := rfl + map_comp _ _ := rfl + +noncomputable def comparison (P : Subgroupoid C) + (hP : ∀c, (𝟙 c)∈P.arrows c c) (n : ℕ) : + evaluation P n ⋙ constant P hP n ≅ 𝟭 (Object P n) := by + refine NatIso.ofComponents (fun F => ?_) ?_ + · + refine ⟨⟨{ app := fun i => F.obj.map (homOfLE (Fin.zero_le i)) + naturality := ?_ }⟩, + ⟨{ app := fun i => Groupoid.inv (F.obj.map (homOfLE (Fin.zero_le i))) + naturality := ?_ }⟩,?_,?_⟩ + · intro i j f + change (𝟙 (F.obj.obj 0)) ≫ F.obj.map (homOfLE (Fin.zero_le j)) = + F.obj.map (homOfLE (Fin.zero_le i)) ≫ F.obj.map f + rw [Category.id_comp,←F.obj.map_comp] + congr 1 + · intro i j f + change F.obj.map f ≫ Groupoid.inv (F.obj.map (homOfLE (Fin.zero_le j))) = + Groupoid.inv (F.obj.map (homOfLE (Fin.zero_le i))) ≫ 𝟙 (F.obj.obj 0) + rw [Category.comp_id] + apply (cancel_mono (F.obj.map (homOfLE (Fin.zero_le j)))).mp + simp only [Category.assoc,Groupoid.inv_comp,Category.comp_id] + have he : F.obj.map (homOfLE (Fin.zero_le j))= + F.obj.map (homOfLE (Fin.zero_le i)) ≫ F.obj.map f := by + rw [←F.obj.map_comp]; congr 1 + rw [he,←Category.assoc,Groupoid.inv_comp,Category.id_comp] + · apply (ObjectProperty.hom_ext _) + ext i + exact Groupoid.comp_inv _ + · apply (ObjectProperty.hom_ext _) + ext i + exact Groupoid.inv_comp _ + · intro F G f + apply (ObjectProperty.hom_ext _) + ext i + change f.hom.app 0 ≫ G.obj.map (homOfLE (Fin.zero_le i)) = + F.obj.map (homOfLE (Fin.zero_le i)) ≫ f.hom.app i + exact (f.hom.naturality _).symm + +noncomputable def evaluationEquivalence (P : Subgroupoid C) + (hP : ∀c, (𝟙 c)∈P.arrows c c) (n : ℕ) : Object P n ≌ C where + functor := evaluation P n + inverse := constant P hP n + unitIso := (comparison P hP n).symm + counitIso := Iso.refl _ + functor_unitIso_comp F := by + change Groupoid.inv (F.obj.map (homOfLE (Fin.zero_le 0))) ≫ 𝟙 _ = 𝟙 _ + have he : (homOfLE (Fin.zero_le (0 : Fin (n+1))))=𝟙 0 := Subsingleton.elim _ _ + rw [he,F.obj.map_id] + simp + +noncomputable def polygonEvaluationEquivalence (a n : ℕ) : + Object (PolygonObject.positionalSubgroupoid a) n ≌ PolygonObject a := + evaluationEquivalence _ (PolygonObject.identity_positional) n + +end VerticalString +end VerticalStringResolution + +section IntegralTransgression +open Classical + +namespace IntegralTransgression +variable {H E : Type*} [Group H] [Group E] + +def Kernel (q : H →* E) (_hc : q.ker ≤ Subgroup.center H) : Type _ := q.ker + +instance kernelCommGroup (q : H →* E) (hc : q.ker ≤ Subgroup.center H) : + CommGroup (Kernel q hc) := by + change CommGroup q.ker + exact { (inferInstance : Group q.ker) with + mul_comm := fun x y => Subtype.ext (Subgroup.mem_center_iff.mp (hc x.property) y.val).symm } + +noncomputable def inclusion (q : H →* E) (hc : q.ker ≤ Subgroup.center H) : Kernel q hc →* H := + q.ker.subtype + +variable (q : H →* E) (hq : Function.Surjective q) (hc : q.ker ≤ Subgroup.center H) + +noncomputable def sectionMap (x : E) : H := if x=1 then 1 else Classical.choose (hq x) + +@[simp] theorem section_one : sectionMap q hq 1 = 1 := by simp [sectionMap] +@[simp] theorem section_projection (x : E) : q (sectionMap q hq x)=x := by + by_cases hx : x=1 + · simp [sectionMap,hx] + · simpa [sectionMap,hx] using Classical.choose_spec (hq x) + +noncomputable def factor (x y : E) : Kernel q hc := + ⟨sectionMap q hq x * sectionMap q hq y * (sectionMap q hq (x*y))⁻¹,by + change q (sectionMap q hq x * sectionMap q hq y * (sectionMap q hq (x*y))⁻¹) = 1 + simp⟩ + +noncomputable def remainder (h : H) : Kernel q hc := + ⟨h * (sectionMap q hq (q h))⁻¹,by + change q (h * (sectionMap q hq (q h))⁻¹) = 1 + simp⟩ + +@[simp] theorem factor_one_left (x : E) : factor q hq hc 1 x=1 := by + apply Subtype.ext; simp only [factor,section_one,one_mul,mul_inv_cancel]; rfl +@[simp] theorem factor_one_right (x : E) : factor q hq hc x 1=1 := by + apply Subtype.ext; simp only [factor,section_one,mul_one,mul_inv_cancel]; rfl +@[simp] theorem remainder_one : remainder q hq hc 1=1 := by + apply Subtype.ext; simp only [remainder,map_one,section_one,inv_one,mul_one]; rfl +@[simp] theorem remainder_inclusion (k : Kernel q hc) : + remainder q hq hc (inclusion q hc k)=k := by + apply Subtype.ext + change k.val * (sectionMap q hq (q k.val))⁻¹=k.val + have hk : q k.val=1 := k.property + simp [hk] + +theorem factor_cocycle (x y z : E) : + factor q hq hc x y * factor q hq hc (x*y) z = + factor q hq hc y z * factor q hq hc x (y*z) := by + apply Subtype.ext + change (sectionMap q hq x * sectionMap q hq y * (sectionMap q hq (x*y))⁻¹) * + (sectionMap q hq (x*y) * sectionMap q hq z * (sectionMap q hq (x*y*z))⁻¹) = + (factor q hq hc y z).val * + (sectionMap q hq x * sectionMap q hq (y*z) * (sectionMap q hq (x*(y*z)))⁻¹) + have hcomm := Subgroup.mem_center_iff.mp (hc (factor q hq hc y z).property) + (sectionMap q hq x) + simp only [mul_assoc x y z] + calc + _ = sectionMap q hq x * sectionMap q hq y * sectionMap q hq z * + (sectionMap q hq (x*(y*z)))⁻¹ := by group + _ = sectionMap q hq x * (factor q hq hc y z).val * + sectionMap q hq (y*z) * (sectionMap q hq (x*(y*z)))⁻¹ := by + dsimp [factor]; group + _ = _ := by rw [hcomm]; group + +theorem remainder_mul (h k : H) : + remainder q hq hc (h*k)=remainder q hq hc h * remainder q hq hc k * + factor q hq hc (q h) (q k) := by + apply Subtype.ext + change h*k*(sectionMap q hq (q (h*k)))⁻¹ = + (h*(sectionMap q hq (q h))⁻¹) * (remainder q hq hc k).val * + (sectionMap q hq (q h)*sectionMap q hq (q k)* + (sectionMap q hq (q h*q k))⁻¹) + have hcomm := Subgroup.mem_center_iff.mp (hc (remainder q hq hc k).property) + (sectionMap q hq (q h))⁻¹ + symm + calc + _ = h * ((sectionMap q hq (q h))⁻¹ * (remainder q hq hc k).val) * + (sectionMap q hq (q h)*sectionMap q hq (q k)* + (sectionMap q hq (q h*q k))⁻¹) := by group + _ = h * ((remainder q hq hc k).val * (sectionMap q hq (q h))⁻¹) * + (sectionMap q hq (q h)*sectionMap q hq (q k)* + (sectionMap q hq (q h*q k))⁻¹) := by rw [hcomm] + _ = _ := by dsimp [remainder]; rw [map_mul]; group + +end IntegralTransgression +end IntegralTransgression + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Homology/WindowEnclosureChains.lean b/lean/OAI/GroupTheory/SimpleAmenable/Homology/WindowEnclosureChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3d13eb9c20900b760bb80497ab10c5cc149114e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Homology/WindowEnclosureChains.lean @@ -0,0 +1,127 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.WindowEnclosureGeometry + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section WindowEnclosureChains + +structure WindowBracket (n : ℕ) (q : ℤ) (t : ℝ) where + lower : CutRing + upper : CutRing + lower_label : q ≤ endpointLabel lower ∧ endpointLabel lower < q+n + upper_label : q ≤ endpointLabel upper ∧ endpointLabel upper < q+n + lower_bound : t-201/(n:ℝ) ≤ ordinary lower + lower_lt : ordinary lower < t + upper_lt : t < ordinary upper + upper_bound : ordinary upper ≤ t+201/(n:ℝ) + +noncomputable def windowBracket (n : ℕ) (hn : 1 ≤ n) (q : ℤ) (t : ℝ) : + WindowBracket n q t := Classical.choice (by + obtain ⟨u,v,hu,hv,huL,huR,hvL,hvR⟩ := coordinate_window_brackets n hn q t + exact ⟨⟨u,v,hu,hv,huL,huR,hvL,hvR⟩⟩) + +noncomputable def lowerEnclosure (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (a : ℝ) : + ℕ → CutRing + | 0 => (windowBracket n hn (q 0) a).lower + | k+1 => (windowBracket n hn (q (k+1)) (ordinary (lowerEnclosure n hn q a k))).lower + +noncomputable def upperEnclosure (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (b : ℝ) : + ℕ → CutRing + | 0 => (windowBracket n hn (q 0) b).upper + | k+1 => (windowBracket n hn (q (k+1)) (ordinary (upperEnclosure n hn q b k))).upper + +theorem lowerEnclosure_label (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (a : ℝ) (k : ℕ) : + q k ≤ endpointLabel (lowerEnclosure n hn q a k) ∧ + endpointLabel (lowerEnclosure n hn q a k) < q k+n := by + cases k with + | zero => exact (windowBracket n hn (q 0) a).lower_label + | succ k => exact (windowBracket n hn (q (k+1)) _).lower_label + +theorem upperEnclosure_label (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (b : ℝ) (k : ℕ) : + q k ≤ endpointLabel (upperEnclosure n hn q b k) ∧ + endpointLabel (upperEnclosure n hn q b k) < q k+n := by + cases k with + | zero => exact (windowBracket n hn (q 0) b).upper_label + | succ k => exact (windowBracket n hn (q (k+1)) _).upper_label + +theorem lowerEnclosure_step (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (a : ℝ) (k : ℕ) : + ordinary (lowerEnclosure n hn q a k) - 201/(n:ℝ) ≤ + ordinary (lowerEnclosure n hn q a (k+1)) ∧ + ordinary (lowerEnclosure n hn q a (k+1)) < ordinary (lowerEnclosure n hn q a k) := + ⟨(windowBracket n hn (q (k+1)) _).lower_bound, + (windowBracket n hn (q (k+1)) _).lower_lt⟩ + +theorem upperEnclosure_step (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (b : ℝ) (k : ℕ) : + ordinary (upperEnclosure n hn q b k) < ordinary (upperEnclosure n hn q b (k+1)) ∧ + ordinary (upperEnclosure n hn q b (k+1)) ≤ + ordinary (upperEnclosure n hn q b k) + 201/(n:ℝ) := + ⟨(windowBracket n hn (q (k+1)) _).upper_lt, + (windowBracket n hn (q (k+1)) _).upper_bound⟩ + +theorem lowerEnclosure_bounds (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (a : ℝ) (k : ℕ) : + a - ((k:ℝ)+1)*201/(n:ℝ) ≤ ordinary (lowerEnclosure n hn q a k) ∧ + ordinary (lowerEnclosure n hn q a k) < a := by + induction k with + | zero => + simpa [lowerEnclosure] using And.intro (windowBracket n hn (q 0) a).lower_bound + (windowBracket n hn (q 0) a).lower_lt + | succ k ih => + have hs := lowerEnclosure_step n hn q a k + constructor + · simp only [Nat.cast_add,Nat.cast_one] + have he : ((k:ℝ)+1+1)*201/(n:ℝ) = ((k:ℝ)+1)*201/(n:ℝ) + 201/(n:ℝ) := by ring + rw [he] + linarith [ih.1,hs.1] + · exact lt_trans hs.2 ih.2 + +theorem upperEnclosure_bounds (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (b : ℝ) (k : ℕ) : + b < ordinary (upperEnclosure n hn q b k) ∧ + ordinary (upperEnclosure n hn q b k) ≤ b + ((k:ℝ)+1)*201/(n:ℝ) := by + induction k with + | zero => + simpa [upperEnclosure] using And.intro (windowBracket n hn (q 0) b).upper_lt + (windowBracket n hn (q 0) b).upper_bound + | succ k ih => + have hs := upperEnclosure_step n hn q b k + constructor + · exact lt_trans ih.1 hs.1 + · simp only [Nat.cast_add,Nat.cast_one] + have he : ((k:ℝ)+1+1)*201/(n:ℝ) = ((k:ℝ)+1)*201/(n:ℝ) + 201/(n:ℝ) := by ring + rw [he] + linarith [ih.2,hs.2] + +theorem window_enclosure_chain (n : ℕ) (hn : 1 ≤ n) (q : ℕ → ℤ) (a b : ℝ) + (_hab : a ≤ b) : + ∃ u v : ℕ → CutRing, + (∀ k, (q k ≤ endpointLabel (u k) ∧ endpointLabel (u k) < q k+n) ∧ + (q k ≤ endpointLabel (v k) ∧ endpointLabel (v k) < q k+n)) ∧ + (∀ k, Set.Icc a b ⊆ Set.Ioo (ordinary (u k)) (ordinary (v k))) ∧ + (∀ k, Set.Icc (ordinary (u k)) (ordinary (v k)) ⊆ + Set.Ioo (ordinary (u (k+1))) (ordinary (v (k+1)))) ∧ + ∀ k : ℕ, a-((k:ℝ)+1)*201/(n:ℝ) ≤ ordinary (u k) ∧ + ordinary (v k) ≤ b+((k:ℝ)+1)*201/(n:ℝ) := by + refine ⟨lowerEnclosure n hn q a,upperEnclosure n hn q b,?_,?_,?_,?_⟩ + · intro k + exact ⟨lowerEnclosure_label n hn q a k,upperEnclosure_label n hn q b k⟩ + · intro k x hx + exact ⟨lt_of_lt_of_le (lowerEnclosure_bounds n hn q a k).2 hx.1, + lt_of_le_of_lt hx.2 (upperEnclosure_bounds n hn q b k).1⟩ + · intro k x hx + exact ⟨lt_of_lt_of_le (lowerEnclosure_step n hn q a k).2 hx.1, + lt_of_le_of_lt hx.2 (upperEnclosure_step n hn q b k).1⟩ + · intro k + exact ⟨(lowerEnclosure_bounds n hn q a k).1,(upperEnclosure_bounds n hn q b k).2⟩ + +end WindowEnclosureChains + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/Main.lean b/lean/OAI/GroupTheory/SimpleAmenable/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f635943ed1ae0efb2057339bdef4e4fc65db0a7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/Main.lean @@ -0,0 +1,116 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AlignedFiniteTables +import OAI.GroupTheory.SimpleAmenable.Configurations.FiniteAlignedConfiguration +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FullSectorCompatibility +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ControlCalculus +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CoordinateFamilyCompare +import OAI.GroupTheory.SimpleAmenable.CentralCovers.UniformTangentTransport +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PolygonAtomLaw +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AxisSplitting +import OAI.GroupTheory.SimpleAmenable.CentralCovers.SectorDifferenceRange +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AnchorConstants +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GrowthGeneration +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ClippedLineSlideAction +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GlobalSignControl +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InactiveQuadrantAction +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AllWindowAction +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ConcurrentCellSlopeAction +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveChartActions +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentCellDecisions +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ConstantCellTemplates +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GridPrimitiveInputs +import OAI.GroupTheory.SimpleAmenable.RandomFields.FormalLawCovariance +import OAI.GroupTheory.SimpleAmenable.Simplicial.FormalLawReindex +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FormalSectorSubfamily +import OAI.GroupTheory.SimpleAmenable.CentralCovers.TemplateActualRelators +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ClosedLocalAssignments +import OAI.GroupTheory.SimpleAmenable.CentralCovers.SimultaneousActiveActions +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CoordinateTemplateControl +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InwardMargins +import OAI.GroupTheory.SimpleAmenable.CentralCovers.InitialGridActions +import OAI.GroupTheory.SimpleAmenable.CentralCovers.SelectedInwardActions +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ConcurrentCoordinateGates +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveStarCoherence +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ExteriorClippedModels +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FarClippedModels +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ExteriorPhaseGeometry +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PhaseClippedModels +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveGermActions +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveGlobalTemplates +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GlobalAlignedCentrality +import OAI.GroupTheory.SimpleAmenable.RandomFields.CanonicalPolygonCovariance +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FrameCentrality +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FrameCompatibility +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CommonFrameTransport +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrivateBankFixer +import OAI.GroupTheory.SimpleAmenable.CentralCovers.DistinctSlotFixer +import OAI.GroupTheory.SimpleAmenable.Simplicial.SmallEvenRouting +import OAI.GroupTheory.SimpleAmenable.CentralCovers.CanonicalSlotStars +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TranslationTransport +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GenerationUpstairs +import OAI.GroupTheory.SimpleAmenable.Amenability.LocalBarrierTransport +import OAI.GroupTheory.SimpleAmenable.Amenability.ChartLineTransport +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonVerticalStrings +import OAI.GroupTheory.SimpleAmenable.Simplicial.PolygonBarFaces +import OAI.GroupTheory.SimpleAmenable.Simplicial.IntervalEssSurj +import OAI.GroupTheory.SimpleAmenable.Homology.RestrictedPolygon +import OAI.GroupTheory.SimpleAmenable.Simplicial.StageMonoidal +import OAI.GroupTheory.SimpleAmenable.Homology.ProductHomologyMaps +import OAI.GroupTheory.SimpleAmenable.Homology.FiberSumHomology +import OAI.GroupTheory.SimpleAmenable.Simplicial.TripleAllNatural +import OAI.GroupTheory.SimpleAmenable.Simplicial.RegularBlockFaces +import OAI.GroupTheory.SimpleAmenable.Simplicial.PointFiberMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.CellMonoidal +import OAI.GroupTheory.SimpleAmenable.Simplicial.TranslationFiberMonoidal +import OAI.GroupTheory.SimpleAmenable.Homology.RegularTotalFiniteDifferentials +import OAI.GroupTheory.SimpleAmenable.Configurations.SymmetricComponents +import OAI.GroupTheory.SimpleAmenable.Simplicial.BarBinaryBoundary + +namespace OAI + +section +open _root_.CategoryTheory _root_.OAI.CategoryTheory Limits MonoidalCategory Simplicial Opposite +namespace SimpleAmenable +open FreeChains IntervalBar.Diagram + +attribute [local instance 1200] Rep.hV2 + +lemma polygon_triple_homology_finite (a:ℕ) (ha:0 g * d)) ∆ D).card : ℝ) < ε * D.card + +def MainStatement : Prop := ∃ (G : Type) (_ : Group G), + Infinite G ∧ Group.IsFinitelyPresented G ∧ IsSimpleGroup G ∧ FolnerAmenable G + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AffineIntegrability.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AffineIntegrability.lean new file mode 100644 index 0000000000000000000000000000000000000000..84d3263706e0a8a702ad158e6a7bc58d70019362 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AffineIntegrability.lean @@ -0,0 +1,69 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.RandomFields.AffineDensityDerivative + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section AffineIntegrability +open Classical MeasureTheory Matrix + +theorem integrable_matrix_affine {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) + {f : (ι → ℝ) → ℝ} (hf : Integrable f) : + Integrable (fun x => f (a+A*ᵥx)) := by + have hm : Integrable f (Measure.map (matrixAffineEquiv A a hA) volume) := by + rw [show (matrixAffineEquiv A a hA : (ι → ℝ) → (ι → ℝ))= + (fun x => a+A*ᵥx) from funext (fun x => matrixAffineEquiv_apply A a x hA), + map_matrix_affine_volume A a hA] + exact hf.smul_measure ENNReal.ofReal_ne_top + convert! (integrable_map_equiv (matrixAffineEquiv A a hA) f).mp hm using 1 + +theorem integrable_matrix_affine_inverse {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) + {f : (ι → ℝ) → ℝ} (hf : Integrable f) : + Integrable (fun y => f (A⁻¹*ᵥ(y-a))) := by + have h := integrable_matrix_affine A⁻¹ (-(A⁻¹*ᵥa)) + (isUnit_iff_ne_zero.mpr (by + rw [Matrix.det_nonsing_inv,Ring.inverse_eq_inv] + exact inv_ne_zero hA.ne_zero)) hf + convert! h using 1 + ext y + rw [Matrix.mulVec_sub] + simp only [sub_eq_add_neg,add_comm] + +theorem affineNoiseRoot_integrable_square {ι : Type*} [Fintype ι] + {f : ℝ → ℝ} (hf : Continuous f) (hc : HasCompactSupport f) + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) : + Integrable (fun y : ι → ℝ => affineNoiseRoot f A a y^2) := by + have ht : Integrable (fun x : ι → ℝ => noiseTensor (fun _ : ι => f) x^2) := by + convert! noiseTensor_integrable_inner (fun _ : ι => f) + (fun _ : ι => f) (fun _ => ((hf.mul hf).integrable_of_hasCompactSupport + (hc.mul_right (f' := f)))) using 1 + ext x + simp only [pow_two] + simpa only [affineNoiseRoot,div_pow] using + (integrable_matrix_affine_inverse A a hA ht).div_const ((Real.sqrt A.det)^2) + +theorem integrable_square_add {X : Type*} [MeasurableSpace X] + (μ : Measure X) {f g : X → ℝ} (hf : AEStronglyMeasurable f μ) + (hg : AEStronglyMeasurable g μ) + (hf2 : Integrable (fun x => f x^2) μ) (hg2 : Integrable (fun x => g x^2) μ) : + Integrable (fun x => (f x+g x)^2) μ := by + apply ((hf2.add hg2).const_mul 2).mono' ((hf.add hg).pow 2) + filter_upwards with x + rw [Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _)] + simp only [Pi.add_apply,Pi.pow_apply] + nlinarith [sq_nonneg (f x-g x)] + +end AffineIntegrability + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AlignedFiniteTables.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AlignedFiniteTables.lean new file mode 100644 index 0000000000000000000000000000000000000000..b49ac74b99493db67f79c0f00868479759118ba4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AlignedFiniteTables.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AlignedPolygonGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section AlignedFiniteTables + +variable {α G : Type*} [Group G] (f : α → G) + +theorem finite_table_lift_in_subgroup_eventually (L : ℕ) + (K : Subgroup (BoundedRelationCover L f)) {T : Type*} [Group T] [Finite T] + (φ : T →* G) (hφ : ∀ s, φ s ∈ K.map (coverMap L f)) : + ∃ B : ℕ, ∃ hLB : L ≤ B, ∀ M : ℕ, ∀ hBM : B ≤ M, + ∃ ρ : T →* BoundedRelationCover M f, + (coverMap M f).comp ρ = φ ∧ + ρ.range ≤ K.map (coverTransition f (le_trans hLB hBM)) := by + choose y hy hyq using hφ + choose w hw using fun s => PresentedGroup.mk_surjective (shortRelations L f) (y s) + have hwp : ∀ s, FreeGroup.lift f (w s) = φ s := by + intro s + rw [← coverMap_mk L f,hw s,hyq s] + obtain ⟨B,hB⟩ := finite_table_lift_eventually f φ w hwp + refine ⟨max L B,le_max_left _ _,fun M hM => ?_⟩ + obtain ⟨ρ,hρ,hρw⟩ := hB M (le_trans (le_max_right _ _) hM) + refine ⟨ρ,hρ,?_⟩ + rintro z ⟨s,rfl⟩ + refine ⟨y s,hy s,?_⟩ + rw [← hw s,coverTransition_mk,hρw s] + +end AlignedFiniteTables + +section SourceAlignedTableCompatibility + +variable (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + +theorem sourceAlignedGroup_map_full (M : ℕ) + (t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm)) + (ht : (coverMap M (alternatingGenerator a r m hm)).comp t = sourceLatticeMap a r m hm) + (I : Finset (Fin (m+1))) : + (sourceAlignedGroup a r m hm M t I).map + ((polygonAlternatingGroup a (m+1)).subtype.comp + (coverMap M (alternatingGenerator a r m hm))) = polygonAlignedGroup a r m hm I := by + rw [sourceAlignedGroup,alignedGroup_map] + have htrans : ((polygonAlternatingGroup a (m+1)).subtype.comp + (coverMap M (alternatingGenerator a r m hm))).comp t = + sourceLatticeFullMap a r m hm := by + rw [MonoidHom.comp_assoc,ht] + rfl + rw [htrans] + rfl + +theorem sourceAlignedGroup_transition {L M : ℕ} (hLM : L ≤ M) + (t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover L (alternatingGenerator a r m hm)) (I : Finset (Fin (m+1))) : + (sourceAlignedGroup a r m hm L t I).map + (coverTransition (alternatingGenerator a r m hm) hLM) = + sourceAlignedGroup a r m hm M + ((coverTransition (alternatingGenerator a r m hm) hLM).comp t) I := by + rw [sourceAlignedGroup,alignedGroup_map] + rfl + +theorem fiveTrack_conditional_preimage_aligned + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (M : ℕ) + (t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm)) + (ht : (coverMap M (alternatingGenerator a r m hm)).comp t = sourceLatticeMap a r m hm) + (ι : Fin 5 ↪ Fin (m+1)) (b : Fin (m+1)) (hb : b ∉ Set.range ι) + (U : polygonAlgebra a) (g : alternatingGroup (Fin 5)) : + ∃ y ∈ sourceAlignedGroup a r m hm M t (Finset.univ.map ι), + ((coverMap M (alternatingGenerator a r m hm) y).val : polygonFullGroup a (m+1)) = + conditionalHom U (fiveTrackHom ι g) := by + have hh := fiveTrack_polygon_aligned a r m hm hr ι b hb U g + rw [← sourceAlignedGroup_map_full a r m hm M t ht] at hh + exact hh + +end SourceAlignedTableCompatibility + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AlignedGroups.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AlignedGroups.lean new file mode 100644 index 0000000000000000000000000000000000000000..bed7a3b6aa268c9ac6d3962089f0e30a681fe177 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AlignedGroups.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.TranslatedDisjoint + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section AlignedGroups + +variable {A H : Type*} [Group A] [Group H] {B : Type*} + +noncomputable def alignedGroup (t : A →* H) (x : B → H) (P : B → Prop) : Subgroup H := + Subgroup.closure {y | ∃ b, P b ∧ ∃ u, y = t u*x b*(t u)⁻¹} + +theorem alignedGroup_generator (t : A →* H) (x : B → H) (P : B → Prop) + (b : B) (hb : P b) (u : A) : t u*x b*(t u)⁻¹ ∈ alignedGroup t x P := + Subgroup.subset_closure ⟨b,hb,u,rfl⟩ + +theorem alignedGroup_input (t : A →* H) (x : B → H) (P : B → Prop) + (b : B) (hb : P b) : x b ∈ alignedGroup t x P := by + simpa only [map_one,inv_one,one_mul,mul_one] using alignedGroup_generator t x P b hb 1 + +theorem alignedGroup_conjugate (t : A →* H) (x : B → H) (P : B → Prop) + (u : A) {y : H} (hy : y ∈ alignedGroup t x P) : + t u*y*(t u)⁻¹ ∈ alignedGroup t x P := by + let f : H →* H := (MulAut.conj (t u)).toMonoidHom + have hh : alignedGroup t x P ≤ (alignedGroup t x P).comap f := by + apply (Subgroup.closure_le _).mpr + rintro z ⟨b,hb,v,rfl⟩ + change t u*(t v*x b*(t v)⁻¹)*(t u)⁻¹ ∈ alignedGroup t x P + have he : t u*(t v*x b*(t v)⁻¹)*(t u)⁻¹ = t (u*v)*x b*(t (u*v))⁻¹ := by + rw [map_mul]; group + rw [he] + exact alignedGroup_generator t x P b hb (u*v) + exact hh hy + +theorem alignedGroup_commute (t : A →* H) (x : B → H) (P Q : B → Prop) + (hc : ∀ b, P b → ∀ c, Q c → ∀ u v, + Commute (t u*x b*(t u)⁻¹) (t v*x c*(t v)⁻¹)) : + ∀ g ∈ alignedGroup t x P, ∀ h ∈ alignedGroup t x Q, Commute g h := by + have hh : alignedGroup t x P ≤ Subgroup.centralizer (alignedGroup t x Q) := by + apply (Subgroup.closure_le _).mpr + rintro g ⟨b,hb,u,rfl⟩ + rw [alignedGroup,Subgroup.centralizer_closure] + intro h hh + obtain ⟨c,hc',v,rfl⟩ := hh + exact (hc b hb c hc' u v).symm.eq + intro g hg h hmem + exact (hh hg h hmem).symm + +theorem alignedGroup_map {G : Type*} [Group G] (q : H →* G) + (t : A →* H) (x : B → H) (P : B → Prop) : + (alignedGroup t x P).map q = alignedGroup (q.comp t) (fun b => q (x b)) P := by + rw [alignedGroup,MonoidHom.map_closure] + congr 1 + ext y + constructor + · rintro ⟨z,⟨b,hb,u,rfl⟩,rfl⟩ + exact ⟨b,hb,u,by simp⟩ + · rintro ⟨b,hb,u,rfl⟩ + exact ⟨t u*x b*(t u)⁻¹,⟨b,hb,u,rfl⟩,by simp⟩ + +end AlignedGroups + +section SourceAlignedGroups + +def SmallConditional (m : ℕ) := Fin 5 × {σ : Equiv.Perm (Fin (m+1)) // + σ ∈ alternatingGroup (Fin (m+1)) ∧ σ.support.card ≤ 5} + +instance (m : ℕ) : Finite (SmallConditional m) := by unfold SmallConditional; infer_instance + +noncomputable def sourceAlignedGroup (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (M : ℕ) (t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm)) (I : Finset (Fin (m+1))) : + Subgroup (BoundedRelationCover M (alternatingGenerator a r m hm)) := + alignedGroup t (fun b : SmallConditional m => PresentedGroup.of (Sum.inl b)) + (fun b => b.2.val.support ⊆ I) + +theorem source_aligned_disjoint_eventually (a : ℕ) (r : CutRing) (m : ℕ) + (hm : 2 ≤ m) (hm' : 10 < m+1) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → + ∃ t : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + BoundedRelationCover M (alternatingGenerator a r m hm), + (∀ i, t (Multiplicative.ofAdd (FreeAbelianGroup.of i)) = PresentedGroup.of (Sum.inr i)) ∧ + (coverMap M (alternatingGenerator a r m hm)).comp t = sourceLatticeMap a r m hm ∧ + ∀ (I J : Finset (Fin (m+1))), Disjoint I J → + ∀ g ∈ sourceAlignedGroup a r m hm M t I, + ∀ h ∈ sourceAlignedGroup a r m hm M t J, Commute g h := by + obtain ⟨L,hL⟩ := source_translated_disjoint_eventually a r m hm hm' + refine ⟨L,fun M hM => ?_⟩ + obtain ⟨t,ht,htq,hc⟩ := hL M hM + refine ⟨t,ht,htq,?_⟩ + intro I J hIJ + apply alignedGroup_commute + intro b hb c hc' u v + exact hc b.1 c.1 b.2 c.2 (hIJ.mono hb hc') u v + +end SourceAlignedGroups + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AnchorConstants.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AnchorConstants.lean new file mode 100644 index 0000000000000000000000000000000000000000..362cf9819f460728e2bf1f484772bfc6d50e83b4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AnchorConstants.lean @@ -0,0 +1,52 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.AxisAnchorFamily +import OAI.GroupTheory.SimpleAmenable.CentralCovers.SectorDifferenceRange + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section AnchorConstants +namespace AxisAnchorFamily +variable {n l : ℕ} {q : ℤ} (A : AxisAnchorFamily n l q) +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (g : B.CoordinateWindowLaw n) (d : Fin 2) + +theorem constant_range_prefixGroup (hl : 201 ≤ l) (hln : l ≤ n) : + B.c.range ≤ A.prefixGroup B hlarge g d := by + have hh := B.fullGeometricSector_partition_range hlarge (axisWindowPrimitives d l q) + (fun I _ b hb => B.axisFamilyLaw n g d l hln q I b hb) (wholePolygon a) + (windowCell a d l q) (windowCell_axis_resolved d l (by omega) q) + (windowCell_pairwise_disjoint d l hl q) (by + intro x; constructor + · intro _; exact windowCell_cover d l hl q x + · intro _; trivial) + rw [B.fullGeometricSector_whole] at hh + have hr : (B.c.comp (universalProjection (alternatingGroup (Fin (m+1))))).range = B.c.range := by + apply le_antisymm + · rintro x ⟨s,rfl⟩; exact ⟨_,rfl⟩ + rintro x ⟨s,rfl⟩ + obtain ⟨t,ht⟩ := universalProjection_surjective (alternatingGroup (Fin (m+1))) s + exact ⟨t,by simp only [MonoidHom.comp_apply,ht]⟩ + rw [hr] at hh + apply hh.trans + apply iSup_le + intro i + change (B.axisSector hlarge n g d l hln q (windowCell a d l q i)).range ≤ _ + rw [← A.anchorCopy_eq_cell B hlarge g d hl hln i] + exact A.anchor_range_prefixGroup B hlarge g d i + +end AxisAnchorFamily +end AnchorConstants + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AxisAnchorFamily.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AxisAnchorFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b46bbfd227d528fe132bf1ed46bc79863beee8c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AxisAnchorFamily.lean @@ -0,0 +1,248 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.DisjointPolygonAtoms +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SortedAxisCuts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section AxisAnchorFamily + +structure AxisAnchorFamily (n l : ℕ) (q : ℤ) where + count : Fin l → ℕ + cuts : ∀ i, AxisCutSequence n (count i) + lower : ∀ i, (cuts i).cut 0 = windowCut l q i.castSucc + upper : ∀ i, (cuts i).cut (Fin.last (count i)) = windowCut l q i.succ + +namespace AxisAnchorFamily +variable {n l : ℕ} {q : ℤ} (A : AxisAnchorFamily n l q) + +theorem intervalLength (hl : 201 ≤ l) (i : Fin l) : + ordinary ((A.cuts i).cut (Fin.last (A.count i)))-ordinary ((A.cuts i).cut 0) < 1 := by + rw [A.lower,A.upper] + have hl' : (200:ℝ) < l := by exact_mod_cast (show 200 < l by omega) + exact (windowCut_mesh l q i).trans_lt ((div_lt_one (by linarith)).mpr hl') + +theorem atom_le_cell {a : ℕ} (d : Fin 2) (hl : 201 ≤ l) (i : Fin l) (j : Fin (A.count i)) : + (A.cuts i).atomPolygon (a := a) d j ≤ windowCell a d l q i := by + have h₁ := (A.cuts i).ordered j.castSucc + have h₂ := (A.cuts i).ordered j.succ + change coordinateInterval a d _ _ ≤ coordinateInterval a d _ _ + rw [← A.lower,← A.upper] + exact coordinateInterval_mono d _ _ _ _ h₁.1 + ((A.cuts i).strictMono (Fin.castSucc_lt_succ (i := j))).le h₂.2 (A.intervalLength hl i) + +theorem atom_disjoint {a : ℕ} (d : Fin 2) (hl : 201 ≤ l) : + Pairwise fun i j : (Σ i : Fin l, Fin (A.count i)) => + Disjoint ((A.cuts i.1).atomPolygon (a := a) d i.2).val ((A.cuts j.1).atomPolygon d j.2).val := by + rintro ⟨i,k⟩ ⟨j,k'⟩ hij + by_cases he : i=j + · subst j + apply (A.cuts i).atomPolygon_disjoint d (A.intervalLength hl i) + intro hk + change k=k' at hk + subst k' + exact hij rfl + · exact (windowCell_pairwise_disjoint d l (by omega) q he).mono + (A.atom_le_cell d hl i k) (A.atom_le_cell d hl j k') + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (g : B.CoordinateWindowLaw n) + (d : Fin 2) (hl : 201 ≤ l) (hln : l ≤ n) + +include hl in +theorem anchorCopy_eq_cell (i : Fin l) : + (A.cuts i).anchorCopy B hlarge g d = B.axisSector hlarge n g d l hln q (windowCell a d l q i) := by + change B.axisSector hlarge n g d _ _ _ (coordinateInterval a d _ _) = + B.axisSector hlarge n g d l hln q (coordinateInterval a d _ _) + rw [← A.lower,← A.upper] + apply B.axisInterval_copy_eq + · exact (A.cuts i).lower_label 0 + · exact (A.cuts i).upper_label 0 + · rw [A.lower]; exact windowCut_label l q (by omega) _ + · rw [A.upper]; exact windowCut_label l q (by omega) _ + +include hl hln in +theorem anchorCopies_commute {i j : Fin l} (hij : i ≠ j) (x y : TrackStar (Fin (m+1))) : + Commute ((A.cuts i).anchorCopy B hlarge g d x) ((A.cuts j).anchorCopy B hlarge g d y) := by + rw [A.anchorCopy_eq_cell B hlarge g d hl hln i,A.anchorCopy_eq_cell B hlarge g d hl hln j] + exact B.fullGeometricSector_commute hlarge _ _ _ _ + (windowCell_axis_resolved d l (by omega) q i) (windowCell_pairwise_disjoint d l (by omega) q hij) x y + +variable (hc : ∀ (i : Fin l) (j k : ℕ), j ≤ k → ∀ x y, + Commute ((A.cuts i).prefixCopy B hlarge g d j x) ((A.cuts i).suffix B hlarge g d k y)) + +include hl hln in +theorem atoms_commute (h20 : 20 ≤ m+1) : + Pairwise fun i j : (Σ i : Fin l, Fin (A.count i)) => ∀ x y, + Commute ((A.cuts i.1).atomCopy B hlarge g d (A.intervalLength hl i.1) (hc i.1) i.2 x) + ((A.cuts j.1).atomCopy B hlarge g d (A.intervalLength hl j.1) (hc j.1) j.2 y) := by + rintro ⟨i,k⟩ ⟨j,k'⟩ hij x y + by_cases he : i=j + · subst j + apply (A.cuts i).atomCopy_commute B hlarge g d (A.intervalLength hl i) (hc i) + · intro hk; change k=k' at hk; subst k'; exact hij rfl + · apply small_control_disjoint _ B.c B.constant_aligned B.disjoint_aligned (by simpa using h20) + _ _ ((A.cuts i).anchorCopy B hlarge g d) ((A.cuts j).anchorCopy B hlarge g d) + · exact (A.cuts i).atomCopy_supported B hlarge g d (A.intervalLength hl i) (hc i) k + · exact (A.cuts j).atomCopy_supported B hlarge g d (A.intervalLength hl j) (hc j) k' + · exact (A.cuts i).anchorCopy_small_supported B hlarge g d + · exact (A.cuts i).atomCopy_controlled B hlarge g d (A.intervalLength hl i) (hc i) k + · exact (A.cuts j).atomCopy_controlled B hlarge g d (A.intervalLength hl j) (hc j) k' + · exact A.anchorCopies_commute B hlarge g d hl hln he + +include hl hln hc in + +theorem prefixes_central (h20 : 20 ≤ m+1) : + CentralOn (coverMap M (alternatingGenerator a r m hm)) + (⨆ i : Fin l, ⨆ j : Fin (A.count i+1), ((A.cuts i).prefixCopy B hlarge g d j.val).range) := by + let f (i : Σ i : Fin l, Fin (A.count i)) := + (A.cuts i.1).atomCopy B hlarge g d (A.intervalLength hl i.1) (hc i.1) i.2 + have hcentral := centralOn_disjoint_polygon_atoms + (coverMap M (alternatingGenerator a r m hm)) + (fun i : Σ i : Fin l, Fin (A.count i) => (A.cuts i.1).atomPolygon d i.2) + (A.atom_disjoint d hl) + (fun i => (A.cuts i.1).atomPolygon_nonempty d (A.intervalLength hl i.1) i.2) + f (A.atoms_commute B hlarge g d hl hln hc h20) + (fun i => (A.cuts i.1).atomCopy_projection B hlarge g d (A.intervalLength hl i.1) (hc i.1) i.2) + apply hcentral.mono + apply iSup_le + intro i + apply iSup_le + intro j + apply (prefix_range_le_differences ((A.cuts i).anchorCopy B hlarge g d) _ _ + ((A.cuts i).prefix_suffix B hlarge g d (A.intervalLength hl i)) (hc i) + ((A.cuts i).prefix_zero B hlarge g d) (A.count i) j.val (by omega)).trans + apply iSup_le + intro k + exact le_iSup (fun z => (f z).range) ⟨i,k⟩ + +end AxisAnchorFamily +end AxisAnchorFamily + +section GrowthAnchors +attribute [local instance] cutOrdinaryOrder + +def growthOldLength (n : ℕ) := n*9/10 + +def growthNewLength (n : ℕ) := n*6/5 + +def growthAnchorLength (n : ℕ) := 2*growthOldLength n-growthNewLength n + +def growthAnchorStart (n : ℕ) (p : ℤ) := p+(growthNewLength n:ℤ)-growthOldLength n + +theorem growth_lengths {n : ℕ} (hn : 1005 ≤ n) : + growthOldLength n ≤ n ∧ growthOldLength n ≤ growthNewLength n ∧ + growthNewLength n ≤ 2*growthOldLength n ∧ 201 ≤ growthAnchorLength n ∧ + growthAnchorLength n ≤ n ∧ n ≤ 2*growthAnchorLength n := by + simp only [growthAnchorLength,growthOldLength,growthNewLength] + omega + +theorem growth_anchor_label {n : ℕ} (hn : 1005 ≤ n) (p : ℤ) (i : Fin (growthAnchorLength n+1)) : + p+(growthNewLength n:ℤ)-growthOldLength n ≤ endpointLabel (windowCut (growthAnchorLength n) (growthAnchorStart n p) i) ∧ + endpointLabel (windowCut (growthAnchorLength n) (growthAnchorStart n p) i) < p+growthOldLength n := by + have h := windowCut_label (growthAnchorLength n) (growthAnchorStart n p) (by have := growth_lengths hn; omega) i + have hh := growth_lengths hn + have he : (growthAnchorLength n:ℤ) = 2*(growthOldLength n:ℤ)-growthNewLength n := by + unfold growthAnchorLength + rw [Nat.cast_sub (by omega)] + push_cast + rfl + unfold growthAnchorStart at h ⊢ + rw [he] at h + omega + +noncomputable def growthAnchorFamily (n : ℕ) (hn : 1005 ≤ n) (p : ℤ) : + AxisAnchorFamily n (growthAnchorLength n) (growthAnchorStart n p) := by + let l := growthAnchorLength n + let q := growthAnchorStart n p + let u (i : Fin l) := windowCut l q i.castSucc + let v (i : Fin l) := windowCut l q i.succ + let S (i : Fin l) := anchorCutSet (growthNewLength n) p (u i) (v i) + have hlens := growth_lengths hn + have hl (i : Fin l) : ordinary (u i) ≤ ordinary (v i) := + (windowCut_strictMono l q (Fin.castSucc_lt_succ (i := i))).le + have hu (i : Fin l) := growth_anchor_label hn p i.castSucc + have hv (i : Fin l) := growth_anchor_label hn p i.succ + have hu' (i : Fin l) : p ≤ endpointLabel (u i) ∧ endpointLabel (u i) < p+growthNewLength n := by + have := hu i; dsimp [u,l,q]; constructor <;> omega + have hv' (i : Fin l) : p ≤ endpointLabel (v i) ∧ endpointLabel (v i) < p+growthNewLength n := by + have := hv i; dsimp [v,l,q]; constructor <;> omega + let D (i : Fin l) := sortedAxisCutSequence n (growthOldLength n) (growthNewLength n) p (u i) (v i) (S i) + (anchorCutSet_lower _ _ _ _) (anchorCutSet_upper _ _ _ _) + (anchorCutSet_bounds _ _ _ _ (hl i)) (anchorCutSet_labels _ _ _ _ (hu' i) (hv' i)) + (hu i) (hv i) hlens.2.1 hlens.2.2.1 (by rfl) + exact ⟨fun i => (S i).card-1,D,fun i => sortedAxisCutSequence_lower .., + fun i => sortedAxisCutSequence_upper ..⟩ + +namespace growthAnchorFamily +variable (n : ℕ) (hn : 1005 ≤ n) (p : ℤ) +local notation "A" => growthAnchorFamily n hn p + +theorem length (i : Fin (growthAnchorLength n)) (j : Fin ((A).count i+1)) : + ((A).cuts i).length j = growthOldLength n := rfl + +theorem start (i : Fin (growthAnchorLength n)) (j : Fin ((A).count i+1)) : + ((A).cuts i).start j = if endpointLabel (((A).cuts i).cut j) omega + · have hh := growth_anchor_label hn p i.succ + have hlens := growth_lengths hn + constructor <;> omega + +theorem label_difference (i : Fin (growthAnchorLength n)) (j k : Fin ((A).count i+1)) : + |(endpointLabel (((A).cuts i).cut k-((A).cuts i).cut j):ℝ)| ≤ 6*(n:ℝ)/5 := by + have hj := labels n hn p i j + have hk := labels n hn p i k + have hh : growthNewLength n*5 ≤ n*6 := by unfold growthNewLength; omega + rw [endpointLabel_sub,Int.cast_sub] + have hj' : (p:ℝ) ≤ endpointLabel (((A).cuts i).cut j) ∧ + (endpointLabel (((A).cuts i).cut j):ℝ) < (p:ℝ)+growthNewLength n := by exact_mod_cast hj + have hk' : (p:ℝ) ≤ endpointLabel (((A).cuts i).cut k) ∧ + (endpointLabel (((A).cuts i).cut k):ℝ) < (p:ℝ)+growthNewLength n := by exact_mod_cast hk + have hh' : (growthNewLength n:ℝ)*5 ≤ (n:ℝ)*6 := by exact_mod_cast hh + rw [abs_le]; constructor <;> linarith + +theorem width (i : Fin (growthAnchorLength n)) : + ordinary (((A).cuts i).cut (Fin.last ((A).count i)))-ordinary (((A).cuts i).cut 0) ≤ 400/(n:ℝ) := by + rw [(A).lower,(A).upper] + apply (windowCut_mesh _ _ i).trans + have hh := growth_lengths hn + have hpos : (0:ℝ) < growthAnchorLength n := by exact_mod_cast (show 0 < growthAnchorLength n by omega) + have hn' : (0:ℝ) < n := by exact_mod_cast (show 0 < n by omega) + have hle : (n:ℝ) ≤ 2*growthAnchorLength n := by exact_mod_cast hh.2.2.2.2.2 + apply (div_le_div_iff₀ hpos hn').mpr + linarith + +end growthAnchorFamily +end GrowthAnchors + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AxisCutSequences.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AxisCutSequences.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ac75e19cced2aaa26673310985d0e9522c0835c --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/AxisCutSequences.lean @@ -0,0 +1,152 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AxisSplitting +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SeparatedAxisSectors + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section AxisCutSequences + +structure AxisCutSequence (n K : ℕ) where + cut : Fin (K+1) → CutRing + strictMono : StrictMono (fun i => ordinary (cut i)) + length : Fin (K+1) → ℕ + start : Fin (K+1) → ℤ + length_le : ∀ i, length i ≤ n*9/10 + lower_label : ∀ i, start i ≤ endpointLabel (cut 0) ∧ endpointLabel (cut 0) < start i+length i + upper_label : ∀ i, start i ≤ endpointLabel (cut (Fin.last K)) ∧ endpointLabel (cut (Fin.last K)) < start i+length i + cut_label : ∀ i, start i ≤ endpointLabel (cut i) ∧ endpointLabel (cut i) < start i+length i + +namespace AxisCutSequence +variable {n K : ℕ} (D : AxisCutSequence n K) + +def index (_D : AxisCutSequence n K) (i : ℕ) : Fin (K+1) := ⟨min i K,by omega⟩ +@[simp] theorem index_zero : D.index 0 = 0 := by ext; simp [index] +@[simp] theorem index_fin (i : Fin (K+1)) : D.index i.val = i := by ext; simp [index]; omega + +theorem index_mono : Monotone D.index := by + intro i j hij + exact min_le_min_right K hij + +theorem ordered (i : Fin (K+1)) : + ordinary (D.cut 0) ≤ ordinary (D.cut i) ∧ ordinary (D.cut i) ≤ ordinary (D.cut (Fin.last K)) := + ⟨D.strictMono.monotone (Fin.zero_le i),D.strictMono.monotone (Fin.le_last i)⟩ + +theorem length_old (i : Fin (K+1)) : D.length i ≤ n := by have hh := D.length_le i; omega + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (g : B.CoordinateWindowLaw n) (d : Fin 2) + +noncomputable def anchorCopy : TrackStar (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) := + B.axisSector hlarge n g d (D.length 0) (D.length_old 0) (D.start 0) + (coordinateInterval a d (D.cut 0) (D.cut (Fin.last K))) + +noncomputable def prefixCopy (i : ℕ) : TrackStar (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) := + B.axisSector hlarge n g d (D.length (D.index i)) (D.length_old _) (D.start (D.index i)) + (coordinateInterval a d (D.cut 0) (D.cut (D.index i))) + +noncomputable def suffix (i : ℕ) : TrackStar (Fin (m+1)) →* + BoundedRelationCover M (alternatingGenerator a r m hm) := + B.axisSector hlarge n g d (D.length (D.index i)) (D.length_old _) (D.start (D.index i)) + (coordinateInterval a d (D.cut (D.index i)) (D.cut (Fin.last K))) + +theorem anchorCopy_eq (i : Fin (K+1)) : + D.anchorCopy B hlarge g d = + B.axisSector hlarge n g d (D.length i) (D.length_old i) (D.start i) + (coordinateInterval a d (D.cut 0) (D.cut (Fin.last K))) := + B.axisInterval_copy_eq hlarge n g d _ _ _ _ _ _ _ _ + (D.lower_label 0) (D.upper_label 0) (D.lower_label i) (D.upper_label i) + +theorem prefix_suffix (hlen : ordinary (D.cut (Fin.last K))-ordinary (D.cut 0) < 1) (i : ℕ) + (s : TrackStar (Fin (m+1))) : + D.anchorCopy B hlarge g d s = D.prefixCopy B hlarge g d i s*D.suffix B hlarge g d i s := by + rw [D.anchorCopy_eq B hlarge g d (D.index i)] + exact B.axisSector_split hlarge n g d _ _ _ _ _ _ + (D.ordered _).1 (D.ordered _).2 hlen (D.lower_label _) (D.cut_label _) s + +@[simp] theorem prefix_zero : D.prefixCopy B hlarge g d 0 = 1 := by + simp only [prefixCopy,index_zero,InitialCoverSystem.axisSector_self] + +theorem prefix_last : D.prefixCopy B hlarge g d K = D.anchorCopy B hlarge g d := by + have hi : D.index K = Fin.last K := by ext; simp [index] + simp only [prefixCopy,hi] + exact (D.anchorCopy_eq B hlarge g d (Fin.last K)).symm + +theorem prefix_projection (i : ℕ) : + (coverMap M (alternatingGenerator a r m hm)).comp (D.prefixCopy B hlarge g d i) = + (conditionalAlternatingHom (coordinateInterval a d (D.cut 0) (D.cut (D.index i)))).comp + (universalProjection (alternatingGroup (Fin (m+1)))) := + B.axisSector_projection hlarge n g d _ _ _ _ _ (D.lower_label _) (D.cut_label _) + +theorem suffix_projection (i : ℕ) : + (coverMap M (alternatingGenerator a r m hm)).comp (D.suffix B hlarge g d i) = + (conditionalAlternatingHom (coordinateInterval a d (D.cut (D.index i)) (D.cut (Fin.last K)))).comp + (universalProjection (alternatingGroup (Fin (m+1)))) := + B.axisSector_projection hlarge n g d _ _ _ _ _ (D.cut_label _) (D.upper_label _) + +theorem prefix_small_supported (i : ℕ) : + B.AlignedSmallSupported (D.prefixCopy B hlarge g d i) := + B.axisSector_supported hlarge n g d _ _ _ _ + (axisInterval_resolved d _ _ _ _ (D.lower_label _) (D.cut_label _)) + +theorem anchorCopy_small_supported : B.AlignedSmallSupported (D.anchorCopy B hlarge g d) := + B.axisSector_supported hlarge n g d _ _ _ _ + (axisInterval_resolved d _ _ _ _ (D.lower_label 0) (D.upper_label 0)) + +theorem prefix_small_controlled (hlen : ordinary (D.cut (Fin.last K))-ordinary (D.cut 0) < 1) (i : ℕ) : + SmallControlled B.c (D.prefixCopy B hlarge g d i) (D.anchorCopy B hlarge g d) := by + rw [D.anchorCopy_eq B hlarge g d (D.index i)] + exact B.fullGeometricSector_small_control hlarge _ _ _ _ + (coordinateInterval_mono d _ _ _ _ le_rfl (D.ordered _).1 (D.ordered _).2 hlen) + +theorem prefix_suffix_self_commute (hlen : ordinary (D.cut (Fin.last K))-ordinary (D.cut 0) < 1) + (i : ℕ) (s t : TrackStar (Fin (m+1))) : + Commute (D.prefixCopy B hlarge g d i s) (D.suffix B hlarge g d i t) := + B.axisSector_split_commute hlarge n g d _ _ _ _ _ _ + (D.ordered _).1 (D.ordered _).2 hlen (D.lower_label _) (D.cut_label _) s t + +end AxisCutSequence +end AxisCutSequences + +section NestedSupport +variable {α H Q : Type*} [Fintype α] [DecidableEq α] [Group H] [Group Q] + [Group.IsPerfect (alternatingGroup α)] + +variable (L : Finset α → Subgroup H) (c : alternatingGroup α →* H) + (f : TrackStar α →* H) (l h : ℕ → TrackStar α →* H) + (hf : ∀ i s, f s = l i s*h i s) + (hc : ∀ i j, i ≤ j → ∀ s t, Commute (l i s) (h j t)) + +theorem cutDifference_small_supported (hs : ∀ i, SmallSupported L (l i)) (i : ℕ) : + SmallSupported L (cutDifference f l h hf hc i) := by + intro I x hx + obtain ⟨s,rfl⟩ := hx + change (l i (universalMap (subtypeAlternatingHom I.val) s))⁻¹ * + l (i+1) (universalMap (subtypeAlternatingHom I.val) s) ∈ L I.val + exact (L I.val).mul_mem ((L I.val).inv_mem (hs i I ⟨s,rfl⟩)) (hs (i+1) I ⟨s,rfl⟩) + +theorem cutDifference_small_controlled (hs : ∀ i, SmallControlled c (l i) f) (i : ℕ) : + SmallControlled c (cutDifference f l h hf hc i) f := by + intro I t x hx + obtain ⟨s,rfl⟩ := hx + apply (same_conj_iff _ _ _).mpr + change Commute _ ((l i s)⁻¹*l (i+1) s) + exact ((same_conj_iff _ _ _).mp (hs i I t _ ⟨s,rfl⟩)).inv_right.mul_right + ((same_conj_iff _ _ _).mp (hs (i+1) I t _ ⟨s,rfl⟩)) + +end NestedSupport + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CanonicalSectors.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CanonicalSectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..49dcbbd9449ae5e11200693d90f99dbe704953bd --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CanonicalSectors.lean @@ -0,0 +1,224 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FiniteCentralKernel + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CanonicalSectors +open scoped commutatorElement + +variable {E H Q : Type*} [Group E] [Group H] [Group Q] + +theorem perfect_maps_commute_of_central [Group.IsPerfect E] + {P : Type*} [Group P] (q : H →* Q) (hc : q.ker ≤ Subgroup.center H) + (f : E →* H) (g : P →* H) + (hfg : ∀ x y, Commute (q (f x)) (q (g y))) : + ∀ x y, Commute (f x) (g y) := by + let : Group.IsPerfect f.range := Group.IsPerfect.range f + have hh : ⁅f.range,g.range⁆ ≤ Subgroup.center H := by + apply Subgroup.commutator_le.mpr + rintro _ ⟨x,rfl⟩ _ ⟨y,rfl⟩ + apply hc + change q ⁅f x,g y⁆ = 1 + rw [map_commutatorElement] + exact (hfg x y).commutator_eq + have hzero := perfect_commutator_central_trivial f.range g.range hh + intro x y + apply commutatorElement_eq_one_iff_mul_comm.mp + have hh' := Subgroup.commutator_mem_commutator + (show f x ∈ f.range from ⟨x,rfl⟩) (show g y ∈ g.range from ⟨y,rfl⟩) + simpa [hzero] using hh' + +theorem perfect_finite_pi {ι : Type*} [Finite ι] {F : ι → Type*} + [∀ i, Group (F i)] [∀ i, Group.IsPerfect (F i)] : Group.IsPerfect (∀ i, F i) := by + classical + have he : (Abelianization.of : (∀ i, F i) →* Abelianization (∀ i, F i)) = 1 := by + apply MonoidHom.pi_ext + intro i x + exact perfect_hom_to_commGroup + (Abelianization.of.comp (MonoidHom.mulSingle F i)) x + constructor + rw [← Abelianization.ker_of, he, MonoidHom.ker_one] + +variable {Ω : Type*} + +noncomputable def sectorMask (U : Set Ω) : E →* (Ω → E) := by + classical + exact { toFun := fun s ω => if ω ∈ U then s else 1 + map_one' := by funext ω; simp + map_mul' := by intro s t; funext ω; by_cases h : ω ∈ U <;> simp [h] } + +@[simp] theorem sectorMask_of_mem (U : Set Ω) (s : E) (ω : Ω) (h : ω ∈ U) : + sectorMask U s ω = s := by + classical + simp [sectorMask, h] + +@[simp] theorem sectorMask_of_not_mem (U : Set Ω) (s : E) (ω : Ω) (h : ω ∉ U) : + sectorMask U s ω = 1 := by + classical + simp [sectorMask, h] + +theorem sectorMask_commute {U V : Set Ω} (huv : Disjoint U V) (s t : E) : + Commute (sectorMask U s) (sectorMask V t) := by + classical + funext ω + change sectorMask U s ω * sectorMask V t ω = sectorMask V t ω * sectorMask U s ω + have hd := Set.disjoint_left.mp huv + by_cases hu : ω ∈ U <;> by_cases hv : ω ∈ V <;> simp_all [sectorMask] + +theorem sectorMask_disjoint_union {U V : Set Ω} (huv : Disjoint U V) (s : E) : + sectorMask (U ∪ V) s = sectorMask U s * sectorMask V s := by + classical + funext ω + have hd := Set.disjoint_left.mp huv + by_cases hu : ω ∈ U <;> by_cases hv : ω ∈ V <;> simp_all [sectorMask, Pi.mul_apply] + +variable [Group.IsPerfect E] + +noncomputable def centralSector (φ : (Ω → E) →* H ⧸ Subgroup.center H) (U : Set Ω) : + UniversalExtension E →* H := + universalLift (QuotientGroup.mk' (Subgroup.center H)) + (QuotientGroup.mk'_surjective (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) (φ.comp (sectorMask U)) + +theorem centralSector_spec (φ : (Ω → E) →* H ⧸ Subgroup.center H) (U : Set Ω) + (s : UniversalExtension E) : + QuotientGroup.mk' (Subgroup.center H) (centralSector φ U s) = + φ (sectorMask U (universalProjection E s)) := + DFunLike.congr_fun (universalLift_spec (QuotientGroup.mk' (Subgroup.center H)) + (QuotientGroup.mk'_surjective (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) (φ.comp (sectorMask U))) s + +theorem centralSector_commute (φ : (Ω → E) →* H ⧸ Subgroup.center H) + {U V : Set Ω} (huv : Disjoint U V) (s t : UniversalExtension E) : + Commute (centralSector φ U s) (centralSector φ V t) := by + apply perfect_maps_commute_of_central (QuotientGroup.mk' (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) (centralSector φ U) (centralSector φ V) ?_ s t + intro x y + rw [centralSector_spec, centralSector_spec] + exact (sectorMask_commute huv _ _).map φ + +def commutingProduct (f g : E →* H) (hc : ∀ s t, Commute (f s) (g t)) : E →* H := + (f.noncommCoprod g hc).comp ((MonoidHom.id E).prod (MonoidHom.id E)) + +omit [Group.IsPerfect E] in +@[simp] theorem commutingProduct_apply (f g : E →* H) + (hc : ∀ s t, Commute (f s) (g t)) (s : E) : + commutingProduct f g hc s = f s * g s := rfl + +theorem centralSector_union (φ : (Ω → E) →* H ⧸ Subgroup.center H) + {U V : Set Ω} (huv : Disjoint U V) (s : UniversalExtension E) : + centralSector φ (U ∪ V) s = centralSector φ U s * centralSector φ V s := by + let p := commutingProduct (centralSector φ U) (centralSector φ V) + (centralSector_commute φ huv) + have hp : centralSector φ (U ∪ V) = p := by + apply perfect_lift_unique (QuotientGroup.mk' (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) + ext t + simp only [MonoidHom.comp_apply, p, commutingProduct_apply, map_mul, centralSector_spec] + rw [sectorMask_disjoint_union huv, map_mul] + exact DFunLike.congr_fun hp s + +@[simp] theorem centralSector_empty (φ : (Ω → E) →* H ⧸ Subgroup.center H) : + centralSector φ ∅ = 1 := by + apply perfect_lift_unique (QuotientGroup.mk' (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) + ext s + simp only [MonoidHom.comp_apply, centralSector_spec, MonoidHom.one_apply, map_one] + have h : sectorMask (∅ : Set Ω) (universalProjection E s) = 1 := by ext ω; simp + rw [h, map_one] + +theorem centralSector_trivial (φ : (Ω → E) →* H ⧸ Subgroup.center H) + (U : Set Ω) (hU : φ.comp (sectorMask U) = 1) : centralSector φ U = 1 := by + apply perfect_lift_unique (QuotientGroup.mk' (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) + ext s + rw [MonoidHom.comp_apply, centralSector_spec] + have ht := DFunLike.congr_fun hU (universalProjection E s) + simpa only [MonoidHom.comp_apply, MonoidHom.one_apply, map_one] using ht + +def assignmentPullback {Ω' : Type*} (r : Ω' → Ω) : (Ω → E) →* (Ω' → E) where + toFun f := f ∘ r + map_one' := rfl + map_mul' _ _ := rfl + +theorem centralSector_refine {Ω' : Type*} (r : Ω' → Ω) + (φ : (Ω' → E) →* H ⧸ Subgroup.center H) (U : Set Ω) : + centralSector (φ.comp (assignmentPullback r)) U = centralSector φ (r ⁻¹' U) := by + apply perfect_lift_unique (QuotientGroup.mk' (Subgroup.center H)) + (by rw [QuotientGroup.ker_mk']) + ext s + simp only [MonoidHom.comp_apply, centralSector_spec] + congr 1 + +noncomputable def centralSectorProduct [Fintype Ω] + (φ : (Ω → E) →* H ⧸ Subgroup.center H) : (Ω → UniversalExtension E) →* H := + MonoidHom.noncommPiCoprod (fun ω => centralSector φ {ω}) + (fun _ _ h => centralSector_commute φ (Set.disjoint_singleton.mpr h)) + +@[simp] theorem centralSectorProduct_single [Fintype Ω] [DecidableEq Ω] + (φ : (Ω → E) →* H ⧸ Subgroup.center H) (ω : Ω) (s : UniversalExtension E) : + centralSectorProduct φ (Pi.mulSingle ω s) = centralSector φ {ω} s := by + classical + exact MonoidHom.noncommPiCoprod_mulSingle _ _ _ + +def assignmentProjection : (Ω → UniversalExtension E) →* (Ω → E) where + toFun s ω := universalProjection E (s ω) + map_one' := by ext ω; exact map_one _ + map_mul' s t := by ext ω; exact map_mul _ _ _ + +theorem assignmentProjection_surjective : + Function.Surjective (assignmentProjection (E := E) (Ω := Ω)) := by + intro f + choose s hs using fun ω => universalProjection_surjective E (f ω) + exact ⟨s, funext hs⟩ + +theorem centralSectorProduct_spec [Fintype Ω] + (φ : (Ω → E) →* H ⧸ Subgroup.center H) : + (QuotientGroup.mk' (Subgroup.center H)).comp (centralSectorProduct φ) = + φ.comp assignmentProjection := by + classical + apply MonoidHom.pi_ext + intro ω s + simp only [MonoidHom.comp_apply, centralSectorProduct_single, centralSector_spec] + congr 1 + ext ν + by_cases h : ν = ω + · subst ν + simp [assignmentProjection] + · simp [sectorMask, assignmentProjection, h] + +theorem centralSectorProduct_surjective [Fintype Ω] [Group.IsPerfect H] + (φ : (Ω → E) →* H ⧸ Subgroup.center H) (hφ : Function.Surjective φ) : + Function.Surjective (centralSectorProduct φ) := by + let : Group.IsPerfect (Ω → UniversalExtension E) := perfect_finite_pi + have hs : Function.Surjective + ((QuotientGroup.mk' (Subgroup.center H)).comp (centralSectorProduct φ)) := by + rw [centralSectorProduct_spec] + exact hφ.comp assignmentProjection_surjective + apply MonoidHom.range_eq_top.mp + rw [perfect_lift_range (centralSectorProduct φ) (QuotientGroup.mk' (Subgroup.center H)) + hs (by rw [QuotientGroup.ker_mk']), Group.IsPerfect.commutator_eq_top] + +theorem centralSector_generate [Fintype Ω] [Group.IsPerfect H] + (φ : (Ω → E) →* H ⧸ Subgroup.center H) (hφ : Function.Surjective φ) : + (⨆ ω : Ω, (centralSector φ {ω}).range) = ⊤ := by + have hr := MonoidHom.range_eq_top.mpr (centralSectorProduct_surjective φ hφ) + calc + _ = (centralSectorProduct φ).range := by + unfold centralSectorProduct + exact (MonoidHom.noncommPiCoprod_range _).symm + _ = ⊤ := hr + +end CanonicalSectors + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CellGeometry.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CellGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..20bdafb1f70347e350529f32645a5769b9ab5143 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CellGeometry.lean @@ -0,0 +1,71 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.WindowCellPartition + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CellGeometry + +theorem coordinateInterval_union {a : ℕ} (j : Fin 2) (u v w : CutRing) + (huv : ordinary u ≤ ordinary v) (hvw : ordinary v ≤ ordinary w) + (hlen : ordinary w-ordinary u < 1) : + coordinateInterval a j u w = coordinateInterval a j u v ⊔ coordinateInterval a j v w := by + apply Subtype.ext + ext p + change p ∈ coordinateBetween a j u w ↔ p ∈ coordinateBetween a j u v ∨ p ∈ coordinateBetween a j v w + rw [mem_coordinateBetween_iff j u w (huv.trans hvw) hlen, + mem_coordinateBetween_iff j u v huv (by linarith), + mem_coordinateBetween_iff j v w hvw (by linarith)] + constructor + · rintro ⟨k,hk,hk'⟩ + by_cases hh : coordinate j p+(k:ℝ) < ordinary v + · exact Or.inl ⟨k,hk,hh⟩ + · exact Or.inr ⟨k,le_of_not_gt hh,hk'⟩ + · rintro (⟨k,hk,hk'⟩|⟨k,hk,hk'⟩) + · exact ⟨k,hk,hk'.trans_le hvw⟩ + · exact ⟨k,huv.trans hk,hk'⟩ + +theorem coordinateInterval_nonempty {a : ℕ} (j : Fin 2) (u v : CutRing) + (huv : ordinary u < ordinary v) (hlen : ordinary v-ordinary u < 1) : + (coordinateInterval a j u v).val.Nonempty := by + have hd : 0 < ordinary v-ordinary u := sub_pos.mpr huv + have hp : ∃ p : GenericSquare a, coordinate j p < ordinary v-ordinary u := by + fin_cases j + · obtain ⟨p,hp,_⟩ := generic_rectangle a 0 (ordinary v-ordinary u) 0 1 + (by norm_num) hlen.le hd (by norm_num) (by norm_num) (by norm_num) + exact ⟨p,hp.2⟩ + · obtain ⟨p,_,hp⟩ := generic_rectangle a 0 1 0 (ordinary v-ordinary u) + (by norm_num) (by norm_num) (by norm_num) (by norm_num) hlen.le hd + exact ⟨p,hp.2⟩ + obtain ⟨p,hp⟩ := hp + refine ⟨translate a (coordinateShift j u) p,?_⟩ + change translate a (-coordinateShift j u) (translate a (coordinateShift j u) p) ∈ coordinateArc a j (v-u) + rw [← translate_add,neg_add_cancel,translate_zero] + change coordinate j p < Int.fract (ordinary (v-u)) + rw [map_sub,Int.fract_eq_self.mpr ⟨hd.le,hlen⟩] + exact hp + +theorem windowCell_nonempty {a : ℕ} (j : Fin 2) (n : ℕ) (hn : 201 ≤ n) (q : ℤ) (i : Fin n) : + (windowCell a j n q i).val.Nonempty := by + apply coordinateInterval_nonempty + · exact windowCut_strictMono n q (Fin.castSucc_lt_succ (i := i)) + · have hn' : (200:ℝ) < n := by exact_mod_cast (by omega : 200 < n) + exact (windowCut_mesh n q i).trans_lt ((div_lt_one (by linarith)).mpr hn') + +theorem windowCell_axis_resolved {a : ℕ} {r : CutRing} (j : Fin 2) (n : ℕ) (hn : 0 < n) (q : ℤ) (i : Fin n) : + ResolvedBy (fun z => (InitialCoverSystem.primitiveTests (a := a) (r := r) + (axisWindowPrimitives j n q) z).val) (windowCell a j n q i).val := + axisInterval_resolved j n q _ _ (windowCut_label n q hn i.castSucc) (windowCut_label n q hn i.succ) + +end CellGeometry + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ChartBoundaryEndpoints.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ChartBoundaryEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..b541f898d465875218931f0dccd88ae8824c52e6 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ChartBoundaryEndpoints.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.OpenAffineCharts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ChartBoundaryEndpoints +open Classical Set + +def squareBoundaryCuts : Finset PlaneCut := {(0,0),(0,1),(1,0),(1,1)} + +theorem interval_endpoints_closed {X : Type*} [TopologicalSpace X] {f : ℝ → X} + (hf : Continuous f) {A : Set X} (hA : IsClosed A) {L U : ℝ} (hLU : L < U) + (h : ∀r ∈ Ioo L U,f r ∈ A) : f L ∈ A ∧ f U ∈ A := by + have hs : closure (Ioo L U) ⊆ f ⁻¹' A := (hA.preimage hf).closure_subset_iff.mpr h + rw [closure_Ioo hLU.ne] at hs + exact ⟨hs (left_mem_Icc.mpr hLU.le),hs (right_mem_Icc.mpr hLU.le)⟩ + +theorem squareBoundaryCuts_of_closed_not_open {a : ℕ} {p : ℝ×ℝ} + (hp : p ∈ Icc (0:ℝ) 1 ×ˢ Icc (0:ℝ) 1) (hn : p ∉ squareInterior) : + ∃l ∈ squareBoundaryCuts,cutForm a l.1 p=ordinary l.2 := by + by_cases hx₀ : p.1=0 + · exact ⟨(0,0),by simp [squareBoundaryCuts],by simp [cutForm,hx₀]⟩ + by_cases hx₁ : p.1=1 + · exact ⟨(0,1),by simp [squareBoundaryCuts],by simp [cutForm,hx₁]⟩ + by_cases hy₀ : p.2=0 + · exact ⟨(1,0),by simp [squareBoundaryCuts],by simp [cutForm,hy₀]⟩ + by_cases hy₁ : p.2=1 + · exact ⟨(1,1),by simp [squareBoundaryCuts],by simp [cutForm,hy₁]⟩ + exact False.elim (hn ⟨⟨lt_of_le_of_ne hp.1.1 (Ne.symm hx₀),lt_of_le_of_ne hp.1.2 hx₁⟩, + ⟨lt_of_le_of_ne hp.2.1 (Ne.symm hy₀),lt_of_le_of_ne hp.2.2 hy₁⟩⟩) + +theorem squareBoundaryCuts_nonzero_on_interior {a : ℕ} {p : ℝ×ℝ} + (hp : p ∈ squareInterior) {l : PlaneCut} (hl : l ∈ squareBoundaryCuts) : + cutForm a l.1 p ≠ ordinary l.2 := by + simp only [squareBoundaryCuts,Finset.mem_insert,Finset.mem_singleton] at hl + rcases hl with rfl|rfl|rfl|rfl + · simpa [cutForm] using ne_of_gt hp.1.1 + · simpa [cutForm] using ne_of_lt hp.1.2 + · simpa [cutForm] using ne_of_gt hp.2.1 + · simpa [cutForm] using ne_of_lt hp.2.2 + +theorem barrier_geometric_endpoint_cut {a : ℕ} {j : Fin 4} {c : CutRing} {N r : ℝ} + (hc : c ∈ barrierCandidate a j N) + (hr : r=barrierLineLower a j c ∨ r=barrierLineUpper a j c) : + ∃l ∈ squareBoundaryCuts,j ≠ l.1 ∧ cutForm a l.1 (barrierLinePoint a j c r)=ordinary l.2 := by + have hgap := barrierLineLower_lt_upper hc + have hh := interval_endpoints_closed (barrierLinePoint_continuous a j c) + (isClosed_Icc.prod isClosed_Icc) hgap + (fun t ht => let hp := (barrierLinePoint_interior_iff hc t).mpr ht + show barrierLinePoint a j c t ∈ Icc (0:ℝ) 1 ×ˢ Icc (0:ℝ) 1 from + ⟨⟨hp.1.1.le,hp.1.2.le⟩,⟨hp.2.1.le,hp.2.2.le⟩⟩) + have hclosed : barrierLinePoint a j c r ∈ Icc (0:ℝ) 1 ×ˢ Icc (0:ℝ) 1 := + hr.elim (fun h => h ▸ hh.1) (fun h => h ▸ hh.2) + have hn : barrierLinePoint a j c r ∉ squareInterior := by + rw [barrierLinePoint_interior_iff hc r] + rcases hr with rfl|rfl <;> simp + obtain ⟨l,hl,hcut⟩ := squareBoundaryCuts_of_closed_not_open hclosed hn + refine ⟨l,hl,?_,hcut⟩ + intro he + obtain ⟨p,hp,hpc⟩ := hc.2 + have hjc := cutForm_barrierLinePoint a j c r + rw [←he] at hcut + have hp' := hpc.trans (hjc.symm.trans hcut) + rw [he] at hp' + exact squareBoundaryCuts_nonzero_on_interior hp hl hp' + +theorem chart_line_endpoints_forced {a : ℕ} (T : Finset PlaneCut) (p : GenericSquare a) + {j : Fin 4} {c : CutRing} {N x : ℝ} (hc : c ∈ barrierCandidate a j N) + (hx : barrierLinePoint a j c x ∈ openSquareChart T p) : + ∃L U : ℝ,x ∈ Ioo L U ∧ + L ∈ Icc (barrierLineLower a j c) (barrierLineUpper a j c) ∧ + U ∈ Icc (barrierLineLower a j c) (barrierLineUpper a j c) ∧ + (∀r ∈ Ioo L U,barrierLinePoint a j c r ∈ openSquareChart T p) ∧ + (∀r ∈ ({L,U} : Finset ℝ),∃l ∈ T ∪ squareBoundaryCuts,j ≠ l.1 ∧ + cutForm a l.1 (barrierLinePoint a j c r)=ordinary l.2) := by + obtain ⟨L,U,hx,hL,hU,hchart,hend⟩ := openSquareChart_line_interval T p hc hx + refine ⟨L,U,hx,hL,hU,hchart,?_⟩ + intro r hr + rcases hend r hr with h | h | h + · obtain ⟨l,hl,hj,hc⟩ := barrier_geometric_endpoint_cut hc (Or.inl h) + exact ⟨l,Finset.mem_union_right _ hl,hj,hc⟩ + · obtain ⟨l,hl,hj,hc⟩ := barrier_geometric_endpoint_cut hc (Or.inr h) + exact ⟨l,Finset.mem_union_right _ hl,hj,hc⟩ + · obtain ⟨l,hl,hj,hc⟩ := h + exact ⟨l,Finset.mem_union_left _ hl,hj,hc⟩ + +end ChartBoundaryEndpoints + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ChartQuadrants.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ChartQuadrants.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e21e0d507ff351313507fbf1903680e49f01f2a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ChartQuadrants.lean @@ -0,0 +1,171 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.IntersectionControl + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ChartQuadrants + +theorem coordinateRectangle_lift {a : ℕ} (u v : Fin 2 → CutRing) + (huv : ∀ j, ordinary (u j) ≤ ordinary (v j)) + (hlen : ∀ j, ordinary (v j)-ordinary (u j) < 1) + (p : GenericSquare a) (hp : p ∈ (coordinateRectangle a u v).val) : + ∃ t : ℝ × ℝ, p.val = (Int.fract t.1,Int.fract t.2) ∧ + (ordinary (u 0) ≤ t.1 ∧ t.1 < ordinary (v 0)) ∧ + (ordinary (u 1) ≤ t.2 ∧ t.2 < ordinary (v 1)) := by + change p ∈ coordinateBetween a 0 (u 0) (v 0) ∧ + p ∈ coordinateBetween a 1 (u 1) (v 1) at hp + obtain ⟨k,hk⟩ := (mem_coordinateBetween_iff 0 (u 0) (v 0) (huv 0) (hlen 0) p).mp hp.1 + obtain ⟨l,hl⟩ := (mem_coordinateBetween_iff 1 (u 1) (v 1) (huv 1) (hlen 1) p).mp hp.2 + refine ⟨(coordinate 0 p+(k:ℝ),coordinate 1 p+(l:ℝ)),?_,hk,hl⟩ + simp only [Int.fract_add_intCast,Int.fract_eq_self.mpr (coordinate_bounds 0 p), + Int.fract_eq_self.mpr (coordinate_bounds 1 p)] + rfl + +theorem coordinateRectangle_sign {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (u v : Fin 2 → CutRing) + (huv : ∀ k, ordinary (u k) ≤ ordinary (v k)) + (hu : ∀ k, -ordinary r < ordinary (u k)) + (hv : ∀ k, ordinary (v k) < ordinary r) + (hside : ∀ t : ℝ × ℝ, + (ordinary (u 0) ≤ t.1 ∧ t.1 < ordinary (v 0)) → + (ordinary (u 1) ≤ t.2 ∧ t.2 < ordinary (v 1)) → 0 ≤ cutForm a j t) : + coordinateRectangle a u v ≤ clippedSlopePrimitive a r j := by + intro p hp + obtain ⟨t,ht,hx,hy⟩ := coordinateRectangle_lift u v huv + (fun k => by have h1 := hu k; have h2 := hv k; linarith [hr.2]) p hp + apply (mem_clippedSlope_lift r j hr p t ?_ ht).mpr + · exact hside t hx hy + · exact ⟨⟨(hu 0).trans_le hx.1,hx.2.trans (hv 0)⟩, + ⟨(hu 1).trans_le hy.1,hy.2.trans (hv 1)⟩⟩ + +theorem coordinateRectangle_negative_sign {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (u v : Fin 2 → CutRing) + (huv : ∀ k, ordinary (u k) ≤ ordinary (v k)) + (hu : ∀ k, -ordinary r < ordinary (u k)) + (hv : ∀ k, ordinary (v k) < ordinary r) + (hside : ∀ t : ℝ × ℝ, + (ordinary (u 0) ≤ t.1 ∧ t.1 < ordinary (v 0)) → + (ordinary (u 1) ≤ t.2 ∧ t.2 < ordinary (v 1)) → cutForm a j t < 0) : + coordinateRectangle a u v ≤ (clippedSlopePrimitive a r j)ᶜ := by + intro p hp hpos + obtain ⟨t,ht,hx,hy⟩ := coordinateRectangle_lift u v huv + (fun k => by have h1 := hu k; have h2 := hv k; linarith [hr.2]) p hp + have hR : (-ordinary r < t.1 ∧ t.1 < ordinary r) ∧ + (-ordinary r < t.2 ∧ t.2 < ordinary r) := + ⟨⟨(hu 0).trans_le hx.1,hx.2.trans (hv 0)⟩, + ⟨(hu 1).trans_le hy.1,hy.2.trans (hv 1)⟩⟩ + have hh := (mem_clippedSlope_lift r j hr p t hR ht).mp hpos + exact (not_lt_of_ge hh) (hside t hx hy) + +theorem northwest_quadrant_sign {a : ℕ} (r s : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (hs : 0 < ordinary s ∧ ordinary s < ordinary r) : + coordinateRectangle a ![-s,0] ![0,s] ≤ clippedSlopePrimitive a r 2 := by + apply coordinateRectangle_sign r 2 hr + · intro k; fin_cases k <;> simp <;> linarith [hs.1] + · intro k; fin_cases k <;> simp <;> linarith [hr.1,hs.2] + · intro k; fin_cases k <;> simp <;> linarith [hr.1,hs.2] + · intro t hx hy + change ordinary (-s) ≤ t.1 ∧ t.1 < ordinary 0 at hx + change ordinary 0 ≤ t.2 ∧ t.2 < ordinary s at hy + have hlambda : 0 ≤ Real.goldenRatio^a := pow_nonneg Real.goldenRatio_pos.le _ + have hx' : t.1 ≤ 0 := by simpa using hx.2.le + have hy' : 0 ≤ t.2 := by simpa using hy.1 + change 0 ≤ t.2-Real.goldenRatio^a*t.1 + exact sub_nonneg.mpr ((mul_nonpos_of_nonneg_of_nonpos hlambda hx').trans hy') + +theorem southeast_quadrant_sign {a : ℕ} (r s : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (hs : 0 < ordinary s ∧ ordinary s < ordinary r) : + coordinateRectangle a ![0,-s] ![s,0] ≤ (clippedSlopePrimitive a r 2)ᶜ := by + apply coordinateRectangle_negative_sign r 2 hr + · intro k; fin_cases k <;> simp <;> linarith [hs.1] + · intro k; fin_cases k <;> simp <;> linarith [hr.1,hs.2] + · intro k; fin_cases k <;> simp <;> linarith [hr.1,hs.2] + · intro t hx hy + change ordinary 0 ≤ t.1 ∧ t.1 < ordinary s at hx + change ordinary (-s) ≤ t.2 ∧ t.2 < ordinary 0 at hy + have hlambda : 0 ≤ Real.goldenRatio^a := pow_nonneg Real.goldenRatio_pos.le _ + have hx' : 0 ≤ t.1 := by simpa using hx.1 + have hy' : t.2 < 0 := by simpa using hy.2 + change t.2-Real.goldenRatio^a*t.1 < 0 + exact sub_neg.mpr (hy'.trans_le (mul_nonneg hlambda hx')) + +end ChartQuadrants + +section ChartAction +namespace ActualLawfulTable +variable {E H Q Ω : Type*} [Group E] [Group H] [Group Q] [Group.IsPerfect E] + {q : H →* Q} {v : (Ω → E) →* Q} (T : ActualLawfulTable q v) + +theorem sector_same_action (U V W : Set Ω) (he : U ∩ W = V ∩ W) : + SameActionOn (T.sector U) (T.sector V) (T.sector W).range := by + intro s x hx + obtain ⟨t,rfl⟩ := hx + rw [T.sector_split U W s,T.sector_split V W s] + rw [conj_mul_of_commute _ _ _ + (T.sector_commute (Set.disjoint_left.mpr (by aesop)) s t)] + rw [conj_mul_of_commute _ _ _ + (T.sector_commute (Set.disjoint_left.mpr (by aesop)) s t)] + rw [he] +end ActualLawfulTable + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι : Type*} [Finite ι] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem fullGeometricSector_same_action (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (U V W : polygonAlgebra a) + (hU : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) U.val) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) W.val) + (he : U ⊓ W = V ⊓ W) : + SameActionOn (B.fullGeometricSector hlarge P h U) + (B.fullGeometricSector hlarge P h V) (B.fullGeometricSector hlarge P h W).range := by + apply (B.fullPrimitiveTable hlarge P h).sector_same_action + rw [← resolvedPolygonMask_inter _ U.val W.val hU hW, + ← resolvedPolygonMask_inter _ V.val W.val hV hW] + exact congrArg (resolvedPolygonMask (primitiveTests (a := a) (r := r) P)) + (congrArg Subtype.val he) + +theorem chart_action_transfer (hlarge : 20 ≤ m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (U V W : polygonAlgebra a) + (hU : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) U.val) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) W.val) + (he : U ⊓ W = V ⊓ W) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hcontrol : SmallControlled B.c f (B.fullGeometricSector (by omega) P h W)) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) : + ∀ x ∈ f.range, + B.fullGeometricSector (by omega) P h U (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) P h U (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) P h V (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) P h V (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + apply small_control_comparison _ B.c B.constant_aligned B.disjoint_aligned f _ hf hcontrol I.val _ _ + (B.fullGeometricSector_supported (by omega) P h U hU I ⟨s,rfl⟩) + (B.fullGeometricSector_supported (by omega) P h V hV I ⟨s,rfl⟩) + (by have hh := I.property.2; simp only [Fintype.card_fin]; omega) + intro J t + exact B.fullGeometricSector_same_action (by omega) P h U V W hU hV hW he _ _ ⟨_,rfl⟩ + +end InitialCoverSystem +end ChartAction + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClippedGerms.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClippedGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..178d54cca6c507177f33fdb7ba4e73112ccc8998 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClippedGerms.lean @@ -0,0 +1,178 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ConcurrentCoordinateGates +import OAI.GroupTheory.SimpleAmenable.Homology.InwardTemplateResolutions +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InwardGermTransport + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section ClippedGerms + +structure ClippedGerm (a : ℕ) (r : CutRing) (j : Fin 4) + (u : CutRing × CutRing) (z : ℝ × ℝ) where + period : Fin 2 → ℤ + radius : ℝ + radius_pos : 0
halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r slope)).val) + (p : GenericSquare a) (hp : p ∈ (C.inwardMargin T.vertex T.offset z).val) : + p ∈ (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r slope)) ()).val ↔ + (∀ d, p ∉ (C.localDecision T.vertex T.offset z (j (lo d)) (c (lo d))).val ∧ + p ∈ (C.localDecision T.vertex T.offset z (j (hi d)) (c (hi d))).val) ∧ + p ∉ (C.localDecision T.vertex T.offset z (j s) (c s)).val := by + obtain ⟨q,hq,he⟩ := T.assignment_realized hr hz₁ hz₂ p hp + (Metric.ball z G.radius) Metric.isOpen_ball (Metric.mem_ball_self G.radius_pos) + have hd (i : ι) : q ∈ (cutPolygon a (j i) (c i)).val ↔ + p ∈ (C.localDecision T.vertex T.offset z (j i) (c i)).val := by + simpa only [polygonAssignment,decide_eq_true_eq] using Bool.eq_iff_iff.mp (congrFun he i) + have hmodel : p ∈ (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r slope)) ()).val ↔ + q ∈ (spatialTranslate u (clippedSlopePrimitive a r slope)).val := by + change polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p ∈ + polygonFormalMask (fun i => cutPolygon a (j i) (c i)) _ ↔ _ + rw [← he] + exact polygonFormalMask_mem _ _ hR q + rw [hmodel,G.valid q hq] + apply and_congr + · apply forall_congr' + intro d + apply and_congr + · simpa only [cutPolygon,halfPlane,Set.mem_ofPred_eq,(hlo d).1,(hlo d).2,cutForm_axis,not_lt,offset] + using not_congr (hd (lo d)) + · simpa only [cutPolygon,halfPlane,Set.mem_ofPred_eq,(hhi d).1,(hhi d).2,cutForm_axis,offset] + using hd (hi d) + · simpa only [cutPolygon,halfPlane,Set.mem_ofPred_eq,hs.1,hs.2,not_lt,offset] using not_congr (hd s) + +end ClippedGerm +end ClippedGerms + +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) {κ : Type*} [Finite κ] + +noncomputable def coordinateGate (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (z : ℝ × ℝ) (j : κ → Fin 2) (c : κ → CutRing) (σ : κ → Bool) : polygonAlgebra a := + C.inwardMargin t u z ⊓ polygonBooleanPullback + (fun i => C.localDecision t u z (axisDirection (j i)) (c i)) {σ} + +theorem coordinateGate_mem (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (z : ℝ × ℝ) (j : κ → Fin 2) (c : κ → CutRing) (σ : κ → Bool) + (p : GenericSquare a) : + p ∈ (C.coordinateGate t u z j c σ).val ↔ p ∈ (C.inwardMargin t u z).val ∧ + polygonAssignment (fun i => C.localDecision t u z (axisDirection (j i)) (c i)) p=σ := Iff.rfl + +end ConcurrentGeometry + +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + {κ : Type*} [Finite κ] + +omit [Group.IsPerfect (alternatingGroup (Fin (m+1)))] in +theorem coordinateGate_resolved (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (z : ℝ × ℝ) (j : κ → Fin 2) (c : κ → CutRing) (σ : κ → Bool) : + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (A.concurrentCoordinates t u) i).val) + (A.geometry.coordinateGate t u z j c σ).val := by + intro x y hh + apply and_congr (A.coordinate_inward_resolved t u z x y hh) + exact polygonBooleanPullback_resolved _ _ + (fun i => A.coordinate_localDecision_resolved t u z (j i) (c i)) {σ} x y hh + +theorem coordinateGate_control (hlarge : 20 ≤ m+1) + (t : VertexType (commonVertexDenominator a)) (u : CutRing × CutRing) (z : ℝ × ℝ) + (j : κ → Fin 2) (c : κ → CutRing) (σ : κ → Bool) + (n : ℕ) (q : Fin 2 → ℤ) (W : polygonAlgebra a) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (coordinateWindowPrimitives n q) i).val) W.val) + (hinc : W ≤ A.geometry.coordinateGate t u z j c σ) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q W)) : + SmallControlled B.c f (B.fullGeometricSector (by omega) (A.concurrentPrimitives t u) (A.concurrentLaw t u) + (A.geometry.coordinateGate t u z j c σ)) := + A.coordinate_control_inward_gate hlarge t u _ (A.coordinateGate_resolved t u z j c σ) n q W hW hinc f hf hc + +end InitialCoverSystem.PatchAtlas + +namespace ClippedGerm +variable {a : ℕ} {r : CutRing} {slope : Fin 4} {u : CutRing × CutRing} {z : ℝ × ℝ} + (G : ClippedGerm a r slope u z) + +noncomputable def axialCut (i : Fin 2 × Bool) : CutRing := + if i.2 then pointCoordinate G.offset i.1+r else pointCoordinate G.offset i.1-r + +theorem model_restrict_gate {ι : Type*} [Finite ι] {C : ConcurrentGeometry a r} + {j : ι → Fin 4} {c : ι → CutRing} + (T : C.InwardChart j c z) (hr : 0 halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r slope)).val) + (σ : Fin 2 × Bool → Bool) : + T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r slope)) () ⊓ + C.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ = + (if ∀ d, σ (d,false)=false ∧ σ (d,true)=true then + (C.localDecision T.vertex T.offset z (j s) (c s))ᶜ else ⊥) ⊓ + C.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ := by + classical + apply Subtype.ext + ext p + by_cases hgate : p ∈ (C.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ).val + · have hmargin := hgate.1 + have hassign := hgate.2 + have hlo' (d : Fin 2) : p ∉ (C.localDecision T.vertex T.offset z (j (lo d)) (c (lo d))).val ↔ + σ (d,false)=false := by + have he := congrFun hassign (d,false) + simpa only [polygonAssignment,axialCut,Bool.false_eq_true,↓reduceIte,Prod.fst, + (hlo d).1,(hlo d).2,decide_eq_false_iff_not] using (congrArg (fun b => b=false) he).to_iff + have hhi' (d : Fin 2) : p ∈ (C.localDecision T.vertex T.offset z (j (hi d)) (c (hi d))).val ↔ + σ (d,true)=true := by + have he := congrFun hassign (d,true) + simpa only [polygonAssignment,axialCut,↓reduceIte,Prod.fst, + (hhi d).1,(hhi d).2,decide_eq_true_eq] using (congrArg (fun b => b=true) he).to_iff + have he := G.model_formula T hr hz₁ hz₂ lo hi s hlo hhi hs hR p hmargin + have hc : (∀ d, p ∉ (C.localDecision T.vertex T.offset z (j (lo d)) (c (lo d))).val ∧ + p ∈ (C.localDecision T.vertex T.offset z (j (hi d)) (c (hi d))).val) ↔ + ∀ d, σ (d,false)=false ∧ σ (d,true)=true := + forall_congr' (fun d => and_congr (hlo' d) (hhi' d)) + change (_ ∧ _) ↔ (_ ∧ _) + simp only [hgate,and_true] + rw [he,hc] + split_ifs with HH <;> simp only [HH,forall_const,true_and,false_and] <;> rfl + · change (_ ∧ _) ↔ (_ ∧ _) + simp only [hgate,and_false] + +end ClippedGerm + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClippedIntervals.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClippedIntervals.lean new file mode 100644 index 0000000000000000000000000000000000000000..95e37bad0486dec423b8bb3e8ad1ba7292e44b6b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClippedIntervals.lean @@ -0,0 +1,133 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SortedAxisCuts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ClippedIntervals +attribute [local instance] cutOrdinaryOrder + +theorem coordinateInterval_mem_lifted {a : ℕ} (d : Fin 2) (b u v : CutRing) + (hbu : ordinary b ≤ ordinary u) (huv : ordinary u ≤ ordinary v) + (hvb : ordinary v < ordinary b+1) (x : GenericSquare a) : + x ∈ (coordinateInterval a d u v).val ↔ + ordinary u ≤ liftedCoordinate d b x ∧ liftedCoordinate d b x < ordinary v := by + change x ∈ coordinateBetween a d u v ↔ _ + rw [mem_coordinateBetween_iff d u v huv (by linarith) x] + constructor + · rintro ⟨k,hk,hk'⟩ + have hf : (⌊coordinate d x-ordinary b⌋:ℤ) = -k := by + apply Int.floor_eq_iff.mpr + simp only [Int.cast_neg] + constructor <;> linarith + simp only [liftedCoordinate,hf,Int.cast_neg,sub_neg_eq_add] + exact ⟨hk,hk'⟩ + · rintro ⟨hk,hk'⟩ + refine ⟨-⌊coordinate d x-ordinary b⌋,?_,?_⟩ + · simpa only [liftedCoordinate,Int.cast_neg,sub_eq_add_neg] using hk + · simpa only [liftedCoordinate,Int.cast_neg,sub_eq_add_neg] using hk' + +theorem coordinateInterval_prefix_difference {a : ℕ} (d : Fin 2) (b u v : CutRing) + (hbu : ordinary b ≤ ordinary u) (huv : ordinary u ≤ ordinary v) + (hvb : ordinary v < ordinary b+1) : + coordinateInterval a d u v = coordinateInterval a d b v \ coordinateInterval a d b u := by + apply Subtype.ext + ext x + change x ∈ (coordinateInterval a d u v).val ↔ + x ∈ (coordinateInterval a d b v).val ∧ x ∉ (coordinateInterval a d b u).val + rw [coordinateInterval_mem_lifted d b u v hbu huv hvb, + coordinateInterval_mem_lifted d b b v le_rfl (hbu.trans huv) hvb, + coordinateInterval_mem_lifted d b b u le_rfl hbu (by linarith)] + have hb := (liftedCoordinate_bounds d b x).1 + constructor + · rintro ⟨h,h'⟩; exact ⟨⟨hb,h'⟩,by rintro ⟨_,h''⟩; linarith⟩ + · rintro ⟨⟨_,h'⟩,h⟩; exact ⟨by by_contra hh; exact h ⟨hb,lt_of_not_ge hh⟩,h'⟩ + +theorem coordinateInterval_prefix_clip {a : ℕ} (d : Fin 2) (u v z : CutRing) + (huv : ordinary u ≤ ordinary v) (hv : ordinary v < ordinary u+1) + (huz : ordinary u ≤ ordinary z) (hz : ordinary z < ordinary u+1) : + coordinateInterval a d u v ⊓ coordinateInterval a d u z = coordinateInterval a d u (min v z) := by + by_cases h : ordinary v ≤ ordinary z + · have hh : v ≤ z := h + rw [min_eq_left hh] + exact inf_eq_left.mpr (coordinateInterval_mono d u v u z le_rfl huv h (by linarith)) + · have hh : z ≤ v := le_of_not_ge h + rw [min_eq_right hh] + exact inf_eq_right.mpr (coordinateInterval_mono d u z u v le_rfl huz hh (by linarith)) + +theorem coordinateInterval_label_eq {a : ℕ} (d : Fin 2) (u v u' v' : CutRing) + (hu : endpointLabel u=endpointLabel u') (hv : endpointLabel v=endpointLabel v') : + coordinateInterval a d u v = coordinateInterval a d u' v' := by + have hu' : u = u'+((u.re-u'.re:ℤ):CutRing) := by + apply QuadraticAlgebra.ext <;> simp [show u.im = u'.im from hu] + have hv' : v = v'+((v.re-v'.re:ℤ):CutRing) := by + apply QuadraticAlgebra.ext <;> simp [show v.im = v'.im from hv] + apply Subtype.ext + change coordinateBetween a d u v = coordinateBetween a d u' v' + rw [hu',hv',coordinateBetween_period] + +noncomputable def clippedLabel (u v : CutRing) (q : ℤ) : CutRing := min v (labelLift u q) + +theorem clippedLabel_bounds (u v : CutRing) (q : ℤ) (huv : ordinary u ≤ ordinary v) : + ordinary u ≤ ordinary (clippedLabel u v q) ∧ ordinary (clippedLabel u v q) ≤ ordinary v := by + change u ≤ min v (labelLift u q) ∧ min v (labelLift u q) ≤ v + exact ⟨le_min huv (labelLift_bounds u q).1,min_le_left _ _⟩ + +theorem clippedLabel_label (u v : CutRing) (q : ℤ) : + endpointLabel (clippedLabel u v q)=endpointLabel v ∨ endpointLabel (clippedLabel u v q)=q := by + unfold clippedLabel + rcases le_total v (labelLift u q) with h|h + · rw [min_eq_left h]; exact Or.inl rfl + · rw [min_eq_right h]; exact Or.inr (endpointLabel_labelLift u q) + +theorem clippedLabel_mem (N : ℕ) (p : ℤ) (u v : CutRing) (q : ℤ) + (huv : ordinary u ≤ ordinary v) (hlen : ordinary v-ordinary u < 1) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+N) + (hq : p ≤ q ∧ q < p+N) : clippedLabel u v q ∈ anchorCutSet N p u v := by + apply mem_anchorCutSet N p u v _ ?_ (clippedLabel_bounds u v q huv) hlen + rcases clippedLabel_label u v q with h|h <;> rw [h] <;> assumption + +theorem coordinateInterval_anchor_formula {a : ℕ} (d : Fin 2) (u v s t : CutRing) + (huv : ordinary u ≤ ordinary v) (hlen : ordinary v-ordinary u < 1) : + coordinateInterval a d u v ⊓ coordinateInterval a d s t = + if ordinary (labelLift u (endpointLabel s)) ≤ ordinary (labelLift u (endpointLabel t)) then + coordinateInterval a d u (clippedLabel u v (endpointLabel t)) \ + coordinateInterval a d u (clippedLabel u v (endpointLabel s)) + else coordinateInterval a d u v \ (coordinateInterval a d u (clippedLabel u v (endpointLabel s)) \ + coordinateInterval a d u (clippedLabel u v (endpointLabel t))) := by + let s' := labelLift u (endpointLabel s) + let t' := labelLift u (endpointLabel t) + have hs := labelLift_bounds u (endpointLabel s) + have ht := labelLift_bounds u (endpointLabel t) + rw [coordinateInterval_label_eq d s t s' t' (by simp [s']) (by simp [t'])] + split_ifs with h + · rw [coordinateInterval_prefix_difference d u s' t' hs.1 h ht.2] + have hset : ∀ (A B C : polygonAlgebra a), A ⊓ (B \ C) = (A ⊓ B) \ (A ⊓ C) := by + intro A B C; apply Subtype.ext; ext x; change _ ∧ (_ ∧ ¬_) ↔ (_ ∧ _) ∧ ¬(_ ∧ _); tauto + rw [hset,coordinateInterval_prefix_clip d u v t' huv (by linarith) ht.1 ht.2, + coordinateInterval_prefix_clip d u v s' huv (by linarith) hs.1 hs.2] + rfl + · have hts : ordinary t' < ordinary s' := lt_of_not_ge h + have he : coordinateInterval a d s' t' = (coordinateInterval a d t' s')ᶜ := by + apply Subtype.ext + exact coordinateBetween_reverse d t' s' (by + rw [map_sub,Int.fract_eq_self.mpr ⟨by linarith,by linarith⟩]; linarith) + rw [he,coordinateInterval_prefix_difference d u t' s' ht.1 hts.le hs.2] + have hset : ∀ (A B C : polygonAlgebra a), A ⊓ (B \ C)ᶜ = A \ ((A ⊓ B) \ (A ⊓ C)) := by + intro A B C; apply Subtype.ext; ext x; change _ ∧ ¬(_ ∧ ¬_) ↔ _ ∧ ¬((_ ∧ _) ∧ ¬(_ ∧ _)); tauto + rw [hset,coordinateInterval_prefix_clip d u v s' huv (by linarith) hs.1 hs.2, + coordinateInterval_prefix_clip d u v t' huv (by linarith) ht.1 ht.2] + rfl + +end ClippedIntervals + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClosedChartOverlap.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClosedChartOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..337ab4d3c1f30068903ea51a4b7fc9a214303ba0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClosedChartOverlap.lean @@ -0,0 +1,190 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RectangularBound + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ClosedChartOverlap + +theorem planar_lift_avoidsCuts {a : ℕ} (p : GenericSquare a) (t : ℝ × ℝ) + (ht : p.val = (Int.fract t.1,Int.fract t.2)) : AvoidsCuts a t := by + have h := avoidsCuts_translate p.property.2.2 + ((⌊t.1⌋ : CutRing),(⌊t.2⌋ : CutRing)) + have he : p.val+(ordinary (⌊t.1⌋ : CutRing),ordinary (⌊t.2⌋ : CutRing)) = t := by + rw [ht] + apply Prod.ext + · change Int.fract t.1+ordinary (⌊t.1⌋ : CutRing) = t.1 + rw [map_intCast] + exact sub_add_cancel _ _ + · change Int.fract t.2+ordinary (⌊t.2⌋ : CutRing) = t.2 + rw [map_intCast] + exact sub_add_cancel _ _ + rwa [he] at h + +theorem coordinateRectangle_strict_lift {a : ℕ} (l h : Fin 2 → CutRing) + (hlh : ∀ j, ordinary (l j) ≤ ordinary (h j)) + (hlen : ∀ j, ordinary (h j)-ordinary (l j) < 1) + (p : GenericSquare a) (hp : p ∈ (coordinateRectangle a l h).val) : + ∃ t : ℝ × ℝ, p.val = (Int.fract t.1,Int.fract t.2) ∧ + (ordinary (l 0) < t.1 ∧ t.1 < ordinary (h 0)) ∧ + (ordinary (l 1) < t.2 ∧ t.2 < ordinary (h 1)) := by + obtain ⟨t,ht,hx,hy⟩ := coordinateRectangle_lift l h hlh hlen p hp + have hx' := planar_lift_avoidsCuts p t ht 0 (l 0) + have hy' := planar_lift_avoidsCuts p t ht 1 (l 1) + simp only [cutForm,Matrix.cons_val_zero,Matrix.cons_val_one] at hx' hy' + exact ⟨t,ht,⟨lt_of_le_of_ne hx.1 (Ne.symm hx'),hx.2⟩, + ⟨lt_of_le_of_ne hy.1 (Ne.symm hy'),hy.2⟩⟩ + +theorem clippedSlope_agree_on_closed_rectangle {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (u v : CutRing × CutRing) (l h : Fin 2 → CutRing) + (hlh : ∀ k, ordinary (l k) ≤ ordinary (h k)) + (hlen : ∀ k, ordinary (h k)-ordinary (l k) < 1) + (hu : ∀ k, -ordinary r ≤ ordinary (l k)-ordinary (pointCoordinate u k) ∧ + ordinary (h k)-ordinary (pointCoordinate u k) ≤ ordinary r) + (hv : ∀ k, -ordinary r ≤ ordinary (l k)-ordinary (pointCoordinate v k) ∧ + ordinary (h k)-ordinary (pointCoordinate v k) ≤ ordinary r) + (hline : integralCutForm a j u = integralCutForm a j v) : + spatialTranslate u (clippedSlopePrimitive a r j) ⊓ coordinateRectangle a l h = + spatialTranslate v (clippedSlopePrimitive a r j) ⊓ coordinateRectangle a l h := by + apply Subtype.ext + ext p + change (p ∈ (spatialTranslate u (clippedSlopePrimitive a r j)).val ∧ + p ∈ (coordinateRectangle a l h).val) ↔ + (p ∈ (spatialTranslate v (clippedSlopePrimitive a r j)).val ∧ + p ∈ (coordinateRectangle a l h).val) + by_cases hp : p ∈ (coordinateRectangle a l h).val + · obtain ⟨t,ht,hx,hy⟩ := coordinateRectangle_strict_lift l h hlh hlen p hp + have hbox (w : CutRing × CutRing) + (hw : ∀ k : Fin 2, -ordinary r ≤ ordinary (l k)-ordinary (pointCoordinate w k) ∧ + ordinary (h k)-ordinary (pointCoordinate w k) ≤ ordinary r) : + (-ordinary r < t.1-ordinary w.1 ∧ t.1-ordinary w.1 < ordinary r) ∧ + (-ordinary r < t.2-ordinary w.2 ∧ t.2-ordinary w.2 < ordinary r) := by + have hw0 := hw 0 + have hw1 := hw 1 + simp only [pointCoordinate,ite_true,Fin.isValue,show (1:Fin 2) ≠ 0 by decide,ite_false] at hw0 hw1 + constructor <;> constructor <;> linarith + rw [translated_clippedSlope_lift r j hr u p t ht (hbox u hu), + translated_clippedSlope_lift r j hr v p t ht (hbox v hv),hline] + · simp only [hp,and_false] + +end ClosedChartOverlap + +section FullTangentOverlap + +noncomputable def orderedCutMax (x y : CutRing) : CutRing := + if ordinary x ≤ ordinary y then y else x +noncomputable def orderedCutMin (x y : CutRing) : CutRing := + if ordinary x ≤ ordinary y then x else y + +@[simp] theorem ordinary_orderedCutMax (x y : CutRing) : + ordinary (orderedCutMax x y) = max (ordinary x) (ordinary y) := by + unfold orderedCutMax + split_ifs with h + · exact (max_eq_right h).symm + · exact (max_eq_left (le_of_not_ge h)).symm + +@[simp] theorem ordinary_orderedCutMin (x y : CutRing) : + ordinary (orderedCutMin x y) = min (ordinary x) (ordinary y) := by + unfold orderedCutMin + split_ifs with h + · exact (min_eq_left h).symm + · exact (min_eq_right (le_of_not_ge h)).symm + +noncomputable def clippingOverlapLower (r : CutRing) (t : CutRing × CutRing) (j : Fin 2) : CutRing := + orderedCutMax (-r) (pointCoordinate t j-r) +noncomputable def clippingOverlapUpper (r : CutRing) (t : CutRing × CutRing) (j : Fin 2) : CutRing := + orderedCutMin r (pointCoordinate t j+r) + +theorem clippingOverlap_bounds (r : CutRing) (t : CutRing × CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (ht : ∀ j, |ordinary (pointCoordinate t j)| ≤ 2*ordinary r) (j : Fin 2) : + ordinary (clippingOverlapLower r t j) ≤ ordinary (clippingOverlapUpper r t j) ∧ + ordinary (clippingOverlapUpper r t j)-ordinary (clippingOverlapLower r t j) < 1 ∧ + (-ordinary r ≤ ordinary (clippingOverlapLower r t j) ∧ + ordinary (clippingOverlapUpper r t j) ≤ ordinary r) ∧ + (-ordinary r ≤ ordinary (clippingOverlapLower r t j)-ordinary (pointCoordinate t j) ∧ + ordinary (clippingOverlapUpper r t j)-ordinary (pointCoordinate t j) ≤ ordinary r) := by + have hh := abs_le.mp (ht j) + simp only [clippingOverlapLower,clippingOverlapUpper,ordinary_orderedCutMax, + ordinary_orderedCutMin,map_sub,map_neg,map_add] + have h1 := le_max_left (-ordinary r) (ordinary (pointCoordinate t j)-ordinary r) + have h2 := le_max_right (-ordinary r) (ordinary (pointCoordinate t j)-ordinary r) + have h3 := min_le_left (ordinary r) (ordinary (pointCoordinate t j)+ordinary r) + have h4 := min_le_right (ordinary r) (ordinary (pointCoordinate t j)+ordinary r) + refine ⟨max_le (le_min (by linarith [hr.1]) (by linarith)) + (le_min (by linarith) (by linarith [hr.1])),by linarith [hr.2],⟨h1,h3⟩,?_,?_⟩ <;> linarith + +theorem exists_full_overlap_window (a : ℕ) (r u : CutRing) : + ∃ k : ℕ, ∃ p : Fin 2 → ℤ, ∀ d : Fin 2, ∀ e : Fin 5, ∀ j : Fin 2, + (p j ≤ endpointLabel (clippingOverlapLower r (tangentOffset a d (signedShortSteps u e)) j) ∧ + endpointLabel (clippingOverlapLower r (tangentOffset a d (signedShortSteps u e)) j) < p j+k) ∧ + (p j ≤ endpointLabel (clippingOverlapUpper r (tangentOffset a d (signedShortSteps u e)) j) ∧ + endpointLabel (clippingOverlapUpper r (tangentOffset a d (signedShortSteps u e)) j) < p j+k) := by + let q (i : Fin 2 × Fin 5 × Bool) (j : Fin 2) : ℤ := + endpointLabel (if i.2.2 then clippingOverlapUpper r (tangentOffset a i.1 (signedShortSteps u i.2.1)) j + else clippingOverlapLower r (tangentOffset a i.1 (signedShortSteps u i.2.1)) j) + obtain ⟨k,p,hp⟩ := finite_coordinate_windows_container (fun _ : Fin 2 × Fin 5 × Bool => 1) q + refine ⟨k,p,fun d e j => ?_⟩ + have hL := hp (d,e,false) j + have hU := hp (d,e,true) j + dsimp [q] at hL hU + omega + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem tangentSign_step_action_closed (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (k : ℕ) (p : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k p u) + (d : Fin 2) (e : Fin 5) (z : CutRing × CutRing) + (l v : Fin 2 → CutRing) + (hl : ∀ j, p j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < p j+k) + (hv : ∀ j, p j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < p j+k) + (hlv : ∀ j, ordinary (l j) ≤ ordinary (v j)) + (hlen : ∀ j, ordinary (v j)-ordinary (l j) < 1) + (hbox : ∀ j, -ordinary r ≤ ordinary (l j) ∧ ordinary (v j) ≤ ordinary r) + (hbox' : ∀ j, -ordinary r ≤ ordinary (l j)-ordinary + (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) ∧ + ordinary (v j)-ordinary + (pointCoordinate (tangentOffset a d (signedShortSteps u e)) j) ≤ ordinary r) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.fullGeometricSector (by omega) + (translatedTemplate (tangentChartTemplate a k p d (signedShortSteps u e)) z) + (h d e z) (spatialTranslate z (coordinateRectangle a l v)))) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) : + ∀ x ∈ f.range, + B.tangentSign (by omega) k p u h d z true (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d z true (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.tangentSign (by omega) k p u h d (z+tangentOffset a d (signedShortSteps u e)) true + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.tangentSign (by omega) k p u h d (z+tangentOffset a d (signedShortSteps u e)) true + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + rw [B.tangentSign_first (by omega) k p u h d z e true, + B.tangentSign_second (by omega) k p u h d z e true] + apply B.chart_action_transfer hlarge _ (h d e z) _ _ _ + (tangentChart_first_resolved p d _ z) (tangentChart_second_resolved p d _ z) + (tangentChart_rectangle_resolved p d _ z l v hl hv) _ f hf hc I s + have he := clippedSlope_agree_on_closed_rectangle (a := a) r (slopeDirection d) hr + (0 : CutRing × CutRing) (tangentOffset a d (signedShortSteps u e)) l v hlv hlen + (by simpa [pointCoordinate] using hbox) hbox' + (by simp only [integralCutForm_zero,integralCutForm_tangentOffset]) + have he' := congrArg (spatialTranslate z) he + simpa only [spatialTranslate_inter,← spatialTranslate_add,add_zero] using he' + +end InitialCoverSystem +end FullTangentOverlap + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClosedSquareGerms.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClosedSquareGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..dafbb3a028dadbc0eabdca7118f2e08e073d181e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ClosedSquareGerms.lean @@ -0,0 +1,64 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FiniteArrangementGerms + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ClosedSquareGerms + +theorem finite_arrangement_germ_square {ι : Type*} [Finite ι] (a : ℕ) + (j : ι → Fin 4) (c : ι → ℝ) (z : ℝ × ℝ) (y : GenericSquare a) (σ : ι → Bool) + (hz₁ : z.1 ∈ Set.Icc (0:ℝ) 1) (hz₂ : z.2 ∈ Set.Icc (0:ℝ) 1) + (hactive : ∀ i, cutForm a (j i) z=c i → + if σ i then cutForm a (j i) y.val < c i else c i < cutForm a (j i) y.val) + (hinactive : ∀ i, cutForm a (j i) z≠c i → + if σ i then cutForm a (j i) z < c i else c i < cutForm a (j i) z) + (N : Set (ℝ × ℝ)) (hN : IsOpen N) (hz : z ∈ N) : + ∃ p : GenericSquare a, p.val ∈ N ∧ p.val ∈ strictLineCell a j c σ := by + classical + let J : Sum ι (Fin 2 × Bool) → Fin 4 := Sum.elim j (fun d => Fin.castLE (by omega) d.1) + let C : Sum ι (Fin 2 × Bool) → ℝ := Sum.elim c (fun d => if d.2 then 1 else 0) + let S : Sum ι (Fin 2 × Bool) → Bool := Sum.elim σ Prod.snd + have hyv := generic_coordinates_pos y + have ha : ∀ i, cutForm a (J i) z=C i → + if S i then cutForm a (J i) y.val < C i else C i < cutForm a (J i) y.val := by + intro i hi + cases i with + | inl i => exact hactive i hi + | inr d => + rcases d with ⟨d,b⟩ + fin_cases d <;> cases b + · exact hyv.1 + · exact y.property.1.2 + · exact hyv.2 + · exact y.property.2.1.2 + have hn : ∀ i, cutForm a (J i) z≠C i → + if S i then cutForm a (J i) z < C i else C i < cutForm a (J i) z := by + intro i hi + cases i with + | inl i => exact hinactive i hi + | inr d => + rcases d with ⟨d,b⟩ + fin_cases d <;> cases b <;> + simp [J,C,S,cutForm] at hi ⊢ + · exact lt_of_le_of_ne hz₁.1 (Ne.symm hi) + · exact lt_of_le_of_ne hz₁.2 hi + · exact lt_of_le_of_ne hz₂.1 (Ne.symm hi) + · exact lt_of_le_of_ne hz₂.2 hi + obtain ⟨p,hp,hcell,hgeneric⟩ := finite_arrangement_germ a J C z y.val S ha hn N hN hz + have hp₁ : p.1 ∈ Set.Ioo (0:ℝ) 1 := ⟨hcell (.inr (0,false)),hcell (.inr (0,true))⟩ + have hp₂ : p.2 ∈ Set.Ioo (0:ℝ) 1 := ⟨hcell (.inr (1,false)),hcell (.inr (1,true))⟩ + exact ⟨⟨p,⟨hp₁.1.le,hp₁.2⟩,⟨hp₂.1.le,hp₂.2⟩,hgeneric⟩,hp,fun i => hcell (.inl i)⟩ + +end ClosedSquareGerms + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CommonTranslatedCopies.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CommonTranslatedCopies.lean new file mode 100644 index 0000000000000000000000000000000000000000..66fcfa826c510e1352a02fb71b09c0834c797435 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CommonTranslatedCopies.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.ReserveAtom +import OAI.GroupTheory.SimpleAmenable.CentralCovers.InitialCoverSystem +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveCopies + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CommonTranslatedCopies + +structure CommonFrame (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (I : Finset (Fin (m+1))) (u : CutRing × CutRing) where + k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) + d : Fin (m+1) → CutRing × CutRing + projection : sourceLatticeFullMap a r m hm k = trackTranslation d + common : ∀ i ∈ I, d i = u + +noncomputable def commonFrame (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) (u : CutRing × CutRing) : + CommonFrame a r m hm I u := by + let h := sourceLatticeFullMap_prescribed a r m hm I b hb (fun _ => u) + exact { + k := h.choose + d := h.choose_spec.choose + projection := h.choose_spec.choose_spec.1 + common := h.choose_spec.choose_spec.2 } + +noncomputable def spatialTranslate {a : ℕ} (u : CutRing × CutRing) + (U : polygonAlgebra a) : polygonAlgebra a := + ⟨translate a (-u) ⁻¹' U.val,polygon_preimage_translate (-u) U.property⟩ + +namespace CommonFrame + +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + {I : Finset (Fin (m+1))} {u : CutRing × CutRing} + (F : CommonFrame a r m hm I u) + +theorem conditional_projection (U : polygonAlgebra a) (s : alternatingGroup I) : + sourceLatticeMap a r m hm F.k * conditionalAlternatingHom U (subtypeAlternatingHom I s) * + (sourceLatticeMap a r m hm F.k)⁻¹ = + conditionalAlternatingHom (spatialTranslate u U) (subtypeAlternatingHom I s) := by + apply Subtype.ext + change sourceLatticeFullMap a r m hm F.k * conditionalHom U (subtypeAlternatingHom I s).val * + (sourceLatticeFullMap a r m hm F.k)⁻¹ = _ + rw [F.projection] + apply (conditional_translation_conjugate U (subtypeAlternatingHom I s).val F.d u ?_).symm + intro i hi + exact F.common i ((Equiv.Perm.mem_range_ofSubtype_iff.mp ⟨s.val,rfl⟩) + (Equiv.Perm.mem_support.mpr hi)) + +end CommonFrame + +namespace InitialCoverSystem + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +theorem commonTranslatedAlphabet_projection {I : Finset (Fin (m+1))} + {u : CutRing × CutRing} (F : CommonFrame a r m hm I u) (j : Fin 5) : + (coverMap M (alternatingGenerator a r m hm)).comp (B.translatedAlphabet I j F.k) = + (conditionalAlternatingHom (spatialTranslate u (initialTest a r j))).comp + (subtypeAlternatingHom I) := by + apply MonoidHom.ext + intro s + change coverMap M (alternatingGenerator a r m hm) + (B.t F.k * B.initialConditional j (subtypeAlternatingHom I s) * (B.t F.k)⁻¹) = _ + rw [map_mul,map_mul,map_inv] + rw [show coverMap M (alternatingGenerator a r m hm) (B.t F.k) = + sourceLatticeMap a r m hm F.k from DFunLike.congr_fun B.t_projection F.k] + rw [show coverMap M (alternatingGenerator a r m hm) + (B.initialConditional j (subtypeAlternatingHom I s)) = + conditionalAlternatingHom (initialTest a r j) (subtypeAlternatingHom I s) from + DFunLike.congr_fun (B.initialConditional_projection j) (subtypeAlternatingHom I s)] + exact F.conditional_projection _ s + +theorem commonTranslatedAlphabet_independent {I : Finset (Fin (m+1))} + {u v : CutRing × CutRing} (F : CommonFrame a r m hm I u) + (G : CommonFrame a r m hm I v) (j : Fin 5) + (huv : spatialTranslate u (initialTest a r j) = spatialTranslate v (initialTest a r j)) : + B.translatedAlphabet I j F.k = B.translatedAlphabet I j G.k := by + apply B.initialAlphabet_orbit_independent + intro s + rw [F.conditional_projection,G.conditional_projection,huv] + +noncomputable def primitiveCopy (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (p : Fin 5 × (CutRing × CutRing)) : + alternatingGroup I →* BoundedRelationCover M (alternatingGenerator a r m hm) := + B.translatedAlphabet I p.1 (commonFrame a r m hm I b hb p.2).k + +theorem primitiveCopy_projection (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (p : Fin 5 × (CutRing × CutRing)) : + (coverMap M (alternatingGenerator a r m hm)).comp (B.primitiveCopy I b hb p) = + (conditionalAlternatingHom (spatialTranslate p.2 (initialTest a r p.1))).comp + (subtypeAlternatingHom I) := + B.commonTranslatedAlphabet_projection (commonFrame a r m hm I b hb p.2) p.1 + +theorem primitiveCopy_aligned (I : Finset (Fin (m+1))) + (b : Fin (m+1)) (hb : b ∉ I) (p : Fin 5 × (CutRing × CutRing)) (s : alternatingGroup I) : + B.primitiveCopy I b hb p s ∈ sourceAlignedGroup a r m hm M B.t I := + B.translatedAlphabet_aligned I p.1 _ s + +end InitialCoverSystem +end CommonTranslatedCopies + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CompactCommonRefinement.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CompactCommonRefinement.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b4fd02e85a0900acfbb1d4382438c6766bd0861 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CompactCommonRefinement.lean @@ -0,0 +1,52 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CompactFineGrid +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RefinedEndpointDecisions + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CompactCommonRefinement + +def closedRefinedBox (N : ℕ) (e : Fin (N+1) → CutRing) (cell : Fin 2 → Fin N) : Set (ℝ × ℝ) := + {p | ∀ j, ordinary (e (cell j).castSucc)≤realCoordinate p j ∧ + realCoordinate p j≤ordinary (e (cell j).succ)} + +theorem compact_common_refining_grid {ι κ : Type*} [Fintype ι] + (S : Finset CutRing) (size : ι → ℕ) (hs : ∀ i, 201 ≤ size i) + (q : ι → Fin 2 → ℤ) (v : ι → CutRing × CutRing) + (O : κ → Set (ℝ × ℝ)) (hO : ∀ i, IsOpen (O i)) + (hcover : Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 ⊆ ⋃ i, O i) + (ε : κ → ℝ) (hε : ∀ i, 0<ε i) : + ∃ N : ℕ, 0 ordinary (e i)) ∧ e 0=0 ∧ e (Fin.last N)=1 ∧ + (∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) ∧ + (∀ c ∈ S, cutFraction c ∈ Set.range e) ∧ + (∀ i, ∀ j : Fin 2, ∀ k : Fin (size i+1), + cutFraction (windowCut (size i) (q i j) k+pointCoordinate (v i) j) ∈ Set.range e) ∧ + (∀ cell : Fin 2 → Fin N, ∃ k, closedRefinedBox N e cell ⊆ O k ∧ + ∀ j, ordinary (e (cell j).succ)-ordinary (e (cell j).castSucc)<ε k) := by + obtain ⟨n,hn,hfine⟩ := compact_local_bounds_fine_grid O hO hcover ε hε + obtain ⟨N,hN,e,he,hzero,hlast,hmesh,hS,hcuts,href⟩ := common_translated_grid S n hn size hs q v + have hnpos : (200:ℝ) (hmesh i).trans_lt + ((div_lt_one (by linarith)).mpr hnpos),hS,hcuts,?_⟩ + intro cell + have hh (j : Fin 2) := href (cell j) + choose old hold using hh + obtain ⟨k,hδ,hk⟩ := hfine n le_rfl old + refine ⟨k,fun p hp => hk (fun j => ⟨(hold j).1.trans (hp j).1,(hp j).2.trans (hold j).2⟩),?_⟩ + intro j + exact (hmesh (cell j)).trans_lt hδ + +end CompactCommonRefinement + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CompactFineGrid.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CompactFineGrid.lean new file mode 100644 index 0000000000000000000000000000000000000000..04a6a922e862e2cd7431c1c18dd2359acbb14471 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CompactFineGrid.lean @@ -0,0 +1,201 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentGeometry + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CompactFineGrid + +def closedWindowBox (n : ℕ) (cell : Fin 2 → Fin n) : Set (ℝ × ℝ) := + {p | ∀ j, ordinary (windowCut n 0 (cell j).castSucc) ≤ realCoordinate p j ∧ + realCoordinate p j ≤ ordinary (windowCut n 0 (cell j).succ)} + +theorem closedWindowBox_subset (n : ℕ) (cell : Fin 2 → Fin n) : + closedWindowBox n cell ⊆ Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 := by + intro p hp + have h (j : Fin 2) : realCoordinate p j ∈ Set.Icc (0:ℝ) 1 := by + have hl := (windowCut_bounds n 0 (cell j).castSucc).1 + have hu := (windowCut_bounds n 0 (cell j).succ).2 + simp only [Int.cast_zero,zero_mul,map_zero,zero_add] at hl hu + exact ⟨hl.trans (hp j).1,(hp j).2.trans hu⟩ + exact ⟨h 0,h 1⟩ + +theorem closedWindowBox_nonempty (n : ℕ) (cell : Fin 2 → Fin n) : + (closedWindowBox n cell).Nonempty := by + refine ⟨(ordinary (windowCut n 0 (cell 0).castSucc), + ordinary (windowCut n 0 (cell 1).castSucc)),?_⟩ + intro j + have he : realCoordinate + (ordinary (windowCut n 0 (cell 0).castSucc), + ordinary (windowCut n 0 (cell 1).castSucc)) j = + ordinary (windowCut n 0 (cell j).castSucc) := by fin_cases j <;> rfl + rw [he] + exact ⟨le_rfl,(windowCut_strictMono n 0 (Fin.castSucc_lt_succ (i := cell j))).le⟩ + +theorem windowPlanarLift_zero {a : ℕ} (p : GenericSquare a) : + windowPlanarLift (fun _ => 0) p=p.val := by + apply Prod.ext + · change p.val.1-⌊p.val.1-ordinary ((0:CutRing)*cutTau)⌋=p.val.1 + simp only [zero_mul,map_zero,sub_zero,Int.floor_eq_zero_iff.mpr p.property.1,Int.cast_zero] + · change p.val.2-⌊p.val.2-ordinary ((0:CutRing)*cutTau)⌋=p.val.2 + simp only [zero_mul,map_zero,sub_zero,Int.floor_eq_zero_iff.mpr p.property.2.1,Int.cast_zero] + +theorem windowRectangle_subset_closed {a : ℕ} (n : ℕ) (hn : 201 ≤ n) + (cell : Fin 2 → Fin n) (p : GenericSquare a) + (hp : p ∈ (windowRectangle a n (fun _ => 0) cell).val) : + p.val ∈ closedWindowBox n cell := by + intro j + have h := (windowRectangle_mem n hn (fun _ => 0) cell p).mp hp j + rw [windowPlanarLift_zero] at h + exact ⟨h.1,h.2.le⟩ + +theorem compact_open_cover_fine_grid {ι : Type*} + (O : ι → Set (ℝ × ℝ)) (hO : ∀ i, IsOpen (O i)) + (hcover : Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 ⊆ ⋃ i, O i) + (ε : ℝ) (hε : 0 < ε) : + ∃ N : ℕ, 201 ≤ N ∧ ∀ n : ℕ, N ≤ n → + 200/(n:ℝ) < ε ∧ ∀ cell : Fin 2 → Fin n, ∃ i, + closedWindowBox n cell ⊆ O i := by + obtain ⟨δ,hδ,hlocal⟩ := lebesgue_number_lemma_of_metric + (isCompact_Icc.prod isCompact_Icc) hO hcover + have hmin : 0 < min δ ε := lt_min hδ hε + obtain ⟨N,hN⟩ := exists_nat_gt (200/min δ ε) + refine ⟨max 201 N,le_max_left _ _,fun n hn => ?_⟩ + have hnN : N ≤ n := (le_max_right _ _).trans hn + have hnpos : (0:ℝ) < n := by exact_mod_cast (show 0 < n by omega) + have hmesh : 200/(n:ℝ) < min δ ε := by + rw [div_lt_iff₀ hnpos] + have hNN : (N:ℝ) ≤ n := by exact_mod_cast hnN + have hlt := (div_lt_iff₀ hmin).mp hN + nlinarith + refine ⟨hmesh.trans_le (min_le_right _ _),fun cell => ?_⟩ + obtain ⟨x,hx⟩ := closedWindowBox_nonempty n cell + obtain ⟨i,hi⟩ := hlocal x (closedWindowBox_subset n cell hx) + refine ⟨i,fun p hp => hi ?_⟩ + apply Metric.mem_ball.mpr + exact (closedWindow_diameter n (fun _ => 0) cell p x hp hx).trans_lt + (hmesh.trans_le (min_le_left _ _)) + +theorem compact_local_bounds_fine_grid {ι : Type*} + (O : ι → Set (ℝ × ℝ)) (hO : ∀ i, IsOpen (O i)) + (hcover : Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 ⊆ ⋃ i, O i) + (ε : ι → ℝ) (hε : ∀ i, 0 < ε i) : + ∃ N : ℕ, 201 ≤ N ∧ ∀ n : ℕ, N ≤ n → + ∀ cell : Fin 2 → Fin n, ∃ i, + 200/(n:ℝ) < ε i ∧ closedWindowBox n cell ⊆ O i := by + classical + obtain ⟨s,hs⟩ := (isCompact_Icc.prod isCompact_Icc).elim_finite_subcover O hO hcover + have hspos : s.Nonempty := by + have hh := hs (show ((0,0) : ℝ × ℝ) ∈ Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 from + ⟨⟨le_rfl,by norm_num⟩,⟨le_rfl,by norm_num⟩⟩) + obtain ⟨i,hi⟩ := Set.mem_iUnion.mp hh + obtain ⟨hi,_⟩ := Set.mem_iUnion.mp hi + exact ⟨i,hi⟩ + obtain ⟨i₀,_,hi₀⟩ := s.exists_min_image ε hspos + have hcov : Set.Icc (0:ℝ) 1 ×ˢ Set.Icc (0:ℝ) 1 ⊆ ⋃ i : s, O i.val := by + intro x hx + obtain ⟨i,hi⟩ := Set.mem_iUnion.mp (hs hx) + obtain ⟨hi,hx⟩ := Set.mem_iUnion.mp hi + exact Set.mem_iUnion.mpr ⟨⟨i,hi⟩,hx⟩ + obtain ⟨N,hN,hfine⟩ := compact_open_cover_fine_grid (fun i : s => O i.val) + (fun i => hO i.val) hcov (ε i₀) (hε i₀) + refine ⟨N,hN,fun n hn cell => ?_⟩ + obtain ⟨hmesh,hcells⟩ := hfine n hn + obtain ⟨i,hi⟩ := hcells cell + exact ⟨i.val,hmesh.trans_le (hi₀ i.val i.property),hi⟩ + +end CompactFineGrid + +section SimultaneousConcurrentTemplates + +theorem vertex_type_zero (D : ℕ) (hD : 0 < D) : + ∃ t : VertexType D, vertexRepresentative D t=0 := by + let f : Fin D := ⟨0,hD⟩ + refine ⟨((f,f),(f,f)),?_⟩ + simp [vertexRepresentative,finiteCutResidue,ordinary_apply,f] + +theorem ordinary_pair_near (z : ℝ × ℝ) (ε : ℝ) (hε : 0 < ε) : + ∃ u : CutRing × CutRing, dist (ordinary u.1,ordinary u.2) z < ε := by + obtain ⟨u,hu,hu'⟩ := exists_cut_between (x := z.1-ε) (y := z.1+ε) (by linarith) + obtain ⟨v,hv,hv'⟩ := exists_cut_between (x := z.2-ε) (y := z.2+ε) (by linarith) + refine ⟨(u,v),?_⟩ + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨abs_lt.mpr ⟨by linarith,by linarith⟩,abs_lt.mpr ⟨by linarith,by linarith⟩⟩ + +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) + +theorem simultaneous_active_template {ι : Type*} (ha : 0 < a) + (j : ι → Fin 4) (c : ι → CutRing) (z : ℝ × ℝ) : + ∃ t : VertexType (commonVertexDenominator a), ∃ u : CutRing × CutRing, + dist (vertexRepresentative (commonVertexDenominator a) t+(ordinary u.1,ordinary u.2)) z < C.epsilon/4 ∧ + ∀ i, cutForm a (j i) z=ordinary (c i) → + integralCutForm a (j i) (u+C.anchors t (j i))=c i ∧ + dist (ordinary (u+C.anchors t (j i)).1,ordinary (u+C.anchors t (j i)).2) + (vertexRepresentative (commonVertexDenominator a) t+(ordinary u.1,ordinary u.2)) < C.epsilon := by + classical + have hε : 0 < C.epsilon/4 := by linarith [C.positive] + by_cases htwo : ∃ i k, cutForm a (j i) z=ordinary (c i) ∧ + cutForm a (j k) z=ordinary (c k) ∧ j i≠j k + · obtain ⟨i,k,hi,hk,hik⟩ := htwo + obtain ⟨t,u,v,hz⟩ := all_intersections_finite_templates ha (j i) (j k) hik (c i) (c k) z hi hk + refine ⟨t,(u,v),by simpa only [← hz,dist_self] using hε,fun e he => ?_⟩ + have hh := translated_vertex_anchors a (commonVertexDenominator a) C.anchors C.anchors_spec + t (u,v) (j e) (c e) z hz he + simpa only [hz] using hh + obtain ⟨t,ht⟩ := vertex_type_zero (commonVertexDenominator a) (commonVertexDenominator_pos ha) + by_cases hone : ∃ i, cutForm a (j i) z=ordinary (c i) + · obtain ⟨i,hi⟩ := hone + obtain ⟨u,hu,hclose⟩ := allowable_line_anchor a (j i) (c i) z hi hε + have hcenter : (ordinary u.1,ordinary u.2)= + vertexRepresentative (commonVertexDenominator a) t+(ordinary u.1,ordinary u.2) := by simp only [ht,zero_add] + refine ⟨t,u,by simpa only [ht,zero_add] using hclose,fun k hk => ?_⟩ + have hdir : j i=j k := by + by_contra hn + exact htwo ⟨i,k,hi,hk,hn⟩ + have hc : c i=c k := ordinary_injective (hi.symm.trans (hdir ▸ hk)) + have hline : cutForm a (j k) (ordinary u.1,ordinary u.2)=ordinary (c k) := by + rw [cutForm_ordinary,← hdir,hu,hc] + have hh := translated_vertex_anchors a (commonVertexDenominator a) C.anchors C.anchors_spec + t u (j k) (c k) (ordinary u.1,ordinary u.2) hcenter hline + simpa only [ht,zero_add] using hh + · obtain ⟨u,hu⟩ := ordinary_pair_near z (C.epsilon/4) hε + refine ⟨t,u,by simpa only [ht,zero_add] using hu,fun i hi => ?_⟩ + exact (hone ⟨i,hi⟩).elim + +theorem simultaneous_active_neighborhood {ι : Type*} (ha : 0 < a) + (j : ι → Fin 4) (c : ι → CutRing) (z : ℝ × ℝ) : + ∃ t : VertexType (commonVertexDenominator a), ∃ u : CutRing × CutRing, + (∀ p : ℝ × ℝ, dist p z < C.epsilon/2 → ∀ k, + ordinary ((C.margins t).lower k+pointCoordinate u k) ⟨(hactive i hi).1,?_⟩⟩ + · intro p hp k + apply (C.margins t).translated_inner u p ?_ k + have htri := dist_triangle p z + (vertexRepresentative (commonVertexDenominator a) t+(ordinary u.1,ordinary u.2)) + rw [dist_comm z] at htri + linarith [C.positive] + · intro p hp k + exact (C.margins t).translated_outer u (u+C.anchors t (j i)) p (hactive i hi).2 hp k + +end ConcurrentGeometry +end SimultaneousConcurrentTemplates + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConcurrentAnchors.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConcurrentAnchors.lean new file mode 100644 index 0000000000000000000000000000000000000000..93501f012c50763472fa2936284c93e9d0824510 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConcurrentAnchors.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TangentChartTemplates +import OAI.GroupTheory.SimpleAmenable.Arithmetic.ConcurrentDenominators + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConcurrentAnchors + +theorem allowable_line_anchor (a : ℕ) (j : Fin 4) (c : CutRing) + (z : ℝ × ℝ) (hz : cutForm a j z=ordinary c) {ε : ℝ} (hε : 0<ε) : + ∃ u : CutRing × CutRing, integralCutForm a j u=c ∧ + dist (ordinary u.1,ordinary u.2) z<ε := by + by_cases hj : j=2 ∨ j=3 + · exact slope_line_anchor a j hj c z hz hε + fin_cases j + · obtain ⟨y,hy,hy'⟩ := exists_cut_between (x := z.2-ε) (y := z.2+ε) (by linarith) + refine ⟨(c,y),by simp [integralCutForm],?_⟩ + have hx : z.1=ordinary c := hz + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,← hx,sub_self,abs_zero,max_eq_right (abs_nonneg _)] + exact abs_lt.mpr ⟨by linarith,by linarith⟩ + · obtain ⟨x,hx,hx'⟩ := exists_cut_between (x := z.1-ε) (y := z.1+ε) (by linarith) + refine ⟨(x,c),by simp [integralCutForm],?_⟩ + have hy : z.2=ordinary c := hz + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,← hy,sub_self,abs_zero,max_eq_left (abs_nonneg _)] + exact abs_lt.mpr ⟨by linarith,by linarith⟩ + · exact False.elim (hj (Or.inl rfl)) + · exact False.elim (hj (Or.inr rfl)) + +abbrev VertexType (D : ℕ) := (Fin D × Fin D) × (Fin D × Fin D) + +def AllowableVertexLine (a : ℕ) (z : ℝ × ℝ) (j : Fin 4) : Prop := + ∃ c : CutRing, cutForm a j z=ordinary c + +theorem finite_vertex_anchors (a D : ℕ) {ε : ℝ} (hε : 0<ε) : + ∃ U : VertexType D → Fin 4 → CutRing × CutRing, + ∀ t j, AllowableVertexLine a (vertexRepresentative D t) j → + cutForm a j (vertexRepresentative D t)=ordinary (integralCutForm a j (U t j)) ∧ + dist (ordinary (U t j).1,ordinary (U t j).2) (vertexRepresentative D t)<ε := by + classical + have h (t : VertexType D) (j : Fin 4) : ∃ u : CutRing × CutRing, + AllowableVertexLine a (vertexRepresentative D t) j → + cutForm a j (vertexRepresentative D t)=ordinary (integralCutForm a j u) ∧ + dist (ordinary u.1,ordinary u.2) (vertexRepresentative D t)<ε := by + by_cases h : AllowableVertexLine a (vertexRepresentative D t) j + · obtain ⟨c,hc⟩ := h + obtain ⟨u,hu,hd⟩ := allowable_line_anchor a j c _ hc hε + exact ⟨u,fun _ => ⟨by rw [hu]; exact hc,hd⟩⟩ + · exact ⟨0,fun hh => (h hh).elim⟩ + choose U hU using h + exact ⟨U,hU⟩ + +theorem representative_line_allowable (a D : ℕ) (t : VertexType D) + (u : CutRing × CutRing) (j : Fin 4) (c : CutRing) (z : ℝ × ℝ) + (hz : z=vertexRepresentative D t+(ordinary u.1,ordinary u.2)) + (hc : cutForm a j z=ordinary c) : AllowableVertexLine a (vertexRepresentative D t) j := by + refine ⟨c-integralCutForm a j u,?_⟩ + rw [hz,cutForm_add,cutForm_ordinary] at hc + rw [map_sub] + linarith + +theorem translated_vertex_anchors (a D : ℕ) {ε : ℝ} + (U : VertexType D → Fin 4 → CutRing × CutRing) + (hU : ∀ t j, AllowableVertexLine a (vertexRepresentative D t) j → + cutForm a j (vertexRepresentative D t)=ordinary (integralCutForm a j (U t j)) ∧ + dist (ordinary (U t j).1,ordinary (U t j).2) (vertexRepresentative D t)<ε) + (t : VertexType D) (u : CutRing × CutRing) (j : Fin 4) (c : CutRing) (z : ℝ × ℝ) + (hz : z=vertexRepresentative D t+(ordinary u.1,ordinary u.2)) + (hc : cutForm a j z=ordinary c) : + integralCutForm a j (u+U t j)=c ∧ + dist (ordinary (u+U t j).1,ordinary (u+U t j).2) z<ε := by + obtain ⟨he,hd⟩ := hU t j (representative_line_allowable a D t u j c z hz hc) + constructor + · apply ordinary_injective + rw [← cutForm_ordinary] + have hpair : (ordinary (u+U t j).1,ordinary (u+U t j).2)= + (ordinary (U t j).1,ordinary (U t j).2)+(ordinary u.1,ordinary u.2) := by + ext <;> simp [add_comm] + rw [hpair,cutForm_add,cutForm_ordinary,← he,← cutForm_add,← hz,hc] + · have hpair : (ordinary (u+U t j).1,ordinary (u+U t j).2)= + (ordinary (U t j).1,ordinary (U t j).2)+(ordinary u.1,ordinary u.2) := by + ext <;> simp [add_comm] + rwa [hpair,hz,dist_add_right] + +theorem concurrent_chart_tables_eventually {a m D : ℕ} {r : CutRing} {hm : 2 ≤ m} + {ι : Type*} [Finite ι] + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (hm' : 15 ≤ m+1) + (U : VertexType D → Fin 4 → CutRing × CutRing) + (P : VertexType D → ι → Fin 5 × (CutRing × CutRing)) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ B : InitialCoverSystem a r m hm M, + ∀ t u I b hb, B.PrimitiveFamilyLaw I b hb + (translatedTemplate (Sum.elim + (fun j : Fin 4 => (⟨j.val+1,by omega⟩,U t j)) (P t)) u) := by + exact fixedChartTables_eventually hr hm' + (fun t => Sum.elim (fun j : Fin 4 => (⟨j.val+1,by omega⟩,U t j)) (P t)) + +end ConcurrentAnchors + +section LineIntersectionBounds + +theorem real_two_lines_intersect (A B C E c d : ℝ) (h : A*E-C*B ≠ 0) : + ∃ z : ℝ × ℝ, A*z.1+B*z.2=c ∧ C*z.1+E*z.2=d := by + refine ⟨((c*E-d*B)/(A*E-C*B),(A*d-C*c)/(A*E-C*B)),?_,?_⟩ <;> + dsimp only <;> rw [← mul_div_assoc, ← mul_div_assoc, ← add_div] <;> + apply (div_eq_iff h).mpr <;> ring + +theorem real_two_lines_distance_bound (A B C E c d : ℝ) (h : A*E-C*B ≠ 0) + (z p : ℝ × ℝ) (hz : A*z.1+B*z.2=c) (hz' : C*z.1+E*z.2=d) + (δ : ℝ) (hδ : 0≤δ) + (hp : |c-(A*p.1+B*p.2)| ≤ δ) (hp' : |d-(C*p.1+E*p.2)| ≤ δ) : + dist z p ≤ ((|A| + |B| + |C| + |E|)/|A*E-C*B|)*δ := by + have hd : 0 < |A*E-C*B| := abs_pos.mpr h + have hx : (A*E-C*B)*(z.1-p.1)=E*(c-(A*p.1+B*p.2))-B*(d-(C*p.1+E*p.2)) := by + linear_combination E*hz-B*hz' + have hy : (A*E-C*B)*(z.2-p.2)=A*(d-(C*p.1+E*p.2))-C*(c-(A*p.1+B*p.2)) := by + linear_combination A*hz'-C*hz + have hx' : |A*E-C*B| * |z.1-p.1| ≤ (|E| + |B|)*δ := by + rw [← abs_mul,hx] + calc + _ ≤ |E*(c-(A*p.1+B*p.2))| + |B*(d-(C*p.1+E*p.2))| := abs_sub _ _ + _ ≤ |E| * δ+|B| * δ := by + rw [abs_mul,abs_mul] + exact add_le_add (mul_le_mul_of_nonneg_left hp (abs_nonneg _)) + (mul_le_mul_of_nonneg_left hp' (abs_nonneg _)) + _ = _ := by ring + have hy' : |A*E-C*B| * |z.2-p.2| ≤ (|A| + |C|)*δ := by + rw [← abs_mul,hy] + calc + _ ≤ |A*(d-(C*p.1+E*p.2))| + |C*(c-(A*p.1+B*p.2))| := abs_sub _ _ + _ ≤ |A| * δ+|C| * δ := by + rw [abs_mul,abs_mul] + exact add_le_add (mul_le_mul_of_nonneg_left hp' (abs_nonneg _)) + (mul_le_mul_of_nonneg_left hp (abs_nonneg _)) + _ = _ := by ring + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_le_iff] + rw [div_mul_eq_mul_div] + constructor + · apply (le_div_iff₀ hd).mpr + nlinarith [abs_nonneg A,abs_nonneg C] + · apply (le_div_iff₀ hd).mpr + nlinarith [abs_nonneg B,abs_nonneg E] + +theorem real_lineDet_ne_zero {a : ℕ} (ha : 0 + ⟨((windowRectangle_mem C.mesh C.mesh_large q cell p).mp hp k).1, + ((windowRectangle_mem C.mesh C.mesh_large q cell p).mp hp k).2.le⟩) + have hh := C.axis_on_margin j u (u+C.anchors t (axisDirection j)) t hnear p + (windowPlanarLift q p) (windowPlanarLift_spec q p) (fun k => ⟨(hz k).1.le,(hz k).2.le⟩) + rw [integralCutForm_axis] at haxis + rw [haxis] at hh + cases positive <;> simp only [Bool.false_eq_true,↓reduceIte] at hc ⊢ + · change (_ ∧ _) ↔ (¬ p ∈ (spatialTranslate (u+C.anchors t (axisDirection j)) (coordinatePrimitive a j)).val ∧ _) + exact and_congr ((hc p hp).trans ((not_le).symm.trans (not_congr hh).symm)) Iff.rfl + · change (_ ∧ _) ↔ (p ∈ (spatialTranslate (u+C.anchors t (axisDirection j)) (coordinatePrimitive a j)).val ∧ _) + exact and_congr ((hc p hp).trans hh.symm) Iff.rfl + · change (_ ∧ _) ↔ (_ ∧ _) + simp only [hp,and_false] + +end ConcurrentGeometry +end ConcurrentCellDecisions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConcurrentGeometry.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConcurrentGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..20d2a6878718a43975ed146dcc2ddc93e5ed8a0b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConcurrentGeometry.lean @@ -0,0 +1,260 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.RectangularAtlas +import OAI.GroupTheory.SimpleAmenable.Homology.UniformConcurrentMesh +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.VertexMargins + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConcurrentGeometry + +structure ConcurrentGeometryData (a D : ℕ) (r : CutRing) where + epsilon : ℝ + positive : 0 1) p + refine ⟨⟨ε,hε,hr',hg,hg',U,hU,V,n,hn,(le_max_right _ _).trans (le_max_right _ _),hmesh,k,q,?_⟩⟩ + intro t j + have hL := hq (t,false) j + have hV := hq (t,true) j + simp only [p, Bool.false_eq_true, ↓reduceIte] at hL + simp only [p, ↓reduceIte] at hV + constructor <;> constructor <;> omega + +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) + +theorem mesh_small : 200/(C.mesh:ℝ) (InitialCoverSystem.primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives C.window C.start) s).val) + (coordinateRectangle a (C.margins t).lower (C.margins t).upper).val := by + intro x y hxy + exact and_congr + (coordinateLabelWindow_resolved C.window C.start 0 _ _ (C.labels t 0).1 (C.labels t 0).2 x y hxy) + (coordinateLabelWindow_resolved C.window C.start 1 _ _ (C.labels t 1).1 (C.labels t 1).2 x y hxy) + +end ConcurrentGeometry + +noncomputable def initialPatchPrimitives (r : CutRing) (n : ℕ) : + Sum (Fin 5) (Fin 2 × Fin (n-1)) → Fin 5 × (CutRing × CutRing) := + Sum.elim (fun j => (j,0)) (coordinateWindowPrimitives n (symmetricWindowStart r)) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +structure PatchAtlas where + rectangles : B.RectangularAtlas + geometry : ConcurrentGeometry a r + initial : ∀ u I b hb, B.PrimitiveFamilyLaw I b hb + (translatedTemplate (initialPatchPrimitives r geometry.mesh) u) + concurrent : ∀ t u I b hb, B.PrimitiveFamilyLaw I b hb + (translatedTemplate (Sum.elim + (fun j : Fin 4 => (⟨j.val+1,by omega⟩,geometry.anchors t j)) + (coordinateWindowPrimitives geometry.window geometry.start)) u) + +end InitialCoverSystem + +theorem patchAtlas_eventually {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (hlarge : 20 ≤ m+1) + (hr : 0 initialPatchPrimitives r C.mesh) + obtain ⟨L₃,hL₃⟩ := concurrent_chart_tables_eventually (hm := hm) hr (by omega) + C.anchors (fun _ => coordinateWindowPrimitives C.window C.start) + refine ⟨L₁+L₂+L₃,fun M hM B => ?_⟩ + obtain ⟨A⟩ := hL₁ M (by omega) B + exact ⟨⟨A,C,(fun u I b hb => hL₂ M (by omega) B () u I b hb),hL₃ M (by omega) B⟩⟩ + +end ConcurrentGeometry + +section ClosedCellTemplates + +theorem closedWindow_diameter (n : ℕ) (q : Fin 2 → ℤ) (cell : Fin 2 → Fin n) + (x y : ℝ × ℝ) + (hx : ∀ d, ordinary (windowCut n (q d) (cell d).castSucc) ≤ realCoordinate x d ∧ + realCoordinate x d ≤ ordinary (windowCut n (q d) (cell d).succ)) + (hy : ∀ d, ordinary (windowCut n (q d) (cell d).castSucc) ≤ realCoordinate y d ∧ + realCoordinate y d ≤ ordinary (windowCut n (q d) (cell d).succ)) : + dist x y ≤ 200/(n:ℝ) := by + have h (d : Fin 2) : |realCoordinate x d-realCoordinate y d| ≤ 200/(n:ℝ) := by + have hh := windowCut_mesh n (q d) (cell d) + have hx' := hx d + have hy' := hy d + apply abs_le.mpr + constructor <;> linarith + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_le_iff] + exact ⟨h 0,h 1⟩ + +theorem windowRectangle_closed_intersection_near {a : ℕ} (ha : 0 ?_⟩ + have hc (t : GenericSquare a) (ht : t ∈ (windowRectangle a n q cell).val) : + dist p (windowPlanarLift q t) ≤ 200/(n:ℝ) := by + apply closedWindow_diameter n q cell p (windowPlanarLift q t) hp + intro k + exact ⟨((windowRectangle_mem n hn q cell t).mp ht k).1, + ((windowRectangle_mem n hn q cell t).mp ht k).2.le⟩ + have h₁ := crossing_level_bound (ordinary (lineNormal a i).1) (ordinary (lineNormal a i).2) + (ordinary c) (200/(n:ℝ)) p (windowPlanarLift q x) (windowPlanarLift q y) + (by simpa only [cutForm_normal] using hcx) (by simpa only [cutForm_normal] using hcy) + (hc x hx) (hc y hy) + have h₂ := crossing_level_bound (ordinary (lineNormal a j).1) (ordinary (lineNormal a j).2) + (ordinary d) (200/(n:ℝ)) p (windowPlanarLift q u) (windowPlanarLift q v) + (by simpa only [cutForm_normal] using hdu) (by simpa only [cutForm_normal] using hdv) + (hc u hu) (hc v hv) + have hδ : 0 ≤ 200/(n:ℝ) := by positivity + have hm₁ := mul_le_mul_of_nonneg_right (le_max_left + (|ordinary (lineNormal a i).1|+|ordinary (lineNormal a i).2|) + (|ordinary (lineNormal a j).1|+|ordinary (lineNormal a j).2|)) hδ + have hm₂ := mul_le_mul_of_nonneg_right (le_max_right + (|ordinary (lineNormal a i).1|+|ordinary (lineNormal a i).2|) + (|ordinary (lineNormal a j).1|+|ordinary (lineNormal a j).2|)) hδ + have hh := real_two_lines_distance_bound _ _ _ _ (ordinary c) (ordinary d) + (real_lineDet_ne_zero ha i j hij) z p (by simpa only [cutForm_normal] using hz) + (by simpa only [cutForm_normal] using hz') _ (by positivity) (h₁.trans hm₁) (h₂.trans hm₂) + have hh' : dist z p ≤ lineIntersectionCoefficient a i j*(200/(n:ℝ)) := by + simpa only [lineIntersectionCoefficient,lineDet,map_sub,map_mul,mul_assoc] using hh + exact hh'.trans (mul_le_mul_of_nonneg_right (lineIntersectionCoefficient_le a i j) hδ) + +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) + +theorem crossing_cell_template (ha : 0 cutPolygon a (j i) (c i)) q= + polygonAssignment (fun i => C.localDecision t u z (j i) (c i)) p := by + classical + have hpM : p ∈ (C.marginPolygon t u).val := hp.1.1 + have hpG (k : Fin 2) : p ∈ (C.inwardGate t u z k).val := by + fin_cases k + · exact hp.1.2 + · exact hp.2 + obtain ⟨y,hy,ha,hcell⟩ := C.marginPolygon_lift hr.2 t u p hpM + have hzero : ∀ k, realCoordinate z k=0 → 0 ⟨(hcell k).1.le,(hcell k).2.le⟩)).mp h + rw [integralCutForm_axis,hboundary k (Or.inl hk),hk] at hd + have haxis : cutForm a (axisDirection k) y=realCoordinate y k := by fin_cases k <;> rfl + rw [haxis] at hd + apply lt_of_le_of_ne hd + intro he + have hn := ha (axisDirection k) 0 + simp only [map_zero,haxis] at hn + exact hn he.symm + have hone : ∀ k, realCoordinate z k=1 → realCoordinate y k<1 := by + intro k hk + have h := hpG k + have hn : realCoordinate z k≠0 := by rw [hk]; norm_num + simp only [inwardGate,ite_eq_right hn,ite_eq_left hk] at h + have hd := (not_congr (C.positiveDecision_planar hr t u (axisDirection k) (hnearB k (Or.inr hk)) p y hy + (fun k => ⟨(hcell k).1.le,(hcell k).2.le⟩))).mp h + rw [integralCutForm_axis,hboundary k (Or.inr hk),hk] at hd + have haxis : cutForm a (axisDirection k) y=realCoordinate y k := by fin_cases k <;> rfl + rw [haxis] at hd + exact lt_of_not_ge hd + let σ := polygonAssignment (fun i => C.localDecision t u z (j i) (c i)) p + have hactive : ∀ i, cutForm a (j i) z=ordinary (c i) → + if σ i then cutForm a (j i) y ⟨(hcell k).1.le,(hcell k).2.le⟩) + rw [hline i hi] at hd + have hσ : σ i=decide (¬ordinary (c i)≤cutForm a (j i) y) := by + apply decide_eq_decide.mpr + change (p ∈ (C.localDecision t u z (j i) (c i)).val) ↔ _ + simp only [localDecision,ite_eq_left hi] + exact not_congr hd + rw [hσ] + split_ifs with h + · exact lt_of_not_ge (of_decide_eq_true h) + · have hh := of_decide_eq_false (Bool.eq_false_iff.mpr h) + exact lt_of_le_of_ne (not_not.mp hh) (ha (j i) (c i)).symm + have hinactive : ∀ i, cutForm a (j i) z≠ordinary (c i) → + if σ i then cutForm a (j i) z ordinary (c i)) + z y σ hz₁ hz₂ hzero hone hactive hinactive N hN hz + refine ⟨q,hq,?_⟩ + funext i + change decide (cutForm a (j i) q.val cutPolygon a (j i) (c i)) q= + polygonAssignment (fun i => C.localDecision t u z (j i) (c i)) p := by + classical + let J : Sum ι (Fin 2 × Bool) → Fin 4 := Sum.elim j (fun d => axisDirection d.1) + let K : Sum ι (Fin 2 × Bool) → CutRing := Sum.elim c (fun d => if d.2 then 1 else 0) + obtain ⟨t,u,hcell,hactive⟩ := C.simultaneous_active_neighborhood ha J K z + have hb (k : Fin 2) (hk : realCoordinate z k=0 ∨ realCoordinate z k=1) : + ∃ b : Bool, cutForm a (J (.inr (k,b))) z=ordinary (K (.inr (k,b))) := by + have haxis : cutForm a (axisDirection k) z=realCoordinate z k := by fin_cases k <;> rfl + rcases hk with hk | hk + · exact ⟨false,by simpa only [J,K,Sum.elim_inr,Bool.false_eq_true,↓reduceIte,map_zero,haxis] using hk⟩ + · exact ⟨true,by simpa only [J,K,Sum.elim_inr,↓reduceIte,map_one,haxis] using hk⟩ + refine ⟨t,u,hcell,fun p hp N hN hz => + C.localDecision_assignment_realized hr t u j c z hz₁ hz₂ + (fun i hi => (hactive (.inl i) hi).1) ?_ + (fun i hi => (hactive (.inl i) hi).2) ?_ p hp N hN hz⟩ + · intro k hk + obtain ⟨b,hb⟩ := hb k hk + have he := congrArg ordinary (hactive (.inr (k,b)) hb).1 + have haxis : cutForm a (axisDirection k) z=realCoordinate z k := by fin_cases k <;> rfl + change ordinary (integralCutForm a (axisDirection k) (u+C.anchors t (axisDirection k)))=_ at he + rw [integralCutForm_axis] at he + exact he.trans (by simpa only [J,Sum.elim_inr,haxis] using hb.symm) + · intro k hk + obtain ⟨b,hb⟩ := hb k hk + exact (hactive (.inr (k,b)) hb).2 + +end ConcurrentGeometry +end ConcurrentInwardModel + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConjugationTransport.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConjugationTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..8401b89125ed574f9e6571ab1767ee5c4abc252e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ConjugationTransport.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.AlphabetAlignedGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ConjugationTransport + +variable {J M H T : Type*} [Group M] [Group H] [MulAction M T] + +theorem word_conjugates_differences (p : J → M) (f : J → H) (Y : T → H) + (R : T → T → Prop) + (hR : ∀ (g : M) t u, R t u → R (g • t) (g • u)) + (hgen : ∀ j t u, R t u → + f j * (Y t)⁻¹ * Y u * (f j)⁻¹ = + (Y (p j • t))⁻¹ * Y (p j • u)) + (w : FreeGroup J) : ∀ t u, R t u → + FreeGroup.lift f w * (Y t)⁻¹ * Y u * (FreeGroup.lift f w)⁻¹ = + (Y (FreeGroup.lift p w • t))⁻¹ * Y (FreeGroup.lift p w • u) := by + induction w using FreeGroup.induction_on with + | one => + intro t u _ + simp + | of j => + simpa only [FreeGroup.lift_apply_of] using hgen j + | inv_of j ih => + intro t u htu + have h := ih ((p j)⁻¹ • t) ((p j)⁻¹ • u) (hR _ _ _ htu) + simp only [FreeGroup.lift_apply_of, smul_inv_smul] at h + simp only [map_inv, FreeGroup.lift_apply_of] + calc + (f j)⁻¹ * (Y t)⁻¹ * Y u * ((f j)⁻¹)⁻¹ = + (f j)⁻¹ * (f j * (Y ((p j)⁻¹ • t))⁻¹ * + Y ((p j)⁻¹ • u) * (f j)⁻¹) * f j := by rw [h]; group + _ = _ := by group + | mul x y ihx ihy => + intro t u htu + simp only [map_mul, mul_smul] + calc + (FreeGroup.lift f x * FreeGroup.lift f y) * (Y t)⁻¹ * Y u * + (FreeGroup.lift f x * FreeGroup.lift f y)⁻¹ = + FreeGroup.lift f x * + (FreeGroup.lift f y * (Y t)⁻¹ * Y u * (FreeGroup.lift f y)⁻¹) * + (FreeGroup.lift f x)⁻¹ := by group + _ = FreeGroup.lift f x * + ((Y (FreeGroup.lift p y • t))⁻¹ * Y (FreeGroup.lift p y • u)) * + (FreeGroup.lift f x)⁻¹ := by rw [ihy t u htu] + _ = _ := by + simpa only [mul_assoc] using + ihx _ _ (hR (FreeGroup.lift p y) t u htu) + +theorem centralLaw_of_difference_conjugations + (p : J → M) (f : J → H) (Y : T → H) (R : T → T → Prop) + (hR : ∀ (g : M) t u, R t u → R (g • t) (g • u)) + (hgen : ∀ j t u, R t u → + f j * (Y t)⁻¹ * Y u * (f j)⁻¹ = + (Y (p j • t))⁻¹ * Y (p j • u)) + (hgenerate : Subgroup.closure {h : H | ∃ t u, R t u ∧ h = (Y t)⁻¹ * Y u} = ⊤) : + HasCentralLaw (FreeGroup.lift p) (FreeGroup.lift f) := by + rw [hasCentralLaw_iff] + intro w hw + rw [← Subgroup.centralizer_univ, ← Subgroup.coe_top, ← hgenerate, + Subgroup.centralizer_closure] + apply Subgroup.mem_centralizer_iff.mpr + rintro z ⟨t,u,htu,rfl⟩ + have h := word_conjugates_differences p f Y R hR hgen w t u htu + rw [hw, one_smul, one_smul] at h + have h' := congrArg (fun x => x * FreeGroup.lift f w) h + simpa only [mul_assoc, inv_mul_cancel, mul_one] using h'.symm + +end ConjugationTransport + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ControlledPatching.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ControlledPatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..a593a3fade4e9d69db1c4404b741d5e5b389da81 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ControlledPatching.lean @@ -0,0 +1,62 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SmallControlTransfer +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InvariantPatching + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ControlledPatching +variable {α H ι : Type*} [Fintype α] [DecidableEq α] [Group H] + [Group.IsPerfect (alternatingGroup α)] + +theorem controlled_cell_normalizes (L : Finset α → Subgroup H) + (c : alternatingGroup α →* H) + (hc : ∀ σ I, ∀ x ∈ L I, c σ*x*(c σ)⁻¹ ∈ L (I.map σ.val.toEmbedding)) + (hd : ∀ I J, Disjoint I J → ∀ x ∈ L I, ∀ y ∈ L J, Commute x y) + (hα : 20 ≤ Fintype.card α) + (F p v : ι → TrackStar α →* H) (j k : TrackStar α →* H) + (hp : ∀ i, SmallSupported L (p i)) (hv : ∀ i, SmallSupported L (v i)) + (hj : SmallSupported L j) (hpc : ∀ i, SmallControlled c (p i) j) + (hvc : ∀ i, SmallControlled c (v i) k) + (hjk : ∀ s t, Commute (j s) (k t)) + (hsplit : ∀ i s, F i s=p i s*v i s) : + ∀ i s, F i s ∈ Subgroup.normalizer ((⨆ i, (p i).range : Subgroup H) : Set H) := by + have hcomm (i i' : ι) (s t : TrackStar α) : Commute (p i s) (v i' t) := + small_control_disjoint L c hc hd hα _ _ _ _ (hp i) (hv i') hj + (hpc i) (hvc i') hjk s t + have ho (i : ι) (s : TrackStar α) : + v i s ∈ Subgroup.centralizer ((⨆ i, (p i).range : Subgroup H) : Set H) := by + have hle : (⨆ i, (p i).range : Subgroup H) ≤ Subgroup.centralizer ({v i s} : Set H) := by + apply iSup_le + rintro i' x ⟨t,rfl⟩ y hy + obtain rfl := Set.mem_singleton_iff.mp hy + exact (hcomm i' i t s).eq.symm + intro x hx + exact (hle hx _ rfl).symm + intro i s + exact normalizes_of_cell_split _ _ _ _ (hsplit i s) + ((le_iSup (fun i => (p i).range) i) ⟨s,rfl⟩) (ho i s) + +theorem sameActionOn_iSup {D : Type*} (f g : D → H) (P : ι → Subgroup H) + (h : ∀ i, SameActionOn f g (P i)) : SameActionOn f g (⨆ i, P i) := by + intro d x hx + let F : H →* H := (MulAut.conj (f d)).toMonoidHom + let J : H →* H := (MulAut.conj (g d)).toMonoidHom + have hle : (⨆ i, P i) ≤ F.eqLocus J := by + apply iSup_le + intro i y hy + exact h i d y hy + exact hle hx + +end ControlledPatching + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateModels.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..30ac34b27287734eb66666949777c31d94b7be34 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateModels.lean @@ -0,0 +1,233 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ActiveClippedModelActions + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section CoordinateModels + +structure CoordinateGerm (a : ℕ) (d : Fin 2) (u : CutRing × CutRing) (z : ℝ × ℝ) where + period : ℤ + radius : ℝ + radius_pos : 0 halfPlane a (j i) (c i)) (spatialTranslate u (coordinatePrimitive a d)).val) + (p : GenericSquare a) (hp : p ∈ (C.inwardMargin T.vertex T.offset z).val) : + p ∈ (T.polygons (fun _ : Unit => spatialTranslate u (coordinatePrimitive a d)) ()).val ↔ + p ∉ (C.localDecision T.vertex T.offset z (j lo) (c lo)).val ∧ + p ∈ (C.localDecision T.vertex T.offset z (j hi) (c hi)).val := by + obtain ⟨q,hq,he⟩ := T.assignment_realized hr hz₁ hz₂ p hp + (Metric.ball z G.radius) Metric.isOpen_ball (Metric.mem_ball_self G.radius_pos) + have hd (i : ι) : q ∈ (cutPolygon a (j i) (c i)).val ↔ + p ∈ (C.localDecision T.vertex T.offset z (j i) (c i)).val := by + simpa only [polygonAssignment,decide_eq_true_eq] using Bool.eq_iff_iff.mp (congrFun he i) + have hmodel : p ∈ (T.polygons (fun _ : Unit => spatialTranslate u (coordinatePrimitive a d)) ()).val ↔ + q ∈ (spatialTranslate u (coordinatePrimitive a d)).val := by + change polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p ∈ + polygonFormalMask (fun i => cutPolygon a (j i) (c i)) _ ↔ _ + rw [← he] + exact polygonFormalMask_mem _ _ hR q + rw [hmodel,G.valid q hq] + apply and_congr + · simpa only [cutPolygon,halfPlane,Set.mem_ofPred_eq,hlo.1,hlo.2,cutForm_axis,not_lt,lower] + using not_congr (hd lo) + · simpa only [cutPolygon,halfPlane,Set.mem_ofPred_eq,hhi.1,hhi.2,cutForm_axis,upper,lower] + using hd hi + +end CoordinateGerm + +namespace InitialCoverSystem.PatchAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.PatchAtlas) + +theorem coordinate_model_action_neighborhood {ι : Type*} [Finite ι] + (hlarge : 20 ≤ m+1) (hr : 0 halfPlane a (j i) (c i)) (spatialTranslate u (coordinatePrimitive a d)).val) : + ∃ N : Set (ℝ × ℝ), IsOpen N ∧ z ∈ N ∧ + ∀ n q (W : polygonAlgebra a), + ResolvedBy (fun i => (primitiveTests (a := a) (r := r) (coordinateWindowPrimitives n q) i).val) W.val → + (∀ p : GenericSquare a, p ∈ W.val → p.val ∈ N) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q W) → + ∀ (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)), + ∀ x ∈ f.range, + A.primitiveStar (by omega) (coordinateTestIndex d,u) (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.primitiveStar (by omega) (coordinateTestIndex d,u) (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (coordinatePrimitive a d)) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (coordinatePrimitive a d)) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + let R : Unit → polygonAlgebra a := fun _ => spatialTranslate u (coordinatePrimitive a d) + obtain ⟨N,hN,hz,hlocal⟩ := T.polygons_locally_eq hr R (fun _ => hR) + let V : polygonAlgebra a := (A.geometry.localDecision T.vertex T.offset z (j lo) (c lo))ᶜ ⊓ + A.geometry.localDecision T.vertex T.offset z (j hi) (c hi) + have hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (A.concurrentCoordinates T.vertex T.offset) i).val) V.val := by + intro p q hh + apply and_congr + · exact not_congr (by simpa only [hlo.1] using + A.coordinate_localDecision_resolved T.vertex T.offset z d (c lo) p q hh) + · simpa only [hhi.1] using A.coordinate_localDecision_resolved T.vertex T.offset z d (c hi) p q hh + have he (p : GenericSquare a) (hp : p ∈ (A.geometry.inwardMargin T.vertex T.offset z).val) : + p ∈ (T.polygons R ()).val ↔ p ∈ V.val := + G.model_formula T hr hz₁ hz₂ lo hi hlo hhi hR p hp + have hrestrict : V ⊓ A.geometry.inwardMargin T.vertex T.offset z= + T.polygons R () ⊓ A.geometry.inwardMargin T.vertex T.offset z := by + apply Subtype.ext + ext p + change (_ ∧ _) ↔ (_ ∧ _) + by_cases hp : p ∈ (A.geometry.inwardMargin T.vertex T.offset z).val + · simp only [hp,and_true,he p hp] + · simp only [hp,and_false] + refine ⟨N,hN,hz,?_⟩ + intro n q W hW hWN f hf hc I s x hx + have hinc : W ≤ A.geometry.inwardMargin T.vertex T.offset z := fun p hp => (hlocal p (hWN p hp)).1 + have heW : spatialTranslate u (coordinatePrimitive a d) ⊓ W=V ⊓ W := by + apply Subtype.ext + ext p + change (_ ∧ _) ↔ (_ ∧ _) + by_cases hp : p ∈ W.val + · have hh := (hlocal p (hWN p hp)).2 () + simpa only [hp,and_true] using hh.symm.trans (he p (hinc hp)) + · simp only [hp,and_false] + apply (A.coordinate_concurrent_action hlarge d u T.vertex T.offset V hV n q W hW heW f hf hc I s x hx).trans + exact B.chart_action_transfer hlarge _ (A.concurrentLaw T.vertex T.offset) V (T.polygons R ()) _ + (fun p q hh => hV p q (fun i => hh (A.concurrentCoordinateEmbedding i))) + (A.inward_model_resolved T R ()) (A.concurrent_inward_resolved T.vertex T.offset z) hrestrict f hf + (A.coordinate_control_inward_gate hlarge T.vertex T.offset _ (A.coordinate_inward_resolved T.vertex T.offset z) + n q W hW hinc f hf hc) I s x hx + +end InitialCoverSystem.PatchAtlas +end CoordinateModels + +namespace ClippedGerm +variable {a : ℕ} {r : CutRing} {slope : Fin 4} {u : CutRing × CutRing} {z : ℝ × ℝ} + (G : ClippedGerm a r slope u z) + +theorem inactive_model_restrict_gate {ι : Type*} [Finite ι] {C : ConcurrentGeometry a r} + {j : ι → Fin 4} {c : ι → CutRing} + (T : C.InwardChart j c z) (hr : 0 halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r slope)).val) + (hinactive : cutForm a slope z ≠ ordinary (integralCutForm a slope G.offset)) + (σ : Fin 2 × Bool → Bool) : + T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r slope)) () ⊓ + C.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ = + if (∀ d, σ (d,false)=false ∧ σ (d,true)=true) ∧ + ordinary (integralCutForm a slope G.offset) halfPlane a (j i) (c i)) + (spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))).val) + (hinactive : cutForm a (slopeDirection d) z ≠ ordinary (integralCutForm a (slopeDirection d) G.offset)) + (hnearline : |cutForm a (slopeDirection d) z-ordinary (integralCutForm a (slopeDirection d) G.offset)| (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) e).val) (coordinateRectangle a L V).val) → + (coordinateRectangle a L V ≤ + A.geometry.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ) → + ∀ (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)), + B.AlignedSmallSupported f → + (SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles.rectangles n) q + (coordinateRectangle a L V))) → + ∀ (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)), + ∀ x ∈ f.range, + A.primitiveStar (by omega) (slopeTestIndex d,u) (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.primitiveStar (by omega) (slopeTestIndex d,u) (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s)*x* + (B.fullGeometricSector (by omega) (A.concurrentPrimitives T.vertex T.offset) (A.concurrentLaw T.vertex T.offset) + (T.polygons (fun _ : Unit => spatialTranslate u (clippedSlopePrimitive a r (slopeDirection d))) ()) + (universalMap (subtypeAlternatingHom I.val) s))⁻¹ := by + obtain ⟨δ,hδ,b,hb,h⟩ := A.rectangles.inactive_near_action_neighborhood hlarge hr d G.offset z hinactive hnearline + refine ⟨δ,hδ,?_⟩ + intro L V hLV hclip hnear n q hW hinc f hf hc I s x hx + have hperiod := A.primitiveStar_periodic (by omega) (slopeTestIndex d) u G.period + change A.primitiveStar (by omega) (slopeTestIndex d,G.offset)=_ at hperiod + rw [← hperiod,A.primitiveStar_slope] + apply (h L V hLV hclip hnear n q hW f hf hc I s x hx).trans + symm + apply B.cell_constant_action hlarge _ (A.concurrentLaw T.vertex T.offset) _ _ + (A.inward_model_resolved T _ ()) + (A.concurrent_coordinateGate_resolved T.vertex T.offset z Prod.fst G.axialCut σ) b ?_ f hf + (A.coordinateGate_control hlarge T.vertex T.offset z Prod.fst G.axialCut σ n q _ hW hinc f hf hc) I s x hx + rw [G.inactive_model_restrict_gate T hr hz₁ hz₂ lo hi slope hlo hhi hs hR hinactive σ] + simp only [hσ,forall_const,true_and,← hb] + +end InitialCoverSystem.PatchAtlas + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateProductPatterns.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateProductPatterns.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb2620cb9c8df2bf11237d545720afbd92f47bb6 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateProductPatterns.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.Supported +import OAI.GroupTheory.SimpleAmenable.CentralCovers.BooleanCoordinateGeneration +import OAI.GroupTheory.SimpleAmenable.Configurations.PointwisePolygonTables + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CoordinateProductPatterns + +theorem generic_fixed_x {a : ℕ} (p : GenericSquare a) (l r : ℝ) + (hl : 0 ≤ l) (hr : r ≤ 1) (hlr : l < r) : + ∃ q : GenericSquare a, q.val.1 = p.val.1 ∧ q.val.2 ∈ Set.Ioo l r := by + let x := p.val.1 + let t := Real.goldenRatio^a + have ht : t ≠ 0 := ne_of_gt (pow_pos Real.goldenRatio_pos a) + let S := Set.range ordinary ∪ Set.range (fun z : CutRing => ordinary z+t*x) ∪ + Set.range (fun z : CutRing => (x-ordinary z)/t) + have hS : S.Countable := ((Set.countable_range ordinary).union + (Set.countable_range _)).union (Set.countable_range _) + obtain ⟨y,hy,hy'⟩ : ∃ y ∈ Set.Ioo l r, y ∉ S := by + apply Set.not_subset.mp + intro hh + have := Cardinal.Real.Ioo_countable_iff.mp (hS.mono hh) + linarith + have hav : AvoidsCuts a (x,y) := by + intro j z hz + fin_cases j + · exact p.property.2.2 0 z hz + · exact hy' (Or.inl (Or.inl ⟨z,by simpa [cutForm] using hz.symm⟩)) + · apply hy' + apply Or.inl ∘ Or.inr + refine ⟨z,?_⟩ + change ordinary z+t*x=y + change y-t*x=ordinary z at hz + linarith + · apply hy' + apply Or.inr + refine ⟨z,?_⟩ + apply (div_eq_iff ht).mpr + change x-t*y=ordinary z at hz + linarith + exact ⟨⟨(x,y),p.property.1,⟨by linarith [hy.1],by linarith [hy.2]⟩,hav⟩,rfl,hy⟩ + +def genericSwap {a : ℕ} (p : GenericSquare a) : GenericSquare a := + ⟨p.val.swap,p.property.2.1,p.property.1,by + intro j z + fin_cases j + · exact p.property.2.2 1 z + · exact p.property.2.2 0 z + · exact p.property.2.2 3 z + · exact p.property.2.2 2 z⟩ + +theorem generic_fixed_y {a : ℕ} (p : GenericSquare a) (l r : ℝ) + (hl : 0 ≤ l) (hr : r ≤ 1) (hlr : l < r) : + ∃ q : GenericSquare a, q.val.2 = p.val.2 ∧ q.val.1 ∈ Set.Ioo l r := by + obtain ⟨q,hq,hqr⟩ := generic_fixed_x (genericSwap p) l r hl hr hlr + exact ⟨genericSwap q,hq,hqr⟩ + +theorem coordinate_patterns_product {a : ℕ} {ι : Type*} [Finite ι] + (U : Fin 2 × ι → polygonAlgebra a) + (hcoord : ∀ j i (p q : GenericSquare a), coordinate j p = coordinate j q → + (p ∈ (U (j,i)).val ↔ q ∈ (U (j,i)).val)) + (σ : Fin 2 × ι → Bool) + (hσ : ∀ j : Fin 2, (fun i => σ (j,i)) ∈ Set.range (polygonAssignment (fun i => U (j,i)))) : + σ ∈ Set.range (polygonAssignment U) := by + classical + let V : Fin 2 → polygonAlgebra a := fun j => + ⟨{q | polygonAssignment (fun i => U (j,i)) q = fun i => σ (j,i)}, + polygonAssignment_fiber_mem _ _⟩ + have hV (j : Fin 2) : (V j).val.Nonempty := hσ j + obtain ⟨l₀,r₀,hl₀,hlr₀,hr₀,hl₀',hlr₀',hr₀',hbox₀⟩ := polygon_contains_rectangle (V 0) (hV 0) + obtain ⟨l₁,r₁,hl₁,hlr₁,hr₁,hl₁',hlr₁',hr₁',hbox₁⟩ := polygon_contains_rectangle (V 1) (hV 1) + obtain ⟨p,hpx,hpy⟩ := generic_rectangle a (ordinary l₀.1) (ordinary r₀.1) + (ordinary l₁.2) (ordinary r₁.2) hl₀.le hr₀.le hlr₀ hl₁'.le hr₁'.le hlr₁' + obtain ⟨q₀,hq₀,hq₀y⟩ := generic_fixed_x p (ordinary l₀.2) (ordinary r₀.2) hl₀'.le hr₀'.le hlr₀' + obtain ⟨q₁,hq₁,hq₁x⟩ := generic_fixed_y p (ordinary l₁.1) (ordinary r₁.1) hl₁.le hr₁.le hlr₁ + have hq₀mem := hbox₀ q₀ (by rwa [hq₀]) hq₀y + have hq₁mem := hbox₁ q₁ hq₁x (by rwa [hq₁]) + refine ⟨p,?_⟩ + funext ⟨j,i⟩ + fin_cases j + · have he := congrFun hq₀mem i + change decide (p ∈ (U (0,i)).val) = _ + change decide (q₀ ∈ (U (0,i)).val) = _ at he + rw [decide_eq_decide.mpr (hcoord 0 i p q₀ hq₀.symm)] + exact he + · have he := congrFun hq₁mem i + change decide (p ∈ (U (1,i)).val) = _ + change decide (q₁ ∈ (U (1,i)).val) = _ at he + rw [decide_eq_decide.mpr (hcoord 1 i p q₁ hq₁.symm)] + exact he + +end CoordinateProductPatterns + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateWindowTarget.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateWindowTarget.lean new file mode 100644 index 0000000000000000000000000000000000000000..c56a7ed6d50cb9a41c2a6cfd4e42906bffd4bec5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/CoordinateWindowTarget.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CommonTranslatedCopies +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveWords + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section CoordinateWindowTarget + +def coordinateTestIndex (j : Fin 2) : Fin 5 := ⟨j.val+1,by omega⟩ + +@[simp] theorem initialTest_coordinate (a : ℕ) (r : CutRing) (j : Fin 2) : + initialTest a r (coordinateTestIndex j) = coordinatePrimitive a j := by + fin_cases j <;> rfl + +noncomputable def coordinateWindowPrimitives (n : ℕ) (q : Fin 2 → ℤ) : + Fin 2 × Fin (n-1) → Fin 5 × (CutRing × CutRing) := fun i => + (coordinateTestIndex i.1,coordinateShift i.1 (((q i.1 + (i.2.val : ℤ)) : CutRing)*cutTau)) + +namespace InitialCoverSystem + +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +def CoordinateWindowLaw (n : ℕ) : Prop := + ∀ (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) (q : Fin 2 → ℤ), + B.PrimitiveFamilyLaw I b hb (coordinateWindowPrimitives n q) + +end InitialCoverSystem + +theorem coordinatePrimitive_translate_eq {a : ℕ} (j : Fin 2) + (u v : CutRing × CutRing) (h : (if j = 0 then u.1 else u.2) = + (if j = 0 then v.1 else v.2)) : + spatialTranslate u (coordinatePrimitive a j) = spatialTranslate v (coordinatePrimitive a j) := by + apply Subtype.ext + ext p + fin_cases j + · change u.1 = v.1 at h + simp [spatialTranslate,coordinatePrimitive,halfPlane,cutForm,translate_val,h] + · change u.2 = v.2 at h + simp [spatialTranslate,coordinatePrimitive,halfPlane,cutForm,translate_val,h] + +end CoordinateWindowTarget + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/DirectionStripCounts.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/DirectionStripCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..e04d719508da614aaa71f87563efab9861889212 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/DirectionStripCounts.lean @@ -0,0 +1,235 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagSiteCounts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section DirectionStripCounts +open Classical + +noncomputable def cutCoordinates (a : ℕ) (j : Fin 4) : (CutRing×CutRing) ≃ (CutRing×CutRing) where + toFun p := ![p,(p.2,p.1),(p.2-cutTau^a*p.1,p.1),(p.1-cutTau^a*p.2,p.2)] j + invFun q := ![q,(q.2,q.1),(q.2,q.1+cutTau^a*q.2),(q.1+cutTau^a*q.2,q.2)] j + left_inv p := by fin_cases j <;> simp + right_inv p := by fin_cases j <;> simp + +@[simp] theorem cutCoordinates_fst (a : ℕ) (j : Fin 4) (p : CutRing×CutRing) : + (cutCoordinates a j p).1=integralCutForm a j p := by + fin_cases j <;> simp [cutCoordinates,integralCutForm] + +theorem cutCoordinates_conjugate_bound (a : ℕ) (j : Fin 4) (p : CutRing×CutRing) + {R : ℝ} (hR : 0 ≤ R) (hx : |conjugate p.1| ≤ R) (hy : |conjugate p.2| ≤ R) : + |conjugate (cutCoordinates a j p).1| ≤ (1+|conjugate (cutTau^a)|)*R := by + have hmulx := mul_le_mul_of_nonneg_left hx (abs_nonneg (conjugate (cutTau^a))) + have hmuly := mul_le_mul_of_nonneg_left hy (abs_nonneg (conjugate (cutTau^a))) + have hn : 0 ≤ |conjugate (cutTau^a)| * R := mul_nonneg (abs_nonneg _) hR + fin_cases j + · change |conjugate p.1| ≤ (1+|conjugate (cutTau^a)|)*R + nlinarith + · change |conjugate p.2| ≤ (1+|conjugate (cutTau^a)|)*R + nlinarith + · change |conjugate (p.2-cutTau^a*p.1)| ≤ (1+|conjugate (cutTau^a)|)*R + rw [map_sub,map_mul] + calc + |conjugate p.2-conjugate (cutTau^a)*conjugate p.1| ≤ + |conjugate p.2| + |conjugate (cutTau^a)| * |conjugate p.1| := by + simpa only [abs_mul] using abs_sub (conjugate p.2) (conjugate (cutTau^a)*conjugate p.1) + _ ≤ _ := by nlinarith + · change |conjugate (p.1-cutTau^a*p.2)| ≤ (1+|conjugate (cutTau^a)|)*R + rw [map_sub,map_mul] + calc + |conjugate p.1-conjugate (cutTau^a)*conjugate p.2| ≤ + |conjugate p.1| + |conjugate (cutTau^a)| * |conjugate p.2| := by + simpa only [abs_mul] using abs_sub (conjugate p.1) (conjugate (cutTau^a)*conjugate p.2) + _ ≤ _ := by nlinarith + +def flagDirectionStrip {a m D : ℕ} {v : ℝ×ℝ} (j : Fin 4) (c ε R : ℝ) : + Set (FlagSite a m D v) := + {z | z∈flagSiteBox R ∧ |cutForm a j z.val.2.val-c| ≤ ε} + +theorem flagDirectionStrip_numerators {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + (j : Fin 4) {c ε R : ℝ} (hR : 0 ≤ R) (z : FlagSite a m D v) + (hz : z∈flagDirectionStrip j c ε R) : + (cutCoordinates a j (flagSiteNumerator z)).1∈ + cutRectangle (D*(c-ε)) (-(D:ℝ)*(1+|conjugate (cutTau^a)|)*R) + (2*D*ε) (2*D*(1+|conjugate (cutTau^a)|)*R) ∧ + (cutCoordinates a j (flagSiteNumerator z)).2∈ + cutRectangle 0 (-(D:ℝ)*R) D (2*D*R) := by + have hd : (0:ℝ) < D := by exact_mod_cast hD + have hb := flagSiteNumerator_box hD z hz.1 + have hx : |conjugate (flagSiteNumerator z).1| ≤ (D:ℝ)*R := by + exact abs_le.mpr ⟨by linarith [hb.1.2.1],by linarith [hb.1.2.2]⟩ + have hy : |conjugate (flagSiteNumerator z).2| ≤ (D:ℝ)*R := by + exact abs_le.mpr ⟨by linarith [hb.2.2.1],by linarith [hb.2.2.2]⟩ + have hc := abs_le.mp (cutCoordinates_conjugate_bound a j (flagSiteNumerator z) + (mul_nonneg hd.le hR) hx hy) + have he : ordinary (cutCoordinates a j (flagSiteNumerator z)).1 = + (D:ℝ)*cutForm a j z.val.2.val := by + rw [cutCoordinates_fst,← cutForm_ordinary,← cutForm_smul] + congr 1 + have hh := flagSiteNumerator_spec z + apply Prod.ext + · have hh₁ := congrArg Prod.fst hh + change ordinary (flagSiteNumerator z).1/(D:ℝ)=z.val.2.val.1 at hh₁ + simpa [smul_eq_mul,mul_comm] using (div_eq_iff hd.ne').mp hh₁ + · have hh₂ := congrArg Prod.snd hh + change ordinary (flagSiteNumerator z).2/(D:ℝ)=z.val.2.val.2 at hh₂ + simpa [smul_eq_mul,mul_comm] using (div_eq_iff hd.ne').mp hh₂ + constructor + · have hs := abs_le.mp hz.2 + constructor <;> constructor <;> nlinarith [hs.1,hs.2,hc.1,hc.2] + · fin_cases j <;> first | simpa [cutCoordinates] using hb.1 | simpa [cutCoordinates] using hb.2 + +theorem flagDirectionStrip_card_bound {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + (j : Fin 4) {c ε R : ℝ} (hε : 0 ≤ ε) (hR : 0 < R) + (S : Finset (FlagSite a m D v)) (hS : ∀z∈S,z∈flagDirectionStrip j c ε R) : + (S.card:ℝ) ≤ m*(4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*ε*R+2)*(2*(D:ℝ)^2*R+2) := by + have hd : (0:ℝ) < D := by exact_mod_cast hD + have hl : 0 < 1+|conjugate (cutTau^a)| := by positivity + let T₁ := (cutRectangle_finite (D*(c-ε)) (-(D:ℝ)*(1+|conjugate (cutTau^a)|)*R) + (2*D*ε) (2*D*(1+|conjugate (cutTau^a)|)*R) (by positivity)).toFinset + let T₂ := (cutRectangle_finite 0 (-(D:ℝ)*R) D (2*D*R) (by positivity)).toFinset + have hc₁ : (T₁.card:ℝ) < 4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*ε*R+2 := by + have hh := cutRectangle_card_bound T₁ _ _ _ _ (by positivity) (by positivity) + (fun u hu => (Set.Finite.mem_toFinset _).mp hu) + dsimp [T₁] at hh ⊢ + convert hh using 1 + ring + have hc₂ : (T₂.card:ℝ) < 2*(D:ℝ)^2*R+2 := by + have hh := cutRectangle_card_bound T₂ 0 (-(D:ℝ)*R) D (2*D*R) hd.le (by positivity) + (fun u hu => (Set.Finite.mem_toFinset _).mp hu) + nlinarith + let key := fun z : FlagSite a m D v => (z.val.1,cutCoordinates a j (flagSiteNumerator z)) + have hi : Function.Injective key := by + intro z w h + have ht : z.val.1=w.val.1 := congrArg (fun x : Fin m × (CutRing×CutRing) => x.1) h + have hn : cutCoordinates a j (flagSiteNumerator z)=cutCoordinates a j (flagSiteNumerator w) := + congrArg (fun x : Fin m × (CutRing×CutRing) => x.2) h + exact flagSite_key_injective (Prod.ext ht ((cutCoordinates a j).injective hn)) + have hn : S.card ≤ m*T₁.card*T₂.card := by + rw [← Finset.card_image_of_injective _ hi] + have hh : S.image key ⊆ (Finset.univ : Finset (Fin m)) ×ˢ (T₁ ×ˢ T₂) := by + intro x hx + obtain ⟨z,hz,rfl⟩ := Finset.mem_image.mp hx + have hz' := flagDirectionStrip_numerators hD j hR.le z (hS z hz) + simpa only [Finset.mem_product,Finset.mem_univ,true_and,key,T₁,T₂, + Set.Finite.mem_toFinset] using hz' + simpa only [Finset.card_product,Finset.card_univ,Fintype.card_fin,mul_assoc] + using Finset.card_le_card hh + have hn' : (S.card:ℝ) ≤ m*(T₁.card:ℝ)*(T₂.card:ℝ) := by exact_mod_cast hn + exact hn'.trans (mul_le_mul + (mul_le_mul_of_nonneg_left hc₁.le (Nat.cast_nonneg _)) hc₂.le + (Nat.cast_nonneg _) (by positivity)) + +end DirectionStripCounts + +section ExceptionalRowCounts +open Classical + +theorem flagDirectionStrip_union_card_bound {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + (j : Fin 4) (T : Finset CutRing) {ε R : ℝ} (hε : 0 ≤ ε) (hR : 0 < R) + (S : Finset (FlagSite a m D v)) + (hS : ∀z∈S,∃c∈T,z∈flagDirectionStrip j (ordinary c) ε R) : + (S.card:ℝ) ≤ T.card*(m*(4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*ε*R+2)* + (2*(D:ℝ)^2*R+2)) := by + let rows := fun c => S.filter (fun z => z∈flagDirectionStrip j (ordinary c) ε R) + have hh : S ⊆ T.biUnion rows := by + intro z hz + obtain ⟨c,hc,hzc⟩ := hS z hz + exact Finset.mem_biUnion.mpr ⟨c,hc,Finset.mem_filter.mpr ⟨hz,hzc⟩⟩ + have hn : S.card ≤ ∑c∈T,(rows c).card := + (Finset.card_le_card hh).trans (Finset.card_biUnion_le) + have hn' : (S.card:ℝ) ≤ ∑c∈T,((rows c).card:ℝ) := by exact_mod_cast hn + calc + (S.card:ℝ) ≤ ∑c∈T,((rows c).card:ℝ) := hn' + _ ≤ ∑c∈T,(m*(4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*ε*R+2)* + (2*(D:ℝ)^2*R+2)) := by + apply Finset.sum_le_sum + intro c hc + exact flagDirectionStrip_card_bound hD j hε hR (rows c) + (fun z hz => (Finset.mem_filter.mp hz).2) + _ = _ := by simp [nsmul_eq_mul] + +def boundedCutLevels (A B : ℝ) : Set CutRing := + {c | |ordinary c| ≤ A ∧ |conjugate c| ≤ B} + +theorem boundedCutLevels_eq (A B : ℝ) : + boundedCutLevels A B = cutRectangle (-A) (-B) (2*A) (2*B) := by + ext c + simp only [boundedCutLevels,cutRectangle,Set.mem_ofPred_eq,Set.mem_Icc,abs_le] + constructor <;> rintro ⟨⟨h₁,h₂⟩,⟨h₃,h₄⟩⟩ <;> constructor <;> constructor <;> linarith + +theorem boundedCutLevels_finite (A : ℝ) {B : ℝ} (hB : 0 < B) : + (boundedCutLevels A B).Finite := by + rw [boundedCutLevels_eq] + exact cutRectangle_finite _ _ _ _ (by positivity) + +theorem boundedCutLevels_card_bound {A B : ℝ} (hA : 0 ≤ A) (hB : 0 < B) + (T : Finset CutRing) (hT : ∀c∈T,c∈boundedCutLevels A B) : + (T.card:ℝ) < 4*A*B+2 := by + have hh := cutRectangle_card_bound T (-A) (-B) (2*A) (2*B) (by positivity) + (by positivity) (fun c hc => by rw [← boundedCutLevels_eq]; exact hT c hc) + convert hh using 1 + ring + +theorem exceptional_direction_rows {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + (j : Fin 4) {A C Q κ s N : ℝ} (hA : 0 ≤ A) (hC : 0 ≤ C) (hQ : 0 < Q) + (hκ : 0 < κ) (hs : 0 < s) (hN : 1 ≤ N) (hscale : 1 ≤ s*N) + (S : Finset (FlagSite a m D v)) + (hS : ∀z∈S,∃c : CutRing, |ordinary c| ≤ A ∧ |conjugate c| ≤ 2*κ/s ∧ + z∈flagDirectionStrip j (ordinary c) (C*s) (Q*N)) : + (S.card:ℝ) ≤ + (m*(4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*C*Q+2)*(2*(D:ℝ)^2*Q+2)*(8*A+2))* + (κ+s)*N^2 := by + have hd : (0:ℝ) < D := by exact_mod_cast hD + have hN' : 0 < N := lt_of_lt_of_le zero_lt_one hN + let T := (boundedCutLevels_finite A (show 0 < 2*κ/s by positivity)).toFinset + have hTc : (T.card:ℝ) ≤ 8*A*κ/s+2 := by + have hh := boundedCutLevels_card_bound hA (show 0 < 2*κ/s by positivity) T + (fun c hc => (Set.Finite.mem_toFinset _).mp hc) + have he : 4*A*(2*κ/s)+2=8*A*κ/s+2 := by ring + rw [he] at hh + exact hh.le + have hTu := flagDirectionStrip_union_card_bound hD j T + (mul_nonneg hC hs.le) (mul_pos hQ hN') S (by + intro z hz + obtain ⟨c,hc₁,hc₂,hzc⟩ := hS z hz + exact ⟨c,(Set.Finite.mem_toFinset _).mpr ⟨hc₁,hc₂⟩,hzc⟩) + let U := 4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*C*Q + let V := 2*(D:ℝ)^2*Q + have hU : 0 ≤ U := by dsimp [U]; positivity + have hV : 0 ≤ V := by dsimp [V]; positivity + have he₁ : 4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*(C*s)*(Q*N)+2 ≤ (U+2)*(s*N) := by + dsimp [U] + nlinarith + have he₂ : 2*(D:ℝ)^2*(Q*N)+2 ≤ (V+2)*N := by + dsimp [V] + nlinarith + have hf : 8*A*κ+2*s ≤ (8*A+2)*(κ+s) := by + nlinarith [mul_nonneg hA hs.le] + calc + (S.card:ℝ) ≤ T.card*(m*(4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*(C*s)*(Q*N)+2)* + (2*(D:ℝ)^2*(Q*N)+2)) := hTu + _ ≤ (8*A*κ/s+2)*(m*((U+2)*(s*N))*((V+2)*N)) := by + apply mul_le_mul hTc + · exact mul_le_mul (mul_le_mul_of_nonneg_left he₁ (Nat.cast_nonneg _)) he₂ + (by positivity) (by positivity) + · positivity + · positivity + _ = (m*(U+2)*(V+2))*(8*A*κ+2*s)*N^2 := by field_simp + _ ≤ (m*(U+2)*(V+2))*((8*A+2)*(κ+s))*N^2 := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hf (by positivity)) (sq_nonneg N) + _ = _ := by dsimp [U,V]; ring + +end ExceptionalRowCounts + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/EvaluationTable.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/EvaluationTable.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8c359bae6e4200c528fe8de43fdf60a19212674 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/EvaluationTable.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.Sectors + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section EvaluationTable +variable {D H Q T : Type*} [Group D] [Group H] [Group Q] [Group T] + +noncomputable def evaluationModel (q : H →* Q) (e : D →* H) + (v : D →* T) (ρ : T →* Q) (hρ : Function.Injective ρ) + (he : q.comp e = ρ.comp v) : e.range →* T := + e.rangeRestrict.liftOfSurjective e.rangeRestrict_surjective + ⟨v,by + intro w hw + apply hρ + have hh := DFunLike.congr_fun he w + change q (e w) = ρ (v w) at hh + have hw' : e w = 1 := congrArg Subtype.val hw + rw [hw',map_one] at hh + simpa only [map_one] using hh.symm⟩ + +theorem evaluationModel_comp (q : H →* Q) (e : D →* H) + (v : D →* T) (ρ : T →* Q) (hρ : Function.Injective ρ) + (he : q.comp e = ρ.comp v) : + (evaluationModel q e v ρ hρ he).comp e.rangeRestrict = v := + e.rangeRestrict.liftOfRightInverse_comp _ _ _ + +theorem evaluationModel_projection (q : H →* Q) (e : D →* H) + (v : D →* T) (ρ : T →* Q) (hρ : Function.Injective ρ) + (he : q.comp e = ρ.comp v) : + q.comp e.range.subtype = ρ.comp (evaluationModel q e v ρ hρ he) := by + apply MonoidHom.ext + intro x + obtain ⟨w,rfl⟩ := e.rangeRestrict_surjective x + have hh := DFunLike.congr_fun (evaluationModel_comp q e v ρ hρ he) w + change evaluationModel q e v ρ hρ he (e.rangeRestrict w) = v w at hh + simp only [MonoidHom.comp_apply,hh] + exact DFunLike.congr_fun he w + +noncomputable def evaluationTable {Ω E : Type*} [Group E] + (q : H →* Q) (e : D →* H) (v : D →* (Ω → E)) + (ρ : (Ω → E) →* Q) (hρ : Function.Injective ρ) + (he : q.comp e = ρ.comp v) (hv : Function.Surjective v) + (h : CentralOn q e.range) : ActualLawfulTable q ρ where + carrier := e.range + law := h + model := evaluationModel q e v ρ hρ he + onto := by + intro s + obtain ⟨w,rfl⟩ := hv s + exact ⟨e.rangeRestrict w,DFunLike.congr_fun (evaluationModel_comp q e v ρ hρ he) w⟩ + projection := evaluationModel_projection q e v ρ hρ he + +end EvaluationTable + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ExteriorPhaseGeometry.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ExteriorPhaseGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..84fe2b8087d11b32f4e022e3390accae6e0b3ea4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ExteriorPhaseGeometry.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ClippedGerms +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FarClippingGeometry +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.LocalClippedBoxFormula + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ExteriorPhaseGeometry +namespace ClippedGerm +variable {a : ℕ} {r : CutRing} {slope : Fin 4} {u : CutRing × CutRing} {z : ℝ × ℝ} + (G : ClippedGerm a r slope u z) + +theorem gate_box_iff {ι : Type*} {C : ConcurrentGeometry a r} + {j : ι → Fin 4} {c : ι → CutRing} (T : C.InwardChart j c z) + (hbox : G.BoxValid) (lo hi : Fin 2 → ι) + (hlo : ∀ k, j (lo k)=axisDirection k ∧ c (lo k)=pointCoordinate G.offset k-r) + (hhi : ∀ k, j (hi k)=axisDirection k ∧ c (hi k)=pointCoordinate G.offset k+r) + (σ : Fin 2 × Bool → Bool) (p : GenericSquare a) + (hp : p ∈ (C.coordinateGate T.vertex T.offset z Prod.fst G.axialCut σ).val) + (hpnear : dist p.val z -r) (fun _ => r))).val ↔ + ∀ k, σ (k,false)=false ∧ σ (k,true)=true := by + classical + rw [hbox p hpnear] + apply forall_congr' + intro k + have hL := hlocal (lo k) + have hH := hlocal (hi k) + rw [(hlo k).1,(hlo k).2] at hL + rw [(hhi k).1,(hhi k).2] at hH + have hsL : decide (p ∈ (C.localDecision T.vertex T.offset z (axisDirection k) + (pointCoordinate G.offset k-r)).val)=σ (k,false) := congrFun hp.2 (k,false) + have hsH : decide (p ∈ (C.localDecision T.vertex T.offset z (axisDirection k) + (pointCoordinate G.offset k+r)).val)=σ (k,true) := congrFun hp.2 (k,true) + change (p ∈ (C.localDecision T.vertex T.offset z (axisDirection k) (pointCoordinate G.offset k-r)).val ↔ + cutForm a (axisDirection k) p.val -r) (fun _ => r)) := by + have hout : p ∉ (spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))).val := + fun hh => hσ ((G.gate_box_iff T hbox lo hi hlo hhi σ p hp hpnear hlocal).mp hh) + exact windowRectangle_exterior_of_point r hr n hn q cell hb he (translate a (-u) p) hinitial hout + +end ClippedGerm +end ExteriorPhaseGeometry + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FarClippingGeometry.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FarClippingGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..860d9167c2f1c68d88e7cd79ae37d5b163c99584 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FarClippingGeometry.lean @@ -0,0 +1,131 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FinePatchAtlas + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FarClippingGeometry + +theorem windowRectangle_clipping_chart_at_lift {a : ℕ} (r : CutRing) + (n : ℕ) (hn : 201≤n) (q : Fin 2 → ℤ) (cell : Fin 2 → Fin n) + (hb : ∀ d, q d≤endpointLabel (-r) ∧ endpointLabel (-r) linarith [(hk d),(hclip d).1,(hclip d).2]) + simpa only [map_neg] using h + · apply Prod.ext + · change (windowPlanarLift q p).1+(k 0:ℝ)=z.1 + have h := hk 0 + change z.1-(windowPlanarLift q p).1=(k 0:ℝ) at h + linarith + · change (windowPlanarLift q p).2+(k 1:ℝ)=z.2 + have h := hk 1 + change z.2-(windowPlanarLift q p).2=(k 1:ℝ) at h + linarith + +theorem far_cut_neighborhood (a : ℕ) (j : Fin 4) (z : ℝ × ℝ) (c R E : ℝ) + (hR : 0-r) (fun _ => r) := by + intro p hp + have hb (d : Fin 2) : p ∈ coordinateBetween a d (-r) r := by + apply (mem_coordinateBetween_iff d (-r) r (by rw [map_neg]; linarith [hr.1]) + (by rw [map_neg]; linarith [hr.2]) p).mpr + refine ⟨k d-⌊coordinate d p-ordinary ((q d:CutRing)*cutTau)⌋,?_⟩ + have hh := (windowRectangle_mem n hn q cell p).mp hp d + simp only [windowPlanarLift_coordinate,liftedCoordinate] at hh + simp only [map_neg,Int.cast_sub] + constructor <;> linarith [(hk d).1,(hk d).2,hh.1,hh.2] + exact ⟨hb 0,hb 1⟩ + +theorem windowRectangle_clipping_dichotomy {a : ℕ} (r : CutRing) + (hr : 0 -r) (fun _ => r)) ∨ + windowRectangle a n q cell ≤ coordinateRectangle a (fun _ => -r) (fun _ => r) := by + classical + by_cases h : ∃ p : GenericSquare a, p ∈ (windowRectangle a n q cell).val ∧ + p ∈ (coordinateRectangle a (fun _ => -r) (fun _ => r)).val + · obtain ⟨p,hp,hbox⟩ := h + obtain ⟨k,hk⟩ := windowRectangle_clipping_chart r hr n hn q cell hb he p hp hbox + exact Or.inr (windowRectangle_le_clipping_box r hr n hn q cell k hk) + · left + rw [disjoint_iff_inf_le] + exact fun p hp => h ⟨p,hp.1,hp.2⟩ + +theorem windowRectangle_exterior_of_point {a : ℕ} (r : CutRing) + (hr : 0 -r) (fun _ => r)).val) : + Disjoint (windowRectangle a n q cell) (coordinateRectangle a (fun _ => -r) (fun _ => r)) := by + rcases windowRectangle_clipping_dichotomy r hr n hn q cell hb he with h | h + · exact h + · exact False.elim (hout (h hp)) + +end WindowBoxDichotomy + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FinePatchAtlas.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FinePatchAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..a90985eb241147a2a5cfeb358714bc63c85c2457 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FinePatchAtlas.lean @@ -0,0 +1,187 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.WindowClipping +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentGeometry + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FinePatchAtlas + +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) + +noncomputable def refineMesh (n : ℕ) (hn : C.mesh ≤ n) : ConcurrentGeometry a r := + { C with + mesh := n + mesh_large := C.mesh_large.trans hn + clipping := C.clipping.trans hn + mesh_fine := by + have hpos : (0:ℝ) < C.mesh := by exact_mod_cast (show 0 < C.mesh by have := C.mesh_large; omega) + have hle : (C.mesh:ℝ) ≤ n := by exact_mod_cast hn + have h := div_le_div_of_nonneg_left (by norm_num : (0:ℝ) ≤ 200) hpos hle + exact (mul_le_mul_of_nonneg_left h (by linarith [lineIntersectionConstant_ge_one a])).trans_lt C.mesh_fine } + +theorem exists_finer (C : ConcurrentGeometry a r) (K δ : ℝ) (hδ : 0 < δ) : + ∃ D : ConcurrentGeometry a r, K*(200/(D.mesh:ℝ)) < δ := by + obtain ⟨N,hN⟩ := exists_nat_gt (200*K/δ) + let n := max C.mesh N + let D := C.refineMesh n (le_max_left _ _) + refine ⟨D,?_⟩ + change K*(200/(n:ℝ)) < δ + have hn : 0 < (n:ℝ) := by exact_mod_cast (show 0 < n by have := C.mesh_large; dsimp [n]; omega) + rw [← mul_div_assoc,div_lt_iff₀ hn] + have h := (div_lt_iff₀ hδ).mp hN + have hNn : (N:ℝ) ≤ n := by exact_mod_cast (le_max_right C.mesh N) + nlinarith + +end ConcurrentGeometry + +theorem rectangularAtlas_fixed_radius_eventually {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (hSlope : 8000 < ordinary (cutTau^a)) (hconj : |conjugate (cutTau^a)| < 1/1000) : + ∃ s : CutRing, 0 < ordinary s ∧ ordinary s < ordinary r/8 ∧ + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ B : InitialCoverSystem a r m hm M, + ∃ A : B.RectangularAtlas, A.radius=s := by + obtain ⟨s,u,v,hs,hsr,huv,hshort⟩ := exists_symmetric_short_chart a r hr.1 + obtain ⟨k,p,hp⟩ := exists_full_overlap_window a r u + obtain ⟨s₁,hs₁,hs₁'⟩ := exists_cut_between (by linarith : (0:ℝ) < ordinary r/8) + obtain ⟨L₁,hL₁⟩ := coordinate_all_eventually (hm := hm) hlarge hr hSlope hconj + obtain ⟨L₂,hL₂⟩ := tangentChartTables_eventually (hm := hm) hr (by omega) k p u + obtain ⟨L₃,hL₃⟩ := tangentChartTables_eventually (hm := hm) hr (by omega) + (symmetricWindowLength s₁) (symmetricWindowStart s₁) u + refine ⟨s₁,hs₁,hs₁',L₁+L₂+L₃,fun M hM B => ?_⟩ + refine ⟨⟨k,p,u,v,huv,?_,hp,hL₁ M (by omega) B,?_,s₁,hs₁,hs₁',?_⟩,rfl⟩ + · nlinarith + · intro d e z I _ b hb + exact hL₂ M (by omega) B d e z I b hb + · intro d e z I _ b hb + exact hL₃ M (by omega) B d e z I b hb + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + +structure FinePatchAtlas extends B.PatchAtlas where + far_mesh : (1+|ordinary (cutTau^a)|)*(200/(geometry.mesh:ℝ)) < ordinary rectangles.radius/4 + +end InitialCoverSystem + +theorem finePatchAtlas_eventually {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (hSlope : 8000 < ordinary (cutTau^a)) (hconj : |conjugate (cutTau^a)| < 1/1000) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ B : InitialCoverSystem a r m hm M, + Nonempty B.FinePatchAtlas := by + obtain ⟨s,hs,_hsr,L₁,hL₁⟩ := rectangularAtlas_fixed_radius_eventually (hm := hm) hlarge hr hSlope hconj + obtain ⟨C₀⟩ := concurrentGeometry_exists a r hr.1 + obtain ⟨C,hC⟩ := C₀.exists_finer (1+|ordinary (cutTau^a)|) (ordinary s/4) (by positivity) + obtain ⟨L₂,hL₂⟩ := fixedChartTables_eventually (hm := hm) hr (by omega) + (fun _ : Unit => initialPatchPrimitives r C.mesh) + obtain ⟨L₃,hL₃⟩ := concurrent_chart_tables_eventually (hm := hm) hr (by omega) + C.anchors (fun _ => coordinateWindowPrimitives C.window C.start) + refine ⟨L₁+L₂+L₃,fun M hM B => ?_⟩ + obtain ⟨A,hA⟩ := hL₁ M (by omega) B + refine ⟨{ rectangles := A + geometry := C + initial := fun u I b hb => hL₂ M (by omega) B () u I b hb + concurrent := hL₃ M (by omega) B + far_mesh := ?_ }⟩ + simpa only [hA] using hC + +end FinePatchAtlas + +section FarGridActions + +theorem cutForm_dist_bound (a : ℕ) (j : Fin 4) (x y : ℝ × ℝ) : + |cutForm a j x-cutForm a j y| ≤ (1+|ordinary (cutTau^a)|)*dist x y := by + have hc : 0 ≤ |ordinary (cutTau^a)| *dist x y := mul_nonneg (abs_nonneg _) dist_nonneg + have hslope : ordinary (cutTau^a)=Real.goldenRatio^a := by simp + fin_cases j + · have h := linear_form_dist_bound 1 0 x y + simp only [one_mul,zero_mul,add_zero,abs_one,abs_zero] at h + change |x.1-y.1| ≤ _ + nlinarith + · have h := linear_form_dist_bound 0 1 x y + simp only [one_mul,zero_mul,zero_add,abs_one,abs_zero] at h + change |x.2-y.2| ≤ _ + nlinarith + · have h := linear_form_dist_bound (-Real.goldenRatio^a) 1 x y + change |(x.2-Real.goldenRatio^a*x.1)-(y.2-Real.goldenRatio^a*y.1)| ≤ _ + simpa only [one_mul,neg_mul,sub_eq_add_neg,abs_neg,abs_one,hslope,add_comm] using h + · have h := linear_form_dist_bound 1 (-Real.goldenRatio^a) x y + change |(x.1-Real.goldenRatio^a*x.2)-(y.1-Real.goldenRatio^a*y.2)| ≤ _ + simpa only [one_mul,neg_mul,sub_eq_add_neg,abs_neg,abs_one,hslope] using h + +theorem windowRectangle_far_sign {a : ℕ} (j : Fin 4) + (n : ℕ) (hn : 201 ≤ n) (q : Fin 2 → ℤ) (cell : Fin 2 → Fin n) + (z : ℝ × ℝ) (hz : ∀ d, + ordinary (windowCut n (q d) (cell d).castSucc) ≤ realCoordinate z d ∧ + realCoordinate z d ≤ ordinary (windowCut n (q d) (cell d).succ)) + (c : ℝ) (hfar : (1+|ordinary (cutTau^a)|)*(200/(n:ℝ)) < |cutForm a j z-c|) + (p : GenericSquare a) (hp : p ∈ (windowRectangle a n q cell).val) : + (c ≤ cutForm a j (windowPlanarLift q p)) ↔ c ≤ cutForm a j z := by + have hh := (windowRectangle_mem n hn q cell p).mp hp + have hd := closedWindow_diameter n q cell (windowPlanarLift q p) z + (fun d => ⟨(hh d).1,(hh d).2.le⟩) hz + have hb := (cutForm_dist_bound a j (windowPlanarLift q p) z).trans + (mul_le_mul_of_nonneg_left hd (by positivity)) + by_cases h : c ≤ cutForm a j z + · rw [abs_of_nonneg (sub_nonneg.mpr h)] at hfar + have h' := (abs_le.mp hb).1 + constructor + · intro _; exact h + · intro _; linarith + · have hc : cutForm a j z < c := lt_of_not_ge h + rw [abs_of_neg (sub_neg.mpr hc)] at hfar + have h' := (abs_le.mp hb).2 + exact iff_of_false (by intro hh; linarith) h + +theorem windowRectangle_far_clipped {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (n : ℕ) (hn : 201 ≤ n) (q : Fin 2 → ℤ) (cell : Fin 2 → Fin n) + (k : Fin 2 → ℤ) + (hk : ∀ d, -ordinary r ≤ ordinary (windowCut n (q d) (cell d).castSucc)+(k d:ℝ) ∧ + ordinary (windowCut n (q d) (cell d).succ)+(k d:ℝ) ≤ ordinary r) + (z : ℝ × ℝ) (hz : ∀ d, + ordinary (windowCut n (q d) (cell d).castSucc) ≤ realCoordinate z d ∧ + realCoordinate z d ≤ ordinary (windowCut n (q d) (cell d).succ)) + (hfar : (1+|ordinary (cutTau^a)|)*(200/(n:ℝ)) < + |cutForm a j z+cutForm a j ((k 0:ℝ),(k 1:ℝ))|) : + clippedSlopePrimitive a r j ⊓ windowRectangle a n q cell = + if 0 ≤ cutForm a j z+cutForm a j ((k 0:ℝ),(k 1:ℝ)) + then windowRectangle a n q cell else ⊥ := by + classical + apply Subtype.ext + ext p + have hside (hp : p ∈ (windowRectangle a n q cell).val) : + (p ∈ (clippedSlopePrimitive a r j).val) ↔ + 0 ≤ cutForm a j z+cutForm a j ((k 0:ℝ),(k 1:ℝ)) := by + have hf := windowRectangle_far_sign j n hn q cell z hz + (-cutForm a j ((k 0:ℝ),(k 1:ℝ))) (by simpa only [sub_neg_eq_add] using hfar) p hp + have he := windowRectangle_clipped_sign r j hr n hn q cell k hk p hp + change (p ∈ (clippedSlopePrimitive a r j).val) ↔ + 0 ≤ cutForm a j (windowPlanarLift q p+((k 0:ℝ),(k 1:ℝ))) at he + rw [cutForm_add] at he + rw [he,← neg_le_iff_add_nonneg,hf,neg_le_iff_add_nonneg] + by_cases h : 0 ≤ cutForm a j z+cutForm a j ((k 0:ℝ),(k 1:ℝ)) + · simp only [h,↓reduceIte] + change (p ∈ (clippedSlopePrimitive a r j).val ∧ p ∈ (windowRectangle a n q cell).val) ↔ + p ∈ (windowRectangle a n q cell).val + exact ⟨And.right,fun hp => ⟨(hside hp).mpr h,hp⟩⟩ + · simp only [h,↓reduceIte] + change (p ∈ (clippedSlopePrimitive a r j).val ∧ p ∈ (windowRectangle a n q cell).val) ↔ False + exact ⟨fun hp => h ((hside hp.2).mp hp.1),False.elim⟩ + +end FarGridActions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteArrangementGerms.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteArrangementGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8f1dac2f6be4ac44fe99385405e04d73be3f0d9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteArrangementGerms.lean @@ -0,0 +1,143 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveGeometricGeneration + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiniteArrangementGerms + +theorem exists_interval_avoiding_countable (l r : ℝ) (hlr : l < r) + (S : Set ℝ) (hS : S.Countable) : ∃ x ∈ Set.Ioo l r, x ∉ S := by + apply Set.not_subset.mp + intro h + have := Cardinal.Real.Ioo_countable_iff.mp (hS.mono h) + linarith + +theorem avoidsCuts_rectangle (a : ℕ) (l₁ r₁ l₂ r₂ : ℝ) + (h₁ : l₁ < r₁) (h₂ : l₂ < r₂) : + ∃ p : ℝ × ℝ, p.1 ∈ Set.Ioo l₁ r₁ ∧ p.2 ∈ Set.Ioo l₂ r₂ ∧ AvoidsCuts a p := by + obtain ⟨x, hx, hx'⟩ := exists_interval_avoiding_countable l₁ r₁ h₁ + (Set.range ordinary) (Set.countable_range ordinary) + let t := Real.goldenRatio ^ a + have ht : t ≠ 0 := ne_of_gt (pow_pos Real.goldenRatio_pos a) + let S := Set.range ordinary ∪ Set.range (fun z : CutRing => ordinary z + t*x) ∪ + Set.range (fun z : CutRing => (x - ordinary z)/t) + have hS : S.Countable := ((Set.countable_range ordinary).union + (Set.countable_range _)).union (Set.countable_range _) + obtain ⟨y, hy, hy'⟩ := exists_interval_avoiding_countable l₂ r₂ h₂ S hS + have hav : AvoidsCuts a (x,y) := by + intro j z hz + fin_cases j + · exact hx' ⟨z, by simpa [cutForm] using hz.symm⟩ + · apply hy' + exact Or.inl (Or.inl ⟨z, by simpa [cutForm] using hz.symm⟩) + · apply hy' + apply Or.inl ∘ Or.inr + refine ⟨z, ?_⟩ + change ordinary z + t*x = y + change y - t*x = ordinary z at hz + linarith + · apply hy' + apply Or.inr + refine ⟨z, ?_⟩ + apply (div_eq_iff ht).mpr + change x - t*y = ordinary z at hz + linarith + exact ⟨(x,y),hx,hy,hav⟩ + +theorem avoidsCuts_dense (a : ℕ) : Dense {p : ℝ × ℝ | AvoidsCuts a p} := by + apply dense_iff_inter_open.mpr + intro U hU ⟨z,hz⟩ + obtain ⟨l,h,hl,hsub⟩ := exists_box_in_open hU z hz + obtain ⟨p,hp₁,hp₂,hp⟩ := avoidsCuts_rectangle a + (ordinary l.1) (ordinary h.1) (ordinary l.2) (ordinary h.2) + (hl.1.1.trans hl.1.2) (hl.2.1.trans hl.2.2) + exact ⟨p,hsub ⟨hp₁,hp₂⟩,hp⟩ + +theorem cutForm_smul (a : ℕ) (j : Fin 4) (t : ℝ) (p : ℝ × ℝ) : + cutForm a j (t • p) = t * cutForm a j p := by + fin_cases j <;> simp [cutForm] <;> ring + +def strictLineCell {ι : Type*} (a : ℕ) (j : ι → Fin 4) (c : ι → ℝ) + (σ : ι → Bool) : Set (ℝ × ℝ) := + {p | ∀ i, if σ i then cutForm a (j i) p < c i else c i < cutForm a (j i) p} + +theorem strictLineCell_open {ι : Type*} [Finite ι] (a : ℕ) + (j : ι → Fin 4) (c : ι → ℝ) (σ : ι → Bool) : + IsOpen (strictLineCell a j c σ) := by + classical + have he : strictLineCell a j c σ = ⋂ i, {p | if σ i then cutForm a (j i) p < c i else c i < cutForm a (j i) p} := by + ext p; simp only [strictLineCell,Set.mem_ofPred_eq,Set.mem_iInter] + rw [he] + apply isOpen_iInter_of_finite + intro i + cases σ i + · exact isOpen_lt continuous_const (cutForm_continuous a (j i)) + · exact isOpen_lt (cutForm_continuous a (j i)) continuous_const + +theorem finite_arrangement_germ {ι : Type*} [Finite ι] (a : ℕ) + (j : ι → Fin 4) (c : ι → ℝ) (z y : ℝ × ℝ) (σ : ι → Bool) + (hactive : ∀ i, cutForm a (j i) z=c i → + if σ i then cutForm a (j i) y < c i else c i < cutForm a (j i) y) + (hinactive : ∀ i, cutForm a (j i) z≠c i → + if σ i then cutForm a (j i) z < c i else c i < cutForm a (j i) z) + (N : Set (ℝ × ℝ)) (hN : IsOpen N) (hz : z ∈ N) : + ∃ p ∈ N, p ∈ strictLineCell a j c σ ∧ AvoidsCuts a p := by + classical + let U : Set (ℝ × ℝ) := N ∩ ⋂ i, if cutForm a (j i) z=c i then Set.univ + else {p | if σ i then cutForm a (j i) p < c i else c i < cutForm a (j i) p} + have hU : IsOpen U := by + apply hN.inter + apply isOpen_iInter_of_finite + intro i + by_cases hi : cutForm a (j i) z=c i + · rw [ite_eq_left hi]; exact isOpen_univ + · rw [ite_eq_right hi] + cases σ i + · exact isOpen_lt continuous_const (cutForm_continuous a (j i)) + · exact isOpen_lt (cutForm_continuous a (j i)) continuous_const + have hzU : z ∈ U := by + refine ⟨hz,Set.mem_iInter.mpr fun i => ?_⟩ + by_cases hi : cutForm a (j i) z=c i + · rw [ite_eq_left hi]; trivial + · rw [ite_eq_right hi]; exact hinactive i hi + let ray : ℝ → ℝ × ℝ := fun t => z+t • (y-z) + have hray : Continuous ray := continuous_const.add (continuous_id.smul continuous_const) + have he : ray ⁻¹' U ∈ nhds (0:ℝ) := by + apply hray.continuousAt.preimage_mem_nhds + simpa [ray] using hU.mem_nhds hzU + obtain ⟨ε,hε,hεU⟩ := Metric.mem_nhds_iff.mp he + let t := ε/2 + have ht : 0 simp only [hσ,Bool.false_eq_true,↓reduceIte] at ha ⊢ + · rw [heq]; nlinarith + · rw [heq]; nlinarith + · have hh := Set.mem_iInter.mp htU.2 i + simpa only [ite_eq_right hi,Set.mem_ofPred_eq] using hh + obtain ⟨p,hp,hpg⟩ := (avoidsCuts_dense a).inter_open_nonempty + (N ∩ strictLineCell a j c σ) (hN.inter (strictLineCell_open a j c σ)) + ⟨ray t,htU.1,hcell⟩ + exact ⟨p,hp.1,hp.2,hpg⟩ + +end FiniteArrangementGerms + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteNestedLaw.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteNestedLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..549c6802e7760accbfef0212640eb820c334c7cb --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteNestedLaw.lean @@ -0,0 +1,236 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.StarAtomLaw +import OAI.GroupTheory.SimpleAmenable.Configurations.SymmetricCharts +import OAI.GroupTheory.SimpleAmenable.CentralCovers.UniformTangentTransport + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiniteNestedLaw +variable {E H Q : Type*} [Group E] [Group H] [Group Q] + +theorem prefix_range_le_differences (f : E →* H) (l h : ℕ → E →* H) + (hf : ∀ i s, f s = l i s*h i s) + (hc : ∀ i j, i ≤ j → ∀ s t, Commute (l i s) (h j t)) + (hl : l 0 = 1) (N : ℕ) (j : ℕ) (hj : j ≤ N) : + (l j).range ≤ ⨆ i : Fin N, (cutDifference f l h hf hc i.val).range := by + let K : Subgroup H := ⨆ i : Fin N, (cutDifference f l h hf hc i.val).range + rintro x ⟨s,rfl⟩ + have he := cutDifference_telescope f l h hf hc j s + rw [hl] at he + simp only [MonoidHom.one_apply,inv_one,one_mul] at he + rw [← he] + apply K.list_prod_mem + intro y hy + obtain ⟨i,hi,rfl⟩ := List.mem_map.mp hy + have hi' : i < j := List.mem_range.mp hi + exact (le_iSup (fun i : Fin N => (cutDifference f l h hf hc i.val).range) + ⟨i,by omega⟩) ⟨s,rfl⟩ + +theorem centralOn_of_nested_star_cuts (q : H →* Q) + (N : ℕ) (v : (Fin N → E) →* Q) (hv : Function.Injective v) + (f : UniversalExtension E →* H) (l h : ℕ → UniversalExtension E →* H) + (hf : ∀ i s, f s = l i s*h i s) + (hc : ∀ i j, i ≤ j → ∀ s t, Commute (l i s) (h j t)) + (hl : l 0 = 1) + (hproj : ∀ i : Fin N, q.comp (cutDifference f l h hf hc i.val) = + (v.comp (sectorMask {i})).comp (universalProjection E)) : + CentralOn q (⨆ j : Fin (N+1), (l j.val).range) := by + have hpair : Pairwise fun i j : Fin N => ∀ s t, + Commute (cutDifference f l h hf hc i.val s) (cutDifference f l h hf hc j.val t) := by + intro i j hij s t + rcases lt_or_gt_of_ne hij with hij | hij + · exact cutDifference_pairwise f l h hf hc i.val j.val hij s t + · exact (cutDifference_pairwise f l h hf hc j.val i.val hij t s).symm + have hcentral := centralOn_of_star_atoms q v hv (fun i : Fin N => cutDifference f l h hf hc i.val) hpair hproj + apply hcentral.mono + apply iSup_le + intro j + exact prefix_range_le_differences f l h hf hc hl N j.val (by omega) + +end FiniteNestedLaw + +section CommonContainingWindows + +theorem source_chart_containing_window (n t : ℕ) (p z v : ℤ) (b d : ℕ) + (hv : p ≤ v ∧ v < p+t) + (hz : (z-v).natAbs ≤ d) + (hsize : t+2*d+2*b+2 ≤ n) : + p ⊓ (z-(b:ℤ)) ≤ p ∧ p+t ≤ (p ⊓ (z-(b:ℤ)))+n ∧ + p ⊓ (z-(b:ℤ)) ≤ z-(b:ℤ) ∧ + z-(b:ℤ)+(2*b+2:ℕ) ≤ (p ⊓ (z-(b:ℤ)))+n := by + have hh : |z-v| ≤ (d:ℤ) := by + simpa only [Int.natCast_natAbs] using (show ((z-v).natAbs:ℤ) ≤ (d:ℤ) by exact_mod_cast hz) + have ha := abs_le.mp hh + have hn : (t:ℤ)+2*(d:ℤ)+2*(b:ℤ)+2 ≤ (n:ℤ) := by exact_mod_cast hsize + constructor + · exact inf_le_left + constructor + · rw [min_def] + split_ifs <;> omega + constructor + · exact inf_le_right + · rw [min_def] + split_ifs <;> omega + +theorem fixed_chart_margin_eventually (b : ℕ) : + ∃ N : ℕ, ∀ n : ℕ, N ≤ n → n*9/10+2*b+2 ≤ n := by + refine ⟨20*b+20,?_⟩ + intro n hn + have hh := Nat.mul_div_le (n*9) 10 + omega + +theorem transverse_chart_margin_eventually (b : ℕ) : + ∃ N : ℕ, ∀ n : ℕ, N ≤ n → n/4+2*(n/10+1)+2*b+2 ≤ n := by + refine ⟨20*b+40,?_⟩ + intro n hn + have h₀ := Nat.mul_div_le n 4 + have h₁ := Nat.mul_div_le n 10 + omega + +end CommonContainingWindows + +section QuadrantControl + +def signQuadrantLower (s : CutRing) (d : Fin 2) (positive : Bool) (j : Fin 2) : CutRing := + if positive then (if j=d then -s else 0) else (if j=d then 0 else -s) + +def signQuadrantUpper (s : CutRing) (d : Fin 2) (positive : Bool) (j : Fin 2) : CutRing := + if positive then (if j=d then 0 else s) else (if j=d then s else 0) + +theorem signQuadrant_side {a : ℕ} (r s : CutRing) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (hs : 0 < ordinary s ∧ ordinary s < ordinary r) (d : Fin 2) (positive : Bool) : + coordinateRectangle a (signQuadrantLower s d positive) (signQuadrantUpper s d positive) ≤ + if positive then clippedSlopePrimitive a r (slopeDirection d) + else (clippedSlopePrimitive a r (slopeDirection d))ᶜ := by + have hSlope : 0 ≤ Real.goldenRatio^a := pow_nonneg Real.goldenRatio_pos.le _ + cases positive with + | true => + apply coordinateRectangle_sign r (slopeDirection d) hr + · intro j; fin_cases d <;> fin_cases j <;> simp [signQuadrantLower,signQuadrantUpper] <;> linarith [hs.1] + · intro j; fin_cases d <;> fin_cases j <;> simp [signQuadrantLower] <;> linarith [hs.2,hr.1] + · intro j; fin_cases d <;> fin_cases j <;> simp [signQuadrantUpper] <;> linarith [hs.2,hr.1] + · intro t hx hy + fin_cases d + · simp [signQuadrantLower,signQuadrantUpper] at hx hy + change 0 ≤ t.2-Real.goldenRatio^a*t.1 + exact sub_nonneg.mpr ((mul_nonpos_of_nonneg_of_nonpos hSlope hx.2.le).trans hy.1) + · simp [signQuadrantLower,signQuadrantUpper] at hx hy + change 0 ≤ t.1-Real.goldenRatio^a*t.2 + exact sub_nonneg.mpr ((mul_nonpos_of_nonneg_of_nonpos hSlope hy.2.le).trans hx.1) + | false => + apply coordinateRectangle_negative_sign r (slopeDirection d) hr + · intro j; fin_cases d <;> fin_cases j <;> simp [signQuadrantLower,signQuadrantUpper] <;> linarith [hs.1] + · intro j; fin_cases d <;> fin_cases j <;> simp [signQuadrantLower] <;> linarith [hs.2,hr.1] + · intro j; fin_cases d <;> fin_cases j <;> simp [signQuadrantUpper] <;> linarith [hs.2,hr.1] + · intro t hx hy + fin_cases d + · simp [signQuadrantLower,signQuadrantUpper] at hx hy + change t.2-Real.goldenRatio^a*t.1 < 0 + exact sub_neg.mpr (hy.2.trans_le (mul_nonneg hSlope hx.1)) + · simp [signQuadrantLower,signQuadrantUpper] at hx hy + change t.1-Real.goldenRatio^a*t.2 < 0 + exact sub_neg.mpr (hx.2.trans_le (mul_nonneg hSlope hy.1)) + +theorem coordinateRectangle_mono {a : ℕ} (L V l v : Fin 2 → CutRing) + (hL : ∀ j, ordinary (l j) ≤ ordinary (L j)) + (hLV : ∀ j, ordinary (L j) ≤ ordinary (V j)) + (hV : ∀ j, ordinary (V j) ≤ ordinary (v j)) + (hlen : ∀ j, ordinary (v j)-ordinary (l j) < 1) : + coordinateRectangle a L V ≤ coordinateRectangle a l v := by + exact inf_le_inf (coordinateInterval_mono 0 _ _ _ _ (hL 0) (hLV 0) (hV 0) (hlen 0)) + (coordinateInterval_mono 1 _ _ _ _ (hL 1) (hLV 1) (hV 1) (hlen 1)) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem rectangle_control_from_axes (hlarge : 15 < m+1) + (n : ℕ) (g : B.CoordinateWindowLaw n) + (t : Fin 2 → ℕ) (ht : ∀ j, t j ≤ n) (p q : Fin 2 → ℤ) + (hp : ∀ j, q j ≤ p j) (hq : ∀ j, p j+t j ≤ q j+n) + (L V : Fin 2 → CutRing) + (hL : ∀ j, p j ≤ endpointLabel (L j) ∧ endpointLabel (L j) < p j+t j) + (hV : ∀ j, p j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < p j+t j) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hc : ∀ j, SmallControlled B.c f + (B.axisSector hlarge n g j (t j) (ht j) (p j) (coordinateInterval a j (L j) (V j)))) : + SmallControlled B.c f (B.windowSector hlarge n g q (coordinateRectangle a L V)) := by + have hsmall (j : Fin 2) := axisInterval_resolved (a := a) (r := r) + j (t j) (p j) (L j) (V j) (hL j) (hV j) + have hlargeL (j : Fin 2) : q j ≤ endpointLabel (L j) ∧ endpointLabel (L j) < q j+n := by + have hh := hL j; have hh' := hp j; have hh'' := hq j; omega + have hlargeV (j : Fin 2) : q j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < q j+n := by + have hh := hV j; have hh' := hp j; have hh'' := hq j; omega + have he (j : Fin 2) := B.axisSector_in_window hlarge n g j (t j) (ht j) (p j) q + (hp j) (hq j) (coordinateInterval a j (L j) (V j)) (hsmall j) + change SmallControlled B.c f (B.fullGeometricSector hlarge _ _ + (coordinateInterval a 0 (L 0) (V 0) ⊓ coordinateInterval a 1 (L 1) (V 1))) + apply B.fullGeometricSector_intersection_control hlarge _ _ _ _ + (coordinateInterval_window n q 0 _ _ (hlargeL 0) (hlargeV 0)) + (coordinateInterval_window n q 1 _ _ (hlargeL 1) (hlargeV 1)) f + · change SmallControlled B.c f (B.windowSector hlarge n g q (coordinateInterval a 0 (L 0) (V 0))) + rw [← he 0]; exact hc 0 + · change SmallControlled B.c f (B.windowSector hlarge n g q (coordinateInterval a 1 (L 1) (V 1))) + rw [← he 1]; exact hc 1 + +theorem tangentSign_quadrant_control (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (s u : CutRing) (hs : 0 < ordinary s ∧ ordinary s < ordinary r) + (h : B.TangentChartLaws (symmetricWindowLength s) (symmetricWindowStart s) u) + (n : ℕ) (g : B.CoordinateWindowLaw n) + (t : Fin 2 → ℕ) (ht : ∀ j, t j ≤ n) (p q : Fin 2 → ℤ) + (hp : ∀ j, q j ≤ p j) (hq : ∀ j, p j+t j ≤ q j+n) + (d : Fin 2) (z : CutRing × CutRing) (positive : Bool) + (hstart : ∀ j, q j ≤ pointLabel z j+symmetricWindowStart s j) + (hend : ∀ j, pointLabel z j+symmetricWindowStart s j+symmetricWindowLength s ≤ q j+n) + (L V : Fin 2 → CutRing) + (hLV : ∀ j, ordinary (L j) ≤ ordinary (V j)) + (hL : ∀ j, p j ≤ endpointLabel (L j) ∧ endpointLabel (L j) < p j+t j) + (hV : ∀ j, p j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < p j+t j) + (hlo : ∀ j, ordinary (signQuadrantLower s d positive j)+ordinary (pointCoordinate z j) ≤ ordinary (L j)) + (hup : ∀ j, ordinary (V j) ≤ ordinary (signQuadrantUpper s d positive j)+ordinary (pointCoordinate z j)) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : ∀ j, SmallControlled B.c f + (B.axisSector (by omega) n g j (t j) (ht j) (p j) (coordinateInterval a j (L j) (V j)))) : + SmallControlled B.c f (B.tangentSign (by omega) (symmetricWindowLength s) + (symmetricWindowStart s) u h d z positive) := by + have hlab (j : Fin 2) : + symmetricWindowStart s j ≤ endpointLabel (signQuadrantLower s d positive j) ∧ + endpointLabel (signQuadrantLower s d positive j) < symmetricWindowStart s j+symmetricWindowLength s := by + unfold signQuadrantLower + split <;> split <;> first | exact (symmetricWindow_labels s j).1 | exact (symmetricWindow_labels s j).2.1 + have hvab (j : Fin 2) : + symmetricWindowStart s j ≤ endpointLabel (signQuadrantUpper s d positive j) ∧ + endpointLabel (signQuadrantUpper s d positive j) < symmetricWindowStart s j+symmetricWindowLength s := by + unfold signQuadrantUpper + split <;> split <;> first | exact (symmetricWindow_labels s j).2.1 | exact (symmetricWindow_labels s j).2.2 + apply B.tangentSign_control_from_rectangle hlarge _ _ u h n g q d z positive hstart hend + _ _ hlab hvab (signQuadrant_side r s hr hs d positive) (coordinateRectangle a L V) ?_ f hf + (B.rectangle_control_from_axes (by omega) n g t ht p q hp hq L V hL hV f hc) + rw [spatialTranslate_coordinateRectangle] + apply coordinateRectangle_mono L V _ _ + · intro j; simpa only [map_add,pointCoordinate] using hlo j + · exact hLV + · intro j; simpa only [map_add,pointCoordinate] using hup j + · intro j + simp only [map_add,add_sub_add_right_eq_sub] + unfold signQuadrantUpper signQuadrantLower + split <;> split <;> simp only [map_zero,map_neg] <;> linarith [hs.2,hr.2] + +end InitialCoverSystem +end QuadrantControl + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteRefiningGrid.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteRefiningGrid.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d59c2b1a6d093385838e75feb51aaecb9e45351 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteRefiningGrid.lean @@ -0,0 +1,193 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RectangularBound + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiniteRefiningGrid +attribute [local instance] cutOrdinaryOrder + +theorem finite_refining_grid (S : Finset CutRing) (n : ℕ) (_hn : 0 ordinary (e i)) ∧ e 0=0 ∧ e (Fin.last N)=1 ∧ + (∀ c ∈ S, cutFraction c ∈ Set.range e) ∧ + (∀ i : Fin (n+1), windowCut n 0 i ∈ Set.range e) := by + classical + let T : Finset CutRing := insert 1 (insert 0 ((S.image cutFraction) ∪ windowEndpointSet n)) + have h0 : (0:CutRing) ∈ T := by simp [T] + have h1 : (1:CutRing) ∈ T := by simp [T] + have hcard : 2 ≤ T.card := by + have hh : ({0,1} : Finset CutRing) ⊆ T := by simp only [Finset.insert_subset_iff,Finset.singleton_subset_iff]; exact ⟨h0,h1⟩ + have hh' := Finset.card_le_card hh + simpa only [Finset.card_insert_of_notMem (by simp : (0:CutRing) ∉ ({1} : Finset CutRing)),Finset.card_singleton] using hh' + let N := T.card-1 + have hN : 0 ordinary (e i))) (i : Fin N) {c : CutRing} + (hc : c ∈ Set.range e) : + ¬(ordinary (e i.castSucc) ordinary (e i))) + (hzero : e 0=0) (hlast : e (Fin.last N)=1) + (hcuts : ∀ j : Fin (n+1), windowCut n 0 j ∈ Set.range e) (i : Fin N) : + ∃ j : Fin n, + ordinary (windowCut n 0 j.castSucc)≤ordinary (e i.castSucc) ∧ + ordinary (e i.succ)≤ordinary (windowCut n 0 j.succ) := by + have h0 : 0≤ordinary (e i.castSucc) := by + have hh := he.monotone (Fin.zero_le i.castSucc); simpa only [hzero,map_zero] using hh + have h1 : ordinary (e i.castSucc)<1 := by + have hh := he (show i.castSucc ordinary (windowCut n 0 j)) (by rwa [hz]) (by rwa [ht]) + refine ⟨j,hj.1,?_⟩ + exact le_of_not_gt (fun h => finite_grid_no_between he i (hcuts j.succ) ⟨hj.2,h⟩) + +end FiniteRefiningGrid + +section RefinementPartition + +theorem coordinateInterval_mem_preferred {a : ℕ} (j : Fin 2) (u v : CutRing) + (hlo : 0≤ordinary u) (huv : ordinary u≤ordinary v) (hup : ordinary v≤1) + (hlen : ordinary v-ordinary u<1) (p : GenericSquare a) : + p ∈ (coordinateInterval a j u v).val ↔ + ordinary u≤coordinate j p ∧ coordinate j p ⟨0,by simpa using h.1,by simpa using h.2⟩ + +noncomputable def refinedGridRectangle (a N : ℕ) (e : Fin (N+1) → CutRing) + (cell : Fin 2 → Fin N) : polygonAlgebra a := + coordinateRectangle a (fun j => e (cell j).castSucc) (fun j => e (cell j).succ) + +theorem refinedGridRectangle_mem {a N : ℕ} (e : Fin (N+1) → CutRing) + (he : StrictMono (fun i => ordinary (e i))) (hzero : e 0=0) (hlast : e (Fin.last N)=1) + (hmesh : ∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) + (cell : Fin 2 → Fin N) (p : GenericSquare a) : + p ∈ (refinedGridRectangle a N e cell).val ↔ ∀ j : Fin 2, + ordinary (e (cell j).castSucc)≤coordinate j p ∧ coordinate j p ordinary (e i))) (hzero : e 0=0) (hlast : e (Fin.last N)=1) + (hmesh : ∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) + (p : GenericSquare a) : ∃ cell : Fin 2 → Fin N, p ∈ (refinedGridRectangle a N e cell).val := by + have h (j : Fin 2) : ∃ i : Fin N, + ordinary (e i.castSucc)≤coordinate j p ∧ coordinate j p ordinary (e i)) hN (coordinate j p) + (by simpa only [hzero,map_zero] using (coordinate_bounds j p).1) + (by simpa only [hlast,map_one] using (coordinate_bounds j p).2) + choose cell hc using h + exact ⟨cell,(refinedGridRectangle_mem e he hzero hlast hmesh cell p).mpr hc⟩ + +theorem refinedGridRectangle_disjoint {a N : ℕ} (e : Fin (N+1) → CutRing) + (he : StrictMono (fun i => ordinary (e i))) (hzero : e 0=0) (hlast : e (Fin.last N)=1) + (hmesh : ∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) : + Pairwise fun i k : Fin 2 → Fin N => Disjoint (refinedGridRectangle a N e i).val + (refinedGridRectangle a N e k).val := by + intro i k hik + obtain ⟨j,hj⟩ := Function.ne_iff.mp hik + apply Set.disjoint_left.mpr + intro p hp hq + have hi := (refinedGridRectangle_mem e he hzero hlast hmesh i p).mp hp j + have hk := (refinedGridRectangle_mem e he hzero hlast hmesh k p).mp hq j + rcases lt_or_gt_of_ne hj with hh | hh + · have hle := he.monotone (show (i j).succ≤(k j).castSucc from by change (i j).val+1≤(k j).val; exact hh) + linarith + · have hle := he.monotone (show (k j).succ≤(i j).castSucc from by change (k j).val+1≤(i j).val; exact hh) + linarith + +theorem refinedGridRectangle_resolved {a N : ℕ} (r : CutRing) (e : Fin (N+1) → CutRing) : + ∃ n : ℕ, ∃ q : Fin 2 → ℤ, ∀ cell : Fin 2 → Fin N, + ResolvedBy (fun i => (InitialCoverSystem.primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (refinedGridRectangle a N e cell).val := by + obtain ⟨n,q,hq⟩ := finite_coordinate_windows_container (fun _ : Fin (N+1) => 1) + (fun i _ => endpointLabel (e i)) + have hl (i : Fin (N+1)) (j : Fin 2) : q j≤endpointLabel (e i) ∧ endpointLabel (e i) omega + refine ⟨n,q,fun cell x y hh => ?_⟩ + exact and_congr + (coordinateInterval_window n q 0 _ _ (hl _ 0) (hl _ 0) x y hh) + (coordinateInterval_window n q 1 _ _ (hl _ 1) (hl _ 1) x y hh) + +end RefinementPartition + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteSectorPartition.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteSectorPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..cfab114e6e2f11f9cfe30f90fc0c61e766001d07 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FiniteSectorPartition.lean @@ -0,0 +1,244 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CellGeometry + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FiniteSectorPartition +namespace ActualLawfulTable +variable {E H Q Ω κ : Type*} [Group E] [Group H] [Group Q] [Group.IsPerfect E] + {q : H →* Q} {v : (Ω → E) →* Q} (T : ActualLawfulTable q v) + +theorem sector_range_le_biUnion (W : κ → Set Ω) (S : Finset κ) + (hdisjoint : Pairwise fun i j => Disjoint (W i) (W j)) (K : Subgroup H) + (hK : ∀ i ∈ S, (T.sector (W i)).range ≤ K) : + (T.sector (⋃ i ∈ S, W i)).range ≤ K := by + classical + induction S using Finset.induction_on with + | empty => simp + | @insert i S hi ih => + have hd : Disjoint (W i) (⋃ j ∈ S, W j) := by + apply Set.disjoint_iUnion_right.mpr + intro j + apply Set.disjoint_iUnion_right.mpr + intro hj + exact hdisjoint (by intro he; subst j; exact hi hj) + have he : (⋃ j ∈ insert i S, W j) = W i ∪ ⋃ j ∈ S, W j := by + ext x + simp only [Set.mem_iUnion,Finset.mem_insert,Set.mem_union] + constructor + · rintro ⟨j,(rfl|hj),hx⟩ + · exact Or.inl hx + · exact Or.inr ⟨j,hj,hx⟩ + · rintro (hx|⟨j,hj,hx⟩) + · exact ⟨i,Or.inl rfl,hx⟩ + · exact ⟨j,Or.inr hj,hx⟩ + rw [he,T.sector_union hd] + rintro x ⟨s,rfl⟩ + exact K.mul_mem (hK i (Finset.mem_insert_self i S) ⟨s,rfl⟩) + (ih (fun j hj => hK j (Finset.mem_insert_of_mem hj)) ⟨s,rfl⟩) + +theorem sector_range_le_partition [Fintype κ] (W : κ → Set Ω) (V : Set Ω) + (hdisjoint : Pairwise fun i j => Disjoint (W i) (W j)) + (hcover : ∀ ω, ω ∈ V ↔ ∃ i, ω ∈ W i) : + (T.sector V).range ≤ ⨆ i, (T.sector (W i)).range := by + have he : V = ⋃ i ∈ (Finset.univ : Finset κ), W i := by + ext ω + simpa only [Set.mem_iUnion,Finset.mem_univ,exists_true_left] using hcover ω + rw [he] + exact T.sector_range_le_biUnion W Finset.univ hdisjoint _ + (fun i _ => le_iSup (fun j => (T.sector (W j)).range) i) + +end ActualLawfulTable + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) {ι κ : Type*} [Finite ι] [Fintype κ] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem fullGeometricSector_union (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (V W : polygonAlgebra a) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val) + (hd : Disjoint V.val W.val) (s : TrackStar (Fin (m+1))) : + B.fullGeometricSector hlarge P h (V ⊔ W) s = + B.fullGeometricSector hlarge P h V s * B.fullGeometricSector hlarge P h W s := by + unfold fullGeometricSector + change (B.fullPrimitiveTable hlarge P h).sector (resolvedPolygonMask _ (V.val ∪ W.val)) s = _ + rw [resolvedPolygonMask_union] + exact DFunLike.congr_fun ((B.fullPrimitiveTable hlarge P h).sector_union + (resolvedPolygonMask_disjoint _ hV hd)) s + +theorem fullGeometricSector_partition_range (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (V : polygonAlgebra a) (W : κ → polygonAlgebra a) + (hW : ∀ i, ResolvedBy (fun z => (primitiveTests (a := a) (r := r) P z).val) (W i).val) + (hdisjoint : Pairwise fun i j => Disjoint (W i).val (W j).val) + (hcover : ∀ p, p ∈ V.val ↔ ∃ i, p ∈ (W i).val) : + (B.fullGeometricSector hlarge P h V).range ≤ + ⨆ i, (B.fullGeometricSector hlarge P h (W i)).range := by + apply (B.fullPrimitiveTable hlarge P h).sector_range_le_partition + · intro i j hij + exact resolvedPolygonMask_disjoint _ (hW i) (hdisjoint hij) + · intro ω + constructor + · rintro ⟨p,hp,hpV⟩ + obtain ⟨i,hi⟩ := (hcover p).mp hpV + exact ⟨i,p,hp,hi⟩ + · rintro ⟨i,p,hp,hi⟩ + exact ⟨p,hp,(hcover p).mpr ⟨i,hi⟩⟩ + +end InitialCoverSystem + +theorem commute_of_range_iSup {G X Y : Type*} [Group G] [Group X] [Group Y] + {ι κ : Type*} (f : ι → X →* G) (g : κ → Y →* G) + (hc : ∀ i j s t, Commute (f i s) (g j t)) + {x y : G} (hx : x ∈ ⨆ i, (f i).range) (hy : y ∈ ⨆ j, (g j).range) : Commute x y := by + have hleft (j : κ) (t : Y) : (⨆ i, (f i).range) ≤ Subgroup.centralizer {g j t} := by + apply iSup_le + intro i z hz w hw + obtain ⟨s,rfl⟩ := hz + obtain rfl := Set.mem_singleton_iff.mp hw + exact (hc i j s t).eq.symm + have hright : (⨆ j, (g j).range) ≤ Subgroup.centralizer {x} := by + apply iSup_le + intro j z hz w hw + obtain ⟨t,rfl⟩ := hz + obtain rfl := Set.mem_singleton_iff.mp hw + exact (hleft j t hx _ (Set.mem_singleton _)).symm + exact hright hy _ (Set.mem_singleton _) + +end FiniteSectorPartition + +section AxisCellSplitting + +def otherAxis (d : Fin 2) : Fin 2 := if d=0 then 1 else 0 +@[simp] theorem otherAxis_ne (d : Fin 2) : otherAxis d ≠ d := by fin_cases d <;> decide + +noncomputable def axisCellRectangle {n : ℕ} (d : Fin 2) + (k l : ℕ) (hk : k ≤ n) (hl : l ≤ n) (hlpos : 0 < l) + (p q : ℤ) (u v : CutRing) (huv : ordinary u ≤ ordinary v) + (hu : p ≤ endpointLabel u ∧ endpointLabel u < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) (i : Fin l) : LabelledRectangle n where + length j := if j=d then k else l + length_le j := by split <;> assumption + start j := if j=d then p else q + lower j := if j=d then u else windowCut l q i.castSucc + upper j := if j=d then v else windowCut l q i.succ + ordered j := by + split + · exact huv + · exact (windowCut_strictMono l q (Fin.castSucc_lt_succ (i := i))).le + lower_label j := by + split_ifs + · exact hu + · exact windowCut_label l q hlpos i.castSucc + upper_label j := by + split_ifs + · exact hv + · exact windowCut_label l q hlpos i.succ + +theorem axisCellRectangle_polygon {a n : ℕ} (d : Fin 2) + (k l : ℕ) (hk : k ≤ n) (hl : l ≤ n) (hlpos : 0 < l) + (p q : ℤ) (u v : CutRing) (huv : ordinary u ≤ ordinary v) + (hu : p ≤ endpointLabel u ∧ endpointLabel u < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) (i : Fin l) : + (axisCellRectangle d k l hk hl hlpos p q u v huv hu hv i).polygon a = + coordinateInterval a d u v ⊓ windowCell a (otherAxis d) l q i := by + fin_cases d + · rfl + · change coordinateInterval a 0 _ _ ⊓ coordinateInterval a 1 u v = + coordinateInterval a 1 u v ⊓ coordinateInterval a 0 _ _ + exact inf_comm _ _ + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem axisSector_range_cells (hlarge : 15 < m+1) (n : ℕ) (g : B.CoordinateWindowLaw n) + (d : Fin 2) (k l : ℕ) (hk : k ≤ n) (hl : l ≤ n) (hlpos : 201 ≤ l) + (p q : ℤ) (u v : CutRing) (huv : ordinary u ≤ ordinary v) + (hu : p ≤ endpointLabel u ∧ endpointLabel u < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) : + (B.axisSector hlarge n g d k hk p (coordinateInterval a d u v)).range ≤ + ⨆ i : Fin l, (B.rectangleCopy hlarge g + (axisCellRectangle d k l hk hl (by omega) p q u v huv hu hv i)).range := by + let R := axisCellRectangle d k l hk hl (by omega) p q u v huv hu hv + let z : Fin 2 → ℤ := fun j => if j=d then p else q + rw [B.axisSector_in_window hlarge n g d k hk p z + (by simp [z]) (by simp [z]; omega) _ (axisInterval_resolved d k p u v hu hv)] + change (B.fullGeometricSector hlarge (coordinateWindowPrimitives n z) _ _).range ≤ _ + apply B.fullGeometricSector_partition_range hlarge (coordinateWindowPrimitives n z) + (fun I _ b hb => g I b hb z) (coordinateInterval a d u v) (fun i => (R i).polygon a) + · intro i + exact (R i).resolved a r + · intro i j hij + rw [axisCellRectangle_polygon,axisCellRectangle_polygon] + exact (windowCell_pairwise_disjoint (a := a) (otherAxis d) l hlpos q hij).mono + (Set.inter_subset_right) (Set.inter_subset_right) + · intro x + constructor + · intro hx + obtain ⟨i,hi⟩ := windowCell_cover (a := a) (otherAxis d) l hlpos q x + refine ⟨i,?_⟩ + rw [axisCellRectangle_polygon] + exact ⟨hx,hi⟩ + · rintro ⟨i,hi⟩ + rw [axisCellRectangle_polygon] at hi + exact hi.1 + +theorem axisCellRectangle_grid_control (hlarge : 15 < m+1) (n : ℕ) (g : B.CoordinateWindowLaw n) + (d : Fin 2) (k l : ℕ) (hk : k ≤ n) (hl : l ≤ n) (hlpos : 0 < l) + (p q : ℤ) (u v : CutRing) (huv : ordinary u ≤ ordinary v) + (hu : p ≤ endpointLabel u ∧ endpointLabel u < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) (i : Fin l) : + SmallControlled B.c (B.rectangleCopy hlarge g + (axisCellRectangle d k l hk hl hlpos p q u v huv hu hv i)) + (B.axisSector hlarge n g (otherAxis d) l hl q (windowCell a (otherAxis d) l q i)) := by + simpa only [axisCellRectangle,otherAxis_ne,ite_false,windowCell] using + B.rectangleCopy_axes_control hlarge g + (axisCellRectangle d k l hk hl hlpos p q u v huv hu hv i) (otherAxis d) + +theorem axisCellRectangle_distinct_commute (hlarge : 20 ≤ m+1) (n : ℕ) (g : B.CoordinateWindowLaw n) + (d : Fin 2) (k k' l : ℕ) (hk : k ≤ n) (hk' : k' ≤ n) (hl : l ≤ n) (hlpos : 201 ≤ l) + (p p' q : ℤ) (u v u' v' : CutRing) + (huv : ordinary u ≤ ordinary v) (huv' : ordinary u' ≤ ordinary v') + (hu : p ≤ endpointLabel u ∧ endpointLabel u < p+k) + (hv : p ≤ endpointLabel v ∧ endpointLabel v < p+k) + (hu' : p' ≤ endpointLabel u' ∧ endpointLabel u' < p'+k') + (hv' : p' ≤ endpointLabel v' ∧ endpointLabel v' < p'+k') + (i j : Fin l) (hij : i ≠ j) (s t : TrackStar (Fin (m+1))) : + Commute (B.rectangleCopy (by omega) g (axisCellRectangle d k l hk hl (by omega) p q u v huv hu hv i) s) + (B.rectangleCopy (by omega) g (axisCellRectangle d k' l hk' hl (by omega) p' q u' v' huv' hu' hv' j) t) := by + let R := axisCellRectangle d k l hk hl (by omega) p q u v huv hu hv i + let R' := axisCellRectangle d k' l hk' hl (by omega) p' q u' v' huv' hu' hv' j + refine (small_control_disjoint _ B.c B.constant_aligned B.disjoint_aligned + (by simpa using hlarge) (B.rectangleCopy (by omega) g R) (B.rectangleCopy (by omega) g R') + (B.axisSector (by omega) n g (otherAxis d) l hl q (windowCell a (otherAxis d) l q i)) + (B.axisSector (by omega) n g (otherAxis d) l hl q (windowCell a (otherAxis d) l q j)) + (B.rectangleCopy_supported (by omega) g R) (B.rectangleCopy_supported (by omega) g R') + (B.axisSector_supported (by omega) n g (otherAxis d) l hl q _ + (windowCell_axis_resolved _ _ (by omega) _ _)) + (B.axisCellRectangle_grid_control (by omega) n g d k l hk hl (by omega) p q u v huv hu hv i) + (B.axisCellRectangle_grid_control (by omega) n g d k' l hk' hl (by omega) p' q u' v' huv' hu' hv' j) ?_) s t + intro x y + exact B.fullGeometricSector_commute (by omega) (axisWindowPrimitives (otherAxis d) l q) _ _ _ + (windowCell_axis_resolved _ _ (by omega) _ _) + (windowCell_pairwise_disjoint (otherAxis d) l hlpos q hij) x y + +end InitialCoverSystem +end AxisCellSplitting + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FixedChartTables.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FixedChartTables.lean new file mode 100644 index 0000000000000000000000000000000000000000..08a7e8fadebc77d78156f9e704fd08cb438309b3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FixedChartTables.lean @@ -0,0 +1,35 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.RandomFields.PrimitiveCovariance + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FixedChartTables + +theorem fixedChartTables_eventually {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + {η : Type*} [Finite η] {ι : η → Type*} [∀ z, Finite (ι z)] + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (hm' : 15 ≤ m+1) + (P : (z : η) → ι z → Fin 5 × (CutRing × CutRing)) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → ∀ B : InitialCoverSystem a r m hm M, + ∀ z u I b hb, B.PrimitiveFamilyLaw I b hb (fun i => ((P z i).1,u+(P z i).2)) := by + classical + let Z := Σ (_ : η), Σ (I : Finset (Fin (m+1))), {b : Fin (m+1) // b ∉ I} + have he (z : Z) := primitiveFamilyLaw_eventually (a := a) (hm := hm) hr hm' + z.2.1 z.2.2.val z.2.2.property (P z.1) + choose L hL using he + let _ := Fintype.ofFinite Z + refine ⟨Finset.univ.sup L,fun M hM B z u I b hb => ?_⟩ + apply InitialCoverSystem.PrimitiveFamilyLaw.translate B I b hb (P z) _ u + exact hL ⟨z,I,⟨b,hb⟩⟩ M ((Finset.le_sup (f := L) (Finset.mem_univ _)).trans hM) B +end FixedChartTables + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagArrangementControl.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagArrangementControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..d110d54c59014b774a844094b92125c8655f79e9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagArrangementControl.lean @@ -0,0 +1,185 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagSites +import OAI.GroupTheory.SimpleAmenable.RandomFields.UniformThresholdCDF + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagArrangementControl +open Classical MeasureTheory + +theorem flagValue_arrangement {a : ℕ} {v : ℝ×ℝ} {K : Type*} + (f : GenericSquare a → K) (S : Finset PlaneCut) + (hS : ∀p q,(∀l∈S,squareSign l p=squareSign l q) → f p=f q) + (z w : SquareFlag a v) + (hs : ∀l∈S,¬ FlagSeparates l.1 l.2 z w) : + flagValue f ⟨S,hS⟩ z=flagValue f ⟨S,hS⟩ w := by + obtain ⟨N,hN,hz,hf⟩ := flagValue_spec f ⟨S,hS⟩ z + obtain ⟨M,hM,hw,hg⟩ := flagValue_spec f ⟨S,hS⟩ w + obtain ⟨p,hp,hpv⟩ := squareSector_generic z (hN.inter (arrangementNeighborhood_open a S z.val)) + ⟨hz,self_mem_arrangementNeighborhood a S z.val⟩ + obtain ⟨q,hq,hqv⟩ := squareSector_generic w (hM.inter (arrangementNeighborhood_open a S w.val)) + ⟨hw,self_mem_arrangementNeighborhood a S w.val⟩ + rw [← hf p hp.1 hpv,← hg q hq.1 hqv] + apply hS p q + intro l hl + have h₁ := planeSign_neighborhood (p:=⟨p.val,p.property.2.2⟩) hp.2 hpv hl + have h₂ := planeSign_neighborhood (p:=⟨q.val,q.property.2.2⟩) hq.2 hqv hl + change squareSign l p=_ at h₁ + change squareSign l q=_ at h₂ + rw [h₁,h₂] + apply decide_eq_decide.mpr + have h := not_not.mp (hs l hl) + simpa only [flagMem_halfPlane] using h + +theorem flagMem_arrangement {a : ℕ} {v : ℝ×ℝ} (U : polygonAlgebra a) : + ∃S : Finset PlaneCut,∀z w : SquareFlag a v, + (∀l∈S,¬ FlagSeparates l.1 l.2 z w) → (flagMem U z ↔ flagMem U w) := by + obtain ⟨S,hS⟩ := polygon_hasSquareArrangement U.property + refine ⟨S,fun z w h => ?_⟩ + unfold flagMem + rw [flagValue_arrangement (fun p => decide (p∈U.val)) S hS z w h] + +theorem separatorMatrix_zero_of_cut {a : ℕ} {v : ℝ×ℝ} + {s κ : ℝ} (hs : 0 < s) (hκ : 0 < κ) (z w : SquareFlag a v) + (j : Fin 4) (c : CutRing) (hc : FlagSeparates j c z w) + (hcut : |conjugate c| ≤ κ/s) : + separatorMatrix (thresholdLaw s κ) z w=0 := by + obtain ⟨d,hd,hdmin⟩ := flagSeparates_exists_min j z w ⟨c,hc⟩ + have h : κ/s < 2*κ/s := (div_lt_div_iff_of_pos_right hs).mpr (by linarith) + have hd' : |conjugate d| ≤ κ/s := (hdmin c hc).trans hcut + have hp : directionNoCutProbability s κ j z w=0 := by + rw [directionNoCutProbability,directionNoCut_of_min j z w d hd hdmin, + uniformInterval_Iio h,intervalCDF] + rw [max_eq_right (by linarith [min_le_right (2*κ/s) |conjugate d|]),zero_div] + rw [separatorMatrix_product hs hκ] + exact Finset.prod_eq_zero (Finset.mem_univ j) hp + +theorem separatorMatrix_ne_zero_signs {a : ℕ} {v : ℝ×ℝ} + {s κ : ℝ} (hs : 0 < s) (hκ : 0 < κ) (S : Finset PlaneCut) + (hS : ∀l∈S,|conjugate l.2| ≤ κ/s) (z w : SquareFlag a v) + (hp : separatorMatrix (thresholdLaw s κ) z w ≠ 0) : + ∀l∈S,¬ FlagSeparates l.1 l.2 z w := by + intro l hl hsep + exact hp (separatorMatrix_zero_of_cut hs hκ z w l.1 l.2 hsep (hS l hl)) + +theorem separatorMatrix_controls_step {a : ℕ} {v : ℝ×ℝ} {K : Type*} + (f : GenericSquare a → K) (hf : HasSquareArrangement f) : + ∃R : ℝ, 0 ≤ R ∧ ∀(s κ : ℝ),0 < s → 0 < κ → R ≤ κ/s → + ∀z w : SquareFlag a v,separatorMatrix (thresholdLaw s κ) z w ≠ 0 → + flagValue f hf z=flagValue f hf w := by + obtain ⟨S,hS⟩ := hf + let R := ∑l∈S,|conjugate l.2| + have hR : 0 ≤ R := Finset.sum_nonneg (fun _ _ => abs_nonneg _) + refine ⟨R,hR,fun s κ hs hκ hRs z w hp => ?_⟩ + apply flagValue_arrangement f S hS z w + apply separatorMatrix_ne_zero_signs hs hκ S _ z w hp + intro l hl + exact (Finset.single_le_sum (fun _ _ => abs_nonneg _) hl).trans hRs + +end FlagArrangementControl + +section SquareAffineCharts +open Classical + +theorem floor_add_unit {x : ℝ} (hx₀ : 0 ≤ x) (hx₁ : x < 1) (y : ℝ) : + ⌊x+y⌋ = ⌊y⌋ + if x < 1-Int.fract y then 0 else 1 := by + have hy₀ := Int.floor_le y + have hy₁ := Int.lt_floor_add_one y + by_cases h : x < 1-Int.fract y + · rw [ite_eq_left h,add_zero] + simp only [Int.fract] at h + apply Int.floor_eq_iff.mpr + constructor <;> linarith + · rw [ite_eq_right h] + simp only [Int.fract] at h + apply Int.floor_eq_iff.mpr + push_cast + constructor <;> linarith + +noncomputable def squareTranslationPeriod {a : ℕ} (u : CutRing×CutRing) + (p : GenericSquare a) : ℤ×ℤ := + (⌊p.val.1+ordinary u.1⌋,⌊p.val.2+ordinary u.2⌋) + +theorem squareTranslationPeriod_arrangement {a : ℕ} (u : CutRing×CutRing) : + HasSquareArrangement (squareTranslationPeriod (a:=a) u) := by + let c₁ : CutRing := (⌊ordinary u.1⌋:CutRing)+1-u.1 + let c₂ : CutRing := (⌊ordinary u.2⌋:CutRing)+1-u.2 + have hc₁ : ordinary c₁=1-Int.fract (ordinary u.1) := by simp only [c₁,map_sub,map_add,map_intCast,map_one,Int.fract]; ring + have hc₂ : ordinary c₂=1-Int.fract (ordinary u.2) := by simp only [c₂,map_sub,map_add,map_intCast,map_one,Int.fract]; ring + refine ⟨{(0,c₁),(1,c₂)},fun p q h => ?_⟩ + have h₁ := decide_eq_decide.mp (h (0,c₁) (by simp)) + have h₂ := decide_eq_decide.mp (h (1,c₂) (by simp)) + change (p.val.1simp only [flagTranslate_val,flagFract_eq,b,t,k,flagShiftPeriod,SquareStep.intPair, + Prod.fst_sub,Prod.snd_sub,Prod.fst_add,Prod.snd_add,map_sub,map_intCast] <;> ring + let M : Set (ℝ×ℝ) := (fun p => p+b) ⁻¹' arrangementNeighborhood a SquareStep.squareEdgeCuts (flagTranslate u z).val + refine ⟨M,(arrangementNeighborhood_open _ _ _).preimage (continuous_id.add continuous_const),?_,fun p hp hpv => ?_⟩ + · change z.val+b ∈ arrangementNeighborhood a SquareStep.squareEdgeCuts (flagTranslate u z).val + rw [← hbase] + exact self_mem_arrangementNeighborhood _ _ _ + · let q : GenericPlane a := GenericPlane.shift t ⟨p.val,p.property.2.2⟩ + have hqv : q.val ∈ planeSector a (flagTranslate u z).val v := by + rw [hbase] + exact (planeSector_add_iff z.val v b p.val).mpr hpv + have hpq : q.val ∈ arrangementNeighborhood a SquareStep.squareEdgeCuts (flagTranslate u z).val := hp + have hqs := sector_enters_square (flagTranslate u z).property.2 hpq hqv + have hx : 0 ≤ p.val.1+ordinary u.1-(k.1:ℝ) ∧ p.val.1+ordinary u.1-(k.1:ℝ) < 1 := by + simpa only [q,GenericPlane.shift,t,SquareStep.intPair,Prod.fst_add,Prod.fst_sub,map_sub,map_intCast,← add_sub_assoc,Set.mem_Ico] using hqs.1 + have hy : 0 ≤ p.val.2+ordinary u.2-(k.2:ℝ) ∧ p.val.2+ordinary u.2-(k.2:ℝ) < 1 := by + simpa only [q,GenericPlane.shift,t,SquareStep.intPair,Prod.snd_add,Prod.snd_sub,map_sub,map_intCast,← add_sub_assoc,Set.mem_Ico] using hqs.2 + apply Prod.ext + · exact Int.floor_eq_iff.mpr ⟨by linarith [hx.1],by linarith [hx.2]⟩ + · exact Int.floor_eq_iff.mpr ⟨by linarith [hy.1],by linarith [hy.2]⟩ + +theorem squareTranslationPeriod_flagValue {a : ℕ} {v : ℝ×ℝ} + (u : CutRing×CutRing) (z : SquareFlag a v) : + flagValue (squareTranslationPeriod u) (squareTranslationPeriod_arrangement u) z=flagShiftPeriod u z := + flagValue_eq _ _ _ (squareTranslationPeriod_germ u z) + +theorem squareArrangement_pair {a : ℕ} {K J : Type*} {f : GenericSquare a → K} {g : GenericSquare a → J} + (hf : HasSquareArrangement f) (hg : HasSquareArrangement g) : + HasSquareArrangement (fun p => (f p,g p)) := by + obtain ⟨S,hS⟩ := hf + obtain ⟨T,hT⟩ := hg + refine ⟨S∪T,fun p q h => Prod.ext (hS p q (fun l hl => h l (Finset.mem_union_left _ hl))) + (hT p q (fun l hl => h l (Finset.mem_union_right _ hl)))⟩ + +theorem squareArrangement_finite_family {a : ℕ} {ι K : Type*} [Finite ι] + (f : ι → GenericSquare a → K) (hf : ∀i,HasSquareArrangement (f i)) : + HasSquareArrangement (fun p i => f i p) := by + let := Fintype.ofFinite ι + choose S hS using hf + refine ⟨Finset.univ.biUnion S,fun p q h => funext (fun i => hS i p q (fun l hl => ?_))⟩ + exact h l (Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ _,hl⟩) + +end SquareAffineCharts + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagGerms.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..7cfd7aab8296eaed0172ef04cd5ecdbbe75e959d --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagGerms.lean @@ -0,0 +1,215 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TorusStepFunctions + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagGerms +open Classical + +def FlagDirections (a : ℕ) (v w : ℝ × ℝ) : Prop := + ∀ j : Fin 4, cutForm a j v ≠ 0 ∨ cutForm a j w ≠ 0 + +theorem flagDirections_sector {a : ℕ} {v w : ℝ×ℝ} (h : FlagDirections a v w) : + ∃ d : ℝ×ℝ, TransverseDirection a d ∧ ∀ j, + (cutForm a j d<0 ↔ if cutForm a j v=0 then cutForm a j w<0 else cutForm a j v<0) := by + let σ : Fin 4 → Bool := fun j => + decide (if cutForm a j v=0 then cutForm a j w<0 else cutForm a j v<0) + have ha (j : Fin 4) (hj : cutForm a j v=0) : + if σ j then cutForm a j (v+w)<0 else 0 0) v (v+w) σ + ha hi Set.univ isOpen_univ (Set.mem_univ _) + refine ⟨d,fun j => ?_,fun j => ?_⟩ + · simpa using hg j 0 + · have hh := hd j + by_cases ht : if cutForm a j v=0 then cutForm a j w<0 else cutForm a j v<0 + · simpa [σ,ht] using hh + · have hh' : 0 hS q p ?_⟩ + intro l hl + exact (planeSign_neighborhood (p:=⟨q.val,q.property.2.2⟩) hq hqv hl).trans + (planeSign_neighborhood (p:=⟨p.val,p.property.2.2⟩) hp hpv hl).symm + +theorem IsSquareGerm.unique {a : ℕ} {v : ℝ×ℝ} {K : Type*} + {f : GenericSquare a → K} {z : SquareFlag a v} {c d : K} + (hc : IsSquareGerm f z c) (hd : IsSquareGerm f z d) : c=d := by + obtain ⟨N,hN,hz,hc⟩ := hc + obtain ⟨M,hM,hz',hd⟩ := hd + obtain ⟨p,hp,hpv⟩ := squareSector_generic z (hN.inter hM) ⟨hz,hz'⟩ + exact (hc p hp.1 hpv).symm.trans (hd p hp.2 hpv) + +noncomputable def flagValue {a : ℕ} {v : ℝ×ℝ} {K : Type*} + (f : GenericSquare a → K) (hf : HasSquareArrangement f) (z : SquareFlag a v) : K := + Classical.choose (exists_squareGerm f hf z) + +theorem flagValue_spec {a : ℕ} {v : ℝ×ℝ} {K : Type*} + (f : GenericSquare a → K) (hf : HasSquareArrangement f) (z : SquareFlag a v) : + IsSquareGerm f z (flagValue f hf z) := Classical.choose_spec (exists_squareGerm f hf z) + +theorem flagValue_eq {a : ℕ} {v : ℝ×ℝ} {K : Type*} + (f : GenericSquare a → K) (hf : HasSquareArrangement f) (z : SquareFlag a v) + {c : K} (hc : IsSquareGerm f z c) : flagValue f hf z=c := (flagValue_spec f hf z).unique hc + +theorem flagValue_map {a : ℕ} {v : ℝ×ℝ} {K J : Type*} + (f : GenericSquare a → K) (hf : HasSquareArrangement f) (t : K → J) + (ht : HasSquareArrangement (t ∘ f)) (z : SquareFlag a v) : + flagValue (t ∘ f) ht z=t (flagValue f hf z) := by + obtain ⟨N,hN,hz,hf'⟩ := flagValue_spec f hf z + exact flagValue_eq _ _ _ ⟨N,hN,hz,fun p hp hpv => congrArg t (hf' p hp hpv)⟩ + +theorem flagValue_finite {a : ℕ} {v : ℝ×ℝ} {ι K : Type*} [Finite ι] + (f : ι → GenericSquare a → K) (hf : ∀ i, HasSquareArrangement (f i)) + (z : SquareFlag a v) {N : Set (ℝ×ℝ)} (hN : IsOpen N) (hz : z.val∈N) : + ∃ p : GenericSquare a, p.val∈N ∧ p.val∈planeSector a z.val v ∧ + ∀ i, f i p=flagValue (f i) (hf i) z := by + choose M hM hzM hfg using fun i => flagValue_spec (f i) (hf i) z + obtain ⟨p,hp,hpv⟩ := squareSector_generic z + (hN.inter (isOpen_iInter_of_finite hM)) ⟨hz,Set.mem_iInter.mpr hzM⟩ + exact ⟨p,hp.1,hpv,fun i => hfg i p (Set.mem_iInter.mp hp.2 i) hpv⟩ + +noncomputable def flagMem {a : ℕ} {v : ℝ×ℝ} (U : polygonAlgebra a) + (z : SquareFlag a v) : Prop := + flagValue (fun p => decide (p∈U.val)) (polygon_hasSquareArrangement U.property) z=true + +theorem flagMem_iff {a : ℕ} {v : ℝ×ℝ} (U : polygonAlgebra a) (z : SquareFlag a v) : + ∃ N : Set (ℝ×ℝ), IsOpen N ∧ z.val∈N ∧ + ∀ p : GenericSquare a, p.val∈N → p.val∈planeSector a z.val v → + (p∈U.val ↔ flagMem U z) := by + obtain ⟨N,hN,hz,hf⟩ := flagValue_spec (fun p => decide (p∈U.val)) + (polygon_hasSquareArrangement U.property) z + refine ⟨N,hN,hz,fun p hp hpv => ?_⟩ + unfold flagMem + rw [← hf p hp hpv] + simp + +@[simp] theorem flagMem_bot {a : ℕ} {v : ℝ×ℝ} (z : SquareFlag a v) : + ¬flagMem (⊥ : polygonAlgebra a) z := by + have h := flagValue_eq (fun p : GenericSquare a => decide (p∈(⊥ : polygonAlgebra a).val)) + (polygon_hasSquareArrangement (⊥ : polygonAlgebra a).property) z + (c:=false) ⟨Set.univ,isOpen_univ,Set.mem_univ _,fun _ _ _ => by simp⟩ + intro hm + exact Bool.false_ne_true (h.symm.trans hm) + +theorem flagMem_sup {a : ℕ} {v : ℝ×ℝ} (U V : polygonAlgebra a) (z : SquareFlag a v) : + flagMem (U⊔V) z ↔ flagMem U z ∨ flagMem V z := by + obtain ⟨N,hN,hz,h⟩ := flagMem_iff (U⊔V) z + obtain ⟨M,hM,hz',h'⟩ := flagMem_iff U z + obtain ⟨L,hL,hz'',h''⟩ := flagMem_iff V z + obtain ⟨p,hp,hpv⟩ := squareSector_generic z ((hN.inter hM).inter hL) ⟨⟨hz,hz'⟩,hz''⟩ + rw [← h p hp.1.1 hpv,← h' p hp.1.2 hpv,← h'' p hp.2 hpv] + rfl + +theorem flagMem_compl {a : ℕ} {v : ℝ×ℝ} (U : polygonAlgebra a) (z : SquareFlag a v) : + flagMem Uᶜ z ↔ ¬flagMem U z := by + obtain ⟨N,hN,hz,h⟩ := flagMem_iff Uᶜ z + obtain ⟨M,hM,hz',h'⟩ := flagMem_iff U z + obtain ⟨p,hp,hpv⟩ := squareSector_generic z (hN.inter hM) ⟨hz,hz'⟩ + rw [← h p hp.1 hpv,← h' p hp.2 hpv] + rfl + +theorem flagMem_halfPlane {a : ℕ} {v : ℝ×ℝ} (j : Fin 4) (c : CutRing) + (z : SquareFlag a v) : + flagMem ⟨halfPlane a j c,halfPlane_mem a j c⟩ z ↔ + (if cutForm a j z.val=ordinary c then cutForm a j v<0 + else cutForm a j z.val decide (p∈U.val)) + (polygon_hasSquareArrangement U.property) z = + decide (if cutForm a j z.val=ordinary c then cutForm a j v<0 + else cutForm a j z.val ?_⟩ + exact planeSign_neighborhood (p:=⟨p.val,p.property.2.2⟩) hp hpv (Finset.mem_singleton_self _) + change flagValue _ _ z=true ↔ _ + rw [hg] + simp + +end FlagGerms + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSeparatingLevels.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSeparatingLevels.lean new file mode 100644 index 0000000000000000000000000000000000000000..0068e9e5026c2f427fec3e326e148fa37ad7ecc8 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSeparatingLevels.lean @@ -0,0 +1,110 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagGerms +import OAI.GroupTheory.SimpleAmenable.Arithmetic.QuadraticRectangleCounts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagSeparatingLevels +open Classical + +def FlagSeparates {a : ℕ} {v : ℝ×ℝ} (j : Fin 4) (c : CutRing) + (z w : SquareFlag a v) : Prop := + ¬ (flagMem ⟨halfPlane a j c,halfPlane_mem a j c⟩ z ↔ + flagMem ⟨halfPlane a j c,halfPlane_mem a j c⟩ w) + +theorem flagSeparates_ordinary_bound {a : ℕ} {v : ℝ×ℝ} {j : Fin 4} {c : CutRing} + {z w : SquareFlag a v} (h : FlagSeparates j c z w) : + ordinary c ∈ Set.Icc (min (cutForm a j z.val) (cutForm a j w.val)) + (max (cutForm a j z.val) (cutForm a j w.val)) := by + unfold FlagSeparates at h + simp only [flagMem_halfPlane] at h + constructor + · by_contra hn + have hz : ordinary c < cutForm a j z.val := lt_of_lt_of_le (lt_of_not_ge hn) (min_le_left _ _) + have hw : ordinary c < cutForm a j w.val := lt_of_lt_of_le (lt_of_not_ge hn) (min_le_right _ _) + simp [ne_of_gt hz,ne_of_gt hw,not_lt_of_ge hz.le,not_lt_of_ge hw.le] at h + · by_contra hn + have hz : cutForm a j z.val < ordinary c := lt_of_le_of_lt (le_max_left _ _) (lt_of_not_ge hn) + have hw : cutForm a j w.val < ordinary c := lt_of_le_of_lt (le_max_right _ _) (lt_of_not_ge hn) + simp [ne_of_lt hz,ne_of_lt hw,hz,hw] at h + +theorem flagSeparates_bounded_finite {a : ℕ} {v : ℝ×ℝ} (j : Fin 4) + (z w : SquareFlag a v) (R : ℝ) : + {c : CutRing | FlagSeparates j c z w ∧ |conjugate c| ≤ R}.Finite := by + let b := |R|+1 + have hb : 0 < b := by dsimp [b]; positivity + let x := min (cutForm a j z.val) (cutForm a j w.val) + let y := max (cutForm a j z.val) (cutForm a j w.val) + apply (cutRectangle_finite x (-b) (y-x) (2*b) (by positivity)).subset + intro c hc + have ho := flagSeparates_ordinary_bound hc.1 + have ht := abs_le.mp hc.2 + change _ ∧ _ + constructor + · simpa [x,y] using ho + · constructor <;> dsimp [b] <;> linarith [le_abs_self R] + +theorem flagSeparates_exists_min {a : ℕ} {v : ℝ×ℝ} (j : Fin 4) + (z w : SquareFlag a v) (h : ∃ c,FlagSeparates j c z w) : + ∃ c,FlagSeparates j c z w ∧ ∀ d,FlagSeparates j d z w → + |conjugate c| ≤ |conjugate d| := by + obtain ⟨c,hc⟩ := h + let S : Set CutRing := {d : CutRing | FlagSeparates j d z w ∧ |conjugate d| ≤ |conjugate c|} + have hS : S.Finite := flagSeparates_bounded_finite j z w _ + have hn : S.Nonempty := ⟨c,hc,le_rfl⟩ + obtain ⟨d,hd,hmin⟩ := Set.exists_min_image S (fun e => |conjugate e|) hS hn + refine ⟨d,hd.1,fun e he => ?_⟩ + by_cases hec : |conjugate e| ≤ |conjugate c| + · exact hmin e ⟨he,hec⟩ + · exact hd.2.trans (le_of_not_ge hec) + +theorem flagMem_halfPlane_local_translation {a : ℕ} {v : ℝ×ℝ} + (u : CutRing×CutRing) (j : Fin 4) (c : CutRing) (z z' : SquareFlag a v) + (hz : z'.val=z.val+(ordinary u.1,ordinary u.2)) : + flagMem ⟨halfPlane a j (c+integralCutForm a j u),halfPlane_mem _ _ _⟩ z' ↔ + flagMem ⟨halfPlane a j c,halfPlane_mem _ _ _⟩ z := by + rw [flagMem_halfPlane,flagMem_halfPlane,hz,cutForm_add,cutForm_ordinary,map_add] + simp only [add_left_inj,add_lt_add_iff_right] + +theorem flagSeparates_local_translation {a : ℕ} {v : ℝ×ℝ} + (u : CutRing×CutRing) (j : Fin 4) (c : CutRing) (z w z' w' : SquareFlag a v) + (hz : z'.val=z.val+(ordinary u.1,ordinary u.2)) + (hw : w'.val=w.val+(ordinary u.1,ordinary u.2)) : + FlagSeparates j (c+integralCutForm a j u) z' w' ↔ FlagSeparates j c z w := by + unfold FlagSeparates + rw [flagMem_halfPlane_local_translation u j c z z' hz, + flagMem_halfPlane_local_translation u j c w w' hw] + +theorem separating_min_translation_bound {a : ℕ} {v : ℝ×ℝ} + (u : CutRing×CutRing) (j : Fin 4) (z w z' w' : SquareFlag a v) + (hz : z'.val=z.val+(ordinary u.1,ordinary u.2)) + (hw : w'.val=w.val+(ordinary u.1,ordinary u.2)) + (c d : CutRing) (hc : FlagSeparates j c z w) (hd : FlagSeparates j d z' w') + (hcmin : ∀ e,FlagSeparates j e z w → |conjugate c| ≤ |conjugate e|) + (hdmin : ∀ e,FlagSeparates j e z' w' → |conjugate d| ≤ |conjugate e|) : + abs (|conjugate c|-|conjugate d|) ≤ |conjugate (integralCutForm a j u)| := by + have hd' := hdmin (c+integralCutForm a j u) + ((flagSeparates_local_translation u j c z w z' w' hz hw).mpr hc) + have hc' := hcmin (d-integralCutForm a j u) (by + apply (flagSeparates_local_translation u j (d-integralCutForm a j u) z w z' w' hz hw).mp + simpa only [sub_add_cancel] using hd) + have h₁ := abs_add_le (conjugate c) (conjugate (integralCutForm a j u)) + have h₂ : |conjugate d-conjugate (integralCutForm a j u)| ≤ |conjugate d|+|conjugate (integralCutForm a j u)| := by + simpa only [sub_zero,zero_sub,abs_neg] using abs_sub_le (conjugate d) 0 (conjugate (integralCutForm a j u)) + simp only [map_add,map_sub] at hd' hc' + apply abs_le.mpr + constructor <;> linarith + +end FlagSeparatingLevels + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSiteCounts.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSiteCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d868f4a9440a73c8cfe9361bff15c74c80c382a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSiteCounts.lean @@ -0,0 +1,159 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagSites +import OAI.GroupTheory.SimpleAmenable.Arithmetic.QuadraticRectangleCounts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagSiteCounts +open Classical + +theorem flagSite_key_injective {a m D : ℕ} {v : ℝ×ℝ} : + Function.Injective (fun z : FlagSite a m D v => (z.val.1,flagSiteNumerator z)) := by + intro z w h + apply Subtype.ext + apply Prod.ext + · exact congrArg (fun p : Fin m × (CutRing×CutRing) => p.1) h + · apply Subtype.ext + rw [← flagSiteNumerator_spec z,← flagSiteNumerator_spec w] + exact congrArg (scaledOrdinary D) (congrArg (fun p : Fin m × (CutRing×CutRing) => p.2) h) + +noncomputable def flagSiteBox {a m D : ℕ} {v : ℝ×ℝ} (R : ℝ) : Set (FlagSite a m D v) := + {z | |(flagSiteConjugate z).1|≤R ∧ |(flagSiteConjugate z).2|≤R} + +theorem flagSiteNumerator_box {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 constructor <;> constructor <;> + simp only [Set.mem_Icc] at * <;> nlinarith + +theorem flagSiteBox_finite {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 (z.val.1,flagSiteNumerator z)) '' flagSiteBox R).Finite := by + refine ((Set.finite_univ : (Set.univ : Set (Fin m)).Finite).prod (hf.prod hf)).subset ?_ + rintro _ ⟨z,hz,rfl⟩ + exact ⟨Set.mem_univ _,flagSiteNumerator_box hD z hz⟩ + exact hi.of_finite_image flagSite_key_injective.injOn + +theorem flagSiteBox_card_bound {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 (ht u).mp hu) + nlinarith + have hn : S.card ≤ m *T.card^2 := by + rw [← Finset.card_image_of_injective _ flagSite_key_injective] + have hi : S.image (fun z => (z.val.1,flagSiteNumerator z)) ⊆ + (Finset.univ : Finset (Fin m)) ×ˢ (T ×ˢ T) := by + intro x hx + obtain ⟨z,hz,rfl⟩ := Finset.mem_image.mp hx + have hh := flagSiteNumerator_box hD z (hS z hz) + simp only [Finset.mem_product,Finset.mem_univ,true_and] + exact ⟨(ht _).mpr hh.1,(ht _).mpr hh.2⟩ + simpa [Finset.card_product,pow_two] using Finset.card_le_card hi + have hn' : (S.card:ℝ) ≤ m *(T.card:ℝ)^2 := by exact_mod_cast hn + have hh : (T.card:ℝ)^2≤(2*(D:ℝ)^2*R+2)^2 := by + nlinarith [Nat.cast_nonneg (α:=ℝ) T.card] + exact hn'.trans (mul_le_mul_of_nonneg_left hh (Nat.cast_nonneg _)) + +end FlagSiteCounts + +section FlagWindowCounts +open Classical + +def flagWindow {a m D : ℕ} {v : ℝ×ℝ} (x y : ℝ×ℝ) (B C : ℝ) : Set (FlagSite a m D v) := + {z | z.val.2.val.1∈Set.Icc x.1 (x.1+B) ∧ z.val.2.val.2∈Set.Icc x.2 (x.2+B) ∧ + (flagSiteConjugate z).1∈Set.Icc y.1 (y.1+C) ∧ + (flagSiteConjugate z).2∈Set.Icc y.2 (y.2+C)} + +theorem flagWindow_numerators {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + {x y : ℝ×ℝ} {B C : ℝ} (z : FlagSite a m D v) (hz : z∈flagWindow x y B C) : + (flagSiteNumerator z).1∈cutRectangle (D*x.1) (D*y.1) (D*B) (D*C) ∧ + (flagSiteNumerator z).2∈cutRectangle (D*x.2) (D*y.2) (D*B) (D*C) := by + have hd : (0:ℝ) constructor <;> constructor <;> nlinarith + +theorem flagWindow_card_bound {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + (t : Fin m) {x y : ℝ×ℝ} {B C : ℝ} (hB : 0 ≤ B) (hC : 0 < C) + (S : Finset (FlagSite a m D v)) (hT : ∀z∈S,z.val.1=t) + (hS : ∀z∈S,z∈flagWindow x y B C) : + (S.card:ℝ) ≤ ((D:ℝ)^2*B*C+2)^2 := by + have hd : (0:ℝ) (Set.Finite.mem_toFinset _).mp hu) + nlinarith + have hc₂ : (T₂.card:ℝ)<(D:ℝ)^2*B*C+2 := by + have hh := cutRectangle_card_bound T₂ (D*x.2) (D*y.2) (D*B) (D*C) + (mul_nonneg hd.le hB) (mul_pos hd hC) (fun u hu => (Set.Finite.mem_toFinset _).mp hu) + nlinarith + have hi : Set.InjOn (flagSiteNumerator (a:=a) (m:=m) (D:=D) (v:=v)) (↑S : Set (FlagSite a m D v)) := by + intro z hz w hw hn + apply flagSite_key_injective + exact Prod.ext ((hT z hz).trans (hT w hw).symm) hn + have hn : S.card ≤ T₁.card*T₂.card := by + rw [← Finset.card_image_of_injOn hi,← Finset.card_product] + apply Finset.card_le_card + intro n hn + obtain ⟨z,hz,rfl⟩ := Finset.mem_image.mp hn + have hh := flagWindow_numerators hD z (hS z hz) + simpa only [Finset.mem_product,T₁,T₂,Set.Finite.mem_toFinset] using hh + have hn' : (S.card:ℝ) ≤ (T₁.card:ℝ)*(T₂.card:ℝ) := by exact_mod_cast hn + calc + (S.card:ℝ) ≤ (T₁.card:ℝ)*(T₂.card:ℝ) := hn' + _ ≤ ((D:ℝ)^2*B*C+2)*((D:ℝ)^2*B*C+2) := + mul_le_mul hc₁.le hc₂.le (Nat.cast_nonneg _) (by positivity) + _ = _ := (pow_two _).symm + +end FlagWindowCounts + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSites.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSites.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ffeb35b9652693d4947aa65d4909d939af601d4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagSites.lean @@ -0,0 +1,143 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.FlagExchangeAction + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagSites +open Classical + +noncomputable def scaledOrdinary (D : ℕ) (u : CutRing×CutRing) : ℝ×ℝ := + (ordinary u.1/D,ordinary u.2/D) + +noncomputable def scaledConjugate (D : ℕ) (u : CutRing×CutRing) : ℝ×ℝ := + (conjugate u.1/D,conjugate u.2/D) + +theorem scaledOrdinary_injective {D : ℕ} (hD : 0 (z.val.1,flagSiteNumerator z)) + intro z w h + apply Subtype.ext + have ht : z.val.1=w.val.1 := congrArg (fun p : Fin m × (CutRing×CutRing) => p.1) h + have hn : flagSiteNumerator z=flagSiteNumerator w := + congrArg (fun p : Fin m × (CutRing×CutRing) => p.2) h + apply Prod.ext + · exact ht + · apply Subtype.ext + rw [← flagSiteNumerator_spec z,← flagSiteNumerator_spec w,hn] + +noncomputable def flagShiftPeriod {a : ℕ} {v : ℝ×ℝ} (u : CutRing×CutRing) + (z : SquareFlag a v) : ℤ×ℤ := + (flagFloor (z.val.1+ordinary u.1) v.1,flagFloor (z.val.2+ordinary u.2) v.2) + +noncomputable def flagShiftNumerator (D : ℕ) (n u : CutRing×CutRing) (k : ℤ×ℤ) : + CutRing×CutRing := + (n.1+(D:CutRing)*u.1-(D:CutRing)*(k.1:CutRing), + n.2+(D:CutRing)*u.2-(D:CutRing)*(k.2:CutRing)) + +theorem scaledOrdinary_shift {D : ℕ} (hD : 0 + simp only [scaledOrdinary,flagShiftNumerator,Prod.fst_sub,Prod.snd_sub, + Prod.fst_add,Prod.snd_add,map_sub,map_add,map_mul,map_natCast,map_intCast] <;> + field_simp + +theorem flagTranslate_lattice {a D : ℕ} {v : ℝ×ℝ} (hD : 0 + simp only [scaledConjugate,flagShiftNumerator,Prod.fst_sub,Prod.snd_sub, + Prod.fst_add,Prod.snd_add,map_sub,map_add,map_mul,map_natCast,map_intCast] <;> + field_simp + +end FlagSites + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagTentMass.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagTentMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..3f6e3ac8fe8cd8df15b7d91595076866c98ff2a6 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagTentMass.lean @@ -0,0 +1,185 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.RandomFields.FlagAveragingMatrices +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.GoodRowSeparators + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagTentMass +open Classical + +noncomputable def flagRowTent {a m D : ℕ} {v : ℝ×ℝ} (s t : ℝ) + (z w : FlagSite a m D v) : ℝ := + if z.val.1=w.val.1 then planeTent s (flagSiteOrdinary z) (flagSiteOrdinary w)* + planeTent t (flagSiteConjugate z) (flagSiteConjugate w) else 0 + +noncomputable def latticeRowTent (D : ℕ) (s t : ℝ) (x y : ℝ×ℝ) (u : CutRing×CutRing) : ℝ := + planeTent s x (scaledOrdinary D u)*planeTent t y (scaledConjugate D u) + +noncomputable def tentRowOffset (s t : ℝ) (x y : ℝ×ℝ) : (Fin 2 → ℝ)×(Fin 2 → ℝ) := + (![-x.1/s,-y.1/t],![-x.2/s,-y.2/t]) + +theorem latticeRowTent_eq (D : ℕ) (s t : ℝ) (x y : ℝ×ℝ) (u : CutRing×CutRing) : + latticeRowTent D s t x y u= + pairedUnitTent (tentRowOffset s t x y+pairedQuadraticEmbedding D s t u) := by + simp only [latticeRowTent,planeTent,scaledOrdinary,scaledConjugate,pairedUnitTent, + doubleUnitTent,Fin.prod_univ_two,unitTent,tentRowOffset,pairedQuadraticEmbedding, + LinearMap.prodMap_apply,quadraticScaledEmbedding,LinearMap.coe_mk,AddHom.coe_mk, + Prod.fst_add,Prod.snd_add,Pi.add_apply,Matrix.cons_val_zero,Matrix.cons_val_one] + have h (a b d c : ℝ) : |(a-b/d)/c|=|-a/c+b/(d*c)| := by + have he : -a/c+b/(d*c) = -((a-b/d)/c) := by rw [div_mul_eq_div_div]; ring + rw [he,abs_neg] + rw [h,h,h,h] + ring + +theorem squareBoundary_of_interior {v x : ℝ×ℝ} + (hx : 0 (ne_of_gt hx.1 h).elim),(fun h => (ne_of_lt hx.2.1 h).elim), + (fun h => (ne_of_gt hx.2.2.1 h).elim),(fun h => (ne_of_lt hx.2.2.2 h).elim)⟩ + +noncomputable def flagSiteFromNumerator {a m D : ℕ} {v : ℝ×ℝ} + (hv : TransverseDirection a v) (k : Fin m) (u : CutRing×CutRing) + (hu : SquareBoundary v (scaledOrdinary D u)) : FlagSite a m D v := + ⟨(k,⟨scaledOrdinary D u,hv,hu⟩),u,rfl⟩ + +@[simp] theorem flagSiteFromNumerator_numerator {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 by by_contra hh; exact hw (hT w hh),?_⟩ + apply Finset.sum_bij_ne_zero (fun w _ _ => flagSiteNumerator w) + · intro w hw hnz + exact by_contra (fun hh => (hn w hnz).2 (hS _ hh)) + · intro w hw hnw w' hw' hnw' he + apply Subtype.ext + apply Prod.ext + · exact (hn w hnw).1.symm.trans (hn w' hnw').1 + · apply Subtype.ext + rw [← flagSiteNumerator_spec w,← flagSiteNumerator_spec w',he] + · intro u hu hnu + let w := flagSiteFromNumerator z.val.2.property.1 z.val.1 u (latticeRowTent_interior hs z hi u hnu) + have he : flagRowTent s t z w=latticeRowTent D s t (flagSiteOrdinary z) (flagSiteConjugate z) u := by + rw [flagRowTent,ite_eq_left (show z.val.1=w.val.1 from rfl)] + change planeTent s _ (scaledOrdinary D u)*planeTent t _ (flagSiteConjugate (flagSiteFromNumerator _ _ _ _)) = _ + rw [flagSiteFromNumerator_conjugate hD] + rfl + have hw : flagRowTent s t z w≠0 := by rwa [he] + exact ⟨w,hT w hw,hw,flagSiteFromNumerator_numerator hD _ _ _ _⟩ + · intro w hw hnw + simp only [flagRowTent,ite_eq_left (hn w hnw).1,latticeRowTent, + flagSiteNumerator_spec,flagSiteOrdinary,flagSiteConjugate] + +theorem flagRowTent_mass {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 θ (x+δ)-θ x + have hf (x : E) : HasFDerivAt F (fderiv ℝ θ (x+δ)-fderiv ℝ θ x) x := by + have hh := (hasFDerivAt_comp_add_right δ).mpr (hθ (x+δ)).hasFDerivAt + exact hh.sub (hθ x).hasFDerivAt + have hb (z : E) : ‖fderiv ℝ F z‖ ≤ (L:ℝ)*‖δ‖ := by + rw [(hf z).fderiv] + simpa only [add_sub_cancel_left] using hL.norm_sub_le (z+δ) z + have hh := Convex.norm_image_sub_le_of_norm_fderiv_le (𝕜:=ℝ) + (f:=F) (s:=Set.univ) (fun z _ => (hf z).differentiableAt) (fun z _ => hb z) + convex_univ (Set.mem_univ y) (Set.mem_univ x) + simpa only [F,Real.norm_eq_abs] using hh + +theorem compactSignal_uniform_constants {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + (ψ : E → ℝ) (hψ : ContDiff ℝ 2 ψ) (hs : HasCompactSupport ψ) : + ∃L₀ L₁ : NNReal,LipschitzWith L₀ ψ ∧ ∀δ x y : E, + |(ψ (x+δ)-ψ x)-(ψ (y+δ)-ψ y)| ≤ (L₁:ℝ)*‖δ‖*‖x-y‖ := by + obtain ⟨L₀,hL₀⟩ := hψ.lipschitzWith_of_hasCompactSupport hs (by norm_num) + have hd : ContDiff ℝ 1 (fderiv ℝ ψ) := hψ.fderiv_right (by norm_num) + obtain ⟨L₁,hL₁⟩ := hd.lipschitzWith_of_hasCompactSupport (hs.fderiv ℝ) (by norm_num) + exact ⟨L₀,L₁,hL₀,finiteDifference_lipschitz ψ (hψ.differentiable (by norm_num)) hL₁⟩ + +end FiniteDifference + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagTranslation.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagTranslation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f93f4712b2b2c065b79ef13950f963050bc581f --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FlagTranslation.lean @@ -0,0 +1,180 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PeriodicSlotStars +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagGerms + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FlagTranslation +open Classical + +noncomputable def flagFloor (x d : ℝ) : ℤ := + if d<0 then -1-⌊-x⌋ else ⌊x⌋ + +noncomputable def flagFract (x d : ℝ) : ℝ := + if d<0 then 1-Int.fract (-x) else Int.fract x + +theorem flagFract_eq (x d : ℝ) : flagFract x d=x-(flagFloor x d:ℝ) := by + unfold flagFract flagFloor + split_ifs <;> simp only [Int.fract,Int.cast_sub,Int.cast_neg,Int.cast_one] + ring + +theorem flagFract_add_int (x d : ℝ) (n : ℤ) : flagFract (x+n) d=flagFract x d := by + unfold flagFract + split_ifs + · rw [neg_add,← sub_eq_add_neg,Int.fract_sub_intCast] + · rw [Int.fract_add_intCast] + +theorem flagFract_sub_int (x d : ℝ) (n : ℤ) : flagFract (x-n) d=flagFract x d := by + simpa [sub_eq_add_neg] using flagFract_add_int x d (-n) + +theorem flagFract_flagFract_add (x y d : ℝ) : + flagFract (flagFract x d+y) d=flagFract (x+y) d := by + rw [flagFract_eq x d,sub_add_eq_add_sub,flagFract_sub_int] + +theorem flagFract_boundary (x d : ℝ) (hd : d≠0) : + flagFract x d∈Set.Icc (0:ℝ) 1 ∧ + (flagFract x d=0 → 0 by linarith,fun _ => ht⟩ + · exact ⟨⟨h₀,le_of_lt h₁⟩,fun _ => lt_of_le_of_ne (le_of_not_gt ht) hd.symm, + fun he => by linarith⟩ + +theorem flagFract_self {x d : ℝ} (hx : x∈Set.Icc (0:ℝ) 1) + (h₀ : x=0 → 0 ht (h₁ he))⟩ + +noncomputable def flagTranslate {a : ℕ} {v : ℝ×ℝ} (u : CutRing×CutRing) + (z : SquareFlag a v) : SquareFlag a v := by + have hv₁ : v.1≠0 := by simpa [cutForm] using z.property.1 0 + have hv₂ : v.2≠0 := by simpa [cutForm] using z.property.1 1 + have hx := flagFract_boundary (z.val.1+ordinary u.1) v.1 hv₁ + have hy := flagFract_boundary (z.val.2+ordinary u.2) v.2 hv₂ + exact ⟨(flagFract (z.val.1+ordinary u.1) v.1,flagFract (z.val.2+ordinary u.2) v.2), + z.property.1,hx.1,hy.1,hx.2.1,hx.2.2,hy.2.1,hy.2.2⟩ + +@[simp] theorem flagTranslate_val {a : ℕ} {v : ℝ×ℝ} (u : CutRing×CutRing) + (z : SquareFlag a v) : (flagTranslate u z).val= + (flagFract (z.val.1+ordinary u.1) v.1,flagFract (z.val.2+ordinary u.2) v.2) := rfl + +@[simp] theorem flagTranslate_zero {a : ℕ} {v : ℝ×ℝ} (z : SquareFlag a v) : + flagTranslate 0 z=z := by + apply Subtype.ext + simp only [flagTranslate_val,Prod.fst_zero,Prod.snd_zero,map_zero,add_zero] + exact Prod.ext (flagFract_self z.property.2.1 z.property.2.2.2.1 z.property.2.2.2.2.1) + (flagFract_self z.property.2.2.1 z.property.2.2.2.2.2.1 z.property.2.2.2.2.2.2) + +theorem flagTranslate_add {a : ℕ} {v : ℝ×ℝ} (u w : CutRing×CutRing) + (z : SquareFlag a v) : flagTranslate (u+w) z=flagTranslate u (flagTranslate w z) := by + apply Subtype.ext + simp only [flagTranslate_val,Prod.fst_add,Prod.snd_add,map_add] + rw [flagFract_flagFract_add,flagFract_flagFract_add] + congr 1 <;> congr 1 <;> ring + +theorem flagTranslate_period {a : ℕ} {v : ℝ×ℝ} (u : CutRing×CutRing) (k : ℤ×ℤ) + (z : SquareFlag a v) : flagTranslate (u+SquareStep.intPair k) z=flagTranslate u z := by + apply Subtype.ext + simp only [flagTranslate_val,SquareStep.intPair,Prod.fst_add,Prod.snd_add,map_add,map_intCast] + rw [← add_assoc,← add_assoc,flagFract_add_int,flagFract_add_int] + +theorem flagTranslate_reduce {a : ℕ} {v : ℝ×ℝ} (u : CutRing×CutRing) + (z : SquareFlag a v) : flagTranslate u z=flagTranslate (orbitRepresentative u) z := by + have hu : u=orbitRepresentative u+SquareStep.intPair (u.1.re,u.2.re) := by + apply Prod.ext <;> apply QuadraticAlgebra.ext <;> simp [orbitRepresentative,SquareStep.intPair,cutTau] + calc + _ = flagTranslate (orbitRepresentative u+SquareStep.intPair (u.1.re,u.2.re)) z := congrArg (fun t => flagTranslate t z) hu + _ = _ := flagTranslate_period _ _ _ + +theorem planeSector_add_iff {a : ℕ} (z v t p : ℝ×ℝ) : + p+t∈planeSector a (z+t) v ↔ p∈planeSector a z v := by + unfold planeSector + simp only [Set.mem_ofPred_eq,cutForm_add] + apply forall_congr' + intro j + split_ifs <;> simp + +theorem flagTranslate_neighborhood {a : ℕ} {v : ℝ×ℝ} (u : CutRing×CutRing) + (z : SquareFlag a v) {N : Set (ℝ×ℝ)} (hN : IsOpen N) + (hz : (flagTranslate u z).val∈N) : + ∃ M : Set (ℝ×ℝ), IsOpen M ∧ z.val∈M ∧ + ∀ p : GenericSquare a, p.val∈M → p.val∈planeSector a z.val v → + (translate a u p).val∈N ∧ + (translate a u p).val∈planeSector a (flagTranslate u z).val v := by + let k : ℤ×ℤ := (flagFloor (z.val.1+ordinary u.1) v.1, + flagFloor (z.val.2+ordinary u.2) v.2) + let t : CutRing×CutRing := u-SquareStep.intPair k + let b : ℝ×ℝ := (ordinary t.1,ordinary t.2) + have hbase : (flagTranslate u z).val=z.val+b := by + apply Prod.ext <;> simp only [flagTranslate_val,flagFract_eq,b,t,k,SquareStep.intPair, + Prod.fst_sub,Prod.snd_sub,Prod.fst_add,Prod.snd_add,map_sub,map_intCast] <;> ring + let L := N ∩ arrangementNeighborhood a SquareStep.squareEdgeCuts (flagTranslate u z).val + let M : Set (ℝ×ℝ) := (fun p => p+b) ⁻¹' L + have hL : IsOpen L := hN.inter (arrangementNeighborhood_open _ _ _) + have hzL : (flagTranslate u z).val∈L := ⟨hz,self_mem_arrangementNeighborhood _ _ _⟩ + refine ⟨M,hL.preimage (continuous_id.add continuous_const),?_,fun p hp hpv => ?_⟩ + · change z.val+b∈L + rw [← hbase]; exact hzL + · let q : GenericPlane a := GenericPlane.shift t ⟨p.val,p.property.2.2⟩ + have hqv : q.val∈planeSector a (flagTranslate u z).val v := by + rw [hbase] + exact (planeSector_add_iff z.val v b p.val).mpr hpv + have hqs : SquareStep.InSquare q := sector_enters_square (flagTranslate u z).property.2 hp.2 hqv + have hqp : (translate a u p).val=q.val := by + apply Prod.ext + · change Int.fract (p.val.1+ordinary u.1)=p.val.1+ordinary t.1 + have he : p.val.1+ordinary t.1=p.val.1+ordinary u.1-(k.1:ℝ) := by + simp only [t,SquareStep.intPair,Prod.fst_sub,map_sub,map_intCast]; ring + rw [he] + rw [← Int.fract_sub_intCast (p.val.1+ordinary u.1) k.1] + exact Int.fract_eq_self.mpr (by simpa only [q,GenericPlane.shift,Prod.fst_add,he,Set.mem_Ico] using hqs.1) + · change Int.fract (p.val.2+ordinary u.2)=p.val.2+ordinary t.2 + have he : p.val.2+ordinary t.2=p.val.2+ordinary u.2-(k.2:ℝ) := by + simp only [t,SquareStep.intPair,Prod.snd_sub,map_sub,map_intCast]; ring + rw [he] + rw [← Int.fract_sub_intCast (p.val.2+ordinary u.2) k.2] + exact Int.fract_eq_self.mpr (by simpa only [q,GenericPlane.shift,Prod.snd_add,he,Set.mem_Ico] using hqs.2) + rw [hqp] + exact ⟨hp.1,hqv⟩ + +theorem flagValue_translate {a : ℕ} {v : ℝ×ℝ} {K : Type*} + (f : GenericSquare a → K) (hf : HasSquareArrangement f) (u : CutRing×CutRing) + (z : SquareFlag a v) : + flagValue (fun p => f (translate a u p)) (squareArrangement_translate hf u) z = + flagValue f hf (flagTranslate u z) := by + obtain ⟨N,hN,hz,hf'⟩ := flagValue_spec f hf (flagTranslate u z) + obtain ⟨M,hM,hzM,hg⟩ := flagTranslate_neighborhood u z hN hz + exact flagValue_eq _ _ _ ⟨M,hM,hzM,fun p hp hpv => + hf' (translate a u p) (hg p hp hpv).1 (hg p hp hpv).2⟩ + +theorem flagMem_preimage_translate {a : ℕ} {v : ℝ×ℝ} (U : polygonAlgebra a) + (u : CutRing×CutRing) (z : SquareFlag a v) : + flagMem ⟨translate a u ⁻¹' U.val,polygon_preimage_translate u U.property⟩ z ↔ + flagMem U (flagTranslate u z) := by + change flagValue (fun p => decide (translate a u p∈U.val)) + (squareArrangement_translate (polygon_hasSquareArrangement U.property) u) z=true ↔ _ + rw [flagValue_translate (fun p => decide (p∈U.val)) (polygon_hasSquareArrangement U.property)] + rfl + +end FlagTranslation + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FrameCompatibility.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FrameCompatibility.lean new file mode 100644 index 0000000000000000000000000000000000000000..79e0d585b2f43aa65e653c86e02dd85939757ecf --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FrameCompatibility.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.OffsetFrames + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FrameCompatibility + +namespace OffsetFrame +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} {I : Finset (Fin (m+1))} + {u : Fin (m+1) → CutRing × CutRing} + +def shift (F : OffsetFrame a r m hm I u) + (k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (d : Fin (m+1) → CutRing × CutRing) + (hd : sourceLatticeFullMap a r m hm k = trackTranslation d) : + OffsetFrame a r m hm I (d+u) where + k := k*F.k + d := d+F.d + projection := by rw [map_mul,hd,F.projection,trackTranslation_add] + prescribed := by intro i hi; simp only [Pi.add_apply,F.prescribed i hi] + +end OffsetFrame + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 u i-v)) (V : polygonAlgebra a) : + B.frameStar hlarge h hr I u F V = + B.frameStar hlarge h hr I (fun i => u i-v) G (spatialTranslate v V) := by + let T := commonFrame a r m hm I b hb v + let K : OffsetFrame a r m hm I u := { + k := G.k*T.k + d := G.d+T.d + projection := by rw [map_mul,G.projection,T.projection,trackTranslation_add] + prescribed := by + intro i hi + simp only [Pi.add_apply,G.prescribed i hi,T.common i hi,sub_add_cancel] } + rw [B.frameStar_independent hlarge h hr I hI b hb u u F K (fun _ _ => rfl) V] + ext s : 1 + have he := DFunLike.congr_fun (B.polygonStar_common_translate hlarge h hr I hI b hb v T V) s + change B.t T.k * B.polygonStar hlarge h hr V (universalMap (subtypeAlternatingHom I) s) * (B.t T.k)⁻¹ = + B.polygonStar hlarge h hr (spatialTranslate v V) (universalMap (subtypeAlternatingHom I) s) at he + change B.t (G.k*T.k) * B.polygonStar hlarge h hr V (universalMap (subtypeAlternatingHom I) s) * + (B.t (G.k*T.k))⁻¹ = B.t G.k * + B.polygonStar hlarge h hr (spatialTranslate v V) (universalMap (subtypeAlternatingHom I) s) * (B.t G.k)⁻¹ + rw [← he] + simp only [map_mul,mul_inv_rev,mul_assoc] + +end InitialCoverSystem +end FrameCompatibility + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FrameDisjointness.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FrameDisjointness.lean new file mode 100644 index 0000000000000000000000000000000000000000..0c1989f554405fe80805e13402dbf71e3826dfe3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FrameDisjointness.lean @@ -0,0 +1,183 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SectorControl +import OAI.GroupTheory.SimpleAmenable.Homology.FinitePrimitiveResolution +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FrameActions + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section FrameDisjointness + +namespace OffsetFrame +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + {I J : Finset (Fin (m+1))} {u : Fin (m+1) → CutRing × CutRing} + +def restrict (F : OffsetFrame a r m hm J u) (hIJ : I ⊆ J) : OffsetFrame a r m hm I u where + k := F.k + d := F.d + projection := F.projection + prescribed := fun i hi => F.prescribed i (hIJ hi) + +end OffsetFrame + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 p.val + have hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val := hS + rw [B.polygonStar_eq hlarge h hr P V hV] + have he := DFunLike.congr_fun (B.fullGeometricSector_inclusion hlarge P (fun J _ d hd => h S P J d hd) I hI b hb + (h S P I b hb) V hV) s + change B.fullGeometricSector hlarge P (fun J _ d hd => h S P J d hd) V (universalMap (subtypeAlternatingHom I) s) = _ at he + rw [he] + exact B.geometricSector_aligned I b hb P _ V s + +theorem frameStar_subalphabet {I J : Finset (Fin (m+1))} + [Group.IsPerfect (alternatingGroup I)] [Group.IsPerfect (alternatingGroup J)] + (hIJ : I ⊆ J) (u : Fin (m+1) → CutRing × CutRing) + (F : OffsetFrame a r m hm J u) (V : polygonAlgebra a) : + (B.frameStar hlarge h hr J u F V).comp (universalMap (subalphabetHom hIJ)) = + B.frameStar hlarge h hr I u (F.restrict hIJ) V := by + unfold frameStar + rw [MonoidHom.comp_assoc,MonoidHom.comp_assoc,← universalMap_comp,subtypeAlternatingHom_comp] + rfl + +theorem frameStar_disjoint_alphabets (I J : Finset (Fin (m+1))) + (hI : 5 ≤ I.card) (hJ : 5 ≤ J.card) + [Group.IsPerfect (alternatingGroup I)] [Group.IsPerfect (alternatingGroup J)] + (hIJ : Disjoint I J) (b : Fin (m+1)) (hb : b ∉ I ∪ J) + (u v : Fin (m+1) → CutRing × CutRing) + (F : OffsetFrame a r m hm I u) (G : OffsetFrame a r m hm J v) + (V W : polygonAlgebra a) (s : UniversalExtension (alternatingGroup I)) + (t : UniversalExtension (alternatingGroup J)) : + Commute (B.frameStar hlarge h hr I u F V s) (B.frameStar hlarge h hr J v G W t) := by + classical + have hbI : b ∉ I := fun hi => hb (Finset.mem_union_left _ hi) + have hbJ : b ∉ J := fun hj => hb (Finset.mem_union_right _ hj) + let w : Fin (m+1) → CutRing × CutRing := fun i => if i ∈ I then u i else v i + let K := balancedOffsetFrame a r m hm (I ∪ J) b hb w + let F' : OffsetFrame a r m hm I u := { + k := K.k + d := K.d + projection := K.projection + prescribed := by + intro i hi + rw [K.prescribed i (Finset.mem_union_left _ hi)] + simp only [w,hi,ite_eq_left] } + let G' : OffsetFrame a r m hm J v := { + k := K.k + d := K.d + projection := K.projection + prescribed := by + intro i hi + rw [K.prescribed i (Finset.mem_union_right _ hi)] + have hn : i ∉ I := fun hI => Finset.disjoint_left.mp hIJ hI hi + simp only [w,hn,ite_false] } + rw [B.frameStar_independent hlarge h hr I hI b hbI u u F F' (fun _ _ => rfl) V, + B.frameStar_independent hlarge h hr J hJ b hbJ v v G G' (fun _ _ => rfl) W] + exact (B.disjoint_aligned I J hIJ _ + (B.polygonStar_alphabet_aligned hlarge h hr I hI b hbI V s) _ + (B.polygonStar_alphabet_aligned hlarge h hr J hJ b hbJ W t)).map (MulAut.conj (B.t K.k)).toMonoidHom + +end InitialCoverSystem +end FrameDisjointness + +theorem supported_fixer_commute {α : Type*} {f g : Equiv.Perm α} {U : Set α} + (hf : ∀ p ∈ U, f p = p) (hg : SupportedIn g U) : Commute f g := by + apply Equiv.Perm.Disjoint.commute + intro p + by_cases hp : p ∈ U + · exact Or.inl (hf p hp) + · exact Or.inr (hg p hp) + +theorem conditional_alphabet_supported {a m : ℕ} (I : Finset (Fin m)) + (V : polygonAlgebra a) (s : alternatingGroup I) : + SupportedIn (conditionalHom V (subtypeAlternatingHom I s).val).val + {p : TrackPoint a m | p.1 ∈ I ∧ p.2 ∈ V.val} := by + classical + rintro ⟨i,x⟩ hp + change (if x∈V.val then (subtypeAlternatingHom I s).val i else i,x) = (i,x) + by_cases hx : x ∈ V.val + · have hi : i ∉ I := fun hi => hp ⟨hi,hx⟩ + have he : (subtypeAlternatingHom I s).val i = i := by + change Equiv.Perm.ofSubtype s.val i = i + exact Equiv.Perm.ofSubtype_apply_of_not_mem _ hi + rw [ite_eq_left hx,he] + · rw [ite_eq_right hx] + +def frameDomain {a m : ℕ} (I : Finset (Fin m)) (u : Fin m → CutRing × CutRing) + (V : polygonAlgebra a) : Set (TrackPoint a m) := + {p | ∃ i ∈ I, ∃ x ∈ V.val, p = (i,translate a (u i) x)} + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 (B.polygonStar hlarge h hr W).range) V) + ⟨universalMap (subtypeAlternatingHom I) t,rfl⟩ + · intro t + have hp := DFunLike.congr_fun (B.polygonStar_projection hlarge h hr V) + (universalMap (subtypeAlternatingHom I) t) + change coverMap M (alternatingGenerator a r m hm) + (B.polygonStar hlarge h hr V (universalMap (subtypeAlternatingHom I) t)) = + conditionalAlternatingHom V (universalProjection _ (universalMap (subtypeAlternatingHom I) t)) at hp + rw [show universalProjection _ (universalMap (subtypeAlternatingHom I) t) = + subtypeAlternatingHom I (universalProjection _ t) from + DFunLike.congr_fun (universalMap_spec (subtypeAlternatingHom I)) t] at hp + change Commute (coverMap M (alternatingGenerator a r m hm) z) + (coverMap M (alternatingGenerator a r m hm) + (B.polygonStar hlarge h hr V (universalMap (subtypeAlternatingHom I) t))) + rw [hp] + have hc := supported_fixer_commute (fun (p : TrackPoint a (m+1)) (hp : p.1 ∈ I ∧ p.2 ∈ V.val) => hfix _ hp.1 _ hp.2) + (conditional_alphabet_supported I V (universalProjection _ t)) + exact show _*_ = _*_ from Subtype.ext (Subtype.ext hc.eq) + +end InitialCoverSystem + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FreshEvenBank.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FreshEvenBank.lean new file mode 100644 index 0000000000000000000000000000000000000000..038a52aa13d760662f36ea2222ebcbb778fcaad2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FreshEvenBank.lean @@ -0,0 +1,80 @@ +import Mathlib + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FreshEvenBank + +theorem even_move_embedding {α : Type*} [Fintype α] [DecidableEq α] {n : ℕ} + (hn : n + 2 ≤ Nat.card α) (s t : Fin n ↪ α) : + ∃ σ : alternatingGroup α, ∀ i, σ.val (s i) = t i := by + let := alternatingGroup.isMultiplyPretransitive α + let : MulAction.IsMultiplyPretransitive (alternatingGroup α) α n := + MulAction.isMultiplyPretransitive_of_le (by omega : n ≤ Nat.card α - 2) + (Nat.sub_le _ _) + obtain ⟨σ,hσ⟩ := MulAction.exists_smul_eq (alternatingGroup α) s t + exact ⟨σ,fun i => congrArg (fun e : Fin n ↪ α => e i) hσ⟩ + +theorem fresh_five_bank {α : Type*} [Fintype α] [DecidableEq α] (J : Finset α) + (hJ : J.card + 5 ≤ Fintype.card α) : + ∃ t : Fin 5 ↪ α, Disjoint (Finset.univ.map t) J := by + classical + have hc : 5 ≤ Jᶜ.card := by rw [Finset.card_compl]; omega + have he : Nonempty (Fin 5 ↪ {x : α // x ∈ Jᶜ}) := by + rw [Function.Embedding.nonempty_iff_card_le,Fintype.card_fin,Fintype.card_coe] + exact hc + obtain ⟨e⟩ := he + refine ⟨e.trans (Function.Embedding.subtype _),?_⟩ + apply Finset.disjoint_left.mpr + intro x hx hj + obtain ⟨i,_,rfl⟩ := Finset.mem_map.mp hx + exact Finset.mem_compl.mp (e i).property hj + +theorem even_move_disjoint_banks {α : Type*} [Fintype α] [DecidableEq α] + (s t : Fin 5 ↪ α) (hd : Disjoint (Finset.univ.map s) (Finset.univ.map t)) : + ∃ σ : alternatingGroup α, + (∀ i, σ.val (s i) = t i) ∧ + σ.val.support ⊆ (Finset.univ.map s) ∪ (Finset.univ.map t) := by + classical + let S := (Finset.univ.map s) ∪ (Finset.univ.map t) + let T := {x : α // x ∈ S} + let s' : Fin 5 ↪ T := ⟨fun i => ⟨s i,Finset.mem_union_left _ (Finset.mem_map.mpr + ⟨i,Finset.mem_univ _,rfl⟩)⟩,fun _ _ h => s.injective (congrArg Subtype.val h)⟩ + let t' : Fin 5 ↪ T := ⟨fun i => ⟨t i,Finset.mem_union_right _ (Finset.mem_map.mpr + ⟨i,Finset.mem_univ _,rfl⟩)⟩,fun _ _ h => t.injective (congrArg Subtype.val h)⟩ + have hT : Nat.card T = 10 := by + rw [Nat.card_eq_fintype_card,Fintype.card_coe] + dsimp only [S] + rw [Finset.card_union_of_disjoint hd,Finset.card_map,Finset.card_map] + simp + obtain ⟨ρ,hρ⟩ := even_move_embedding (by omega : 5+2 ≤ Nat.card T) s' t' + let e : T ↪ α := Function.Embedding.subtype _ + let σ := ρ.val.viaEmbedding e + have hσ : σ ∈ alternatingGroup α := by + change Equiv.Perm.sign (ρ.val.viaEmbedding e) = 1 + rw [Equiv.Perm.viaEmbedding,Equiv.Perm.sign_extendDomain] + exact ρ.property + refine ⟨⟨σ,hσ⟩,?_,?_⟩ + · intro i + change ρ.val.viaEmbedding e (e (s' i)) = t i + rw [Equiv.Perm.viaEmbedding_apply,hρ] + rfl + · intro x hx + by_contra hn + have he : x ∉ Set.range e := by + rintro ⟨y,rfl⟩ + exact hn y.property + exact Equiv.Perm.mem_support.mp hx (Equiv.Perm.viaEmbedding_apply_of_notMem _ _ _ he) + +end FreshEvenBank + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FullGroupAffineData.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FullGroupAffineData.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a84e6521fc932ffb27347cb48193fc379427c88 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/FullGroupAffineData.lean @@ -0,0 +1,203 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FlagArrangementControl + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section FullGroupAffineData +open Classical + +theorem fullGroupSquareShift_exists {a m : ℕ} (g : polygonFullGroup a m) + (i : Fin m) (p : GenericSquare a) : + ∃u : CutRing×CutRing,(g.val (i,p)).2.val=p.val+(ordinary u.1,ordinary u.2) := by + obtain ⟨S,hS,hcover⟩ := g.property + obtain ⟨c,hc,hi,hp⟩ := hcover (i,p) + change i=c.source at hi + refine ⟨c.shift-SquareStep.intPair (squareTranslationPeriod c.shift p),?_⟩ + rw [hi,hS c hc p hp] + apply Prod.ext <;> + simp only [translate,Int.fract,squareTranslationPeriod,SquareStep.intPair, + Prod.fst_sub,Prod.snd_sub,Prod.fst_add,Prod.snd_add,map_sub,map_intCast] <;> ring + +noncomputable def fullGroupSquareShift {a m : ℕ} (g : polygonFullGroup a m) + (i : Fin m) (p : GenericSquare a) : CutRing×CutRing := + (fullGroupSquareShift_exists g i p).choose + +theorem fullGroupSquareShift_spec {a m : ℕ} (g : polygonFullGroup a m) + (i : Fin m) (p : GenericSquare a) : + (g.val (i,p)).2.val=p.val+(ordinary (fullGroupSquareShift g i p).1, + ordinary (fullGroupSquareShift g i p).2) := (fullGroupSquareShift_exists g i p).choose_spec + +noncomputable def fullGroupAffineData {a m : ℕ} (g : polygonFullGroup a m) + (i : Fin m) (p : GenericSquare a) : Fin m × (CutRing×CutRing) := + ((g.val (i,p)).1,fullGroupSquareShift g i p) + +theorem fullGroupAffineData_chart {a m : ℕ} (g : polygonFullGroup a m) + (i : Fin m) (p : GenericSquare a) (c : TableChart a m) (hc : c.Holds g.val) + (hi : i=c.source) (hp : p∈c.domain.val) : + fullGroupAffineData g i p=(c.target,c.shift-SquareStep.intPair (squareTranslationPeriod c.shift p)) := by + have he : g.val (i,p)=(c.target,translate a c.shift p) := by rw [hi,hc p hp] + unfold fullGroupAffineData + apply Prod.ext + · change (g.val (i,p)).1=c.target + exact congrArg Prod.fst he + · have hv := fullGroupSquareShift_spec g i p + rw [he] at hv + apply Prod.ext + · apply ordinary_injective + have hx := congrArg Prod.fst hv + simpa only [translate,Int.fract,squareTranslationPeriod,SquareStep.intPair, + Prod.fst_sub,Prod.fst_add,map_sub,map_intCast,add_sub_assoc,add_right_inj] using hx.symm + · apply ordinary_injective + have hx := congrArg Prod.snd hv + simpa only [translate,Int.fract,squareTranslationPeriod,SquareStep.intPair, + Prod.snd_sub,Prod.snd_add,map_sub,map_intCast,add_sub_assoc,add_right_inj] using hx.symm + +theorem fullGroupAffineData_arrangement {a m : ℕ} (g : polygonFullGroup a m) + (i : Fin m) : HasSquareArrangement (fullGroupAffineData g i) := by + obtain ⟨S,hS,hcover⟩ := g.property + let f (c : S) (p : GenericSquare a) := (decide (p∈c.val.domain.val),squareTranslationPeriod c.val.shift p) + have hf (c : S) : HasSquareArrangement (f c) := + squareArrangement_pair (polygon_hasSquareArrangement c.val.domain.property) + (squareTranslationPeriod_arrangement c.val.shift) + obtain ⟨T,hT⟩ := squareArrangement_finite_family f hf + refine ⟨T,fun p q h => ?_⟩ + obtain ⟨c,hc,hi,hp⟩ := hcover (i,p) + have he := congrFun (hT p q h) ⟨c,hc⟩ + have hq : q∈c.domain.val := (decide_eq_decide.mp (congrArg Prod.fst he)).mp hp + rw [fullGroupAffineData_chart g i p c (hS c hc) hi hp, + fullGroupAffineData_chart g i q c (hS c hc) hi hq] + exact congrArg (fun k => (c.target,c.shift-SquareStep.intPair k)) (congrArg Prod.snd he) + +noncomputable def flagAffineData {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (i : Fin m) (z : SquareFlag a v) : Fin m × (CutRing×CutRing) := + flagValue (fullGroupAffineData g i) (fullGroupAffineData_arrangement g i) z + +theorem flagAffineData_chart {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (i : Fin m) (z : SquareFlag a v) (c : TableChart a m) (hc : c.Holds g.val) + (hi : i=c.source) (hz : flagMem c.domain z) : + flagAffineData g i z=(c.target,c.shift-SquareStep.intPair (flagShiftPeriod c.shift z)) := by + obtain ⟨N,hN,hzN,hf⟩ := flagMem_iff c.domain z + obtain ⟨M,hM,hzM,hp⟩ := squareTranslationPeriod_germ c.shift z + apply flagValue_eq + refine ⟨N∩M,hN.inter hM,⟨hzN,hzM⟩,fun p hpm hpv => ?_⟩ + rw [fullGroupAffineData_chart g i p c hc hi ((hf p hpm.1 hpv).mpr hz),hp p hpm.2 hpv] + +theorem flagAffineData_selected {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : + flagAffineData g z.1 z.2=((flagChart g z).target, + (flagChart g z).shift-SquareStep.intPair (flagShiftPeriod (flagChart g z).shift z.2)) := + flagAffineData_chart g z.1 z.2 (flagChart g z) (flagChart_spec g z).1 + (flagChart_spec g z).2.1 (flagChart_spec g z).2.2 + +theorem flagAffineData_action {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : + (flagAction g z).1=(flagAffineData g z.1 z.2).1 ∧ + (flagAction g z).2.val=z.2.val+ + (ordinary (flagAffineData g z.1 z.2).2.1,ordinary (flagAffineData g z.1 z.2).2.2) := by + rw [flagAffineData_selected] + refine ⟨rfl,?_⟩ + apply Prod.ext <;> + simp only [flagAction,flagTranslate_val,flagFract_eq,flagShiftPeriod,SquareStep.intPair, + Prod.fst_sub,Prod.snd_sub,Prod.fst_add,Prod.snd_add,map_sub,map_intCast] <;> ring + +theorem flagAffineData_conjugate {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 + simp only [SquareStep.intPair,Prod.fst_sub,Prod.snd_sub,Prod.fst_add,Prod.snd_add, + map_sub,map_intCast] <;> ring + +end FullGroupAffineData + +section FlagAffineControl +open Classical + +theorem squareArrangement_finite_range {a : ℕ} {K : Type*} (f : GenericSquare a → K) + (hf : HasSquareArrangement f) : (Set.range f).Finite := by + obtain ⟨S,hS⟩ := hf + let p (k : Set.range f) : GenericSquare a := k.property.choose + have hp (k : Set.range f) : f (p k)=k.val := k.property.choose_spec + let q (k : Set.range f) : S → Bool := fun l => squareSign l.val (p k) + have hq : Function.Injective q := by + intro k j h + apply Subtype.ext + rw [← hp k,← hp j] + exact hS (p k) (p j) (fun l hl => congrFun h ⟨l,hl⟩) + have : Finite (Set.range f) := Finite.of_injective q hq + exact Set.toFinite _ + +theorem flagValue_mem_range {a : ℕ} {v : ℝ×ℝ} {K : Type*} (f : GenericSquare a → K) + (hf : HasSquareArrangement f) (z : SquareFlag a v) : flagValue f hf z∈Set.range f := by + obtain ⟨N,hN,hz,hf'⟩ := flagValue_spec f hf z + obtain ⟨p,hp,hpv⟩ := squareSector_generic z hN hz + exact ⟨p,hf' p hp hpv⟩ + +theorem flagValue_finite_range {a : ℕ} {v : ℝ×ℝ} {K : Type*} (f : GenericSquare a → K) + (hf : HasSquareArrangement f) : (Set.range (flagValue (v:=v) f hf)).Finite := + (squareArrangement_finite_range f hf).subset (by rintro _ ⟨z,rfl⟩; exact flagValue_mem_range f hf z) + +theorem flagAffineData_finite_range {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) : + (Set.range (fun z : FlagTrackPoint a m v => flagAffineData g z.1 z.2)).Finite := by + have h (i : Fin m) : (Set.range (flagAffineData (v:=v) g i)).Finite := + flagValue_finite_range (fullGroupAffineData g i) (fullGroupAffineData_arrangement g i) + apply (Set.finite_iUnion h).subset + rintro _ ⟨z,rfl⟩ + exact Set.mem_iUnion.mpr ⟨z.1,⟨z.2,rfl⟩⟩ + +theorem flagAffineData_bounded {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (f : (CutRing×CutRing) → ℝ) : + ∃C : ℝ,0 ≤ C ∧ ∀z : FlagTrackPoint a m v,|f (flagAffineData g z.1 z.2).2| ≤ C := by + let S := (flagAffineData_finite_range (v:=v) g).toFinset + refine ⟨∑d∈S,|f d.2|,Finset.sum_nonneg (fun _ _ => abs_nonneg _),fun z => ?_⟩ + apply Finset.single_le_sum (f:=fun d : Fin m × (CutRing×CutRing) => |f d.2|) (fun _ _ => abs_nonneg _) + change flagAffineData g z.1 z.2∈(flagAffineData_finite_range (v:=v) g).toFinset + exact (Set.Finite.mem_toFinset _).mpr ⟨z,rfl⟩ + +theorem flagAffineData_separator_control {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) : + ∃R : ℝ,0 ≤ R ∧ ∀(s κ : ℝ),0 < s → 0 < κ → R ≤ κ/s → + ∀(i : Fin m) (z w : SquareFlag a v),separatorMatrix (thresholdLaw s κ) z w ≠ 0 → + flagAffineData g i z=flagAffineData g i w := by + choose R hR hcontrol using fun i : Fin m => separatorMatrix_controls_step (v:=v) + (fullGroupAffineData g i) (fullGroupAffineData_arrangement g i) + refine ⟨∑i,R i,Finset.sum_nonneg (fun i _ => hR i),fun s κ hs hκ hbound i z w hp => ?_⟩ + exact hcontrol i s κ hs hκ ((Finset.single_le_sum + (fun j _ => hR j) (Finset.mem_univ i)).trans hbound) z w hp + +theorem flagAffineData_inverse {a m : ℕ} {v : ℝ×ℝ} (g : polygonFullGroup a m) + (z : FlagTrackPoint a m v) : + flagAffineData g⁻¹ (flagAction g z).1 (flagAction g z).2=(z.1,-(flagAffineData g z.1 z.2).2) := by + have he : flagAction g⁻¹ (flagAction g z)=z := by rw [← flagAction_mul,inv_mul_cancel,flagAction_one] + have hf := flagAffineData_action g z + have hb := flagAffineData_action g⁻¹ (flagAction g z) + rw [he] at hb + apply Prod.ext + · exact hb.1.symm + · rw [hf.2] at hb + apply Prod.ext + · apply ordinary_injective + have hh := congrArg Prod.fst hb.2 + simp only [Prod.fst_add] at hh + simp only [Prod.fst_neg,map_neg] + linarith + · apply ordinary_injective + have hh := congrArg Prod.snd hb.2 + simp only [Prod.snd_add] at hh + simp only [Prod.snd_neg,map_neg] + linarith + +end FlagAffineControl + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/GoodRowSeparators.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/GoodRowSeparators.lean new file mode 100644 index 0000000000000000000000000000000000000000..16e31dee6aa2c4e5a310fc6735c56dda37803bd4 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/GoodRowSeparators.lean @@ -0,0 +1,275 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FinePatchAtlas +import OAI.GroupTheory.SimpleAmenable.RandomFields.UniformThresholdCDF +import OAI.GroupTheory.SimpleAmenable.Arithmetic.UniformLatticeRiemann +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.DirectionStripCounts + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section GoodRowSeparators +open Classical MeasureTheory ProbabilityTheory + +theorem flagSeparates_near_row {a : ℕ} {v : ℝ×ℝ} {j : Fin 4} {c : CutRing} + {z w : SquareFlag a v} (h : FlagSeparates j c z w) : + |cutForm a j z.val-ordinary c| ≤ (1+|ordinary (cutTau^a)|)*dist z.val w.val := by + have hc := flagSeparates_ordinary_bound h + have hb := abs_le.mp (cutForm_dist_bound a j z.val w.val) + rcases le_total (cutForm a j z.val) (cutForm a j w.val) with hh|hh + · rw [min_eq_left hh,max_eq_right hh] at hc + exact abs_le.mpr ⟨by linarith [hc.1,hc.2],by linarith [hc.1,hc.2]⟩ + · rw [min_eq_right hh,max_eq_left hh] at hc + exact abs_le.mpr ⟨by linarith [hc.1,hc.2],by linarith [hc.1,hc.2]⟩ + +theorem directionNoCutProbability_eq_one {a : ℕ} {v : ℝ×ℝ} {s κ : ℝ} + (hs : 0 < s) (hκ : 0 < κ) (j : Fin 4) (z w : SquareFlag a v) + (h : ∀c, |conjugate c| ≤ 2*κ/s → ¬ FlagSeparates j c z w) : + directionNoCutProbability s κ j z w=1 := by + have hi : κ/s < 2*κ/s := (div_lt_div_iff_of_pos_right hs).mpr (by linarith) + have hinter : Set.Icc (κ/s) (2*κ/s) ∩ directionNoCut j z w = Set.Icc (κ/s) (2*κ/s) := by + apply Set.inter_eq_left.mpr + intro t ht c hc + exact h c (hc.trans ht.2) + have he : cond volume (Set.Icc (κ/s) (2*κ/s)) (directionNoCut j z w)=1 := by + calc + _ = cond volume (Set.Icc (κ/s) (2*κ/s)) (Set.Icc (κ/s) (2*κ/s)) := by + rw [cond_apply measurableSet_Icc,cond_apply measurableSet_Icc,hinter,Set.inter_self] + _ = 1 := cond_apply_self + (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_zero_iff.mpr (sub_pos.mpr hi)) + (by rw [Real.volume_Icc]; exact ENNReal.ofReal_ne_top) + exact congrArg ENNReal.toReal he + +theorem separatorMatrix_eq_one_on_good_row {a : ℕ} {v : ℝ×ℝ} {s κ : ℝ} + (hs : 0 < s) (hκ : 0 < κ) (z w : SquareFlag a v) (hw : dist z.val w.val ≤ s) + (hz : ∀j c, |conjugate c| ≤ 2*κ/s → + (1+|ordinary (cutTau^a)|)*s < |cutForm a j z.val-ordinary c|) : + separatorMatrix (thresholdLaw s κ) z w=1 := by + rw [separatorMatrix_product hs hκ] + suffices ∀j,directionNoCutProbability s κ j z w=1 by simp [this] + intro j + apply directionNoCutProbability_eq_one hs hκ + intro c hc hsep + have hb := (flagSeparates_near_row hsep).trans + (mul_le_mul_of_nonneg_left hw (by positivity)) + exact (not_le_of_gt (hz j c hc)) hb + +theorem squareFlag_cutForm_bound {a : ℕ} {v : ℝ×ℝ} (j : Fin 4) (z : SquareFlag a v) : + |cutForm a j z.val| ≤ 1+|ordinary (cutTau^a)| := by + have hn : ‖z.val‖ ≤ (1:ℝ) := by + rw [Prod.norm_def] + apply max_le + · rw [Real.norm_eq_abs,abs_of_nonneg z.property.2.1.1] + exact z.property.2.1.2 + · rw [Real.norm_eq_abs,abs_of_nonneg z.property.2.2.1.1] + exact z.property.2.2.1.2 + have hz : cutForm a j 0=0 := by fin_cases j <;> simp [cutForm] + have hh := cutForm_dist_bound a j z.val 0 + rw [hz,sub_zero,dist_zero_right] at hh + exact hh.trans (by nlinarith [abs_nonneg (ordinary (cutTau^a))]) + +def flagBadSeparatorRow {a m D : ℕ} {v : ℝ×ℝ} (s κ R : ℝ) : Set (FlagSite a m D v) := + {z | z∈flagSiteBox R ∧ ∃j c, |conjugate c| ≤ 2*κ/s ∧ + |cutForm a j z.val.2.val-ordinary c| ≤ (1+|ordinary (cutTau^a)|)*s} + +theorem flagBadSeparatorRow_card_bound {a m D : ℕ} {v : ℝ×ℝ} (hD : 0 < D) + {Q κ s N : ℝ} (hQ : 0 < Q) (hκ : 0 < κ) (hs : 0 < s) + (hs₁ : s ≤ 1) (hN : 1 ≤ N) (hscale : 1 ≤ s*N) + (S : Finset (FlagSite a m D v)) (hS : ∀z∈S,z∈flagBadSeparatorRow s κ (Q*N)) : + (S.card:ℝ) ≤ 4*(m*(4*(D:ℝ)^2*(1+|conjugate (cutTau^a)|)*(1+|ordinary (cutTau^a)|)*Q+2)* + (2*(D:ℝ)^2*Q+2)*(16*(1+|ordinary (cutTau^a)|)+2))*(κ+s)*N^2 := by + let L : ℝ := 1+|ordinary (cutTau^a)| + have hL : 0 ≤ L := by dsimp [L]; positivity + let row := fun j : Fin 4 => S.filter (fun z => ∃c : CutRing, |conjugate c| ≤ 2*κ/s ∧ + |cutForm a j z.val.2.val-ordinary c| ≤ L*s) + have hh : S ⊆ Finset.univ.biUnion row := by + intro z hz + obtain ⟨j,c,hc,hd⟩ := (hS z hz).2 + exact Finset.mem_biUnion.mpr ⟨j,Finset.mem_univ _,Finset.mem_filter.mpr ⟨hz,c,hc,hd⟩⟩ + have hc j := exceptional_direction_rows hD j (show 0 ≤ 2*L by positivity) hL hQ hκ hs hN hscale + (row j) (by + intro z hz + obtain ⟨hzS,c,hc,hd⟩ := Finset.mem_filter.mp hz + refine ⟨c,?_,hc,(hS z hzS).1,hd⟩ + have hb := squareFlag_cutForm_bound j z.val.2 + have htri := abs_sub_le (ordinary c) (cutForm a j z.val.2.val) 0 + rw [sub_zero,sub_zero,abs_sub_comm (ordinary c)] at htri + change |cutForm a j z.val.2.val| ≤ L at hb + exact htri.trans (by nlinarith)) + have hn : S.card ≤ ∑j : Fin 4,(row j).card := + (Finset.card_le_card hh).trans Finset.card_biUnion_le + have hn' : (S.card:ℝ) ≤ ∑j : Fin 4,((row j).card:ℝ) := by exact_mod_cast hn + refine hn'.trans ((Finset.sum_le_sum (fun j _ => hc j)).trans_eq ?_) + simp only [Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul] + dsimp [L] + ring + +end GoodRowSeparators + +section NormalizedTentMass +open Classical MeasureTheory + +noncomputable def unitTent (x : ℝ) : ℝ := max (1-|x|) 0 + +theorem unitTent_bounds (x : ℝ) : 0 ≤ unitTent x ∧ unitTent x ≤ 1 := by + constructor + · exact le_max_right _ _ + · exact max_le (by linarith [abs_nonneg x]) zero_le_one + +theorem unitTent_lipschitz : LipschitzWith 1 unitTent := by + apply LipschitzWith.of_dist_le_mul + intro x y + simp only [Real.dist_eq,NNReal.coe_one,one_mul] + calc + _ ≤ |(1-|x|)-(1-|y|)| := abs_max_sub_max_le_abs _ _ 0 + _ = abs (abs x - abs y) := by rw [show (1-|x|)-(1-|y|)=-(abs x - abs y) by ring,abs_neg] + _ ≤ |x-y| := abs_abs_sub_abs_le_abs_sub x y + +theorem unitTent_zero {x : ℝ} (hx : 1 ≤ |x|) : unitTent x=0 := + max_eq_right (by linarith) + +theorem unitTent_compact : HasCompactSupport unitTent := by + apply HasCompactSupport.intro (isCompact_Icc (a:=(-1:ℝ)) (b:=1)) + intro x hx + by_contra hn + have hh : |x| < 1 := lt_of_not_ge (fun h => hn (unitTent_zero h)) + exact hx ⟨(abs_lt.mp hh).1.le,(abs_lt.mp hh).2.le⟩ + +theorem unitTent_integral : ∫x,unitTent x=1 := by + have hsupp : Function.support unitTent ⊆ Set.Ioc (-1) 1 := by + intro x hx + have hh : |x| < 1 := lt_of_not_ge (fun h => hx (unitTent_zero h)) + exact ⟨(abs_lt.mp hh).1,(abs_lt.mp hh).2.le⟩ + rw [← intervalIntegral.integral_eq_integral_of_support_subset hsupp] + rw [← intervalIntegral.integral_add_adjacent_intervals + (unitTent_lipschitz.continuous.intervalIntegrable (-1) 0) + (unitTent_lipschitz.continuous.intervalIntegrable 0 1)] + have hneg : Set.EqOn unitTent (fun x => 1+x) (Set.uIcc (-1) 0) := by + intro x hx + rw [Set.uIcc_of_le (by norm_num)] at hx + simp only [unitTent,abs_of_nonpos hx.2,sub_neg_eq_add] + exact max_eq_left (by linarith [hx.1]) + have hpos : Set.EqOn unitTent (fun x => 1-x) (Set.uIcc 0 1) := by + intro x hx + rw [Set.uIcc_of_le (by norm_num)] at hx + simp only [unitTent,abs_of_nonneg hx.1] + exact max_eq_left (by linarith [hx.2]) + rw [intervalIntegral.integral_congr hneg,intervalIntegral.integral_congr hpos, + intervalIntegral.integral_add (f:=fun _ : ℝ => (1:ℝ)) (g:=fun x : ℝ => x) (continuous_const.intervalIntegrable _ _) + (continuous_id.intervalIntegrable _ _), + intervalIntegral.integral_sub (f:=fun _ : ℝ => (1:ℝ)) (g:=fun x : ℝ => x) (continuous_const.intervalIntegrable _ _) + (continuous_id.intervalIntegrable _ _)] + norm_num [intervalIntegral.integral_const,integral_id] + +noncomputable def doubleUnitTent (x : Fin 2 → ℝ) : ℝ := ∏i,unitTent (x i) + +theorem doubleUnitTent_bounds (x : Fin 2 → ℝ) : 0 ≤ doubleUnitTent x ∧ doubleUnitTent x ≤ 1 := by + exact ⟨Finset.prod_nonneg (fun i _ => (unitTent_bounds (x i)).1), + Finset.prod_le_one₀ (fun i _ => (unitTent_bounds (x i)).1) (fun i _ => (unitTent_bounds (x i)).2)⟩ + +theorem doubleUnitTent_lipschitz : LipschitzWith 2 doubleUnitTent := by + apply LipschitzWith.of_dist_le_mul + intro x y + rw [Real.dist_eq] + have hp := unit_product_sub_bound Finset.univ (fun i => unitTent (x i)) (fun i => unitTent (y i)) + (fun i _ => unitTent_bounds (x i)) (fun i _ => unitTent_bounds (y i)) + calc + _ ≤ ∑i : Fin 2,|unitTent (x i)-unitTent (y i)| := hp + _ ≤ ∑i : Fin 2,dist x y := by + apply Finset.sum_le_sum + intro i _ + have hh := unitTent_lipschitz.dist_le_mul (x i) (y i) + rw [Real.dist_eq,NNReal.coe_one,one_mul] at hh + exact hh.trans (dist_le_pi_dist x y i) + _ = _ := by simp + +theorem doubleUnitTent_zero {x : Fin 2 → ℝ} (hx : 1 < ‖x‖) : doubleUnitTent x=0 := by + have hh : ∃i,1 < |x i| := by + by_contra hn + push Not at hn + have he : ‖x‖ ≤ (1:ℝ) := by + rw [← dist_zero_right] + exact (dist_pi_le_iff zero_le_one).mpr (fun i => by simpa [Real.dist_eq] using hn i) + exact (not_le_of_gt hx) he + obtain ⟨i,hi⟩ := hh + exact Finset.prod_eq_zero (Finset.mem_univ i) (unitTent_zero hi.le) + +theorem doubleUnitTent_integral : ∫x,doubleUnitTent x=1 := by + unfold doubleUnitTent + rw [integral_fintype_prod_volume_eq_prod] + simp [unitTent_integral] + +noncomputable def pairedUnitTent (x : (Fin 2 → ℝ)×(Fin 2 → ℝ)) : ℝ := + doubleUnitTent x.1*doubleUnitTent x.2 + +theorem pairedUnitTent_bounds (x : (Fin 2 → ℝ)×(Fin 2 → ℝ)) : + 0 ≤ pairedUnitTent x ∧ pairedUnitTent x ≤ 1 := by + exact ⟨mul_nonneg (doubleUnitTent_bounds x.1).1 (doubleUnitTent_bounds x.2).1, + (mul_le_of_le_one_left (doubleUnitTent_bounds x.2).1 + (doubleUnitTent_bounds x.1).2).trans (doubleUnitTent_bounds x.2).2⟩ + +theorem unit_mul_sub_bound {a b c d : ℝ} (ha : a∈Set.Icc (0:ℝ) 1) (hb : b∈Set.Icc (0:ℝ) 1) + (hc : c∈Set.Icc (0:ℝ) 1) (hd : d∈Set.Icc (0:ℝ) 1) : + |a*b-c*d| ≤ |a-c|+|b-d| := by + have h := unit_product_sub_bound (Finset.univ : Finset (Fin 2)) ![a,b] ![c,d] + (by intro i _; fin_cases i <;> assumption) (by intro i _; fin_cases i <;> assumption) + simpa [Fin.prod_univ_two,Fin.sum_univ_two] using h + +theorem pairedUnitTent_lipschitz : LipschitzWith 4 pairedUnitTent := by + apply LipschitzWith.of_dist_le_mul + intro x y + rw [Real.dist_eq] + have hh := unit_mul_sub_bound (doubleUnitTent_bounds x.1) (doubleUnitTent_bounds x.2) + (doubleUnitTent_bounds y.1) (doubleUnitTent_bounds y.2) + have h₁ := doubleUnitTent_lipschitz.dist_le_mul x.1 y.1 + have h₂ := doubleUnitTent_lipschitz.dist_le_mul x.2 y.2 + rw [Real.dist_eq] at h₁ h₂ + change |pairedUnitTent x-pairedUnitTent y| ≤ _ at hh + have hd₁ : dist x.1 y.1 ≤ dist x y := by rw [Prod.dist_eq]; exact le_max_left _ _ + have hd₂ : dist x.2 y.2 ≤ dist x y := by rw [Prod.dist_eq]; exact le_max_right _ _ + norm_num at h₁ h₂ ⊢ + linarith + +theorem pairedUnitTent_zero {x : (Fin 2 → ℝ)×(Fin 2 → ℝ)} (hx : 1 < ‖x‖) : + pairedUnitTent x=0 := by + rw [Prod.norm_def,lt_max_iff] at hx + rcases hx with hh|hh + · simp [pairedUnitTent,doubleUnitTent_zero hh] + · simp [pairedUnitTent,doubleUnitTent_zero hh] + +theorem pairedUnitTent_integrable : Integrable pairedUnitTent := by + apply pairedUnitTent_lipschitz.continuous.integrable_of_hasCompactSupport + apply HasCompactSupport.intro (isCompact_closedBall (0 : (Fin 2 → ℝ)×(Fin 2 → ℝ)) 1) + intro x hx + exact pairedUnitTent_zero (lt_of_not_ge (by simpa only [Metric.mem_closedBall,dist_zero_right] using hx)) + +theorem pairedUnitTent_integral : ∫x,pairedUnitTent x=1 := by + change (∫x : (Fin 2 → ℝ)×(Fin 2 → ℝ),doubleUnitTent x.1*doubleUnitTent x.2 ∂ + (volume.prod volume))=1 + rw [integral_prod_mul,doubleUnitTent_integral,mul_one] + +theorem pairedQuadratic_tent_mass {d s t : ℝ} (hd : 1 ≤ d) (hs : 0 < s) (ht : 0 < t) + (hst : 36 ≤ s*t) (q : (Fin 2 → ℝ)×(Fin 2 → ℝ)) : + ∃S : Finset (CutRing×CutRing), + (∀z,z∉S → pairedUnitTent (q+pairedQuadraticEmbedding d s t z)=0) ∧ + |(5/(d^4*s^2*t^2))*(∑z∈S,pairedUnitTent (q+pairedQuadraticEmbedding d s t z))-1| ≤ + 38880/(d*Real.sqrt (s*t)) := by + obtain ⟨S,hS,hh⟩ := pairedQuadratic_riemann_uniform hd hs ht hst (show 0 ≤ (1:ℝ) by norm_num) + pairedUnitTent_integrable pairedUnitTent_lipschitz (fun x hx => pairedUnitTent_zero hx) q + refine ⟨S,hS,?_⟩ + rw [pairedUnitTent_integral] at hh + convert hh using 1 + norm_num + ring + +end NormalizedTentMass + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveNeighborhoodActions.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveNeighborhoodActions.lean new file mode 100644 index 0000000000000000000000000000000000000000..91dc58881c400e0de4eb3b4b131f5841e25984d1 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveNeighborhoodActions.lean @@ -0,0 +1,239 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InactiveQuadrantAction +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InactiveQuadrantAnchors +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentInwardModel +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InwardMargins + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section InactiveNeighborhoodActions + +theorem strict_rectangle_ball (l v : Fin 2 → ℝ) (z : ℝ × ℝ) + (hz : ∀ k, l k realCoordinate y k) := by + fin_cases k + · exact continuous_fst + · exact continuous_snd + exact (isOpen_lt continuous_const hc).inter (isOpen_lt hc continuous_const) + obtain ⟨δ,hδ,hball⟩ := Metric.isOpen_iff.mp hO z (Set.mem_iInter.mpr hz) + exact ⟨δ,hδ,fun y hy => Set.mem_iInter.mp (hball hy)⟩ + +namespace InitialCoverSystem.RectangularAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.RectangularAtlas) + +theorem inactive_near_action_neighborhood (hlarge : 20 ≤ m+1) + (hr : 0 (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) e).val) (coordinateRectangle a L V).val → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles n) q (coordinateRectangle a L V)) → + ∀ (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)), + ∀ x ∈ f.range, + A.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s)*x* + (A.slope (by omega) d v (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + (if positive then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)*x* + (if positive then B.c (subtypeAlternatingHom I.val (universalProjection _ s)) else 1)⁻¹ := by + obtain ⟨u,positive,hline,hsign,hquad⟩ := inactive_slope_quadrant_anchor a d + (integralCutForm a (slopeDirection d) v) A.radius z hinactive hnear + obtain ⟨δ,hδ,hball⟩ := strict_rectangle_ball + (fun k => ordinary (pointCoordinate u k)+ordinary (signQuadrantLower A.radius d positive k)) + (fun k => ordinary (pointCoordinate u k)+ordinary (signQuadrantUpper A.radius d positive k)) z hquad + refine ⟨δ,hδ,positive,hsign,?_⟩ + intro L V hLV hclip hsmall n q hW f hf hc I s x hx + have hL : dist (ordinary (L 0),ordinary (L 1)) z<δ := by + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨(hsmall 0).1,(hsmall 1).1⟩ + have hV : dist (ordinary (V 0),ordinary (V 1)) z<δ := by + rw [Prod.dist_eq,Real.dist_eq,Real.dist_eq,max_lt_iff] + exact ⟨(hsmall 0).2,(hsmall 1).2⟩ + have hlo (k : Fin 2) := (hball (ordinary (L 0),ordinary (L 1)) hL k).1.le + have hup (k : Fin 2) := (hball (ordinary (V 0),ordinary (V 1)) hV k).2.le + exact A.inactive_quadrant_action hlarge hr d v u positive hline.symm L V hLV hclip + (fun k => by have he : realCoordinate (ordinary (L 0),ordinary (L 1)) k=ordinary (L k) := by fin_cases k <;> rfl + simpa only [he] using hlo k) + (fun k => by have he : realCoordinate (ordinary (V 0),ordinary (V 1)) k=ordinary (V k) := by fin_cases k <;> rfl + simpa only [he] using hup k) n q hW f hf hc I s x hx + +end InitialCoverSystem.RectangularAtlas +end InactiveNeighborhoodActions + +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) {ι : Type*} + +def InwardChartNeighborhood (t : VertexType (commonVertexDenominator a)) (u : CutRing × CutRing) + (z : ℝ × ℝ) : Prop := + ∀ y : ℝ × ℝ, dist y z axisDirection d.1) + let K : Sum ι (Fin 2 × Bool) → CutRing := Sum.elim c (fun d => if d.2 then 1 else 0) + obtain ⟨t,u,hcell,hactive⟩ := C.simultaneous_active_neighborhood ha J K z + have hb (k : Fin 2) (hk : realCoordinate z k=0 ∨ realCoordinate z k=1) : + ∃ b : Bool, cutForm a (J (.inr (k,b))) z=ordinary (K (.inr (k,b))) := by + have haxis : cutForm a (axisDirection k) z=realCoordinate z k := by fin_cases k <;> rfl + rcases hk with hk | hk + · exact ⟨false,by simpa only [J,K,Sum.elim_inr,Bool.false_eq_true,↓reduceIte,map_zero,haxis] using hk⟩ + · exact ⟨true,by simpa only [J,K,Sum.elim_inr,↓reduceIte,map_one,haxis] using hk⟩ + refine ⟨⟨(t,u),hcell,(fun i hi => (hactive (.inl i) hi).1), + (fun i hi => (hactive (.inl i) hi).2),?_,?_⟩⟩ + · intro k hk + obtain ⟨b,hb⟩ := hb k hk + have he := congrArg ordinary (hactive (.inr (k,b)) hb).1 + have haxis : cutForm a (axisDirection k) z=realCoordinate z k := by fin_cases k <;> rfl + change ordinary (integralCutForm a (axisDirection k) (u+C.anchors t (axisDirection k)))=_ at he + rw [integralCutForm_axis] at he + exact he.trans (by simpa only [J,Sum.elim_inr,haxis] using hb.symm) + · intro k hk + obtain ⟨b,hb⟩ := hb k hk + exact (hactive (.inr (k,b)) hb).2 + +namespace InwardChart +variable {C} {j : ι → Fin 4} {c : ι → CutRing} {z : ℝ × ℝ} (T : C.InwardChart j c z) + +theorem canonical_mem (hr : 0 ⟨(T.neighborhood p.val hp k).1.le,(T.neighborhood p.val hp k).2⟩) + +theorem assignment_realized [Finite ι] (hr : 0 cutPolygon a (j i) (c i)) q= + polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p := + C.localDecision_assignment_realized hr T.vertex T.offset j c z hz₁ hz₂ + T.active_anchor T.boundary_anchor T.active_bound T.boundary_bound p hp N hN hz + +theorem local_decisions_eq (hr : 0 C.localDecision T.vertex T.offset z (j i) (c i)) p= + polygonAssignment (localCutFamily j c z) p := by + classical + have hy : p.val=(Int.fract p.val.1,Int.fract p.val.2) := by + rw [Int.fract_eq_self.mpr p.property.1,Int.fract_eq_self.mpr p.property.2.1] + have hcell k := (T.neighborhood p.val hp k).imp le_of_lt le_of_lt + funext i + apply decide_eq_decide.mpr + by_cases hi : cutForm a (j i) z=ordinary (c i) + · have hd := C.positiveDecision_planar hr T.vertex T.offset (j i) (T.active_bound i hi) p p.val hy hcell + rw [T.active_anchor i hi] at hd + simp only [localDecision,localCutFamily,ite_eq_left hi] + change (p ∉ (C.positiveDecision T.vertex T.offset (j i)).val) ↔ cutForm a (j i) p.val C.localDecision T.vertex T.offset z (j i) (c i)) + (polygonFormalMask (fun i => cutPolygon a (j i) (c i)) (R i)) + +theorem polygons_assignment_realized [Finite ι] {κ : Type*} + (hr : 0 halfPlane a (j i) (c i)) (R k).val) + (p : GenericSquare a) (hp : p ∈ (C.inwardMargin T.vertex T.offset z).val) + (N : Set (ℝ × ℝ)) (hN : IsOpen N) (hz : z ∈ N) : + ∃ q : GenericSquare a, q.val ∈ N ∧ polygonAssignment R q=polygonAssignment (T.polygons R) p := by + obtain ⟨q,hq,he⟩ := T.assignment_realized hr hz₁ hz₂ p hp N hN hz + refine ⟨q,hq,?_⟩ + funext k + apply decide_eq_decide.mpr + change (q ∈ (R k).val) ↔ polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p ∈ + polygonFormalMask (fun i => cutPolygon a (j i) (c i)) (R k) + rw [← he] + exact (polygonFormalMask_mem _ (R k) (hR k) q).symm + +theorem polygons_locally_eq [Finite ι] {κ : Type*} + (hr : 0 halfPlane a (j i) (c i)) (R k).val) : + ∃ N : Set (ℝ × ℝ), IsOpen N ∧ z ∈ N ∧ ∀ p : GenericSquare a, p.val ∈ N → + p ∈ (C.inwardMargin T.vertex T.offset z).val ∧ ∀ k, p ∈ (T.polygons R k).val ↔ p ∈ (R k).val := by + obtain ⟨O,hO,hz,hlocal⟩ := localPolygonFamily_locally_eq j c z R hR + refine ⟨O ∩ Metric.ball z (C.epsilon/2),hO.inter Metric.isOpen_ball, + ⟨hz,by simp only [Metric.mem_ball,dist_self]; linarith [C.positive]⟩,?_⟩ + intro p hp + refine ⟨T.canonical_mem hr p hp.2,fun k => ?_⟩ + have he := T.local_decisions_eq hr p hp.2 + change polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p ∈ + polygonFormalMask (fun i => cutPolygon a (j i) (c i)) (R k) ↔ _ + rw [he] + exact hlocal p hp.1 k + +end InwardChart +end ConcurrentGeometry + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveQuadrantAction.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveQuadrantAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..2846ddddc06b759838a6222bc85c886c9e7a8d4e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveQuadrantAction.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.RectangularAtlas +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GlobalSignControl + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement + +theorem signQuadrant_bounds (s : CutRing) (hs : 0 ≤ ordinary s) + (d : Fin 2) (positive : Bool) (j : Fin 2) : + -ordinary s ≤ ordinary (signQuadrantLower s d positive j) ∧ + ordinary (signQuadrantUpper s d positive j) ≤ ordinary s := by + cases positive <;> by_cases h : j=d <;> + simp [signQuadrantLower,signQuadrantUpper,h] <;> linarith + +namespace InitialCoverSystem +namespace RectangularAtlas +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + {B : InitialCoverSystem a r m hm M} + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] (A : B.RectangularAtlas) + +theorem inactive_quadrant_action (hlarge : 20 ≤ m+1) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) + (d : Fin 2) (z z' : CutRing × CutRing) (positive : Bool) + (hline : integralCutForm a (slopeDirection d) z=integralCutForm a (slopeDirection d) z') + (L V : Fin 2 → CutRing) (hLV : ∀ j, ordinary (L j) ≤ ordinary (V j)) + (hz : ∀ j, -ordinary r ≤ ordinary (L j)-ordinary (pointCoordinate z j) ∧ + ordinary (V j)-ordinary (pointCoordinate z j) ≤ ordinary r) + (hlo : ∀ j, ordinary (pointCoordinate z' j)+ordinary (signQuadrantLower A.radius d positive j) ≤ ordinary (L j)) + (hup : ∀ j, ordinary (V j) ≤ ordinary (pointCoordinate z' j)+ordinary (signQuadrantUpper A.radius d positive j)) + (n : ℕ) (q : Fin 2 → ℤ) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) + (coordinateWindowPrimitives n q) i).val) (coordinateRectangle a L V).val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hf : B.AlignedSmallSupported f) + (hc : SmallControlled B.c f (B.windowSector (by omega) n (A.rectangles n) q (coordinateRectangle a L V))) + (I : ControlAlphabet (Fin (m+1))) (s : UniversalExtension (alternatingGroup I.val)) + (t : BoundedRelationCover M (alternatingGenerator a r m hm)) (ht : t ∈ f.range) : + A.slope (by omega) d z (universalMap (subtypeAlternatingHom I.val) s)*t* + (A.slope (by omega) d z (universalMap (subtypeAlternatingHom I.val) s))⁻¹ = + (if positive then B.c (subtypeAlternatingHom I.val (universalProjection (alternatingGroup I.val) s)) else 1)*t* + (if positive then B.c (subtypeAlternatingHom I.val (universalProjection (alternatingGroup I.val) s)) else 1)⁻¹ := by + have hbound (j : Fin 2) := signQuadrant_bounds A.radius A.radius_pos.le d positive j + have hdiff (j : Fin 2) : + |ordinary (L j)-ordinary (pointCoordinate z' j)| ≤ ordinary A.radius ∧ + |ordinary (V j)-ordinary (pointCoordinate z' j)| ≤ ordinary A.radius := by + have hb := hbound j + have hl := hlo j + have hu := hup j + have hlv := hLV j + constructor <;> apply abs_le.mpr <;> constructor <;> linarith + have hz' (j : Fin 2) : -ordinary r ≤ ordinary (L j)-ordinary (pointCoordinate z' j) ∧ + ordinary (V j)-ordinary (pointCoordinate z' j) ≤ ordinary r := by + have hh := hdiff j + have h₁ := (abs_le.mp hh.1).1 + have h₂ := (abs_le.mp hh.2).2 + constructor <;> linarith [A.radius_small] + have he := A.slope_line_action hlarge hr d z z' hline L V hLV hz hz' + (ordinary z'.1,ordinary z'.2) (by rw [cutForm_ordinary,hline]) + (fun j => by + have hh := hdiff j + have hh' : realCoordinate (ordinary z'.1,ordinary z'.2) j=ordinary (pointCoordinate z' j) := by + fin_cases j <;> rfl + rw [hh'] + constructor <;> linarith [A.radius_small]) n q hW f hf hc I s t ht + rw [he] + have hlab (j : Fin 2) : + symmetricWindowStart A.radius j ≤ endpointLabel (signQuadrantLower A.radius d positive j) ∧ + endpointLabel (signQuadrantLower A.radius d positive j) < + symmetricWindowStart A.radius j+symmetricWindowLength A.radius := by + unfold signQuadrantLower + split <;> split <;> first | exact (symmetricWindow_labels A.radius j).1 | exact (symmetricWindow_labels A.radius j).2.1 + have hvab (j : Fin 2) : + symmetricWindowStart A.radius j ≤ endpointLabel (signQuadrantUpper A.radius d positive j) ∧ + endpointLabel (signQuadrantUpper A.radius d positive j) < + symmetricWindowStart A.radius j+symmetricWindowLength A.radius := by + unfold signQuadrantUpper + split <;> split <;> first | exact (symmetricWindow_labels A.radius j).2.1 | exact (symmetricWindow_labels A.radius j).2.2 + have hside := signQuadrant_side (a := a) r A.radius hr + ⟨A.radius_pos,by linarith [A.radius_small]⟩ d positive + have hinc : coordinateRectangle a L V ≤ spatialTranslate z' + (coordinateRectangle a (signQuadrantLower A.radius d positive) (signQuadrantUpper A.radius d positive)) := by + rw [spatialTranslate_coordinateRectangle] + apply coordinateRectangle_mono L V _ _ + · intro j; simpa only [map_add,pointCoordinate,add_comm] using hlo j + · exact hLV + · intro j; simpa only [map_add,pointCoordinate,add_comm] using hup j + · intro j + have hb := hbound j + simp only [map_add,add_sub_add_right_eq_sub] + linarith [A.radius_small,hr.2] + have hc' := B.all_rectangle_control_to_sign hlarge A.rectangles _ _ A.u A.quadrants + d z' positive _ _ hlab hvab hside n q _ hW hinc f hf hc + have ht' := B.tangentSign_constant_action hlarge _ _ A.u A.quadrants d z' positive f hf hc' I s t ht + have hs := B.tangentSign_eq (by omega) A.k _ A.p _ A.u A.u A.charts A.quadrants d z' true + simpa only [slope,hs] using ht' + +end RectangularAtlas +end InitialCoverSystem + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveQuadrantAnchors.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveQuadrantAnchors.lean new file mode 100644 index 0000000000000000000000000000000000000000..a799e227a527f3b67df19043e4409dc328491381 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InactiveQuadrantAnchors.lean @@ -0,0 +1,104 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.LocalChartDecisions + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InactiveQuadrantAnchors + +theorem positive_slope_quadrant_anchor (b c : CutRing) (hb : 1 ≤ ordinary b) + (x y : ℝ) (h : 0 < y-ordinary b*x-ordinary c) : + ∃ u v : CutRing, v-b*u=c ∧ + 0 < ordinary u-x ∧ ordinary u-x < y-ordinary b*x-ordinary c ∧ + 0 < y-ordinary v ∧ y-ordinary v < y-ordinary b*x-ordinary c := by + let δ := y-ordinary b*x-ordinary c + have hb' : 0 < ordinary b := by linarith + have hδ : 0 < δ := h + have hinterval : x+(δ/4)/ordinary b < x+(3*δ/4)/ordinary b := by + apply add_lt_add_right + exact (div_lt_div_iff_of_pos_right hb').mpr (by linarith) + obtain ⟨u,hu,hu'⟩ := exists_cut_between hinterval + have hL : δ/4 < (ordinary u-x)*ordinary b := + (div_lt_iff₀ hb').mp (by linarith) + have hU : (ordinary u-x)*ordinary b < 3*δ/4 := + (lt_div_iff₀ hb').mp (by linarith) + have hux : 0 < ordinary u-x := by nlinarith + refine ⟨u,b*u+c,by ring,hux,?_,?_,?_⟩ + · nlinarith + · simp only [map_add,map_mul] + dsimp [δ] at hL hU + nlinarith + · simp only [map_add,map_mul] + dsimp [δ] at hL hU + nlinarith + +theorem negative_slope_quadrant_anchor (b c : CutRing) (hb : 1 ≤ ordinary b) + (x y : ℝ) (h : y-ordinary b*x-ordinary c < 0) : + ∃ u v : CutRing, v-b*u=c ∧ + 0 < x-ordinary u ∧ x-ordinary u < -(y-ordinary b*x-ordinary c) ∧ + 0 < ordinary v-y ∧ ordinary v-y < -(y-ordinary b*x-ordinary c) := by + obtain ⟨u,v,he,hx,hx',hy,hy'⟩ := positive_slope_quadrant_anchor b (-c) hb (-x) (-y) + (by simp only [map_neg]; linarith) + refine ⟨-u,-v,?_,?_,?_,?_,?_⟩ + · linear_combination -he + all_goals simp only [map_neg] at *; linarith + +theorem inactive_slope_quadrant_anchor (a : ℕ) (d : Fin 2) (c s : CutRing) + (x : ℝ × ℝ) (hx : cutForm a (slopeDirection d) x ≠ ordinary c) + (hs : |cutForm a (slopeDirection d) x-ordinary c| < ordinary s) : + ∃ u : CutRing × CutRing, ∃ positive : Bool, + integralCutForm a (slopeDirection d) u=c ∧ + (positive=true ↔ ordinary c < cutForm a (slopeDirection d) x) ∧ + ∀ j : Fin 2, + ordinary (pointCoordinate u j)+ordinary (signQuadrantLower s d positive j) < realCoordinate x j ∧ + realCoordinate x j < ordinary (pointCoordinate u j)+ordinary (signQuadrantUpper s d positive j) := by + have hb : 1 ≤ ordinary (cutTau^a) := by + simpa using one_le_pow₀ Real.one_lt_goldenRatio.le + fin_cases d + · change x.2-Real.goldenRatio^a*x.1 ≠ ordinary c at hx + change |x.2-Real.goldenRatio^a*x.1-ordinary c| < ordinary s at hs + rcases lt_or_gt_of_ne hx with h | h + · obtain ⟨u,v,he,hx₀,hx₁,hy₀,hy₁⟩ := negative_slope_quadrant_anchor (cutTau^a) c hb x.1 x.2 + (by simpa only [map_pow,ordinary_cutTau] using sub_neg.mpr h) + refine ⟨(u,v),false,by simpa [integralCutForm,slopeDirection] using he,by simp [cutForm,slopeDirection]; linarith,?_⟩ + rw [abs_of_neg (sub_neg.mpr h)] at hs + simp only [map_pow,ordinary_cutTau] at hx₁ hy₁ + intro j; fin_cases j <;> simp [realCoordinate,pointCoordinate,signQuadrantLower,signQuadrantUpper] <;> + constructor <;> linarith + · obtain ⟨u,v,he,hx₀,hx₁,hy₀,hy₁⟩ := positive_slope_quadrant_anchor (cutTau^a) c hb x.1 x.2 + (by simpa only [map_pow,ordinary_cutTau] using sub_pos.mpr h) + refine ⟨(u,v),true,by simpa [integralCutForm,slopeDirection] using he,by simp; exact h,?_⟩ + rw [abs_of_pos (sub_pos.mpr h)] at hs + simp only [map_pow,ordinary_cutTau] at hx₁ hy₁ + intro j; fin_cases j <;> simp [realCoordinate,pointCoordinate,signQuadrantLower,signQuadrantUpper] <;> + constructor <;> linarith + · change x.1-Real.goldenRatio^a*x.2 ≠ ordinary c at hx + change |x.1-Real.goldenRatio^a*x.2-ordinary c| < ordinary s at hs + rcases lt_or_gt_of_ne hx with h | h + · obtain ⟨u,v,he,hx₀,hx₁,hy₀,hy₁⟩ := negative_slope_quadrant_anchor (cutTau^a) c hb x.2 x.1 + (by simpa only [map_pow,ordinary_cutTau] using sub_neg.mpr h) + refine ⟨(v,u),false,by simpa [integralCutForm,slopeDirection] using he,by simp [cutForm,slopeDirection]; linarith,?_⟩ + rw [abs_of_neg (sub_neg.mpr h)] at hs + simp only [map_pow,ordinary_cutTau] at hx₁ hy₁ + intro j; fin_cases j <;> simp [realCoordinate,pointCoordinate,signQuadrantLower,signQuadrantUpper] <;> + constructor <;> linarith + · obtain ⟨u,v,he,hx₀,hx₁,hy₀,hy₁⟩ := positive_slope_quadrant_anchor (cutTau^a) c hb x.2 x.1 + (by simpa only [map_pow,ordinary_cutTau] using sub_pos.mpr h) + refine ⟨(v,u),true,by simpa [integralCutForm,slopeDirection] using he,by simp; exact h,?_⟩ + rw [abs_of_pos (sub_pos.mpr h)] at hs + simp only [map_pow,ordinary_cutTau] at hx₁ hy₁ + intro j; fin_cases j <;> simp [realCoordinate,pointCoordinate,signQuadrantLower,signQuadrantUpper] <;> + constructor <;> linarith + +end InactiveQuadrantAnchors + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InitialPointwiseTable.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InitialPointwiseTable.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fa9b4baf7681e25dc47d98962593d06a80d3a31 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InitialPointwiseTable.lean @@ -0,0 +1,120 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FinitelyManyTranslationRelations +import OAI.GroupTheory.SimpleAmenable.CentralCovers.GenuineFiniteGeneration +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CanonicalSectors +import OAI.GroupTheory.SimpleAmenable.Configurations.PointwisePolygonTables + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section SourceInitialPointwiseTable + +variable {a m : ℕ} {ι : Type*} [Finite ι] + +noncomputable def actualPolygonTableHom (U : ι → polygonAlgebra a) : + (Set.range (polygonAssignment U) → alternatingGroup (Fin m)) →* + polygonAlternatingGroup a m := by + classical + let := Fintype.ofFinite (Set.range (polygonAssignment U)) + exact (actualPolygonLabelling U).tableHom + +@[simp] theorem actualPolygonTableHom_apply (U : ι → polygonAlgebra a) + (σ : Set.range (polygonAssignment U) → alternatingGroup (Fin m)) + (p : TrackPoint a m) : + (actualPolygonTableHom U σ).val.val p = + ((σ ⟨polygonAssignment U p.2,⟨p.2,rfl⟩⟩).val p.1,p.2) := by + classical + let := Fintype.ofFinite (Set.range (polygonAssignment U)) + exact (actualPolygonLabelling U).tableHom_apply σ p + +theorem actualPolygonTableHom_injective (U : ι → polygonAlgebra a) : + Function.Injective (actualPolygonTableHom (m := m) U) := by + classical + let := Fintype.ofFinite (Set.range (polygonAssignment U)) + exact (actualPolygonLabelling U).tableHom_injective (actualPolygonLabelling_surjective U) + +noncomputable def polygonTableInput (U : ι → polygonAlgebra a) (i : ι) : + alternatingGroup (Fin m) →* (Set.range (polygonAssignment U) → alternatingGroup (Fin m)) := + sectorMask {ω | ω.val i = true} + +@[simp] theorem actualPolygonTableHom_input (U : ι → polygonAlgebra a) (i : ι) + (σ : alternatingGroup (Fin m)) : + actualPolygonTableHom U (polygonTableInput U i σ) = conditionalAlternatingHom (U i) σ := by + classical + apply Subtype.ext + apply Subtype.ext + apply Equiv.ext + intro p + rw [actualPolygonTableHom_apply] + change ((polygonTableInput U i σ ⟨polygonAssignment U p.2,⟨p.2,rfl⟩⟩).val p.1,p.2) = + conditionalPerm (U i) σ.val p + rw [conditionalPerm_apply] + by_cases hp : p.2 ∈ (U i).val + · have hω : (⟨polygonAssignment U p.2,⟨p.2,rfl⟩⟩ : + Set.range (polygonAssignment U)) ∈ {ω | ω.val i = true} := by + change decide (p.2 ∈ (U i).val) = true + exact decide_eq_true hp + rw [polygonTableInput, sectorMask_of_mem _ _ _ hω, ite_eq_left hp] + · have hω : (⟨polygonAssignment U p.2,⟨p.2,rfl⟩⟩ : + Set.range (polygonAssignment U)) ∉ {ω | ω.val i = true} := by + change ¬decide (p.2 ∈ (U i).val) = true + simpa only [decide_eq_true_eq] using hp + rw [polygonTableInput, sectorMask_of_not_mem _ _ _ hω, ite_eq_right hp] + rfl + +def sourceConditionalLabel (m : ℕ) + (b : Fin 5 × {σ : Equiv.Perm (Fin (m+1)) // + σ ∈ alternatingGroup (Fin (m+1)) ∧ σ.support.card ≤ 5}) : + SourceGeneratorLabel m := Sum.inl b + +theorem source_initial_table_lifts_eventually (a : ℕ) (r : CutRing) (m : ℕ) + (hr : 0 < ordinary r ∧ ordinary r < 1/2) (hm : 15 ≤ m+1) (hm' : 2 ≤ m) : + ∃ L : ℕ, ∀ M : ℕ, L ≤ M → + ∃ ρ : (Set.range (polygonAssignment (initialTest a r)) → + alternatingGroup (Fin (m+1))) →* + BoundedRelationCover M (alternatingGenerator a r m hm'), + (coverMap M (alternatingGenerator a r m hm')).comp ρ = + actualPolygonTableHom (initialTest a r) ∧ + Function.Injective ρ ∧ + ∀ b, ρ (polygonTableInput (initialTest a r) b.1 + (⟨b.2.val,b.2.property.1⟩ : alternatingGroup (Fin (m+1)))) = + PresentedGroup.of (sourceConditionalLabel m b) := by + let β := Fin 5 × {σ : Equiv.Perm (Fin (m+1)) // + σ ∈ alternatingGroup (Fin (m+1)) ∧ σ.support.card ≤ 5} + let input : β → (Set.range (polygonAssignment (initialTest a r)) → + alternatingGroup (Fin (m+1))) := fun b => + polygonTableInput (initialTest a r) b.1 ⟨b.2.val,b.2.property.1⟩ + let w : β → FreeGroup (SourceGeneratorLabel m) := + fun b => FreeGroup.of (sourceConditionalLabel m b) + have hw : ∀ b, FreeGroup.lift (alternatingGenerator a r m hm') (w b) = + actualPolygonTableHom (initialTest a r) (input b) := by + intro b + rw [show w b = FreeGroup.of (sourceConditionalLabel m b) from rfl, + FreeGroup.lift_apply_of] + change _ = actualPolygonTableHom (initialTest a r) + (polygonTableInput (initialTest a r) b.1 ⟨b.2.val,b.2.property.1⟩) + rw [actualPolygonTableHom_input] + rfl + obtain ⟨L,hL⟩ := finite_table_with_inputs_eventually (alternatingGenerator a r m hm') + (actualPolygonTableHom (initialTest a r)) input w hw + (alternatingGenerator_surjective a r m hr hm hm') + refine ⟨L,fun M hM => ?_⟩ + obtain ⟨ρ,hρ,hi⟩ := hL M hM + refine ⟨ρ,hρ,?_,hi⟩ + intro s t hst + apply actualPolygonTableHom_injective (initialTest a r) + have hst' := congrArg (coverMap M (alternatingGenerator a r m hm')) hst + exact (DFunLike.congr_fun hρ s).symm.trans (hst'.trans (DFunLike.congr_fun hρ t)) + +end SourceInitialPointwiseTable + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/IntersectionControl.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/IntersectionControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a07d4a17561dddb6de0d66b0b424b78e337a95b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/IntersectionControl.lean @@ -0,0 +1,168 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SmallControlTransfer +import OAI.GroupTheory.SimpleAmenable.CentralCovers.FullSector +import OAI.GroupTheory.SimpleAmenable.CentralCovers.ControlCalculus + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section IntersectionControl +namespace ActualLawfulTable +variable {E H Q Ω : Type*} [Group E] [Group H] [Group Q] [Group.IsPerfect E] + {q : H →* Q} {v : (Ω → E) →* Q} (T : ActualLawfulTable q v) + +theorem sector_split (U V : Set Ω) (s : UniversalExtension E) : + T.sector U s = T.sector (U ∩ V) s*T.sector (U \ V) s := by + have hd : Disjoint (U ∩ V) (U \ V) := Set.disjoint_left.mpr (by aesop) + have he : (U ∩ V) ∪ (U \ V) = U := by ext x; simp only [Set.mem_union,Set.mem_inter_iff,Set.mem_sdiff]; tauto + have hh := DFunLike.congr_fun (T.sector_union hd) s + simpa only [he,commutingProduct_apply] using hh + +theorem sector_four_factors (U V : Set Ω) (s : UniversalExtension E) : + T.sector Set.univ s = T.sector (U ∩ V) s*T.sector (U \ V) s* + T.sector (V \ U) s*T.sector (U ∪ V)ᶜ s := by + rw [T.sector_split Set.univ U s] + rw [Set.univ_inter, ← Set.compl_eq_univ_sdiff] + rw [T.sector_split U V s,T.sector_split Uᶜ V s] + have he₁ : Uᶜ ∩ V = V \ U := by ext x; simp only [Set.mem_inter_iff,Set.mem_compl_iff,Set.mem_sdiff]; tauto + have he₂ : Uᶜ \ V = (U ∪ V)ᶜ := by ext x; simp only [Set.mem_union,Set.mem_compl_iff,Set.mem_sdiff]; tauto + simp only [he₁,he₂,mul_assoc] + +end ActualLawfulTable + +variable {α H Q Ω : Type*} [Fintype α] [DecidableEq α] [Group H] [Group Q] + [Group.IsPerfect (alternatingGroup α)] + {q : H →* Q} {v : (Ω → alternatingGroup α) →* Q} + (T : ActualLawfulTable q v) (c : alternatingGroup α →* H) + +theorem table_small_control_intersection + (hwhole : T.sector Set.univ = c.comp (universalProjection (alternatingGroup α))) + (f : TrackStar α →* H) (U V : Set Ω) + (hU : SmallControlled c f (T.sector U)) (hV : SmallControlled c f (T.sector V)) : + SmallControlled c f (T.sector (U ∩ V)) := by + refine small_control_intersection c f (T.sector (U ∩ V)) (T.sector (U \ V)) + (T.sector (V \ U)) (T.sector (U ∪ V)ᶜ) ?_ ?_ ?_ ?_ ?_ ?_ + · exact T.sector_commute (Set.disjoint_left.mpr (by aesop)) + · exact T.sector_commute (Set.disjoint_left.mpr (by aesop)) + · exact T.sector_commute (Set.disjoint_left.mpr (by aesop)) + · intro s + rw [← T.sector_four_factors U V s,hwhole] + rfl + · intro I t x hx + dsimp only + rw [← T.sector_split U V] + exact hU I t x hx + · intro I t x hx + dsimp only + have he : V ∩ U = U ∩ V := Set.inter_comm _ _ + have hh := T.sector_split V U (universalMap (subtypeAlternatingHom I.val) t) + rw [he] at hh + rw [← hh] + exact hV I t x hx + +variable {a : ℕ} {ι : Type*} + +theorem resolvedPolygonMask_inter (U : ι → polygonAlgebra a) (V W : Set (GenericSquare a)) + (hV : ResolvedBy (fun i => (U i).val) V) (hW : ResolvedBy (fun i => (U i).val) W) : + resolvedPolygonMask U (V ∩ W) = resolvedPolygonMask U V ∩ resolvedPolygonMask U W := by + ext ω + obtain ⟨x,hx⟩ := ω.property + obtain rfl : ω = ⟨polygonAssignment U x,⟨x,rfl⟩⟩ := Subtype.ext hx.symm + have hVW : ResolvedBy (fun i => (U i).val) (V ∩ W) := by + intro x y he + exact and_congr (hV x y he) (hW x y he) + simp only [Set.mem_inter_iff,resolvedPolygonMask_mem U _ hVW x, + resolvedPolygonMask_mem U _ hV x,resolvedPolygonMask_mem U _ hW x] + +namespace InitialCoverSystem +variable {m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) [Finite ι] + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem fullGeometricSector_intersection_control (hlarge : 15 < m+1) + (P : ι → Fin 5 × (CutRing × CutRing)) + (h : ∀ I, I.card ≤ 15 → ∀ b hb, B.PrimitiveFamilyLaw I b hb P) + (V W : polygonAlgebra a) + (hV : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) V.val) + (hW : ResolvedBy (fun i => (primitiveTests (a := a) (r := r) P i).val) W.val) + (f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm)) + (hfV : SmallControlled B.c f (B.fullGeometricSector hlarge P h V)) + (hfW : SmallControlled B.c f (B.fullGeometricSector hlarge P h W)) : + SmallControlled B.c f (B.fullGeometricSector hlarge P h (V ⊓ W)) := by + have hw := B.fullGeometricSector_whole hlarge P h + unfold fullGeometricSector at hw hfV hfW ⊢ + change (B.fullPrimitiveTable hlarge P h).sector + (resolvedPolygonMask (primitiveTests (a := a) (r := r) P) Set.univ) = _ at hw + rw [resolvedPolygonMask_univ] at hw + change SmallControlled _ _ ((B.fullPrimitiveTable hlarge P h).sector + (resolvedPolygonMask (primitiveTests (a := a) (r := r) P) (V.val ∩ W.val))) + rw [resolvedPolygonMask_inter _ _ _ hV hW] + exact table_small_control_intersection _ B.c hw f _ _ hfV hfW + +end InitialCoverSystem +end IntersectionControl + +section ActualRectangleBridge + +noncomputable def coordinateRectangle (a : ℕ) (u v : Fin 2 → CutRing) : polygonAlgebra a := + coordinateInterval a 0 (u 0) (v 0) ⊓ coordinateInterval a 1 (u 1) (v 1) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem old_rectangle_bridge_control (hlarge : 20 ≤ m+1) + {K δ : ℝ} (hK : 0 ≤ K) (hδ : 0 < δ) : + ∃ N : ℕ, 160 ≤ N ∧ ∀ n : ℕ, N ≤ n → ∀ h : B.CoordinateWindowLaw n, + ∀ (s : Fin 2 → ℕ) (hs : ∀ j, s j ≤ n) (p q : Fin 2 → ℤ), + (∀ j, ((q j-p j).natAbs:ℝ) ≤ (K+1)*(n:ℝ)) → + ∀ u v U V : Fin 2 → CutRing, + (∀ j, ordinary (u j) ≤ ordinary (v j)) → + (∀ j, ordinary (U j) ≤ ordinary (u j)-δ) → + (∀ j, ordinary (v j)+δ ≤ ordinary (V j)) → + (∀ j, ordinary (V j)-ordinary (U j) < 1) → + (∀ j, p j ≤ endpointLabel (u j) ∧ endpointLabel (u j) < p j+s j) → + (∀ j, p j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < p j+s j) → + (∀ j, q j ≤ endpointLabel (U j) ∧ endpointLabel (U j) < q j+(n/8:ℕ)) → + (∀ j, q j ≤ endpointLabel (V j) ∧ endpointLabel (V j) < q j+(n/8:ℕ)) → + ∀ f : TrackStar (Fin (m+1)) →* BoundedRelationCover M (alternatingGenerator a r m hm), + B.AlignedSmallSupported f → + (∀ j, SmallControlled B.c f + (B.axisSector (by omega) n h j (s j) (hs j) (p j) (coordinateInterval a j (u j) (v j)))) → + SmallControlled B.c f (B.windowSector (by omega) n h q (coordinateRectangle a U V)) := by + obtain ⟨N,hN,hbridge⟩ := B.old_axis_bridge_control hlarge hK hδ + refine ⟨N,hN,?_⟩ + intro n hn h s hs p q hpq u v U V huv hU hV hlen hlu hlv hlU hlV f hf hstart + have hc (j : Fin 2) : SmallControlled B.c f + (B.windowSector (by omega) n h q (coordinateInterval a j (U j) (V j))) := by + have hh := hbridge n hn h j (s j) (hs j) (p j) (q j) (hpq j) + (u j) (v j) (U j) (V j) (huv j) (hU j) (hV j) (hlen j) + (hlu j) (hlv j) (hlU j) (hlV j) f hf (hstart j) + rw [B.axisSector_in_window (by omega) n h j (n/8) (Nat.div_le_self n 8) + (q j) q le_rfl (by omega) (coordinateInterval a j (U j) (V j)) + (axisInterval_resolved j (n/8) (q j) (U j) (V j) (hlU j) (hlV j))] at hh + exact hh + apply B.fullGeometricSector_intersection_control (by omega) (coordinateWindowPrimitives n q) + (fun I _ b hb => h I b hb q) (coordinateInterval a 0 (U 0) (V 0)) + (coordinateInterval a 1 (U 1) (V 1)) ?_ ?_ f (hc 0) (hc 1) + · exact coordinateLabelWindow_resolved n q 0 (U 0) (V 0) + ⟨(hlU 0).1,by have h' := (hlU 0).2; omega⟩ + ⟨(hlV 0).1,by have h' := (hlV 0).2; omega⟩ + · exact coordinateLabelWindow_resolved n q 1 (U 1) (V 1) + ⟨(hlU 1).1,by have h' := (hlU 1).2; omega⟩ + ⟨(hlV 1).1,by have h' := (hlV 1).2; omega⟩ + +end InitialCoverSystem +end ActualRectangleBridge + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/IntervalTangentConnectivity.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/IntervalTangentConnectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0f1e7b4555520be6a52c7446f637b98dcfb630b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/IntervalTangentConnectivity.lean @@ -0,0 +1,182 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ArithmeticTangentBasis +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TangentChartTemplates + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section IntervalTangentConnectivity + +def TangentIntervalStep (u : CutRing) (L H : ℝ) (x y : CutRing) : Prop := + L ≤ ordinary x ∧ ordinary x ≤ H ∧ L ≤ ordinary y ∧ ordinary y ≤ H ∧ + (y-x=u ∨ y-x= -u ∨ y-x=cutTau*u ∨ y-x= -(cutTau*u)) + +def TangentIntervalReach (u : CutRing) (L H : ℝ) (x y : CutRing) : Prop := + Relation.ReflTransGen (TangentIntervalStep u L H) x y + +theorem tangentIntervalStep_symm {u x y : CutRing} {L H : ℝ} + (h : TangentIntervalStep u L H x y) : TangentIntervalStep u L H y x := by + rcases h with ⟨h1,h2,h3,h4,h⟩ + refine ⟨h3,h4,h1,h2,?_⟩ + have he : x-y= -(y-x) := by abel + rw [he] + rcases h with h | h | h | h + · exact Or.inr (Or.inl (congrArg Neg.neg h)) + · left; simpa using congrArg Neg.neg h + · exact Or.inr (Or.inr (Or.inr (congrArg Neg.neg h))) + · right; right; left; simpa using congrArg Neg.neg h + +theorem tangentIntervalReach_symm {u x y : CutRing} {L H : ℝ} + (h : TangentIntervalReach u L H x y) : TangentIntervalReach u L H y x := by + induction h with + | refl => exact .refl + | tail _ hstep ih => exact ih.head (tangentIntervalStep_symm hstep) + +theorem tangentIntervalStep_index {u x y : CutRing} {L H : ℝ} + (h : TangentIntervalStep u L H x y) : + ∃ e : Fin 5, y=x+signedShortSteps u e := by + rcases h.2.2.2.2 with h | h | h | h + · exact ⟨1,by change y=x+u; linear_combination h⟩ + · exact ⟨2,by change y=x+ -u; linear_combination h⟩ + · exact ⟨3,by change y=x+cutTau*u; linear_combination h⟩ + · exact ⟨4,by change y=x+ -(cutTau*u); linear_combination h⟩ + +theorem tangentInterval_natural (u v x : CutRing) (L H : ℝ) (n : ℕ) + (hv : v=u ∨ v= -u) + (hx : L ≤ ordinary x ∧ ordinary x ≤ H) + (hy : L ≤ ordinary (x+(n:CutRing)*v) ∧ ordinary (x+(n:CutRing)*v) ≤ H) : + TangentIntervalReach u L H x (x+(n:CutRing)*v) := by + have hi (i : ℕ) (hin : i ≤ n) : + L ≤ ordinary (x+(i:CutRing)*v) ∧ ordinary (x+(i:CutRing)*v) ≤ H := by + have hi' : (i:ℝ) ≤ n := by exact_mod_cast hin + simp only [map_add,map_mul,map_natCast] at hy ⊢ + by_cases hv0 : 0 ≤ ordinary v + · have hm := mul_le_mul_of_nonneg_right hi' hv0 + have hp : 0 ≤ (i:ℝ)*ordinary v := mul_nonneg (Nat.cast_nonneg _) hv0 + constructor <;> linarith + · have hm := mul_le_mul_of_nonpos_right hi' (le_of_not_ge hv0) + have hp : (i:ℝ)*ordinary v ≤ 0 := mul_nonpos_of_nonneg_of_nonpos + (Nat.cast_nonneg _) (le_of_not_ge hv0) + constructor <;> linarith + have hpath i (hin : i ≤ n) : TangentIntervalReach u L H x (x+(i:CutRing)*v) := by + induction i with + | zero => simpa [TangentIntervalReach] using (Relation.ReflTransGen.refl (a := x) (r := TangentIntervalStep u L H)) + | succ i ih => + apply (ih (by omega)).tail + refine ⟨(hi i (by omega)).1,(hi i (by omega)).2,(hi (i+1) hin).1,(hi (i+1) hin).2,?_⟩ + have he : x+((i+1:ℕ):CutRing)*v-(x+(i:CutRing)*v)=v := by push_cast; ring + rw [he] + rcases hv with hv | hv + · exact Or.inl hv + · exact Or.inr (Or.inl hv) + exact hpath n le_rfl + +theorem tangentInterval_integer (u v x : CutRing) (L H : ℝ) (n : ℤ) + (hv : v=u ∨ v= -u) + (hx : L ≤ ordinary x ∧ ordinary x ≤ H) + (hy : L ≤ ordinary (x+(n:CutRing)*v) ∧ ordinary (x+(n:CutRing)*v) ≤ H) : + TangentIntervalReach u L H x (x+(n:CutRing)*v) := by + by_cases hn : 0 ≤ n + · have he : (n.toNat:CutRing)=(n:CutRing) := by exact_mod_cast Int.toNat_of_nonneg hn + simpa only [he] using tangentInterval_natural u v x L H n.toNat hv hx (by simpa only [he] using hy) + · have hev : -v=u ∨ -v= -u := by + rcases hv with rfl | rfl + · exact Or.inr rfl + · exact Or.inl (neg_neg u) + have he : ((-n).toNat:CutRing)= -(n:CutRing) := by + exact_mod_cast Int.toNat_of_nonneg (by omega : 0 ≤ -n) + simpa only [he,neg_mul_neg] using tangentInterval_natural u (-v) x L H (-n).toNat hev hx + (by simpa only [he,neg_mul_neg] using hy) + +theorem tangentInterval_list (u x : CutRing) (L H : ℝ) (w : List CutRing) + (hw : ∀ e ∈ w, e=u ∨ e= -u ∨ e=cutTau*u ∨ e= -(cutTau*u)) + (hb : ∀ n, L ≤ ordinary (x+(w.take n).sum) ∧ ordinary (x+(w.take n).sum) ≤ H) : + TangentIntervalReach u L H x (x+w.sum) := by + have hp n (hn : n ≤ w.length) : TangentIntervalReach u L H x (x+(w.take n).sum) := by + induction n with + | zero => simpa [TangentIntervalReach] using (Relation.ReflTransGen.refl (a := x) (r := TangentIntervalStep u L H)) + | succ n ih => + have hn' : n < w.length := by omega + apply (ih (by omega)).tail + refine ⟨(hb n).1,(hb n).2,(hb (n+1)).1,(hb (n+1)).2,?_⟩ + have he : x+(w.take (n+1)).sum-(x+(w.take n).sum)=w[n] := by + rw [List.take_add_one,List.getElem?_eq_getElem hn',Option.toList_some,List.sum_append,List.sum_singleton] + abel + rw [he] + exact hw _ (List.getElem_mem hn') + simpa using hp w.length le_rfl + +theorem tangentInterval_recenter (u v : CutRing) (huv : u*v=1) + (L H c : ℝ) (x : CutRing) (hx : L ≤ ordinary x ∧ ordinary x ≤ H) + (hL : L ≤ c-|ordinary u|) (hH : c ≤ H) : + ∃ y : CutRing, c-|ordinary u| < ordinary y ∧ ordinary y ≤ c ∧ + TangentIntervalReach u L H x y := by + have hu0 : u ≠ 0 := by intro h; simp [h] at huv + have huo : ordinary u ≠ 0 := by simpa using ordinary_injective.ne hu0 + let u' : CutRing := if 0 ≤ ordinary u then u else -u + have hu' : u'=u ∨ u'= -u := by dsimp [u']; split <;> simp + have hpos : ordinary u'=|ordinary u| := by + dsimp [u']; split_ifs with h + · exact (abs_of_nonneg h).symm + · rw [map_neg,abs_of_neg (lt_of_not_ge h)] + have hα : 0 < ordinary u' := by rw [hpos]; exact abs_pos.mpr huo + let n : ℤ := ⌊(c-ordinary x)/ordinary u'⌋ + let y : CutRing := x+(n:CutRing)*u' + have hny : c-ordinary u' < ordinary y ∧ ordinary y ≤ c := by + have hl := Int.floor_le ((c-ordinary x)/ordinary u') + have hh := Int.lt_floor_add_one ((c-ordinary x)/ordinary u') + have hl' := (le_div_iff₀ hα).mp hl + have hh' := (div_lt_iff₀ hα).mp hh + dsimp only [y] + simp only [map_add,map_mul,map_intCast] + dsimp only [n] at * + constructor <;> linarith + refine ⟨y,by simpa only [hpos] using hny.1,hny.2,?_⟩ + exact tangentInterval_integer u u' x L H n hu' hx + ⟨hL.trans (by rw [← hpos]; exact hny.1.le),hny.2.trans hH⟩ + +theorem tangentInterval_connected (u v : CutRing) (huv : u*v=1) + (L H : ℝ) (hwidth : 4*(|ordinary u|+|ordinary (cutTau*u)|) ≤ H-L) + (x y : CutRing) + (hx : L ≤ ordinary x ∧ ordinary x ≤ H) + (hy : L ≤ ordinary y ∧ ordinary y ≤ H) : TangentIntervalReach u L H x y := by + let c : ℝ := (L+H)/2 + let b : ℝ := |ordinary u|+|ordinary (cutTau*u)| + have hb : 0 ≤ b := add_nonneg (abs_nonneg _) (abs_nonneg _) + have hub : |ordinary u| ≤ b := le_add_of_nonneg_right (abs_nonneg _) + have hlo : L ≤ c-|ordinary u| := by dsimp [c]; dsimp [b] at hub; linarith + have hup : c ≤ H := by dsimp [c]; dsimp [b] at hb; linarith + obtain ⟨x',hxL,hxH,hxx'⟩ := tangentInterval_recenter u v huv L H c x hx hlo hup + obtain ⟨y',hyL,hyH,hyy'⟩ := tangentInterval_recenter u v huv L H c y hy hlo hup + obtain ⟨w,hws,hwm,_,hwb,_⟩ := tangent_chain u v huv (y'-x') + have hm : TangentIntervalReach u L H x' y' := by + have he : x'+w.sum=y' := by rw [hws]; abel + rw [← he] + apply tangentInterval_list u x' L H w hwm + intro n + have hn := hwb n + simp only [map_add,map_sub] at hn ⊢ + change min 0 (ordinary y'-ordinary x')-b ≤ ordinary (w.take n).sum ∧ + ordinary (w.take n).sum ≤ max 0 (ordinary y'-ordinary x')+b at hn + have hw' : 4*b ≤ H-L := hwidth + have hcL : L ≤ c-2*b := by dsimp [c]; linarith + have hcH : c+2*b ≤ H := by dsimp [c]; linarith + by_cases hh : ordinary x' ≤ ordinary y' + · rw [min_eq_left (by linarith),max_eq_right (by linarith)] at hn + constructor <;> linarith + · rw [min_eq_right (by linarith),max_eq_left (by linarith)] at hn + constructor <;> linarith + exact hxx'.trans (hm.trans (tangentIntervalReach_symm hyy')) + +end IntervalTangentConnectivity + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InvariantPatching.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InvariantPatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..c43020f9afa77b12f98e5ecced12395b859a3efc --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InvariantPatching.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.NestedCutCalculus + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InvariantPatching +variable {G D α ι : Type*} [Group G] [Group D] + +theorem normalizes_of_cell_split (P : Subgroup G) (x y z : G) + (hx : x=y*z) (hy : y ∈ P) (hz : z ∈ Subgroup.centralizer (P : Set G)) : + x ∈ (Subgroup.normalizer (P : Set G)) := by + rw [hx] + exact (Subgroup.normalizer (P : Set G)).mul_mem (Subgroup.le_normalizer hy) + (Subgroup.centralizer_le_normalizer _ hz) + +theorem sameActionOn_free_lift (P : Subgroup G) (f g : α → G) + (hf : ∀ i, f i ∈ (Subgroup.normalizer (P : Set G))) (hg : ∀ i, g i ∈ (Subgroup.normalizer (P : Set G))) + (h : SameActionOn f g P) : + SameActionOn (FreeGroup.lift f) (FreeGroup.lift g) P := by + let F : FreeGroup α →* (Subgroup.normalizer (P : Set G)) := FreeGroup.lift (fun i => ⟨f i,hf i⟩) + let J : FreeGroup α →* (Subgroup.normalizer (P : Set G)) := FreeGroup.lift (fun i => ⟨g i,hg i⟩) + have hF : (Subgroup.normalizer (P : Set G)).subtype.comp F = FreeGroup.lift f := by + apply FreeGroup.ext_hom + intro i + simp [F] + have hJ : (Subgroup.normalizer (P : Set G)).subtype.comp J = FreeGroup.lift g := by + apply FreeGroup.ext_hom + intro i + simp [J] + have he : P.normalizerMonoidHom.comp F = P.normalizerMonoidHom.comp J := by + apply FreeGroup.ext_hom + intro i + apply MulEquiv.ext + intro x + apply Subtype.ext + simpa [F,J] using h i x.val x.property + intro w x hx + have hh := congrArg (fun k : FreeGroup α →* MulAut P => ((k w) ⟨x,hx⟩).val) he + change (F w).val*x*(F w).val⁻¹ = (J w).val*x*(J w).val⁻¹ at hh + have hf' : (F w).val = FreeGroup.lift f w := DFunLike.congr_fun hF w + have hg' : (J w).val = FreeGroup.lift g w := DFunLike.congr_fun hJ w + simpa only [hf',hg'] using hh + +theorem normalizes_of_same_action (P : Subgroup G) (x y : G) + (hx : x ∈ (Subgroup.normalizer (P : Set G))) (h : ∀ z ∈ P, x*z*x⁻¹=y*z*y⁻¹) : + y ∈ (Subgroup.normalizer (P : Set G)) := by + intro z + constructor + · intro hz + rw [← h z hz] + exact (hx z).mp hz + · intro hz + have hu : x⁻¹*(y*z*y⁻¹)*x ∈ P := by + have hu' := ((Subgroup.normalizer (P : Set G)).inv_mem hx (y*z*y⁻¹)).mp hz + rw [inv_inv] at hu' + exact hu' + have hh := h _ hu + have he : x*(x⁻¹*(y*z*y⁻¹)*x)*x⁻¹ = y*z*y⁻¹ := by group + rw [he] at hh + have hv : z=x⁻¹*(y*z*y⁻¹)*x := by + have ht := congrArg (fun q => y⁻¹*q*y) hh + simpa only [mul_assoc,inv_mul_cancel,inv_mul_cancel_left,mul_inv_cancel_left,mul_one] using ht + rwa [← hv] at hu + +theorem patching_centrality (f : α → G) (P : ι → Subgroup G) + (hgen : (FreeGroup.lift f).range ≤ ⨆ i, P i) + (hinv : ∀ i j, f j ∈ (Subgroup.normalizer (P i : Set G))) + (w : FreeGroup α) + (hlocal : ∀ i, ∃ g : α → G, SameActionOn f g (P i) ∧ + FreeGroup.lift g w ∈ Subgroup.centralizer (P i : Set G)) : + ∀ x ∈ (FreeGroup.lift f).range, Commute (FreeGroup.lift f w) x := by + have hc : ∀ i, FreeGroup.lift f w ∈ Subgroup.centralizer (P i : Set G) := by + intro i + obtain ⟨g,hg,hgw⟩ := hlocal i + have hact := sameActionOn_free_lift (P i) f g (hinv i) + (fun j => normalizes_of_same_action (P i) _ _ (hinv i j) (hg j)) hg + intro x hx + have he := hact w x hx + have he' : FreeGroup.lift g w*x*(FreeGroup.lift g w)⁻¹=x := by + rw [← hgw x hx]; group + rw [he'] at he + have ht := congrArg (fun z => z*FreeGroup.lift f w) he + exact (by simpa only [mul_assoc,inv_mul_cancel,mul_one] using ht : + FreeGroup.lift f w*x=x*FreeGroup.lift f w).symm + have hs : (⨆ i, P i) ≤ Subgroup.centralizer {FreeGroup.lift f w} := by + apply iSup_le + intro i x hx y hy + obtain rfl : y=FreeGroup.lift f w := Set.mem_singleton_iff.mp hy + exact (hc i x hx).symm + intro x hx + exact show FreeGroup.lift f w*x=x*FreeGroup.lift f w from hs (hgen hx) _ rfl + +end InvariantPatching + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardGermTransport.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardGermTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c77a971238891b3892af83b293ef4832e3fb799 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardGermTransport.lean @@ -0,0 +1,193 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.IndividualGridSplits +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.InactiveNeighborhoodActions + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +namespace ConcurrentGeometry.InwardChart +variable {a : ℕ} {r : CutRing} {C : ConcurrentGeometry a r} + {ι κ : Type*} [Finite ι] {j : ι → Fin 4} {c : ι → CutRing} {z : ℝ × ℝ} + (T : C.InwardChart j c z) + +theorem germ_rule (hr : 0 halfPlane a (j i) (c i)) (R k).val) + (N : Set (ℝ × ℝ)) (hN : IsOpen N) (hz : z ∈ N) + (rule : (κ → Bool) → Prop) + (h : ∀ q : GenericSquare a, q.val ∈ N → rule (polygonAssignment R q)) + (p : GenericSquare a) (hp : p ∈ (C.inwardMargin T.vertex T.offset z).val) : + rule (polygonAssignment (T.polygons R) p) := by + obtain ⟨q,hq,he⟩ := T.polygons_assignment_realized hr hz₁ hz₂ R hR p hp N hN hz + rw [← he] + exact h q hq + +theorem polygons_cut_on_margin (hr : 0 cutPolygon a (j i) (c i)) i).val ↔ + p ∈ (C.localDecision T.vertex T.offset z (j i) (c i)).val := by + obtain ⟨q,_,he⟩ := T.assignment_realized hr hz₁ hz₂ p hp Set.univ isOpen_univ (Set.mem_univ z) + change polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p ∈ + polygonFormalMask (fun i => cutPolygon a (j i) (c i)) (cutPolygon a (j i) (c i)) ↔ _ + rw [← he,polygonFormalMask_mem _ _ (fun x y h => h i) q] + simpa only [polygonAssignment,decide_eq_true_eq] using (Bool.eq_iff_iff.mp (congrFun he i)) + +theorem model_mem_iff_germ_rule (hr : 0 halfPlane a (j i) (c i)) R.val) + (N : Set (ℝ × ℝ)) (hN : IsOpen N) (hz : z ∈ N) + (rule : (ι → Bool) → Prop) + (h : ∀ q : GenericSquare a, q.val ∈ N → + (q ∈ R.val ↔ rule (polygonAssignment (fun i => cutPolygon a (j i) (c i)) q))) + (p : GenericSquare a) (hp : p ∈ (C.inwardMargin T.vertex T.offset z).val) : + p ∈ (T.polygons (fun _ : Unit => R) ()).val ↔ + rule (polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p) := by + obtain ⟨q,hq,he⟩ := T.assignment_realized hr hz₁ hz₂ p hp N hN hz + change polygonAssignment (fun i => C.localDecision T.vertex T.offset z (j i) (c i)) p ∈ + polygonFormalMask (fun i => cutPolygon a (j i) (c i)) R ↔ _ + rw [← he,polygonFormalMask_mem _ R hR q] + exact h q hq + +end ConcurrentGeometry.InwardChart + +section LocalPeriodicIntervals + +theorem local_periodic_interval {a : ℕ} (j : Fin 2) (l v : CutRing) + (hpos : ordinary l linarith [hn.1,hn.2] + · intro hp + refine ⟨-k,?_⟩ + simp only [Int.cast_neg] + constructor <;> linarith [hp.1,hp.2] + +theorem local_periodic_rectangle {a : ℕ} (l v : Fin 2 → CutRing) + (hpos : ∀ j, ordinary (l j) -r+pointCoordinate u d + let h := fun d => r+pointCoordinate u d + obtain ⟨k,δ,hδ,hlocal⟩ := local_periodic_rectangle (a := a) l h + (fun d => by dsimp [l,h]; simp only [map_add,map_neg]; linarith [hr.1]) + (fun d => by dsimp [l,h]; simp only [map_add,map_neg]; linarith [hr.2]) z + let v := u+((k 0:CutRing),(k 1:CutRing)) + have hperiod : spatialTranslate v (clippedSlopePrimitive a r j)= + spatialTranslate u (clippedSlopePrimitive a r j) := by + rw [show v=u+((k 0:CutRing),(k 1:CutRing)) from rfl,spatialTranslate_add,spatialTranslate_integral] + have hbox : spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))= + coordinateRectangle a l h := by + simpa only [l,h,pointCoordinate] using spatialTranslate_coordinateRectangle u (fun _ => -r) (fun _ => r) + have hlift (p : GenericSquare a) (hp : dist p.val z<δ) : + p ∈ (spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))).val ↔ + ∀ d, ordinary (pointCoordinate v d-r)≤realCoordinate p.val d ∧ + realCoordinate p.val d simp [v,pointCoordinate] + simp only [l,h,map_add,map_neg,map_sub,hv] + constructor <;> rintro ⟨h₁,h₂⟩ <;> constructor <;> linarith + have hs (p : GenericSquare a) + (hp : ∀ d, ordinary (pointCoordinate v d-r)≤realCoordinate p.val d ∧ + realCoordinate p.val d exact hh + have hlo := lt_of_le_of_ne (hp d).1 hne.symm + have hup := (hp d).2 + simp only [map_sub,map_add] at hlo hup + rw [abs_lt] + constructor <;> linarith + rw [← hperiod] + exact translated_clippedSlope_planar r j hr v p p.val + (by rw [Int.fract_eq_self.mpr p.property.1,Int.fract_eq_self.mpr p.property.2.1]) + ⟨hnear 0,hnear 1⟩ + refine ⟨k,δ,hδ,?_⟩ + dsimp only + intro p hp + constructor + · intro hmem + have hc : p ∈ (spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))).val := + clippedSlope_le_box r j hr hmem + have hc' := (hlift p hp).mp hc + exact ⟨hc',(hs p hc').mp hmem⟩ + · rintro ⟨hc,hside⟩ + exact (hs p hc).mpr hside + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardMargins.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..40c670158d79f3716b345ff58509ce3aac52acb9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardMargins.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentInwardModel + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InwardMargins +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) + +theorem mem_marginPolygon_of_planar (hr : ordinary r<1/2) + (t : VertexType (commonVertexDenominator a)) (u : CutRing × CutRing) + (p : GenericSquare a) (y : ℝ × ℝ) (hy : p.val=(Int.fract y.1,Int.fract y.2)) + (hcell : ∀ k, ordinary ((C.margins t).lower k+pointCoordinate u k)≤realCoordinate y k ∧ + realCoordinate y k realCoordinate q k) hy + have hh : coordinate k p=Int.fract (realCoordinate y k) := by fin_cases k <;> exact h + rw [hh] + exact sub_add_cancel _ _ + rw [he] + exact hcell k + change p ∈ (spatialTranslate u (coordinateRectangle a (C.margins t).lower (C.margins t).upper)).val + rw [spatialTranslate_coordinateRectangle] + exact ⟨hh 0,hh 1⟩ + +theorem mem_inwardMargin_of_planar (hr : 0 ⟨(hcell k).1,(hcell k).2.le⟩) + rw [integralCutForm_axis,hboundary k (Or.inl hzero),hzero] at hd + apply hd.mpr + have haxis : cutForm a (axisDirection k) p.val=coordinate k p := by fin_cases k <;> rfl + rw [haxis] + exact (coordinate_bounds k p).1 + · by_cases hone : realCoordinate z k=1 + · simp only [inwardGate,ite_eq_right hzero,ite_eq_left hone] + have hd := C.positiveDecision_planar hr t u (axisDirection k) + (hnearB k (Or.inr hone)) p p.val hy (fun k => ⟨(hcell k).1,(hcell k).2.le⟩) + rw [integralCutForm_axis,hboundary k (Or.inr hone),hone] at hd + apply (not_congr hd).mpr + have haxis : cutForm a (axisDirection k) p.val=coordinate k p := by fin_cases k <;> rfl + rw [haxis] + exact not_le_of_gt (coordinate_bounds k p).2 + · simp [inwardGate,hzero,hone,wholePolygon] + exact ⟨⟨hpM,hgate 0⟩,hgate 1⟩ + +end ConcurrentGeometry +end InwardMargins + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardPlanarGerms.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardPlanarGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cde02e1131e94ee0c0d59f708504b52618b6fcf --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/InwardPlanarGerms.lean @@ -0,0 +1,135 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentGeometry +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FiniteArrangementGerms +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.SupportedCellPatching + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section InwardPlanarGerms + +theorem finite_arrangement_germ_inward {ι : Type*} [Finite ι] (a : ℕ) + (j : ι → Fin 4) (c : ι → ℝ) (z y : ℝ × ℝ) (σ : ι → Bool) + (hz₁ : z.1 ∈ Set.Icc (0:ℝ) 1) (hz₂ : z.2 ∈ Set.Icc (0:ℝ) 1) + (hzero : ∀ k, realCoordinate z k=0 → 0 Fin.castLE (by omega) d.1) + let C : Sum ι (Fin 2 × Bool) → ℝ := Sum.elim c (fun d => if d.2 then 1 else 0) + let S : Sum ι (Fin 2 × Bool) → Bool := Sum.elim σ Prod.snd + have ha : ∀ i, cutForm a (J i) z=C i → + if S i then cutForm a (J i) y < C i else C i < cutForm a (J i) y := by + intro i hi + cases i with + | inl i => exact hactive i hi + | inr d => + rcases d with ⟨d,b⟩ + fin_cases d <;> cases b + · exact hzero 0 hi + · exact hone 0 hi + · exact hzero 1 hi + · exact hone 1 hi + have hn : ∀ i, cutForm a (J i) z≠C i → + if S i then cutForm a (J i) z < C i else C i < cutForm a (J i) z := by + intro i hi + cases i with + | inl i => exact hinactive i hi + | inr d => + rcases d with ⟨d,b⟩ + fin_cases d <;> cases b <;> + simp [J,C,S,cutForm] at hi ⊢ + · exact lt_of_le_of_ne hz₁.1 (Ne.symm hi) + · exact lt_of_le_of_ne hz₁.2 hi + · exact lt_of_le_of_ne hz₂.1 (Ne.symm hi) + · exact lt_of_le_of_ne hz₂.2 hi + obtain ⟨p,hp,hcell,hgeneric⟩ := finite_arrangement_germ a J C z y S ha hn N hN hz + have hp₁ : p.1 ∈ Set.Ioo (0:ℝ) 1 := ⟨hcell (.inr (0,false)),hcell (.inr (0,true))⟩ + have hp₂ : p.2 ∈ Set.Ioo (0:ℝ) 1 := ⟨hcell (.inr (1,false)),hcell (.inr (1,true))⟩ + exact ⟨⟨p,⟨hp₁.1.le,hp₁.2⟩,⟨hp₂.1.le,hp₂.2⟩,hgeneric⟩,hp,fun i => hcell (.inl i)⟩ + +end InwardPlanarGerms + +section ConcurrentPositiveDecisions +namespace ConcurrentGeometry +variable {a : ℕ} {r : CutRing} (C : ConcurrentGeometry a r) + +noncomputable def positiveDecision (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) (j : Fin 4) : polygonAlgebra a := + spatialTranslate (u+C.anchors t j) (initialTest a r ⟨j.val+1,by omega⟩) + +noncomputable def marginPolygon (t : VertexType (commonVertexDenominator a)) + (u : CutRing × CutRing) : polygonAlgebra a := + spatialTranslate u (coordinateRectangle a (C.margins t).lower (C.margins t).upper) + +theorem positiveDecision_planar (hr : 0 linarith + fin_cases j + · exact C.axis_on_margin 0 u (u+C.anchors t 0) t hnear p y hy hcell + · exact C.axis_on_margin 1 u (u+C.anchors t 1) t hnear p y hy hcell + · exact translated_clippedSlope_planar r 2 hr (u+C.anchors t 2) p y hy hs + · exact translated_clippedSlope_planar r 3 hr (u+C.anchors t 3) p y hy hs + +theorem marginPolygon_lift (hr : ordinary r<1/2) + (t : VertexType (commonVertexDenominator a)) (u : CutRing × CutRing) + (p : GenericSquare a) (hp : p ∈ (C.marginPolygon t u).val) : + ∃ y : ℝ × ℝ, p.val=(Int.fract y.1,Int.fract y.2) ∧ AvoidsCuts a y ∧ + ∀ k, ordinary ((C.margins t).lower k+pointCoordinate u k) (C.margins t).lower k+pointCoordinate u k) + (fun k => (C.margins t).upper k+pointCoordinate u k)).val := by + simpa only [marginPolygon,spatialTranslate_coordinateRectangle,pointCoordinate] using hp + obtain ⟨y,hy,hy₀,hy₁⟩ := coordinateRectangle_strict_lift _ _ hle hlen p hp' + refine ⟨y,hy,planar_lift_avoidsCuts p y hy,?_⟩ + intro k + fin_cases k + · exact hy₀ + · exact hy₁ + +end ConcurrentGeometry +end ConcurrentPositiveDecisions + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LabelShiftedCharts.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LabelShiftedCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..e821f254dcd4afc1c4b62992468d95428390c40e --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LabelShiftedCharts.lean @@ -0,0 +1,84 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Arithmetic.PropagationArithmetic +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TangentChartTemplates +import OAI.GroupTheory.SimpleAmenable.Homology.ChartControlChain + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LabelShiftedCharts + +noncomputable def pointCoordinate (z : CutRing × CutRing) (j : Fin 2) : CutRing := + if j=0 then z.1 else z.2 + +noncomputable def pointLabel (z : CutRing × CutRing) (j : Fin 2) : ℤ := endpointLabel (pointCoordinate z j) + +@[simp] theorem pointCoordinate_add (z w : CutRing × CutRing) (j : Fin 2) : + pointCoordinate (z+w) j = pointCoordinate z j+pointCoordinate w j := by + fin_cases j <;> rfl + +@[simp] theorem pointLabel_add (z w : CutRing × CutRing) (j : Fin 2) : + pointLabel (z+w) j = pointLabel z j+pointLabel w j := by + simp only [pointLabel,pointCoordinate_add,endpointLabel_add] + +@[simp] theorem endpointLabel_int_mul_tau (i : ℤ) : + endpointLabel ((i : CutRing)*cutTau) = i := by simp [endpointLabel,cutTau] + +@[simp] theorem coordinateWindow_pointLabel (k : ℕ) (p : Fin 2 → ℤ) + (i : Fin 2 × Fin (k-1)) : + pointLabel (coordinateWindowPrimitives k p i).2 i.1 = p i.1+(i.2.val:ℤ) := by + simp only [coordinateWindowPrimitives,pointLabel,pointCoordinate,coordinateShift] + split <;> rw [← Int.cast_add, endpointLabel_int_mul_tau] + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + +theorem tangentChartSector_eq_window (hlarge : 15 < m+1) + (k : ℕ) (p : Fin 2 → ℤ) (u : CutRing) (h : B.TangentChartLaws k p u) + (n : ℕ) (hn : k ≤ n) (g : B.CoordinateWindowLaw n) + (d : Fin 2) (e : Fin 5) (z : CutRing × CutRing) + (l v : Fin 2 → CutRing) + (hl : ∀ j, p j ≤ endpointLabel (l j) ∧ endpointLabel (l j) < p j+k) + (hv : ∀ j, p j ≤ endpointLabel (v j) ∧ endpointLabel (v j) < p j+k) : + B.fullGeometricSector hlarge + (translatedTemplate (tangentChartTemplate a k p d (signedShortSteps u e)) z) (h d e z) + (spatialTranslate z (coordinateRectangle a l v)) = + B.windowSector hlarge n g (fun j => pointLabel z j+p j) + (spatialTranslate z (coordinateRectangle a l v)) := by + apply B.chartCoordinateSector_eq_window hlarge n g (fun j => pointLabel z j+p j) + _ (h d e z) Sum.inr Prod.fst (fun i => z+(coordinateWindowPrimitives k p i).2) + · intro i + rfl + · intro i + change pointLabel z i.1+p i.1 ≤ pointLabel (z+(coordinateWindowPrimitives k p i).2) i.1 + simp only [pointLabel_add,coordinateWindow_pointLabel] + omega + · intro i + change pointLabel (z+(coordinateWindowPrimitives k p i).2) i.1 < + pointLabel z i.1+p i.1+(n-1:ℕ) + simp only [pointLabel_add,coordinateWindow_pointLabel] + have hi := i.2.isLt + omega + · intro x y he + apply (translatedTemplate_resolved (a := a) (r := r) (coordinateWindowPrimitives k p) + (coordinateRectangle a l v) (fun x y he => and_congr + (coordinateLabelWindow_resolved k p 0 (l 0) (v 0) (hl 0) (hv 0) x y he) + (coordinateLabelWindow_resolved k p 1 (l 1) (v 1) (hl 1) (hv 1) x y he)) z) x y + simpa only [primitiveTests,primitiveFamilyTests,translatedTemplate,coordinateWindowPrimitives, + initialTest_coordinate] using he + +end InitialCoverSystem +end LabelShiftedCharts + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LiftedTranslationOrbits.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LiftedTranslationOrbits.lean new file mode 100644 index 0000000000000000000000000000000000000000..6cb3c330503a9585a680c5f5a9b50bda3c10a172 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LiftedTranslationOrbits.lean @@ -0,0 +1,36 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.NestedCutCalculus + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LiftedTranslationOrbits + +variable {A G H : Type*} [CommGroup A] [Group G] [Group H] + +theorem lifted_translation_orbit_independent (q : A →* G) (t : A →* H) + (x : G) (y : H) + (hc : ∀ k, Commute (q k) x → Commute (t k) y) + (u v : A) (h : q u*x*(q u)⁻¹ = q v*x*(q v)⁻¹) : + t u*y*(t u)⁻¹ = t v*y*(t v)⁻¹ := by + have hc₀ : Commute (q (v⁻¹*u)) x := by + simpa only [map_mul,map_inv] using (commute_ratio_of_conjugation h).symm + have hc₁ : Commute (t v⁻¹*t u) y := by + simpa only [map_mul,map_inv] using hc (v⁻¹*u) hc₀ + calc + t u*y*(t u)⁻¹ = t v*((t v⁻¹*t u)*y)*(t u)⁻¹ := by rw [map_inv]; group + _ = t v*(y*(t v⁻¹*t u))*(t u)⁻¹ := by rw [hc₁.eq] + _ = t v*y*(t v)⁻¹ := by rw [map_inv]; group + +end LiftedTranslationOrbits + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalChartDecisions.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalChartDecisions.lean new file mode 100644 index 0000000000000000000000000000000000000000..03aa40d56cb3e91027810cbd232e82f4e85cac95 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalChartDecisions.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Homology.ClippedLineSlide + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LocalChartDecisions + +theorem fract_fract_add_eq (x y : ℝ) : + Int.fract (Int.fract x+y)=Int.fract (x+y) := by + change Int.fract (x-(⌊x⌋:ℝ)+y)=_ + rw [sub_add_eq_add_sub,Int.fract_sub_intCast] + +theorem translate_planar_lift {a : ℕ} (p : GenericSquare a) (z : ℝ × ℝ) + (hz : p.val=(Int.fract z.1,Int.fract z.2)) (u : CutRing × CutRing) : + (translate a u p).val=(Int.fract (z.1+ordinary u.1),Int.fract (z.2+ordinary u.2)) := by + simp only [translate_val,hz,fract_fract_add_eq] + +theorem translated_clippedSlope_planar {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 rfl + simp only [hform,map_sub,ordinary_cutTau,map_one,map_zero,not_lt, + (coordinate_bounds j (translate a (-u) p)).1,and_true] + rw [hmem,hc,fract_coordinate_sign _ hl hu] + exact sub_nonneg + +end LocalChartDecisions + +section LineParameters + +theorem slope_same_intercept (a : ℕ) (d : Fin 2) (z z' : CutRing × CutRing) + (h : integralCutForm a (slopeDirection d) z = integralCutForm a (slopeDirection d) z') : + ∃ w : CutRing, z'=z+tangentOffset a d w := by + fin_cases d + · refine ⟨z'.1-z.1,?_⟩ + change z.2-cutTau^a*z.1=z'.2-cutTau^a*z'.1 at h + apply Prod.ext + · simp [tangentOffset] + · simp [tangentOffset] + linear_combination -h + · refine ⟨z'.2-z.2,?_⟩ + change z.1-cutTau^a*z.2=z'.1-cutTau^a*z'.2 at h + apply Prod.ext + · simp [tangentOffset] + linear_combination -h + · simp [tangentOffset] + +theorem real_slope_parameter (a : ℕ) (d : Fin 2) (u : CutRing × CutRing) (z : ℝ × ℝ) + (h : cutForm a (slopeDirection d) z=ordinary (integralCutForm a (slopeDirection d) u)) : + ∃ c : ℝ, ∀ j : Fin 2, + realCoordinate z j=ordinary (pointCoordinate u j)+tangentCoefficient a d j*c := by + fin_cases d + · refine ⟨z.1-ordinary u.1,?_⟩ + change z.2-Real.goldenRatio^a*z.1=ordinary (u.2-cutTau^a*u.1) at h + simp only [map_sub,map_mul,map_pow,ordinary_cutTau] at h + intro j; fin_cases j + · simp [realCoordinate,pointCoordinate,tangentCoefficient,tangentOffset] + · simp [realCoordinate,pointCoordinate,tangentCoefficient,tangentOffset] + linear_combination h + · refine ⟨z.2-ordinary u.2,?_⟩ + change z.1-Real.goldenRatio^a*z.2=ordinary (u.1-cutTau^a*u.2) at h + simp only [map_sub,map_mul,map_pow,ordinary_cutTau] at h + intro j; fin_cases j + · simp [realCoordinate,pointCoordinate,tangentCoefficient,tangentOffset] + linear_combination h + · simp [realCoordinate,pointCoordinate,tangentCoefficient,tangentOffset] + +end LineParameters + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalClippedBoxFormula.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalClippedBoxFormula.lean new file mode 100644 index 0000000000000000000000000000000000000000..5c8736089f0185373c0cde74e3ab0b5ffcd61f43 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalClippedBoxFormula.lean @@ -0,0 +1,192 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.RefinedEndpointDecisions +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ClippedGerms + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section LocalClippedBoxFormula + +theorem local_clipped_formula_with_box {a : ℕ} (r : CutRing) (j : Fin 4) + (hr : 0 -r) (fun _ => r))).val ↔ + ∀ d, ordinary (pointCoordinate v d-r)≤realCoordinate p.val d ∧ + realCoordinate p.val d -r+pointCoordinate u d + let h := fun d => r+pointCoordinate u d + obtain ⟨k,δ,hδ,hlocal⟩ := local_periodic_rectangle (a := a) l h + (fun d => by dsimp [l,h]; simp only [map_add,map_neg]; linarith [hr.1]) + (fun d => by dsimp [l,h]; simp only [map_add,map_neg]; linarith [hr.2]) z + let v := u+((k 0:CutRing),(k 1:CutRing)) + have hperiod : spatialTranslate v (clippedSlopePrimitive a r j)= + spatialTranslate u (clippedSlopePrimitive a r j) := by + rw [show v=u+((k 0:CutRing),(k 1:CutRing)) from rfl,spatialTranslate_add,spatialTranslate_integral] + have hbox : spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))= + coordinateRectangle a l h := by + simpa only [l,h,pointCoordinate] using spatialTranslate_coordinateRectangle u (fun _ => -r) (fun _ => r) + have hlift (p : GenericSquare a) (hp : dist p.val z<δ) : + p ∈ (spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))).val ↔ + ∀ d, ordinary (pointCoordinate v d-r)≤realCoordinate p.val d ∧ + realCoordinate p.val d simp [v,pointCoordinate] + simp only [l,h,map_add,map_neg,map_sub,hv] + constructor <;> rintro ⟨h₁,h₂⟩ <;> constructor <;> linarith + have hs (p : GenericSquare a) + (hp : ∀ d, ordinary (pointCoordinate v d-r)≤realCoordinate p.val d ∧ + realCoordinate p.val d exact hh + have hlo := lt_of_le_of_ne (hp d).1 hne.symm + have hup := (hp d).2 + simp only [map_sub,map_add] at hlo hup + rw [abs_lt] + constructor <;> linarith + rw [← hperiod] + exact translated_clippedSlope_planar r j hr v p p.val + (by rw [Int.fract_eq_self.mpr p.property.1,Int.fract_eq_self.mpr p.property.2.1]) + ⟨hnear 0,hnear 1⟩ + refine ⟨k,δ,hδ,?_⟩ + dsimp only + intro p hp + refine ⟨hlift p hp,?_⟩ + constructor + · intro hmem + have hc : p ∈ (spatialTranslate u (coordinateRectangle a (fun _ => -r) (fun _ => r))).val := + clippedSlope_le_box r j hr hmem + have hc' := (hlift p hp).mp hc + exact ⟨hc',(hs p hc').mp hmem⟩ + · rintro ⟨hc,hside⟩ + exact (hs p hc).mpr hside + +namespace ClippedGerm + +def BoxValid {a : ℕ} {r : CutRing} {j : Fin 4} {u : CutRing × CutRing} {z : ℝ × ℝ} + (G : ClippedGerm a r j u z) : Prop := + ∀ p : GenericSquare a, dist p.val z -r) (fun _ => r))).val ↔ + ∀ d, ordinary (pointCoordinate G.offset d-r)≤realCoordinate p.val d ∧ + realCoordinate p.val d (h p hp).2⟩,?_⟩ + exact fun p hp => (h p hp).1 + +end LocalClippedBoxFormula + +namespace ConcurrentGeometry.InwardChart +variable {a : ℕ} {r : CutRing} {C : ConcurrentGeometry a r} {ι : Type*} [Finite ι] + {j : ι → Fin 4} {c : ι → CutRing} {z : ℝ × ℝ} (T : C.InwardChart j c z) + +theorem decisions_locally_eq (hr : 0 ?_⟩ + have he := (T.local_decisions_eq hr p hp.2).trans (hlocal p hp.1) + simpa only [polygonAssignment,decide_eq_true_eq] using Bool.eq_iff_iff.mp (congrFun he i) + +omit [Finite ι] in + +theorem refined_coordinate_phase {κ : Type*} [Finite κ] + {N : ℕ} (e : Fin (N+1) → CutRing) + (he : StrictMono (fun i => ordinary (e i))) (hzero : e 0=0) (hlast : e (Fin.last N)=1) + (hmesh : ∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) + (cell : Fin 2 → Fin N) (d : κ → Fin 2) (v : κ → CutRing) (f : κ → ι) + (hf : ∀ k, j (f k)=axisDirection (d k) ∧ c (f k)=v k) + (hv : ∀ k, cutFraction (v k) ∈ Set.range e) + (hlocal : ∀ p : GenericSquare a, p ∈ (refinedGridRectangle a N e cell).val → + p ∈ (C.inwardMargin T.vertex T.offset z).val ∧ ∀ i, + p ∈ (C.localDecision T.vertex T.offset z (j i) (c i)).val ↔ + p ∈ (cutPolygon a (j i) (c i)).val) : + ∃ σ : κ → Bool, refinedGridRectangle a N e cell ≤ + C.coordinateGate T.vertex T.offset z d v σ := by + classical + obtain ⟨x,hx⟩ := refinedGridRectangle_nonempty e he hzero hlast hmesh cell + let σ := polygonAssignment (fun k => C.localDecision T.vertex T.offset z (axisDirection (d k)) (v k)) x + refine ⟨σ,fun y hy => ⟨(hlocal y hy).1,?_⟩⟩ + funext k + apply decide_eq_decide.mpr + have hxy := finite_grid_endpoint_decision e he hzero hlast (cell (d k)) (v k) (hv k) 0 (d k) y x + ((refinedGridRectangle_mem e he hzero hlast hmesh cell y).mp hy (d k)) + ((refinedGridRectangle_mem e he hzero hlast hmesh cell x).mp hx (d k)) + have hy' := (hlocal y hy).2 (f k) + have hx' := (hlocal x hx).2 (f k) + rw [(hf k).1,(hf k).2] at hy' hx' + refine Iff.trans hy' (Iff.trans ?_ hx'.symm) + simpa only [cutPolygon,halfPlane,Set.mem_ofPred_eq,cutForm_axis,coordinate,realCoordinate, + Int.cast_zero,add_zero] using hxy + +omit [Finite ι] in + +theorem refined_interior_phase_bounds {N : ℕ} (e : Fin (N+1) → CutRing) + (he : StrictMono (fun i => ordinary (e i))) (hzero : e 0=0) (hlast : e (Fin.last N)=1) + (hmesh : ∀ i : Fin N, ordinary (e i.succ)-ordinary (e i.castSucc)<1) + (cell : Fin 2 → Fin N) (v : CutRing × CutRing) + (lo hi : Fin 2 → ι) + (hlo : ∀ d, j (lo d)=axisDirection d ∧ c (lo d)=pointCoordinate v d-r) + (hhi : ∀ d, j (hi d)=axisDirection d ∧ c (hi d)=pointCoordinate v d+r) + (hlor : ∀ d, cutFraction (pointCoordinate v d-r) ∈ Set.range e) + (hhir : ∀ d, cutFraction (pointCoordinate v d+r) ∈ Set.range e) + (σ : Fin 2 × Bool → Bool) (hσ : ∀ d, σ (d,false)=false ∧ σ (d,true)=true) + (hgate : refinedGridRectangle a N e cell ≤ C.coordinateGate T.vertex T.offset z Prod.fst + (fun k => if k.2 then pointCoordinate v k.1+r else pointCoordinate v k.1-r) σ) + (hlocal : ∀ p : GenericSquare a, p ∈ (refinedGridRectangle a N e cell).val → ∀ i, + p ∈ (C.localDecision T.vertex T.offset z (j i) (c i)).val ↔ + p ∈ (cutPolygon a (j i) (c i)).val) : + ∀ d, -ordinary r≤ordinary (e (cell d).castSucc)-ordinary (pointCoordinate v d) ∧ + ordinary (e (cell d).succ)-ordinary (pointCoordinate v d)≤ordinary r := by + obtain ⟨x,hx⟩ := refinedGridRectangle_nonempty e he hzero hlast hmesh cell + have hassign := (hgate hx).2 + intro d + have hl := congrFun hassign (d,false) + have hh := congrFun hassign (d,true) + have hlocalL := hlocal x hx (lo d) + have hlocalH := hlocal x hx (hi d) + rw [(hlo d).1,(hlo d).2] at hlocalL + rw [(hhi d).1,(hhi d).2] at hlocalH + have hl' : ¬ x ∈ (C.localDecision T.vertex T.offset z (axisDirection d) (pointCoordinate v d-r)).val := by + simpa only [polygonAssignment,Bool.false_eq_true,↓reduceIte,(hσ d).1,decide_eq_false_iff_not] using hl + have hh' : x ∈ (C.localDecision T.vertex T.offset z (axisDirection d) (pointCoordinate v d+r)).val := by + simpa only [polygonAssignment,↓reduceIte,(hσ d).2,decide_eq_true_eq] using hh + simp only [cutPolygon,halfPlane,Set.mem_ofPred_eq,cutForm_axis] at hlocalL hlocalH + have hb : ordinary (pointCoordinate v d-r) ≤ coordinate d x ∧ + coordinate d x < ordinary (pointCoordinate v d+r) := by + exact ⟨le_of_not_gt (fun h => hl' (hlocalL.mpr h)),hlocalH.mp hh'⟩ + have hf := finite_grid_interval_lift e he hzero hlast (cell d) + (pointCoordinate v d-r) (pointCoordinate v d+r) (hlor d) (hhir d) (coordinate d x) + ((refinedGridRectangle_mem e he hzero hlast hmesh cell x).mp hx d) 0 + (by simpa only [Int.cast_zero,add_zero] using hb) + simp only [Int.cast_zero,add_zero,map_sub,map_add] at hf + constructor <;> linarith [hf.1,hf.2] + +end ConcurrentGeometry.InwardChart + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalCoordinateClassifier.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalCoordinateClassifier.lean new file mode 100644 index 0000000000000000000000000000000000000000..a51f15f3dcdd82baafb8d8312bff4f5bc86ed69b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/LocalCoordinateClassifier.lean @@ -0,0 +1,215 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.WindowRectangles + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section LocalCoordinateClassifier + +theorem circular_interval_on_short_cell (t l u v : ℝ) (_ht : 0 intro hh <;> linarith + · have hx' : Int.fract (x-v)=x-v-((k:ℝ)+1) := by + have he : ⌊x-v⌋=k+1 := Int.floor_eq_iff.mpr (by push_cast; constructor <;> linarith [hk.2,_ht.2]) + rw [Int.fract,he] + push_cast + rfl + rw [hx'] + push_cast + constructor <;> intro hh <;> linarith [hk.2] + · right; right; left + refine ⟨k,by linarith,by linarith,?_⟩ + intro x hxl hxu + rw [hf x (by linarith [hk.1]) (by linarith)] + constructor <;> intro hh <;> linarith + +end LocalCoordinateClassifier + +section ActualCoordinateClassifier + +theorem translated_coordinate_fract {a : ℕ} (j : Fin 2) (u : CutRing × CutRing) + (p : GenericSquare a) (z : ℝ × ℝ) (hz : p.val=(Int.fract z.1,Int.fract z.2)) : + p ∈ (spatialTranslate u (coordinatePrimitive a j)).val ↔ + Int.fract (realCoordinate z j-ordinary (pointCoordinate u j)) rfl + simp only [hform,map_sub,ordinary_cutTau,map_one,map_zero,not_lt, + hc,Int.fract_nonneg,and_true] + +theorem windowRectangle_coordinate_classify {a : ℕ} (n : ℕ) (hn : 201≤n) + (hmesh₁ : 200/(n:ℝ) intro hx <;> linarith + · have hu : u≤ordinary e+(k:ℝ) := by + by_contra hu + exact hkn ⟨by linarith,by linarith⟩ + exact iff_of_true (by linarith) (by linarith) + · rw [h x hxl hxu,h y hyl hyu] + have hkn := hn b hb k + by_cases hh : ordinary b+(k:ℝ)≤l + · exact iff_of_true (by linarith) (by linarith) + · have hu : u≤ordinary b+(k:ℝ) := by + by_contra hu + exact hkn ⟨by linarith,by linarith⟩ + constructor <;> intro hx <;> linarith + +theorem coordinateInterval_planar {a : ℕ} (j : Fin 2) (b e : CutRing) + (hbe : 0≤ordinary e-ordinary b ∧ ordinary e-ordinary b<1) + (p : GenericSquare a) (z : ℝ × ℝ) (hz : p.val=(Int.fract z.1,Int.fract z.2)) : + p ∈ (coordinateInterval a j b e).val ↔ + Int.fract (realCoordinate z j-ordinary b) (A s).det) t := by + convert! (determinantMultilinear.hasFDerivAt (A t)).differentiableAt.comp t hA using 1 + +theorem matrix_differentiableAt_inverse {ι : Type*} [Fintype ι] + {A : ℝ → Matrix ι ι ℝ} {t : ℝ} (hA : DifferentiableAt ℝ A t) + (hunit : IsUnit (A t).det) : DifferentiableAt ℝ (fun s => (A s)⁻¹) t := by + apply differentiableAt_pi.mpr + intro i + apply differentiableAt_pi.mpr + intro j + have hAj : DifferentiableAt ℝ (fun s => (A s).adjugate i j) t := by + simp only [Matrix.adjugate_apply] + apply matrix_differentiableAt_det + apply differentiableAt_pi.mpr + intro k + apply differentiableAt_pi.mpr + intro l + by_cases hk : k=j + · subst k + simpa only [Matrix.updateRow_self] using differentiableAt_const ((Pi.single i (1 : ℝ) : ι → ℝ) l) + · simpa only [Matrix.updateRow_ne hk] using + (differentiableAt_pi.mp (differentiableAt_pi.mp hA k) l) + have hd := (matrix_differentiableAt_det hA).inv hunit.ne_zero + convert! hd.mul hAj using 1 + ext s + simp only [Matrix.inv_def,Ring.inverse_eq_inv,Matrix.smul_apply,smul_eq_mul,Pi.mul_apply,Pi.inv_apply] + +theorem matrix_hasDerivAt_mul {ι : Type*} [Fintype ι] + {A B : ℝ → Matrix ι ι ℝ} {A' B' : Matrix ι ι ℝ} {t : ℝ} + (hA : HasDerivAt A A' t) (hB : HasDerivAt B B' t) : + HasDerivAt (fun s => A s*B s) (A'*B t+A t*B') t := by + apply hasDerivAt_pi.mpr + intro i + apply hasDerivAt_pi.mpr + intro j + have h (k : ι) := ((hasDerivAt_pi.mp (hasDerivAt_pi.mp hA i)) k).mul + ((hasDerivAt_pi.mp (hasDerivAt_pi.mp hB k)) j) + convert! HasDerivAt.fun_sum (fun k (_ : k∈Finset.univ) => h k) using 1 + simp only [Matrix.add_apply,Matrix.mul_apply,Finset.sum_add_distrib] + +theorem matrix_hasDerivAt_inverse {ι : Type*} [Fintype ι] + {A : ℝ → Matrix ι ι ℝ} {A' : Matrix ι ι ℝ} {t : ℝ} + (hA : HasDerivAt A A' t) (hunit : IsUnit (A t).det) : + HasDerivAt (fun s => (A s)⁻¹) (-(A t)⁻¹*A'*(A t)⁻¹) t := by + have hd : HasDerivAt (fun s => (A s)⁻¹) (deriv (fun s => (A s)⁻¹) t) t := by + apply DifferentiableAt.hasDerivAt + convert! matrix_differentiableAt_inverse hA.differentiableAt hunit using 1 + let D := deriv (fun s => (A s)⁻¹) t + have he : ∀ᶠs in 𝓝 t,A s*(A s)⁻¹=1 := by + have hn := (matrix_differentiableAt_det hA.differentiableAt).continuousAt.eventually_ne hunit.ne_zero + filter_upwards [hn] with s hs + exact Matrix.mul_nonsing_inv _ (isUnit_iff_ne_zero.mpr hs) + have hp := matrix_hasDerivAt_mul hA hd + have hz : A'*(A t)⁻¹+A t*D=0 := by + exact (hp.congr_of_eventuallyEq (Filter.EventuallyEq.symm he)).unique (hasDerivAt_const t (1 : Matrix ι ι ℝ)) + have hm := congrArg (fun M : Matrix ι ι ℝ => (A t)⁻¹*M) hz + have heq : D=-(A t)⁻¹*A'*(A t)⁻¹ := by + simp only [Matrix.mul_add,← Matrix.mul_assoc,Matrix.nonsing_inv_mul _ hunit, + one_mul,mul_zero] at hm + rw [neg_mul,neg_mul] + exact eq_neg_of_add_eq_zero_right hm + rw [← heq] + exact hd + +theorem matrix_hasDerivAt_mulVec {ι : Type*} [Fintype ι] + {A : ℝ → Matrix ι ι ℝ} {x : ℝ → ι → ℝ} + {A' : Matrix ι ι ℝ} {x' : ι → ℝ} {t : ℝ} + (hA : HasDerivAt A A' t) (hx : HasDerivAt x x' t) : + HasDerivAt (fun s => A s*ᵥx s) (A'*ᵥx t+A t*ᵥx') t := by + apply hasDerivAt_pi.mpr + intro i + have h (j : ι) := ((hasDerivAt_pi.mp (hasDerivAt_pi.mp hA i)) j).mul + ((hasDerivAt_pi.mp hx) j) + convert! HasDerivAt.fun_sum (fun j (_ : j∈Finset.univ) => h j) using 1 + simp only [Pi.add_apply,Matrix.mulVec,dotProduct,Finset.sum_add_distrib] + +end MatrixInverseCalculus + +section AffineVolume +open Classical Matrix MeasureTheory +open scoped ENNReal + +noncomputable def matrixAffineEquiv {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) : + (ι → ℝ) ≃ᵐ (ι → ℝ) := + ((Matrix.toLinearEquiv (Pi.basisFun ℝ ι) A hA).toContinuousLinearEquiv.toHomeomorph.trans + (Homeomorph.addLeft a)).toMeasurableEquiv + +theorem matrixAffineEquiv_apply {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a x : ι → ℝ) (hA : IsUnit A.det) : + matrixAffineEquiv A a hA x=a+A*ᵥx := by + change a+Matrix.toLin (Pi.basisFun ℝ ι) (Pi.basisFun ℝ ι) A x=_ + rw [Matrix.toLin_eq_toLin',Matrix.toLin'_apply] + +theorem matrixAffineEquiv_symm_apply {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a y : ι → ℝ) (hA : IsUnit A.det) : + (matrixAffineEquiv A a hA).symm y=A⁻¹*ᵥ(y-a) := by + apply (matrixAffineEquiv A a hA).injective + rw [MeasurableEquiv.apply_symm_apply,matrixAffineEquiv_apply, + Matrix.mulVec_mulVec,Matrix.mul_nonsing_inv _ hA,Matrix.one_mulVec] + abel + +theorem map_matrix_affine_volume {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) : + Measure.map (fun x => a+A*ᵥx) (volume : Measure (ι → ℝ))= + ENNReal.ofReal |A.det⁻¹| • volume := by + change Measure.map ((fun y => a+y) ∘ (Matrix.toLin' A)) volume=_ + rw [← Measure.map_map (by fun_prop) (by fun_prop), + Real.map_matrix_volume_pi_eq_smul_volume_pi hA.ne_zero, + Measure.map_smul _ (by fun_prop),map_add_left_eq_self] + +theorem integral_matrix_affine {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) (f : (ι → ℝ) → ℝ) : + (∫x,f (a+A*ᵥx))=|A.det⁻¹| *(∫y,f y) := by + have h := integral_map_equiv (μ := (volume : Measure (ι → ℝ))) + (matrixAffineEquiv A a hA) f + rw [show (matrixAffineEquiv A a hA : (ι → ℝ) → (ι → ℝ))= + (fun x => a+A*ᵥx) from funext (fun x => matrixAffineEquiv_apply A a x hA),map_matrix_affine_volume A a hA, + integral_smul_measure,ENNReal.toReal_ofReal (abs_nonneg _),smul_eq_mul] at h + exact h.symm + +theorem integral_matrix_affine_inverse {ι : Type*} [Fintype ι] + (A : Matrix ι ι ℝ) (a : ι → ℝ) (hA : IsUnit A.det) (f : (ι → ℝ) → ℝ) : + (∫y,f (A⁻¹*ᵥ(y-a)))=|A.det| *(∫x,f x) := by + have h := integral_matrix_affine A⁻¹ (-(A⁻¹*ᵥa)) + (isUnit_iff_ne_zero.mpr (by rw [Matrix.det_nonsing_inv,Ring.inverse_eq_inv]; exact inv_ne_zero hA.ne_zero)) f + convert! h using 1 + · congr 1 + ext y + rw [Matrix.mulVec_sub] + simp only [sub_eq_add_neg,add_comm] + · rw [Matrix.det_nonsing_inv,Ring.inverse_eq_inv,inv_inv] + +end AffineVolume + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/NestedCutCalculus.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/NestedCutCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..881d4755788586240713a44edc1dc72d9c7e96c0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/NestedCutCalculus.lean @@ -0,0 +1,248 @@ +import Mathlib + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +section NestedCutCalculus + +variable {E H : Type*} [Group E] [Group H] + +theorem commute_ratio_of_conjugation {u v x : H} + (h : v*x*v⁻¹ = u*x*u⁻¹) : Commute x (u⁻¹*v) := by + change x*(u⁻¹*v) = (u⁻¹*v)*x + have ht := congrArg (fun z => u⁻¹*z*v) h + simpa only [mul_assoc, inv_mul_cancel, mul_one, inv_mul_cancel_left] using ht.symm + +def differenceHom (l g : E →* H) + (h : ∀ s t, Commute (l s) ((l t)⁻¹*g t)) : E →* H where + toFun t := (l t)⁻¹*g t + map_one' := by simp + map_mul' s t := by + simp only [map_mul, mul_inv_rev] + calc + (l t)⁻¹*(l s)⁻¹*(g s*g t) = (l t)⁻¹*((l s)⁻¹*g s)*g t := by group + _ = ((l s)⁻¹*g s)*(l t)⁻¹*g t := by rw [(h t s).inv_left.eq] + _ = ((l s)⁻¹*g s)*((l t)⁻¹*g t) := by group + +@[simp] theorem differenceHom_apply (l g : E →* H) + (h : ∀ s t, Commute (l s) ((l t)⁻¹*g t)) (t : E) : + differenceHom l g h t = (l t)⁻¹*g t := rfl + +theorem split_conjugation (l k : E →* H) (h : ∀ s t, Commute (l s) (k t)) + (s t : E) : (l t*k t)*l s*(l t*k t)⁻¹ = l t*l s*(l t)⁻¹ := by + calc + (l t*k t)*l s*(l t*k t)⁻¹ = l t*(k t*l s)*(k t)⁻¹*(l t)⁻¹ := by group + _ = l t*(l s*k t)*(k t)⁻¹*(l t)⁻¹ := by rw [(h s t).symm.eq] + _ = l t*l s*(l t)⁻¹ := by group + +theorem nested_cut_commute_ratio (f l₁ h₁ l₂ h₂ : E →* H) + (hf₁ : ∀ s, f s = l₁ s*h₁ s) (hf₂ : ∀ s, f s = l₂ s*h₂ s) + (hc₁ : ∀ s t, Commute (l₁ s) (h₁ t)) + (hc₁₂ : ∀ s t, Commute (l₁ s) (h₂ t)) : + ∀ s t, Commute (l₁ s) ((l₂ t)⁻¹*f t) ∧ + Commute (l₁ s) ((l₁ t)⁻¹*l₂ t) := by + intro s t + constructor + · simpa [hf₂] using hc₁₂ s t + · apply commute_ratio_of_conjugation + calc + l₂ t*l₁ s*(l₂ t)⁻¹ = f t*l₁ s*(f t)⁻¹ := by + rw [hf₂] + calc + l₂ t*l₁ s*(l₂ t)⁻¹ = l₂ t*(l₁ s*h₂ t)*(h₂ t)⁻¹*(l₂ t)⁻¹ := by group + _ = l₂ t*(h₂ t*l₁ s)*(h₂ t)⁻¹*(l₂ t)⁻¹ := by rw [(hc₁₂ s t).eq] + _ = (l₂ t*h₂ t)*l₁ s*(l₂ t*h₂ t)⁻¹ := by group + _ = l₁ t*l₁ s*(l₁ t)⁻¹ := by rw [hf₁]; exact split_conjugation l₁ h₁ hc₁ s t + +theorem nested_cut_difference (f l₁ h₁ l₂ h₂ : E →* H) + (hf₁ : ∀ s, f s = l₁ s*h₁ s) (hf₂ : ∀ s, f s = l₂ s*h₂ s) + (hc₁ : ∀ s t, Commute (l₁ s) (h₁ t)) + (hc₁₂ : ∀ s t, Commute (l₁ s) (h₂ t)) : + ∃ d : E →* H, (∀ s, l₂ s = l₁ s*d s) ∧ + (∀ s t, Commute (l₁ s) (d t)) := by + let hc := fun s t => (nested_cut_commute_ratio f l₁ h₁ l₂ h₂ hf₁ hf₂ hc₁ hc₁₂ s t).2 + refine ⟨differenceHom l₁ l₂ hc, ?_, hc⟩ + intro s + simp + +theorem ordered_differences_telescope (l : ℕ → H) (n : ℕ) : + ((List.range n).map (fun i => (l i)⁻¹*l (i+1))).prod = (l 0)⁻¹*l n := by + induction n with + | zero => simp + | succ n ih => + rw [List.range_succ, List.map_append, List.prod_append, ih] + simp + +theorem difference_commutes_with_prefix (earlier l g : E →* H) + (h : ∀ s t, g t*earlier s*(g t)⁻¹ = l t*earlier s*(l t)⁻¹) + (hc : ∀ s t, Commute (l s) ((l t)⁻¹*g t)) (s t : E) : + Commute (earlier s) (differenceHom l g hc t) := + commute_ratio_of_conjugation (h s t) + +end NestedCutCalculus + +open scoped commutatorElement +section ConditionalControl +variable {E H : Type*} [Group E] [Group H] + +theorem same_conj_iff (u v k : H) : + u*k*u⁻¹ = v*k*v⁻¹ ↔ Commute (u⁻¹*v) k := by + constructor + · intro h + apply commutatorElement_eq_one_iff_commute.mp + rw [commutatorElement_def] + calc + _ = u⁻¹*(v*k*v⁻¹)*u*k⁻¹ := by group + _ = u⁻¹*(u*k*u⁻¹)*u*k⁻¹ := by rw [← h] + _ = 1 := by group + · intro h + have hc := h.eq + calc + u*k*u⁻¹ = u*(k*(u⁻¹*v))*v⁻¹ := by group + _ = u*((u⁻¹*v)*k)*v⁻¹ := by rw [hc] + _ = v*k*v⁻¹ := by group + +theorem commute_of_conditional_move (u v k : H) (hv : Commute u v) + (hk : Commute u (v*k*v⁻¹)) : Commute u k := by + have h := (hv.inv_right.mul_right hk).mul_right hv + simpa only [mul_assoc,inv_mul_cancel_left,mul_inv_cancel_right,inv_mul_cancel,mul_one] using h + +private theorem commutator_four (b c d e : H) + (hcb : Commute c b) (hce : Commute c e) (hdb : Commute d b) + (hcd : Commute c d) (hbe : Commute b e) : + ⁅c*d,b*e⁆ = ⁅d,e⁆ := by + rw [commutatorElement_mul_left_eq_conj_mul, + (hcb.mul_right hce).commutator_eq,mul_one, + commutatorElement_mul_right_eq_mul_conj,hdb.commutator_eq,one_mul] + have hb : Commute b ⁅d,e⁆ := by + rw [commutatorElement_def] + exact ((hdb.symm.mul_right hbe).mul_right hdb.symm.inv_right).mul_right hbe.inv_right + have hc : Commute c ⁅d,e⁆ := by + rw [commutatorElement_def] + exact ((hcd.mul_right hce).mul_right hcd.inv_right).mul_right hce.inv_right + calc + _ = c* ⁅d,e⁆ *c⁻¹ := by rw [hb.eq]; group + _ = ⁅d,e⁆ := by rw [hc.eq]; group + +theorem four_factor_in_subgroup [Group.IsPerfect E] + (b c d : E →* H) (C : Subgroup H) + (hbc : ∀ s t, Commute (b s) (c t)) + (hbd : ∀ s t, Commute (b s) (d t)) + (hcd : ∀ s t, Commute (c s) (d t)) + (hJ : ∀ s, c s*d s ∈ C) (hK : ∀ s, b s*d s ∈ C) : + d.range ≤ C := by + have hh : ⁅d.range,d.range⁆ ≤ C := by + apply Subgroup.commutator_le.mpr + rintro _ ⟨s,rfl⟩ _ ⟨t,rfl⟩ + rw [← commutator_four (b t) (c s) (d s) (d t) + (hbc t s).symm (hcd s t) (hbd t s).symm (hcd s s) (hbd t t)] + exact C.mul_mem (C.mul_mem (C.mul_mem (hJ s) (hK t)) (C.inv_mem (hJ s))) + (C.inv_mem (hK t)) + have he : (commutator E).map d = d.range := by + rw [Group.IsPerfect.commutator_eq_top,← MonoidHom.range_eq_map] + rw [← he,map_commutator_eq] + exact hh + +def SameActionOn (f g : E → H) (P : Subgroup H) : Prop := + ∀ s, ∀ k ∈ P, f s*k*(f s)⁻¹ = g s*k*(g s)⁻¹ + +theorem intersection_control [Group.IsPerfect E] + (a b c d f : E →* H) (P : Subgroup H) + (hbc : ∀ s t, Commute (b s) (c t)) + (hbd : ∀ s t, Commute (b s) (d t)) + (hcd : ∀ s t, Commute (c s) (d t)) + (hf : ∀ s, f s = a s*b s*c s*d s) + (hJ : SameActionOn (fun s => a s*b s) f P) + (hK : SameActionOn (fun s => a s*c s) f P) : + SameActionOn a f P := by + let C := Subgroup.centralizer (P : Set H) + have hJ' (s : E) : c s*d s ∈ C := by + intro k hk + have he := (same_conj_iff _ _ _).mp (hJ s k hk) + rw [hf] at he + have hu : (a s*b s)⁻¹*(a s*b s*c s*d s) = c s*d s := by group + rw [hu] at he + exact he.eq.symm + have hK' (s : E) : b s*d s ∈ C := by + intro k hk + have he := (same_conj_iff _ _ _).mp (hK s k hk) + rw [hf] at he + have hu : (a s*c s)⁻¹*(a s*b s*c s*d s) = b s*d s := by + calc + _ = (c s)⁻¹*b s*c s*d s := by group + _ = (c s)⁻¹*c s*b s*d s := by + simp only [mul_assoc] + rw [← mul_assoc (b s) (c s) (d s), (hbc s s).eq, mul_assoc] + _ = b s*d s := by group + rw [hu] at he + exact he.eq.symm + have hd := four_factor_in_subgroup b c d C hbc hbd hcd hJ' hK' + have hb (s : E) : b s ∈ C := by + simpa using C.mul_mem (hK' s) (C.inv_mem (hd ⟨s,rfl⟩)) + have hc (s : E) : c s ∈ C := by + simpa using C.mul_mem (hJ' s) (C.inv_mem (hd ⟨s,rfl⟩)) + intro s k hk + apply (same_conj_iff _ _ _).mpr + rw [hf] + have hu : (a s)⁻¹*(a s*b s*c s*d s) = b s*c s*d s := by group + rw [hu] + exact (C.mul_mem (C.mul_mem (hb s) (hc s)) + (hd ⟨s,rfl⟩) k hk).symm + +theorem conj_mul_of_commute (a b k : H) (h : Commute b k) : + (a*b)*k*(a*b)⁻¹ = a*k*a⁻¹ := by + calc + _ = a*(b*k*b⁻¹)*a⁻¹ := by group + _ = a*k*a⁻¹ := by rw [h.eq]; group + +section NestedCuts +variable (f : E →* H) (l h : ℕ → E →* H) + (hf : ∀ i s, f s = l i s*h i s) + (hc : ∀ i j, i ≤ j → ∀ s t, Commute (l i s) (h j t)) + +def cutDifference (i : ℕ) : E →* H := + differenceHom (l i) (l (i+1)) (fun s t => + (nested_cut_commute_ratio f (l i) (h i) (l (i+1)) (h (i+1)) + (hf i) (hf (i+1)) (hc i i le_rfl) (hc i (i+1) (by omega)) s t).2) + +theorem cutDifference_commute_prefix (i j : ℕ) (hij : j ≤ i) (s t : E) : + Commute (cutDifference f l h hf hc i t) (l j s) := by + change Commute ((l i t)⁻¹*l (i+1) t) (l j s) + apply (same_conj_iff _ _ _).mp + calc + _ = f t*l j s*(f t)⁻¹ := by + rw [hf i] + exact (conj_mul_of_commute _ _ _ (hc j i hij s t).symm).symm + _ = _ := by + rw [hf (i+1)] + exact conj_mul_of_commute _ _ _ (hc j (i+1) (by omega) s t).symm + +theorem cutDifference_pairwise (i j : ℕ) (hij : i < j) (s t : E) : + Commute (cutDifference f l h hf hc i s) (cutDifference f l h hf hc j t) := by + change Commute ((l i s)⁻¹*l (i+1) s) (cutDifference f l h hf hc j t) + exact ((cutDifference_commute_prefix f l h hf hc j i (by omega) s t).symm.inv_left).mul_left + (cutDifference_commute_prefix f l h hf hc j (i+1) (by omega) s t).symm + +theorem cutDifference_telescope (n : ℕ) (s : E) : + ((List.range n).map (fun i => cutDifference f l h hf hc i s)).prod = + (l 0 s)⁻¹*l n s := by + induction n with + | zero => simp + | succ n ih => + rw [List.range_succ,List.map_append,List.prod_append,ih] + simp only [List.map_singleton,List.prod_singleton] + change (l 0 s)⁻¹*l n s*((l n s)⁻¹*l (n+1) s) = _ + group + +end NestedCuts + +end ConditionalControl + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ObservableDistance.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ObservableDistance.lean new file mode 100644 index 0000000000000000000000000000000000000000..db8362aee6e90ce4b8ac9bc960c1e448ced814e2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ObservableDistance.lean @@ -0,0 +1,144 @@ +import Mathlib + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ObservableDistance +open Classical MeasureTheory Set + +def ObservableClose {X : Type*} [MeasurableSpace X] (μ ν : Measure X) (ε : ℝ) : Prop := + ∀f : X → ℝ,Measurable f → (∀x,f x∈Icc (0:ℝ) 1) → + |(∫x,f x ∂μ)-(∫x,f x ∂ν)| ≤ ε + +theorem boundedObservable_integrable {X : Type*} [MeasurableSpace X] + (μ : Measure X) [IsFiniteMeasure μ] {f : X → ℝ} + (hf : Measurable f) (hb : ∀x,f x∈Icc (0:ℝ) 1) : Integrable f μ := by + apply (integrable_const (1:ℝ)).mono' hf.aestronglyMeasurable + filter_upwards with x + simpa only [Real.norm_eq_abs,abs_of_nonneg (hb x).1] using (hb x).2 + +theorem ObservableClose.mono {X : Type*} [MeasurableSpace X] + {μ ν : Measure X} {ε δ : ℝ} (h : ObservableClose μ ν ε) (he : ε ≤ δ) : + ObservableClose μ ν δ := fun f hf hb => (h f hf hb).trans he + +theorem ObservableClose.symm {X : Type*} [MeasurableSpace X] + {μ ν : Measure X} {ε : ℝ} (h : ObservableClose μ ν ε) : + ObservableClose ν μ ε := by + intro f hf hb + rw [abs_sub_comm] + exact h f hf hb + +theorem ObservableClose.map {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] + {μ ν : Measure X} {ε : ℝ} (h : ObservableClose μ ν ε) {g : X → Y} (hg : Measurable g) : + ObservableClose (μ.map g) (ν.map g) ε := by + intro f hf hb + rw [integral_map hg.aemeasurable hf.aestronglyMeasurable, + integral_map hg.aemeasurable hf.aestronglyMeasurable] + exact h (f ∘ g) (hf.comp hg) (fun x => hb (g x)) + +theorem ObservableClose.event {X : Type*} [MeasurableSpace X] + {μ ν : Measure X} [IsFiniteMeasure μ] [IsFiniteMeasure ν] + {ε : ℝ} (h : ObservableClose μ ν ε) {s : Set X} (hs : MeasurableSet s) : + |μ.real s-ν.real s| ≤ ε := by + have hh := h (s.indicator (fun _ => (1:ℝ))) (measurable_const.indicator hs) (by + intro x + by_cases hx : x∈s <;> simp [hx]) + simpa only [integral_indicator hs,integral_const,smul_eq_mul,mul_one,Measure.real,Measure.restrict_apply_univ] using hh + +theorem ObservableClose.prod_right {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] + {μ ν : Measure X} [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] + (ρ : Measure Y) [IsProbabilityMeasure ρ] {ε : ℝ} (h : ObservableClose μ ν ε) : + ObservableClose (μ.prod ρ) (ν.prod ρ) ε := by + intro f hf hb + have hiμ := boundedObservable_integrable (μ.prod ρ) hf hb + have hiν := boundedObservable_integrable (ν.prod ρ) hf hb + rw [integral_prod f hiμ,integral_prod f hiν] + apply h (fun x => ∫y,f (x,y) ∂ρ) + · have hh : StronglyMeasurable (Function.uncurry (fun (x : X) (y : Y) => f (x,y))) := + hf.stronglyMeasurable + exact hh.integral_prod_right.measurable + · intro x + refine ⟨integral_nonneg (fun y => (hb (x,y)).1),?_⟩ + have hi := boundedObservable_integrable ρ (hf.comp (measurable_const.prodMk measurable_id)) + (fun y => hb (x,y)) + calc + _ ≤ ∫_ : Y,(1:ℝ) ∂ρ := integral_mono hi (integrable_const 1) (fun y => (hb (x,y)).2) + _ = 1 := by simp + +theorem observableClose_of_density {X : Type*} [MeasurableSpace X] + (μ : Measure X) {p q : X → ℝ} (hp : Measurable p) (hq : Measurable q) + (hp₀ : ∀x,0 ≤ p x) (hq₀ : ∀x,0 ≤ q x) + (hip : Integrable p μ) (hiq : Integrable q μ) : + ObservableClose (μ.withDensity (fun x => ENNReal.ofReal (p x))) + (μ.withDensity (fun x => ENNReal.ofReal (q x))) (∫x,|p x-q x| ∂μ) := by + intro f hf hb + have hb' : ∀ᵐx ∂μ,‖f x‖ ≤ (1:ℝ) := ae_of_all _ (fun x => by + simpa only [Real.norm_eq_abs,abs_of_nonneg (hb x).1] using (hb x).2) + have hipf := hip.mul_bdd hf.aestronglyMeasurable hb' + have hiqf := hiq.mul_bdd hf.aestronglyMeasurable hb' + rw [integral_withDensity_eq_integral_toReal_smul hp.ennreal_ofReal + (ae_of_all _ (fun _ => ENNReal.ofReal_lt_top)), + integral_withDensity_eq_integral_toReal_smul hq.ennreal_ofReal + (ae_of_all _ (fun _ => ENNReal.ofReal_lt_top))] + simp only [ENNReal.toReal_ofReal (hp₀ _),ENNReal.toReal_ofReal (hq₀ _),smul_eq_mul] + rw [← integral_sub hipf hiqf] + calc + _ ≤ ∫x,|p x*f x-q x*f x| ∂μ := abs_integral_le_integral_abs + _ ≤ _ := by + apply integral_mono (hipf.sub hiqf).abs (hip.sub hiq).abs + intro x + change |p x*f x-q x*f x| ≤ |p x-q x| + rw [← sub_mul,abs_mul,abs_of_nonneg (hb x).1] + exact mul_le_of_le_one_right (abs_nonneg _) (hb x).2 + +end ObservableDistance + +section InfiniteSplit +open Classical MeasureTheory Set + +theorem infinitePi_split {ι X : Type*} [MeasurableSpace X] + (μ : Measure X) [IsProbabilityMeasure μ] (p : ι → Prop) : + ((Measure.infinitePi (fun _ : Subtype p => μ)).prod + (Measure.infinitePi (fun _ : Subtype (fun i => ¬p i) => μ))).map + (MeasurableEquiv.piEquivPiSubtypeProd (fun _ : ι => X) p).symm= + Measure.infinitePi (fun _ : ι => μ) := by + apply Measure.eq_infinitePi + intro s t ht + let e := (MeasurableEquiv.piEquivPiSubtypeProd (fun _ : ι => X) p).symm + rw [Measure.map_apply e.measurable (MeasurableSet.pi s.countable_toSet (fun i _ => ht i))] + have he (x : (Subtype p → X) × (Subtype (fun i => ¬p i) → X)) (i : ι) : + e x i=(if h : p i then x.1 ⟨i,h⟩ else x.2 ⟨i,h⟩) := rfl + have hpre : (e : _ → _) ⁻¹' ((s : Set ι).pi t)= + ((s.subtype p : Set (Subtype p)).pi (fun i => t i.val)) ×ˢ + ((s.subtype (fun i => ¬p i) : Set (Subtype (fun i => ¬p i))).pi (fun i => t i.val)) := by + ext x + simp only [mem_preimage,mem_pi,Finset.mem_coe,mem_prod,Finset.mem_subtype] + constructor + · intro h + constructor + · intro i hi + simpa only [he,dite_eq_left i.property] using h i.val hi + · intro i hi + simpa only [he,dite_eq_right i.property] using h i.val hi + · rintro ⟨h₁,h₂⟩ i hi + by_cases hp : p i + · simpa only [he,dite_eq_left hp] using h₁ ⟨i,hp⟩ hi + · simpa only [he,dite_eq_right hp] using h₂ ⟨i,hp⟩ hi + rw [hpre,Measure.prod_prod,Measure.infinitePi_pi (fun _ : Subtype p => μ) (fun i _ => ht i.val), + Measure.infinitePi_pi (fun _ : Subtype (fun i => ¬p i) => μ) (fun i _ => ht i.val)] + rw [Finset.prod_subtype_eq_prod_filter (s:=s) (p:=p) (fun i => μ (t i)), + Finset.prod_subtype_eq_prod_filter (s:=s) (p:=fun i => ¬p i) (fun i => μ (t i))] + exact Finset.prod_filter_mul_prod_filter_not s p (fun i => μ (t i)) + +end InfiniteSplit + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ObservableProducts.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ObservableProducts.lean new file mode 100644 index 0000000000000000000000000000000000000000..04e37f8117513da61db6c098d6891b49a016aaa8 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/ObservableProducts.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ObservableDistance + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section ObservableProducts +open Classical MeasureTheory Set + +theorem ObservableClose.refl {X : Type*} [MeasurableSpace X] (μ : Measure X) : + ObservableClose μ μ 0 := by + intro f hf hb + simp + +theorem ObservableClose.trans {X : Type*} [MeasurableSpace X] + {μ ν ρ : Measure X} {ε δ : ℝ} (h : ObservableClose μ ν ε) (k : ObservableClose ν ρ δ) : + ObservableClose μ ρ (ε+δ) := by + intro f hf hb + exact (abs_sub_le _ _ _).trans (add_le_add (h f hf hb) (k f hf hb)) + +theorem ObservableClose.prod_left {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] + {μ ν : Measure Y} [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] + (ρ : Measure X) [IsProbabilityMeasure ρ] {ε : ℝ} (h : ObservableClose μ ν ε) : + ObservableClose (ρ.prod μ) (ρ.prod ν) ε := by + have hh := (h.prod_right ρ).map measurable_swap + simpa only [Measure.prod_swap] using hh + +theorem ObservableClose.prod {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] + {μ ν : Measure X} [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] + {ρ σ : Measure Y} [IsProbabilityMeasure ρ] [IsProbabilityMeasure σ] + {ε δ : ℝ} (h : ObservableClose μ ν ε) (k : ObservableClose ρ σ δ) : + ObservableClose (μ.prod ρ) (ν.prod σ) (ε+δ) := + (h.prod_right ρ).trans (k.prod_left ν) + +theorem ObservableClose.fin_pi (n : ℕ) {X : Fin n → Type*} [∀i,MeasurableSpace (X i)] + (μ ν : ∀i,Measure (X i)) [∀i,IsProbabilityMeasure (μ i)] [∀i,IsProbabilityMeasure (ν i)] + (ε : Fin n → ℝ) (h : ∀i,ObservableClose (μ i) (ν i) (ε i)) : + ObservableClose (Measure.pi μ) (Measure.pi ν) (∑i,ε i) := by + induction n with + | zero => + have he : μ=ν := by funext i; exact Fin.elim0 i + subst ν + simpa using ObservableClose.refl (Measure.pi μ) + | succ n ih => + let e := MeasurableEquiv.piFinSuccAbove X (0 : Fin (n+1)) + have hμ := (measurePreserving_piFinSuccAbove μ (0 : Fin (n+1))).symm.map_eq + have hν := (measurePreserving_piFinSuccAbove ν (0 : Fin (n+1))).symm.map_eq + have hi := ih (fun i => μ ((0 : Fin (n+1)).succAbove i)) + (fun i => ν ((0 : Fin (n+1)).succAbove i)) + (fun i => ε ((0 : Fin (n+1)).succAbove i)) (fun i => h _) + have hh := ((h 0).prod hi).map e.symm.measurable + rw [hμ,hν] at hh + simpa only [Fin.succAbove_zero,Fin.sum_univ_succ] using hh + +end ObservableProducts + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OffsetFrames.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OffsetFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..908c795307ff2654d88d9db8d12a0fb2633c764b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OffsetFrames.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PrimitiveCentralLaws +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.CommonTranslatedCopies +import OAI.GroupTheory.SimpleAmenable.RandomFields.CanonicalPolygonCovariance + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement + +structure OffsetFrame (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (I : Finset (Fin (m+1))) (u : Fin (m+1) → CutRing × CutRing) where + k : Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) + d : Fin (m+1) → CutRing × CutRing + projection : sourceLatticeFullMap a r m hm k = trackTranslation d + prescribed : ∀ i ∈ I, d i = u i + +noncomputable def balancedOffsetFrame (a : ℕ) (r : CutRing) (m : ℕ) (hm : 2 ≤ m) + (I : Finset (Fin (m+1))) (b : Fin (m+1)) (hb : b ∉ I) + (u : Fin (m+1) → CutRing × CutRing) : OffsetFrame a r m hm I u := by + let h := sourceLatticeFullMap_prescribed a r m hm I b hb u + exact ⟨h.choose,h.choose_spec.choose,h.choose_spec.choose_spec.1,h.choose_spec.choose_spec.2⟩ + +namespace OffsetFrame +variable {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} {I : Finset (Fin (m+1))} + {u v : Fin (m+1) → CutRing × CutRing} + +def difference (F : OffsetFrame a r m hm I u) (G : OffsetFrame a r m hm I v) + (huv : ∀ i ∈ I, u i = v i) : CommonFrame a r m hm I 0 where + k := F.k⁻¹ * G.k + d := -F.d + G.d + projection := by rw [map_mul,map_inv,F.projection,G.projection,trackTranslation_add,trackTranslation_neg] + common := by intro i hi; simp only [Pi.add_apply,Pi.neg_apply,F.prescribed i hi,G.prescribed i hi,huv i hi,neg_add_cancel] + +end OffsetFrame + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 l.val.1) + (fun l => ordinary l.val.2) (fun l => squareSign l.val p) + +theorem openSquareChart_open {a : ℕ} (T : Finset PlaneCut) (p : GenericSquare a) : + IsOpen (openSquareChart T p) := by + apply ((isOpen_Ioo : IsOpen (Ioo (0:ℝ) 1)).prod isOpen_Ioo).inter + have he : strictLineCell a (fun l : T => l.val.1) (fun l => ordinary l.val.2) + (fun l => squareSign l.val p)=⋂l : T,{x | if squareSign l.val p then + cutForm a l.val.1 x < ordinary l.val.2 else ordinary l.val.2 < cutForm a l.val.1 x} := by + ext x + simp [strictLineCell] + rw [he] + apply isOpen_iInter_of_finite + intro l + split_ifs + · exact isOpen_lt (cutForm_continuous a l.val.1) continuous_const + · exact isOpen_lt continuous_const (cutForm_continuous a l.val.1) + +theorem openSquareChart_convex {a : ℕ} (T : Finset PlaneCut) (p : GenericSquare a) : + Convex ℝ (openSquareChart T p) := + ((convex_Ioo (0:ℝ) 1).prod (convex_Ioo (0:ℝ) 1)).inter (strictLineCell_convex _ _ _ _) + +theorem self_mem_openSquareChart {a : ℕ} (T : Finset PlaneCut) (p : GenericSquare a) : + p.val ∈ openSquareChart T p := by + refine ⟨generic_mem_squareInterior p,?_⟩ + intro l + by_cases h : cutForm a l.val.1 p.val < ordinary l.val.2 + · simp [squareSign,h] + · simpa [squareSign,h] using + lt_of_le_of_ne (le_of_not_gt h) (p.property.2.2 l.val.1 l.val.2).symm + +theorem openSquareChart_signs {a : ℕ} {T : Finset PlaneCut} {p : GenericSquare a} + {x : ℝ×ℝ} (hx : x ∈ openSquareChart T p) {l : PlaneCut} (hl : l ∈ T) : + cutForm a l.1 x ≠ ordinary l.2 ∧ + (cutForm a l.1 x < ordinary l.2 ↔ cutForm a l.1 p.val < ordinary l.2) := by + have hh := hx.2 ⟨l,hl⟩ + by_cases h : cutForm a l.1 p.val < ordinary l.2 + · have ht : cutForm a l.1 x < ordinary l.2 := by simpa [squareSign,h] using hh + exact ⟨ne_of_lt ht,iff_of_true ht h⟩ + · have ht : ordinary l.2 < cutForm a l.1 x := by simpa [squareSign,h] using hh + exact ⟨ne_of_gt ht,iff_of_false (not_lt_of_gt ht) h⟩ + +theorem squareArrangement_on_openChart {a : ℕ} {K : Type*} + (f : GenericSquare a → K) (T : Finset PlaneCut) + (hT : ∀p q,(∀l ∈ T,squareSign l p=squareSign l q) → f p=f q) + (p q : GenericSquare a) (hq : q.val ∈ openSquareChart T p) : f q=f p := + hT q p (fun _ hl => decide_eq_decide.mpr (openSquareChart_signs hq hl).2) + +theorem open_subset_closed_of_dense {X : Type*} [TopologicalSpace X] + {D C A : Set X} (hD : Dense D) (hC : IsOpen C) (hA : IsClosed A) + (h : C ∩ D ⊆ A) : C ⊆ A := by + intro x hx + by_contra hn + have hne : (C ∩ Aᶜ).Nonempty := ⟨x,hx,hn⟩ + obtain ⟨y,hy,hyD⟩ := hD.inter_open_nonempty (C ∩ Aᶜ) (hC.inter hA.isOpen_compl) hne + exact hy.2 (h ⟨hy.1,hyD⟩) + +theorem open_translation_square {a : ℕ} {C : Set (ℝ×ℝ)} (hC : IsOpen C) + (hCs : C ⊆ squareInterior) (u : CutRing×CutRing) + (hgen : ∀p : GenericSquare a,p.val ∈ C → p.val+(ordinary u.1,ordinary u.2) ∈ squareInterior) : + (fun x => x+(ordinary u.1,ordinary u.2)) '' C ⊆ squareInterior := by + let v := (ordinary u.1,ordinary u.2) + let W := (fun x => x+v) '' C + have hW : IsOpen W := (Homeomorph.addRight v).isOpenMap C hC + have hWclosed : W ⊆ Icc (0:ℝ) 1 ×ˢ Icc (0:ℝ) 1 := by + apply open_subset_closed_of_dense (avoidsCuts_dense a) hW (isClosed_Icc.prod isClosed_Icc) + rintro y ⟨⟨x,hx,rfl⟩,hy⟩ + have hg : AvoidsCuts a x := by + have hh := avoidsCuts_translate hy (-u) + simpa [v,map_neg,←Prod.neg_mk] using hh + have hp : x.1 ∈ Ico (0:ℝ) 1 ∧ x.2 ∈ Ico (0:ℝ) 1 ∧ AvoidsCuts a x := + ⟨⟨(hCs hx).1.1.le,(hCs hx).1.2⟩,⟨(hCs hx).2.1.le,(hCs hx).2.2⟩,hg⟩ + have hi := hgen ⟨x,hp⟩ hx + exact ⟨⟨hi.1.1.le,hi.1.2.le⟩,⟨hi.2.1.le,hi.2.2.le⟩⟩ + have hh := hW.subset_interior_iff.mpr hWclosed + simpa only [interior_prod_eq,interior_Icc,squareInterior] using hh + +theorem fullGroupAffineChart_square {a m : ℕ} (g : polygonFullGroup a m) (i : Fin m) + (T : Finset PlaneCut) + (hT : ∀p q,(∀l ∈ T,squareSign l p=squareSign l q) → + fullGroupAffineData g i p=fullGroupAffineData g i q) (p : GenericSquare a) : + (fun x => x+(ordinary (fullGroupAffineData g i p).2.1, + ordinary (fullGroupAffineData g i p).2.2)) '' openSquareChart T p ⊆ squareInterior := by + apply open_translation_square (openSquareChart_open T p) (fun _ h => h.1) + intro q hq + have hf := squareArrangement_on_openChart (fullGroupAffineData g i) T hT p q hq + have hg := fullGroupSquareShift_spec g i q + change (g.val (i,q)).2.val=q.val+(ordinary (fullGroupAffineData g i q).2.1, + ordinary (fullGroupAffineData g i q).2.2) at hg + rw [hf] at hg + rw [←hg] + exact generic_mem_squareInterior _ + +end OpenAffineCharts + +section ChartLineIntervals +open Classical Set + +noncomputable def chartCrossingParameter (a : ℕ) (j : Fin 4) (c : CutRing) (l : PlaneCut) : ℝ := + (ordinary l.2-cutForm a l.1 (barrierLinePoint a j c 0))/cutForm a l.1 (barrierTangent a j) + +theorem chartCrossingParameter_spec (a : ℕ) (j : Fin 4) (c : CutRing) (l : PlaneCut) + (hl : cutForm a l.1 (barrierTangent a j) ≠ 0) : + cutForm a l.1 (barrierLinePoint a j c (chartCrossingParameter a j c l))=ordinary l.2 := by + rw [barrier_cut_difference a j l.1 c 0] + simp only [sub_zero,chartCrossingParameter,div_mul_cancel₀ _ hl] + ring + +theorem chartCrossingParameter_unique (a : ℕ) (j : Fin 4) (c : CutRing) (l : PlaneCut) + (hl : cutForm a l.1 (barrierTangent a j) ≠ 0) {r : ℝ} + (hr : cutForm a l.1 (barrierLinePoint a j c r)=ordinary l.2) : + r=chartCrossingParameter a j c l := by + have hd := barrier_cut_difference a j l.1 c 0 r + dsimp [chartCrossingParameter] + apply (eq_div_iff hl).mpr + simpa only [sub_zero] using (eq_sub_iff_add_eq.mpr (by linarith : + r*cutForm a l.1 (barrierTangent a j)+cutForm a l.1 (barrierLinePoint a j c 0)=ordinary l.2)) + +theorem openSquareChart_line_interval {a : ℕ} (T : Finset PlaneCut) (p : GenericSquare a) + {j : Fin 4} {c : CutRing} {N x : ℝ} (hc : c ∈ barrierCandidate a j N) + (hx : barrierLinePoint a j c x ∈ openSquareChart T p) : + ∃L U : ℝ,x ∈ Ioo L U ∧ + L ∈ Icc (barrierLineLower a j c) (barrierLineUpper a j c) ∧ + U ∈ Icc (barrierLineLower a j c) (barrierLineUpper a j c) ∧ + (∀r ∈ Ioo L U,barrierLinePoint a j c r ∈ openSquareChart T p) ∧ + (∀r ∈ ({L,U} : Finset ℝ),r=barrierLineLower a j c ∨ r=barrierLineUpper a j c ∨ + ∃l ∈ T,j ≠ l.1 ∧ cutForm a l.1 (barrierLinePoint a j c r)=ordinary l.2) := by + let lo := barrierLineLower a j c + let hi := barrierLineUpper a j c + let R := T.filter (fun l => cutForm a l.1 (barrierTangent a j) ≠ 0) + let E := (({lo,hi} : Finset ℝ) ∪ R.image (chartCrossingParameter a j c)).filter (fun r => r ∈ Icc lo hi) + have hxin : x ∈ Ioo lo hi := (barrierLinePoint_interior_iff hc x).mp hx.1 + have hgap : lo ≤ hi := hxin.1.le.trans hxin.2.le + have hlo : lo ∈ E := by simp [E,hgap] + have hhi : hi ∈ E := by simp [E,hgap] + have hxE : x ∉ E := by + intro he + have hh := (Finset.mem_filter.mp he).1 + rcases Finset.mem_union.mp hh with hh | hh + · simp only [Finset.mem_insert,Finset.mem_singleton] at hh + rcases hh with hh | hh + · exact (ne_of_gt hxin.1) hh + · exact (ne_of_lt hxin.2) hh + · obtain ⟨l,hl,he⟩ := Finset.mem_image.mp hh + obtain ⟨hlT,hlne⟩ := Finset.mem_filter.mp hl + exact (openSquareChart_signs hx hlT).1 (he ▸ chartCrossingParameter_spec a j c l hlne) + obtain ⟨L,U,hLU,hxLU⟩ := exists_consecutiveSubdivision E hlo hhi ⟨hxin.1.le,hxin.2⟩ + have hxL : L < x := lt_of_le_of_ne hxLU.1 (fun h => hxE (h ▸ hLU.1)) + have hxU : x < U := lt_of_le_of_ne hxLU.2 (fun h => hxE (h.symm ▸ hLU.2.1)) + have hL := (Finset.mem_filter.mp hLU.1).2 + have hU := (Finset.mem_filter.mp hLU.2.1).2 + have hn (l : PlaneCut) (hl : l ∈ T) (r : ℝ) (hr : r ∈ Ioo L U) : + cutForm a l.1 (barrierLinePoint a j c r) ≠ ordinary l.2 := by + intro he + by_cases hzero : cutForm a l.1 (barrierTangent a j)=0 + · have hh := barrier_cut_difference a j l.1 c r x + rw [hzero,mul_zero,add_zero,he] at hh + exact (openSquareChart_signs hx hl).1 hh + · have hre : r ∈ E := by + apply Finset.mem_filter.mpr + refine ⟨Finset.mem_union_right _ (Finset.mem_image.mpr ⟨l,Finset.mem_filter.mpr ⟨hl,hzero⟩,?_⟩), + ⟨hL.1.trans hr.1.le,hr.2.le.trans hU.2⟩⟩ + exact (chartCrossingParameter_unique a j c l hzero he).symm + exact not_le_of_gt hr.2 (hLU.2.2.2 r hre hr.1) + refine ⟨L,U,⟨hxL,hxU⟩,hL,hU,?_,?_⟩ + · intro r hr + refine ⟨(barrierLinePoint_interior_iff hc r).mpr ⟨hL.1.trans_lt hr.1,hr.2.trans_le hU.2⟩,?_⟩ + intro l + have hs := continuous_nonzero_sign isPreconnected_Ioo + (((cutForm_continuous a l.val.1).comp (barrierLinePoint_continuous a j c)).sub continuous_const).continuousOn + (fun t ht => sub_ne_zero.mpr (hn l.val l.property t ht)) hr ⟨hxL,hxU⟩ + have hsg : (cutForm a l.val.1 (barrierLinePoint a j c r) < ordinary l.val.2 ↔ + cutForm a l.val.1 (barrierLinePoint a j c x) < ordinary l.val.2) := by simpa only [Pi.sub_apply,Function.comp_apply,sub_lt_zero] using hs + have hh := hx.2 l + by_cases hl : squareSign l.val p=true + · simpa [hl] using hsg.mpr (by simpa [hl] using hh) + · have hnot : ¬cutForm a l.val.1 (barrierLinePoint a j c r) < ordinary l.val.2 := + fun h => not_lt_of_gt (by simpa [hl] using hh) (hsg.mp h) + simpa [hl] using lt_of_le_of_ne (le_of_not_gt hnot) (hn l.val l.property r hr).symm + · intro r hr + have hre : r ∈ E := by + simp only [Finset.mem_insert,Finset.mem_singleton] at hr + rcases hr with rfl|rfl + · exact hLU.1 + · exact hLU.2.1 + rcases Finset.mem_union.mp (Finset.mem_filter.mp hre).1 with he | he + · simp only [Finset.mem_insert,Finset.mem_singleton] at he + exact he.elim Or.inl (fun h => Or.inr (Or.inl h)) + · obtain ⟨l,hl,rfl⟩ := Finset.mem_image.mp he + obtain ⟨hlT,hlne⟩ := Finset.mem_filter.mp hl + refine Or.inr (Or.inr ⟨l,hlT,?_,chartCrossingParameter_spec a j c l hlne⟩) + intro he + exact hlne (he ▸ barrierTangent_cut a j) + +end ChartLineIntervals + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OperationalControl.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OperationalControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb50388141ff4cca636721adf419d53fcc236f0a --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OperationalControl.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.NestedCutCalculus +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FreshEvenBank + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section OperationalControl + +variable {α H : Type*} [Fintype α] [DecidableEq α] [Group H] + +theorem fresh_bank_conditional_control (L : Finset α → Subgroup H) + (c : alternatingGroup α →* H) + (hc : ∀ σ I, ∀ x ∈ L I, c σ*x*(c σ)⁻¹ ∈ L (I.map σ.val.toEmbedding)) + (hd : ∀ I J, Disjoint I J → ∀ x ∈ L I, ∀ y ∈ L J, Commute x y) + (s : Fin 5 ↪ α) (J : Finset α) (u x : H) (hu : u ∈ L J) + (hx : x ∈ L (Finset.univ.map s)) + (hreserve : (J ∪ Finset.univ.map s).card + 5 ≤ Fintype.card α) + (hv : ∀ (σ : alternatingGroup α), σ.val.support.card ≤ 10 → + ∃ v : H, Commute u v ∧ v*x*v⁻¹ = c σ*x*(c σ)⁻¹) : Commute u x := by + obtain ⟨t,ht⟩ := fresh_five_bank (J ∪ Finset.univ.map s) hreserve + have hst : Disjoint (Finset.univ.map s) (Finset.univ.map t) := + (ht.mono_right Finset.subset_union_right).symm + obtain ⟨σ,hσ,hsupp⟩ := even_move_disjoint_banks s t hst + have hcard : σ.val.support.card ≤ 10 := by + apply (Finset.card_le_card hsupp).trans + rw [Finset.card_union_of_disjoint hst,Finset.card_map,Finset.card_map] + simp + obtain ⟨v,huv,hv⟩ := hv σ hcard + apply commute_of_conditional_move u v x huv + rw [hv] + have hem : (Finset.univ.map s).map σ.val.toEmbedding = Finset.univ.map t := by + rw [Finset.map_map] + congr 1 + exact Function.Embedding.ext hσ + have hm := hc σ (Finset.univ.map s) x hx + rw [hem] at hm + exact hd J (Finset.univ.map t) (ht.mono_right Finset.subset_union_left).symm u hu _ hm + +end OperationalControl + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OrderedSubdivision.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OrderedSubdivision.lean new file mode 100644 index 0000000000000000000000000000000000000000..6007d19f0d9878a5af515861bf12a3bfd9244650 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/OrderedSubdivision.lean @@ -0,0 +1,85 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Amenability.BarrierAlgorithm + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section OrderedSubdivision +open Classical Set + +theorem exists_consecutiveSubdivision (E : Finset ℝ) {L U x : ℝ} + (hL : L∈E) (hU : U∈E) (hx : x∈Ico L U) : + ∃s t,ConsecutiveSubdivision E s t ∧ x∈Icc s t := by + let E₀ := E.filter (fun s => s≤x) + have h₀ : E₀.Nonempty := ⟨L,Finset.mem_filter.mpr ⟨hL,hx.1⟩⟩ + let s := E₀.max' h₀ + have hs₀ : s∈E₀ := Finset.max'_mem E₀ h₀ + have hs := Finset.mem_filter.mp hs₀ + let E₁ := E.filter (fun t => s by rw [hzp,hs]; rfl) id) + have hactivation : barrierActivation ha i j c (b j) s=true := by + rw [barrierActivation_at_site ha i j c (b j) s z hzt hzp,hzb] + refine ⟨⟨j,⟨c,hc⟩⟩,(s,t),?_,x,hx,hpx⟩ + apply Finset.mem_filter.mpr + exact ⟨Finset.mem_product.mpr ⟨hst.1,hst.2.1⟩,hst,hactivation⟩ + +theorem barrierActiveIntervals_empty {a m : ℕ} (ha : 0 e x) (translation_reduce a u) + +theorem cut_im_eq_of_fract_eq (x : ℝ) (u v : CutRing) + (he : Int.fract (x+ordinary u)=Int.fract (x+ordinary v)) : u.im=v.im := by + obtain ⟨n,hn⟩ := Int.fract_eq_fract.mp he + have huv : u-v=(n : CutRing) := by + apply ordinary_injective + simp only [map_sub,map_intCast] + linarith + have him : u.im-v.im=0 := by simpa using congrArg (fun z : CutRing => z.im) huv + omega + +theorem orbitRepresentative_eq_of_translate_eq {a : ℕ} {u v : CutRing × CutRing} + (x : GenericSquare a) (he : translate a u x=translate a v x) : + orbitRepresentative u=orbitRepresentative v := by + have hx := congrArg (fun p : GenericSquare a => p.val.1) he + have hy := congrArg (fun p : GenericSquare a => p.val.2) he + have hu := cut_im_eq_of_fract_eq x.val.1 u.1 v.1 hx + have hv := cut_im_eq_of_fract_eq x.val.2 u.2 v.2 hy + simp only [orbitRepresentative,hu,hv] + +theorem SlotMap_orbitRepresentative {a m : ℕ} (V : polygonAlgebra a) + (i : Fin 5 → Fin m) (u : Fin 5 → CutRing × CutRing) : + SlotMap a m V (fun j => (i j,u j))= + SlotMap a m V (fun j => (i j,orbitRepresentative (u j))) := by + funext p + exact congrArg (fun z => (i p.1,z)) (translate_orbitRepresentative a (u p.1) p.2.val) + +noncomputable def OffsetFrame.reduce {a m : ℕ} {r : CutRing} {hm : 2 ≤ m} + {I : Finset (Fin (m+1))} {u : Fin (m+1) → CutRing × CutRing} + (F : OffsetFrame a r m hm I u) : + OffsetFrame a r m hm I (fun t => orbitRepresentative (u t)) where + k := F.k + d := fun t => orbitRepresentative (F.d t) + projection := F.projection.trans (trackTranslation_reduce _) + prescribed := fun t ht => congrArg orbitRepresentative (F.prescribed t ht) + +namespace InitialCoverSystem +variable {a m M : ℕ} {r : CutRing} {hm : 2 ≤ m} + (B : InitialCoverSystem a r m hm M) + [Group.IsPerfect (alternatingGroup (Fin (m+1)))] + (hlarge : 15 < m+1) (h : B.AllPrimitiveLaws) (hr : 0 orbitRepresentative (u j)) where + alphabet := ρ.alphabet + card_le := ρ.card_le + source_mem := ρ.source_mem + target := ρ.target + target_mem := ρ.target_mem + offsets := fun t => orbitRepresentative (ρ.offsets t) + offsets_spec := fun j => congrArg orbitRepresentative (ρ.offsets_spec j) + frame := ρ.frame.reduce + word := ρ.word + aligned := ρ.aligned + supported := ρ.supported + transport := by + intro j x + rw [← translate_orbitRepresentative a (u j)] + exact ρ.transport j x + +theorem reduce_star {V : polygonAlgebra a} {i : Fin 5 → Fin (m+1)} + {u : Fin 5 → CutRing × CutRing} (ρ : B.SlotRouting hlarge h hr V i u) : + ρ.reduce.star=ρ.star := rfl + +theorem star_empty {i : Fin 5 → Fin (m+1)} {u : Fin 5 → CutRing × CutRing} + (ρ : B.SlotRouting hlarge h hr ⊥ i u) : ρ.star=1 := by + ext s : 1 + change ρ.word⁻¹*B.frameStar hlarge h hr (orderedTrackAlphabet ρ.target) ρ.offsets ρ.frame ⊥ + (universalMap (orderedTrackHom ρ.target) s)*(ρ.word⁻¹)⁻¹=1 + rw [B.frameStar_empty hlarge h hr] + simp + +end SlotRouting + +variable (R : alternatingGroup (Fin (m+1)) → + Multiplicative (FreeAbelianGroup (Fin m × Fin 2)) →* + Multiplicative (FreeAbelianGroup (Fin m × Fin 2))) + (hR : ∀ s k, B.c s * B.t k * (B.c s)⁻¹ = B.t (R s k)) + (hwide : 100 ≤ m+1) + +include R hR + +theorem slotStar_reduce (V : polygonAlgebra a) (i : Fin 5 → Fin (m+1)) + (u : Fin 5 → CutRing × CutRing) + (hinj : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) : + B.slotStar hlarge h hr hwide V i u hinj= + B.slotStar hlarge h hr hwide V i (fun j => orbitRepresentative (u j)) + (by rw [← SlotMap_orbitRepresentative]; exact hinj) := by + let ρ := (B.slotRouting_nonempty hlarge h hr (by omega) V i u hinj).some + rw [B.slotStar_eq_routing hlarge h hr R hR hwide V i u hinj ρ, + B.slotStar_eq_routing hlarge h hr R hR hwide V i _ _ ρ.reduce,ρ.reduce_star] + +theorem slotStar_empty (i : Fin 5 → Fin (m+1)) (u : Fin 5 → CutRing × CutRing) + (hinj : Function.Injective (SlotMap a (m+1) (⊥ : polygonAlgebra a) (fun j => (i j,u j)))) : + B.slotStar hlarge h hr hwide ⊥ i u hinj=1 := by + let ρ := (B.slotRouting_nonempty hlarge h hr (by omega) ⊥ i u hinj).some + rw [B.slotStar_eq_routing hlarge h hr R hR hwide ⊥ i u hinj ρ,ρ.star_empty] + +theorem slotStar_parameterwise (V : polygonAlgebra a) + (i k : Fin 5 → Fin (m+1)) (u v : Fin 5 → CutRing × CutRing) + (hinj : Function.Injective (SlotMap a (m+1) V (fun j => (i j,u j)))) + (hkinj : Function.Injective (SlotMap a (m+1) V (fun j => (k j,v j)))) + (he : ∀ j, ∀ x : V.val, (i j,translate a (u j) x.val)=(k j,translate a (v j) x.val)) : + B.slotStar hlarge h hr hwide V i u hinj=B.slotStar hlarge h hr hwide V k v hkinj := by + by_cases hV : V.val.Nonempty + · obtain ⟨x,hx⟩ := hV + have hik : i=k := funext (fun j => congrArg Prod.fst (he j ⟨x,hx⟩)) + have huv : (fun j => orbitRepresentative (u j))=(fun j => orbitRepresentative (v j)) := by + funext j + exact orbitRepresentative_eq_of_translate_eq x (congrArg Prod.snd (he j ⟨x,hx⟩)) + rw [B.slotStar_reduce hlarge h hr R hR hwide V i u hinj, + B.slotStar_reduce hlarge h hr R hR hwide V k v hkinj] + congr 1 + · have hbot : V=⊥ := Subtype.ext (Set.not_nonempty_iff_eq_empty.mp hV) + subst V + rw [B.slotStar_empty hlarge h hr R hR hwide,B.slotStar_empty hlarge h hr R hR hwide] + +end InitialCoverSystem + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerCoordinates.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..13890968866d6079dbc1ec74e07cd6cc92eae5a7 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerCoordinates.lean @@ -0,0 +1,150 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.ConcurrentAnchors +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PlaneCornerKernel + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PlaneCornerCoordinates +open Classical + +abbrev PlaneSectorIndex := Fin 4 → Bool +noncomputable def planeDirectionSign (a : ℕ) (v : ℝ × ℝ) : PlaneSectorIndex := + fun j => decide (cutForm a j v<0) + +noncomputable def planeDirectionRep (a : ℕ) (σ : PlaneSectorIndex) : ℝ × ℝ := + if h : ∃ v, TransverseDirection a v ∧ planeDirectionSign a v=σ then + Classical.choose h else (-1,1) + +theorem planeDirectionRep_transverse (a : ℕ) (σ : PlaneSectorIndex) : + TransverseDirection a (planeDirectionRep a σ) := by + unfold planeDirectionRep + split_ifs with h + · exact (Classical.choose_spec h).1 + · exact plane_antidiagonal_transverse a + +theorem planeDirectionRep_sign {a : ℕ} {v : ℝ × ℝ} (hv : TransverseDirection a v) : + planeDirectionSign a (planeDirectionRep a (planeDirectionSign a v))=planeDirectionSign a v := by + have he : ∃ w, TransverseDirection a w ∧ planeDirectionSign a w=planeDirectionSign a v := + ⟨v,hv,rfl⟩ + rw [planeDirectionRep,dite_eq_left he] + exact (Classical.choose_spec he).2 + +theorem transverse_neg_sign_congr {a : ℕ} {v w : ℝ × ℝ} + (hv : TransverseDirection a v) (hw : TransverseDirection a w) + (he : ∀ j, (cutForm a j v<0 ↔ cutForm a j w<0)) : + ∀ j, (cutForm a j (-v)<0 ↔ cutForm a j (-w)<0) := by + intro j + simp only [cutForm_neg,neg_lt_zero] + constructor <;> intro h + · by_contra! hh + have ht := (he j).mpr (lt_of_le_of_ne hh (hw j)) + linarith + · by_contra! hh + have ht := (he j).mp (lt_of_le_of_ne hh (hv j)) + linarith + +theorem planeCornerValue_congr_direction {a : ℕ} (f : PlaneStep a) (z : ℝ × ℝ) + {v w : ℝ × ℝ} (hv : TransverseDirection a v) (hw : TransverseDirection a w) + (he : ∀ j, (cutForm a j v<0 ↔ cutForm a j w<0)) : + planeCornerValue f z v=planeCornerValue f z w := by + unfold planeCornerValue planePairValue + rw [planeGerm_congr_direction f z hv hw he, + planeGerm_congr_direction f z hv.neg hw.neg (transverse_neg_sign_congr hv hw he)] + +theorem planeCornerValue_rep {a : ℕ} (f : PlaneStep a) (z : ℝ × ℝ) + {v : ℝ × ℝ} (hv : TransverseDirection a v) : + planeCornerValue f z (planeDirectionRep a (planeDirectionSign a v))=planeCornerValue f z v := by + apply planeCornerValue_congr_direction f z (planeDirectionRep_transverse _ _) hv + intro j + exact decide_eq_decide.mp (congrFun (planeDirectionRep_sign hv) j) + +theorem planeGerm_translate {a : ℕ} (f : PlaneStep a) (u : CutRing × CutRing) + (z v : ℝ × ℝ) : + planeGerm (PlaneStep.translate u f) z v= + planeGerm f (z-(ordinary u.1,ordinary u.2)) v := by + by_cases hv : TransverseDirection a v + · apply planeGerm_eq hv + obtain ⟨N,hN,hz,hf⟩ := planeGerm_spec f (z-(ordinary u.1,ordinary u.2)) v hv + refine ⟨(fun p => p-(ordinary u.1,ordinary u.2)) ⁻¹' N, + hN.preimage (continuous_id.sub continuous_const),hz,fun p hp hpv => ?_⟩ + have he : (GenericPlane.shift (-u) p).val=p.val-(ordinary u.1,ordinary u.2) := by + ext <;> simp [GenericPlane.shift,sub_eq_add_neg] + apply hf (GenericPlane.shift (-u) p) + · rw [he]; exact hp + · intro j + have hj := hpv j + rw [he,cutForm_sub,cutForm_sub] + split_ifs with ht + · rw [ite_eq_left ht] at hj; linarith + · rw [ite_eq_right ht] at hj; linarith + · simp [planeGerm,hv] + +theorem planeCornerValue_translate {a : ℕ} (f : PlaneStep a) (u : CutRing × CutRing) + (z v : ℝ × ℝ) : + planeCornerValue (PlaneStep.translate u f) z v= + planeCornerValue f (z-(ordinary u.1,ordinary u.2)) v := by + simp only [planeCornerValue,planePairValue,planeGerm_translate] + +abbrev PlaneCornerIndex (a : ℕ) := VertexType (commonVertexDenominator a) × PlaneSectorIndex + +noncomputable def planeVertexPosition (a : ℕ) (t : VertexType (commonVertexDenominator a)) + (u : Multiplicative (CutRing × CutRing)) : ℝ × ℝ := + vertexRepresentative (commonVertexDenominator a) t+(ordinary u.toAdd.1,ordinary u.toAdd.2) + +theorem planeVertexPosition_injective (a : ℕ) (t : VertexType (commonVertexDenominator a)) : + Function.Injective (planeVertexPosition a t) := by + intro u v h + have he := add_left_cancel h + have h₁ := ordinary_injective (congrArg Prod.fst he) + have h₂ := ordinary_injective (congrArg Prod.snd he) + exact congrArg Multiplicative.ofAdd (Prod.ext h₁ h₂) + +theorem planeCorner_coordinates_finite {a : ℕ} (ha : 0 planeCornerValue f (planeVertexPosition a t.1 u) + (planeDirectionRep a t.2))).Finite := by + obtain ⟨S,hS⟩ := PlaneStep.hasArrangement f + apply ((planeArrangementVertices a S).finite_toSet.preimage + (planeVertexPosition_injective a t.1).injOn).subset + intro u hu + exact planeCornerValue_mem_vertices ha f hS (planeDirectionRep_transverse a t.2) hu + +noncomputable def planeCornerCoordinates {a : ℕ} (ha : 0 planeCornerValue f (planeVertexPosition a t.1 u) (planeDirectionRep a t.2)) + (planeCorner_coordinates_finite ha f t)) + +@[simp] theorem planeCornerCoordinates_coeff {a : ℕ} (ha : 0 q.coeff (Multiplicative.ofAdd (x,y))) + (hc (t,planeDirectionSign a v)) + change planeCornerValue f (planeVertexPosition a t (Multiplicative.ofAdd (x,y))) + (planeDirectionRep a (planeDirectionSign a v))=0 at he + rw [planeCornerValue_rep f _ hv] at he + exact hn (hz ▸ he) + +end PlaneCornerCoordinates + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerInjectivity.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerInjectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb2358063645a7696531fc3e3405640d5c75f291 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerInjectivity.lean @@ -0,0 +1,196 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PlaneStepFunctions + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PlaneCornerInjectivity +open Classical + +@[simp] theorem cutForm_zero (a : ℕ) (j : Fin 4) : cutForm a j (0,0)=0 := by + fin_cases j <;> simp [cutForm] + +@[simp] theorem cutForm_neg (a : ℕ) (j : Fin 4) (v : ℝ × ℝ) : + cutForm a j (-v) = -cutForm a j v := by + fin_cases j <;> simp [cutForm] <;> ring + +theorem TransverseDirection.neg {a : ℕ} {v : ℝ × ℝ} (hv : TransverseDirection a v) : + TransverseDirection a (-v) := by + intro j + simpa only [cutForm_neg,neg_ne_zero] using hv j + +theorem genericPlane_transverse {a : ℕ} (p : GenericPlane a) : + TransverseDirection a p.val := by + intro j hj + exact p.property j 0 (by simpa using hj) + +theorem planeGerm_evaluate_incident {a : ℕ} (f : PlaneStep a) {S : Finset PlaneCut} + (hS : ∀ p q, (∀ l∈S, planeSign l p=planeSign l q) → f.val p=f.val q) + {z v : ℝ × ℝ} (hv : TransverseDirection a v) {p : GenericPlane a} + (hp : p.val∈arrangementNeighborhood a S z) + (hpv : ∀ l∈S, cutForm a l.1 z=ordinary l.2 → + (cutForm a l.1 p.val ?_⟩ + have hh := Set.mem_iInter₂.mp hv l hl + rw [ite_eq_left he] at hh + by_cases ht : cutForm a l.1 p.val ?_⟩ + obtain ⟨v,hv,hpv⟩ := exists_incident_direction S z p + exact (planeGerm_evaluate_incident f hS hv hp hpv).trans (h v hv) + +noncomputable def planeHeight (p : ℝ × ℝ) : ℝ := p.1+p.2 + +theorem planeHeight_continuous : Continuous planeHeight := continuous_fst.add continuous_snd + +theorem planeSector_generic_descending {a : ℕ} {z v : ℝ × ℝ} + (hv : TransverseDirection a v) (hdesc : planeHeight v<0) + {N : Set (ℝ × ℝ)} (hN : IsOpen N) (hz : z∈N) : + ∃ p : GenericPlane a, p.val∈N ∧ p.val∈planeSector a z v ∧ + planeHeight p.val z+t • v + have hray : Continuous ray := continuous_const.add (continuous_id.smul continuous_const) + have he : ray ⁻¹' N∈nhds (0:ℝ) := by + apply hray.continuousAt.preimage_mem_nhds + simpa [ray] using hN.mem_nhds hz + obtain ⟨ε,hε,hεN⟩ := Metric.mem_nhds_iff.mp he + let t := ε/2 + have ht : 0 simp [cutForm] <;> linarith + +theorem transverse_negative_perturbation {a : ℕ} {v : ℝ × ℝ} + (hv : TransverseDirection a v) (hh : planeHeight v≤0) : + ∃ w : ℝ × ℝ, TransverseDirection a w ∧ planeHeight w<0 ∧ + ∀ j, (cutForm a j v<0 ↔ cutForm a j w<0) := by + let U := planeSector a (0,0) v + have hvU : v∈U := by + intro j + simp only [cutForm_zero] + split_ifs with hj + · exact hj + · exact lt_of_le_of_ne (le_of_not_gt hj) (hv j).symm + let ray : ℝ → ℝ × ℝ := fun t => v-t • (1,1) + have hray : Continuous ray := continuous_const.sub (continuous_id.smul continuous_const) + have he : ray ⁻¹' U∈nhds (0:ℝ) := by + apply hray.continuousAt.preimage_mem_nhds + have hz : ray 0=v := by ext <;> simp [ray] + rw [hz] + exact (planeSector_open a (0,0) v).mem_nhds hvU + obtain ⟨ε,hε,hεU⟩ := Metric.mem_nhds_iff.mp he + let t := ε/2 + have ht : 0 (hs j).2,?_,fun j => (hs j).1⟩ + change (v.1-t*1)+(v.2-t*1)<0 + change v.1+v.2≤0 at hh + linarith + +end PlaneCornerInjectivity + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerKernel.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..355166712a2ace2dc9919f8657e80b0a8b6b5b89 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneCornerKernel.lean @@ -0,0 +1,265 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Arithmetic.ConcurrentDenominators +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PlaneCornerInjectivity + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PlaneCornerKernel +open Classical + +noncomputable def planePairValue {a : ℕ} (f : PlaneStep a) (z v : ℝ × ℝ) : ℤ := + planeGerm f z v+planeGerm f z (-v) + +noncomputable def planeCornerValue {a : ℕ} (f : PlaneStep a) (z v : ℝ × ℝ) : ℤ := + planePairValue f z v-planePairValue f z (-1,1) + +@[simp] theorem planeCornerValue_zero {a : ℕ} (z v : ℝ × ℝ) : + planeCornerValue (0 : PlaneStep a) z v=0 := by simp [planeCornerValue,planePairValue] + +@[simp] theorem planeCornerValue_add {a : ℕ} (f g : PlaneStep a) (z v : ℝ × ℝ) : + planeCornerValue (f+g) z v=planeCornerValue f z v+planeCornerValue g z v := by + simp only [planeCornerValue,planePairValue,planeGerm_add]; ring + +@[simp] theorem planeCornerValue_smul {a : ℕ} (c : ℤ) (f : PlaneStep a) (z v : ℝ × ℝ) : + planeCornerValue (c • f) z v=c • planeCornerValue f z v := by + simp only [planeCornerValue,planePairValue,planeGerm_smul,smul_add,smul_sub] + +def planeSupportClosure {a : ℕ} (f : PlaneStep a) : Set (ℝ × ℝ) := + closure {z | ∃ p : GenericPlane a, p.val=z ∧ f.val p≠0} + +theorem planeSupportClosure_compact {a : ℕ} (f : PlaneStep a) : + IsCompact (planeSupportClosure f) := by + obtain ⟨R,hR⟩ := PlaneStep.compactSupport f + have hcompact : IsCompact (Set.Icc (-R) R ×ˢ Set.Icc (-R) R) := + isCompact_Icc.prod isCompact_Icc + apply hcompact.of_isClosed_subset isClosed_closure + apply closure_minimal _ (isClosed_Icc.prod isClosed_Icc) + rintro _ ⟨p,rfl,hp⟩ + have h : |p.val.1|≤R ∧ |p.val.2|≤R := by + constructor + · by_contra! hh + exact hp (hR p (Or.inl hh)) + · by_contra! hh + exact hp (hR p (Or.inr hh)) + exact ⟨abs_le.mp h.1,abs_le.mp h.2⟩ + +theorem planeSupportClosure_nonempty {a : ℕ} {f : PlaneStep a} (hf : f≠0) : + (planeSupportClosure f).Nonempty := by + have hh : ∃ p : GenericPlane a, f.val p≠0 := by + by_contra! h + apply hf + apply Subtype.ext + funext p + exact h p + obtain ⟨p,hp⟩ := hh + exact ⟨p.val,subset_closure ⟨p,rfl,hp⟩⟩ + +theorem planeGerm_zero_at_minimum {a : ℕ} (f : PlaneStep a) {z v : ℝ × ℝ} + (hmin : ∀ p : GenericPlane a, f.val p≠0 → planeHeight z≤planeHeight p.val) + (hv : TransverseDirection a v) (hdesc : planeHeight v<0) : + planeGerm f z v=0 := by + obtain ⟨N,hN,hz,hf⟩ := planeGerm_spec f z v hv + obtain ⟨p,hp,hpv,hdown⟩ := planeSector_generic_descending hv hdesc hN hz + by_contra hh + have hp' : f.val p≠0 := by rwa [hf p hp hpv] + exact (not_lt_of_ge (hmin p hp')) hdown + +theorem planeGerm_zero_at_minimum_le {a : ℕ} (f : PlaneStep a) {z v : ℝ × ℝ} + (hmin : ∀ p : GenericPlane a, f.val p≠0 → planeHeight z≤planeHeight p.val) + (hv : TransverseDirection a v) (hdesc : planeHeight v≤0) : + planeGerm f z v=0 := by + obtain ⟨w,hw,hdown,hvw⟩ := transverse_negative_perturbation hv hdesc + exact (planeGerm_congr_direction f z hv hw hvw).trans + (planeGerm_zero_at_minimum f hmin hw hdown) + +theorem planeCornerValue_injective_zero {a : ℕ} (f : PlaneStep a) + (hc : ∀ z v, TransverseDirection a v → planeCornerValue f z v=0) : f=0 := by + by_contra hf + obtain ⟨z,hz,hmin⟩ := (planeSupportClosure_compact f).exists_isMinOn + (planeSupportClosure_nonempty hf) planeHeight_continuous.continuousOn + have hminimum : ∀ p : GenericPlane a, f.val p≠0 → planeHeight z≤planeHeight p.val := by + intro p hp + exact hmin (subset_closure ⟨p,rfl,hp⟩) + have hbase : planePairValue f z (-1,1)=0 := by + unfold planePairValue + rw [planeGerm_zero_at_minimum_le f hminimum (plane_antidiagonal_transverse a) + (by norm_num [planeHeight])] + rw [planeGerm_zero_at_minimum_le f hminimum (plane_antidiagonal_transverse a).neg + (by norm_num [planeHeight])] + simp + have hzero : ∀ v, TransverseDirection a v → planeGerm f z v=0 := by + intro v hv + have he := hc z v hv + unfold planeCornerValue at he + rw [hbase,sub_zero] at he + change planeGerm f z v+planeGerm f z (-v)=0 at he + by_cases hh : planeHeight v≤0 + · exact planeGerm_zero_at_minimum_le f hminimum hv hh + · have hn : planeHeight (-v)≤0 := by + change -v.1+-v.2≤0 + change ¬v.1+v.2≤0 at hh + linarith + rw [planeGerm_zero_at_minimum_le f hminimum hv.neg hn,add_zero] at he + exact he + obtain ⟨N,hN,hzN,hfN⟩ := planeGerm_zero_neighborhood f z hzero + obtain ⟨_,hpN,p,rfl,hp⟩ := mem_closure_iff.mp hz N hN hzN + exact hp (hfN p hpN) + +end PlaneCornerKernel + +section PlaneCornerSupport +open Classical + +theorem planeGerm_congr_incident {a : ℕ} (f : PlaneStep a) {S : Finset PlaneCut} + (hS : ∀ p q, (∀ l∈S, planeSign l p=planeSign l q) → f.val p=f.val q) + (z : ℝ × ℝ) {v w : ℝ × ℝ} (hv : TransverseDirection a v) + (hw : TransverseDirection a w) + (he : ∀ l∈S, cutForm a l.1 z=ordinary l.2 → + (cutForm a l.1 v<0 ↔ cutForm a l.1 w<0)) : + planeGerm f z v=planeGerm f z w := by + obtain ⟨p,hp,hpv⟩ := planeSector_generic hv (arrangementNeighborhood_open a S z) + (self_mem_arrangementNeighborhood a S z) + obtain ⟨q,hq,hqv⟩ := planeSector_generic hw (arrangementNeighborhood_open a S z) + (self_mem_arrangementNeighborhood a S z) + rw [← planeGerm_evaluate f hS hv hp hpv,← planeGerm_evaluate f hS hw hq hqv] + apply hS + intro l hl + rw [planeSign_neighborhood hp hpv hl,planeSign_neighborhood hq hqv hl] + apply decide_eq_decide.mpr + split_ifs with hh + · exact he l hl hh + · rfl + +theorem planeCornerValue_zero_of_one_direction {a : ℕ} (f : PlaneStep a) + {S : Finset PlaneCut} + (hS : ∀ p q, (∀ l∈S, planeSign l p=planeSign l q) → f.val p=f.val q) + (z : ℝ × ℝ) (j : Fin 4) + (hj : ∀ l∈S, cutForm a l.1 z=ordinary l.2 → l.1=j) + {v : ℝ × ℝ} (hv : TransverseDirection a v) : planeCornerValue f z v=0 := by + let w : ℝ × ℝ := (-1,1) + have hw : TransverseDirection a w := plane_antidiagonal_transverse a + have hcompare : ∀ {x y : ℝ × ℝ}, TransverseDirection a x → TransverseDirection a y → + (cutForm a j x<0 ↔ cutForm a j y<0) → planeGerm f z x=planeGerm f z y := by + intro x y hx hy he + apply planeGerm_congr_incident f hS z hx hy + intro l hl hz + simpa only [hj l hl hz] using he + by_cases he : (cutForm a j v<0 ↔ cutForm a j w<0) + · have he' : (cutForm a j (-v)<0 ↔ cutForm a j (-w)<0) := by + simp only [cutForm_neg,neg_lt_zero] + constructor + · intro h + by_contra! hh + have hw' := hw j + have hh' : cutForm a j w<0 := lt_of_le_of_ne hh hw' + have := he.mpr hh'; linarith + · intro h + by_contra! hh + have hv' := hv j + have hh' : cutForm a j v<0 := lt_of_le_of_ne hh hv' + have := he.mp hh'; linarith + have h₁ := hcompare hv hw he + have h₂ := hcompare hv.neg hw.neg he' + unfold planeCornerValue planePairValue + change planeGerm f z v+planeGerm f z (-v)-(planeGerm f z w+planeGerm f z (-w))=0 + rw [h₁,h₂,sub_self] + · have he₁ : (cutForm a j v<0 ↔ cutForm a j (-w)<0) := by + rw [cutForm_neg,neg_lt_zero] + have hv' := hv j + have hw' := hw j + constructor <;> intro hh + · by_contra! ht + have hwlt : cutForm a j w<0 := lt_of_le_of_ne ht hw' + exact he (iff_of_true hh hwlt) + · by_contra! ht + have hvlt : 0 intro hh + · by_contra! ht + have hwlt : 0 + lineDet_ne_zero ha i j hij (ordinary_injective (by simpa using hh)) + rw [cutForm_normal,cutForm_normal] at hi hj + have h₁ : ordinary (lineDet a i j)*(p.1-q.1)=0 := by + simp only [lineDet,map_sub,map_mul] + linear_combination ordinary (lineNormal a j).2*hi-ordinary (lineNormal a i).2*hj + have h₂ : ordinary (lineDet a i j)*(p.2-q.2)=0 := by + simp only [lineDet,map_sub,map_mul] + linear_combination ordinary (lineNormal a i).1*hj-ordinary (lineNormal a j).1*hi + exact Prod.ext (sub_eq_zero.mp ((mul_eq_zero.mp h₁).resolve_left hd)) + (sub_eq_zero.mp ((mul_eq_zero.mp h₂).resolve_left hd)) + +noncomputable def planeLineIntersection (a : ℕ) (l k : PlaneCut) : ℝ × ℝ := + if h : ∃ z, cutForm a l.1 z=ordinary l.2 ∧ cutForm a k.1 z=ordinary k.2 then + Classical.choose h else 0 + +theorem planeLineIntersection_eq {a : ℕ} (ha : 0 planeLineIntersection a lk.1 lk.2) + +theorem planeCornerValue_exists_incident {a : ℕ} (f : PlaneStep a) {S : Finset PlaneCut} + (hS : ∀ p q, (∀ l∈S, planeSign l p=planeSign l q) → f.val p=f.val q) + {z v : ℝ × ℝ} (hv : TransverseDirection a v) (hc : planeCornerValue f z v≠0) : + ∃ l∈S, ∃ k∈S, l.1≠k.1 ∧ cutForm a l.1 z=ordinary l.2 ∧ + cutForm a k.1 z=ordinary k.2 := by + by_contra! h + by_cases hinc : ∃ l∈S, cutForm a l.1 z=ordinary l.2 + · obtain ⟨l,hl,hzl⟩ := hinc + apply hc + apply planeCornerValue_zero_of_one_direction f hS z l.1 _ hv + intro k hk hzk + by_contra hdir + exact (h k hk l hl hdir hzk) hzl + · apply hc + apply planeCornerValue_zero_of_one_direction f hS z 0 _ hv + intro l hl hzl + exact (hinc ⟨l,hl,hzl⟩).elim + +theorem planeCornerValue_mem_vertices {a : ℕ} (ha : 0 slice n f) := by + obtain ⟨R,hR⟩ := PlaneStep.compactSupport f + let N : ℤ := ⌈R+1⌉ + refine (Set.finite_Icc (-N,-N) (N,N)).subset ?_ + intro n hn + have hp : ∃ p : GenericSquare a, (slice n f).val p ≠ 0 := by + by_contra! h + apply hn + apply Subtype.ext + exact funext h + obtain ⟨p,hp⟩ := hp + rw [slice_apply] at hp + have hb : |p.val.1+(n.1:ℝ)| ≤ R ∧ |p.val.2+(n.2:ℝ)| ≤ R := by + by_contra! h + apply hp + apply hR + have hh : R < |p.val.1+(n.1:ℝ)| ∨ R < |p.val.2+(n.2:ℝ)| := by + by_cases hx : |p.val.1+(n.1:ℝ)| ≤ R + · exact Or.inr (h hx) + · exact Or.inl (lt_of_not_ge hx) + simpa only [GenericPlane.shift,intPair,Prod.fst_add,Prod.snd_add,map_intCast] using hh + have hx : |(n.1:ℝ)| ≤ R+1 := by + have ht := abs_add_le (p.val.1+(n.1:ℝ)) (-p.val.1) + have he : p.val.1+(n.1:ℝ)+ -p.val.1=(n.1:ℝ) := by ring + rw [he,abs_neg,abs_of_nonneg p.property.1.1] at ht + linarith [p.property.1.2] + have hy : |(n.2:ℝ)| ≤ R+1 := by + have ht := abs_add_le (p.val.2+(n.2:ℝ)) (-p.val.2) + have he : p.val.2+(n.2:ℝ)+ -p.val.2=(n.2:ℝ) := by ring + rw [he,abs_neg,abs_of_nonneg p.property.2.1.1] at ht + linarith [p.property.2.1.2] + have hx' : -N ≤ n.1 ∧ n.1 ≤ N := by + exact_mod_cast abs_le.mp (hx.trans (Int.le_ceil (R+1))) + have hy' : -N ≤ n.2 ∧ n.2 ≤ N := by + exact_mod_cast abs_le.mp (hy.trans (Int.le_ceil (R+1))) + exact ⟨⟨hx'.1,hy'.1⟩,⟨hx'.2,hy'.2⟩⟩ + +noncomputable def periodize : PlaneStep a →ₗ[ℤ] SquareStep a where + toFun f := ∑ᶠ n : ℤ×ℤ, slice n f + map_add' f g := by + simp only [map_add] + exact finsum_add_distrib (slice_finite f) (slice_finite g) + map_smul' c f := by + simp only [map_smul] + exact (map_finsum (DistribSMul.toAddMonoidHom (SquareStep a) c) (slice_finite f)).symm + +noncomputable def eval (p : GenericSquare a) : SquareStep a →ₗ[ℤ] ℤ := + (LinearMap.proj p).comp (squareStepSubmodule a).subtype + +theorem periodize_apply (f : PlaneStep a) (p : GenericSquare a) : + (periodize f).val p = ∑ᶠ n : ℤ×ℤ, (slice n f).val p := + map_finsum (eval p) (slice_finite f) + +theorem slice_extend (f : SquareStep a) (n : ℤ×ℤ) (hn : n≠0) : + slice n (extend f)=0 := by + apply Subtype.ext + funext p + rw [slice_apply,extend_apply] + apply dite_eq_right + intro h + have h' : (0 ≤ p.val.1+(n.1:ℝ) ∧ p.val.1+(n.1:ℝ)<1) ∧ + (0 ≤ p.val.2+(n.2:ℝ) ∧ p.val.2+(n.2:ℝ)<1) := by + simpa [InSquare,GenericPlane.shift,intPair] using h + have hx : (-1:ℤ) slice_extend f n hn),slice_zero,restrict_extend] + +theorem periodize_surjective : Function.Surjective (periodize (a := a)) := + fun f => ⟨extend f,periodize_extend f⟩ + +end SquareStep +end PlanePeriodization + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneStepFunctions.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneStepFunctions.lean new file mode 100644 index 0000000000000000000000000000000000000000..243dfb5b44244e8047fe77aba5d680855a683999 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PlaneStepFunctions.lean @@ -0,0 +1,327 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.FiniteArrangementGerms + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PlaneStepFunctions + +def GenericPlane (a : ℕ) := {p : ℝ × ℝ // AvoidsCuts a p} + +namespace GenericPlane +noncomputable def shift {a : ℕ} (u : CutRing × CutRing) (p : GenericPlane a) : + GenericPlane a := ⟨p.val+(ordinary u.1,ordinary u.2),avoidsCuts_translate p.property u⟩ +@[simp] theorem shift_zero {a : ℕ} (p : GenericPlane a) : shift 0 p=p := by + apply Subtype.ext + simp [shift] +@[simp] theorem shift_add {a : ℕ} (u v : CutRing × CutRing) (p : GenericPlane a) : + shift u (shift v p)=shift (u+v) p := by + apply Subtype.ext + simp only [shift,Prod.fst_add,Prod.snd_add,map_add] + ext <;> simp only [Prod.fst_add,Prod.snd_add] <;> ring +end GenericPlane + +abbrev PlaneCut := Fin 4 × CutRing + +noncomputable def planeSign {a : ℕ} (l : PlaneCut) (p : GenericPlane a) : Bool := + decide (cutForm a l.1 p.val < ordinary l.2) + +def HasPlaneArrangement {a : ℕ} (f : GenericPlane a → ℤ) : Prop := + ∃ S : Finset PlaneCut, ∀ p q, (∀ l∈S, planeSign l p=planeSign l q) → f p=f q + +def PlaneCompactSupport {a : ℕ} (f : GenericPlane a → ℤ) : Prop := + ∃ R : ℝ, ∀ p, R < |p.val.1| ∨ R < |p.val.2| → f p=0 + +noncomputable def planeStepSubmodule (a : ℕ) : Submodule ℤ (GenericPlane a → ℤ) where + carrier := {f | HasPlaneArrangement f ∧ PlaneCompactSupport f} + zero_mem' := by + refine ⟨⟨∅,fun _ _ _ => rfl⟩,⟨0,fun _ _ => rfl⟩⟩ + add_mem' := by + classical + rintro f g ⟨⟨S,hS⟩,⟨R,hR⟩⟩ ⟨⟨T,hT⟩,⟨Q,hQ⟩⟩ + constructor + · refine ⟨S∪T,fun p q hpq => ?_⟩ + exact congrArg₂ (·+·) (hS p q (fun l hl => hpq l (Finset.mem_union_left T hl))) + (hT p q (fun l hl => hpq l (Finset.mem_union_right S hl))) + · refine ⟨max R Q,fun p hp => ?_⟩ + have h₁ : R < |p.val.1| ∨ R < |p.val.2| := hp.imp + (lt_of_le_of_lt (le_max_left _ _)) (lt_of_le_of_lt (le_max_left _ _)) + have h₂ : Q < |p.val.1| ∨ Q < |p.val.2| := hp.imp + (lt_of_le_of_lt (le_max_right _ _)) (lt_of_le_of_lt (le_max_right _ _)) + change f p+g p=0 + rw [hR p h₁,hQ p h₂,add_zero] + smul_mem' := by + rintro c f ⟨⟨S,hS⟩,⟨R,hR⟩⟩ + refine ⟨⟨S,fun p q hpq => congrArg (c • ·) (hS p q hpq)⟩,⟨R,fun p hp => ?_⟩⟩ + change c • f p=0 + rw [hR p hp,smul_zero] + +noncomputable abbrev PlaneStep (a : ℕ) : Type := ↥(planeStepSubmodule a) + +namespace PlaneStep +variable {a : ℕ} + +theorem hasArrangement (f : PlaneStep a) : HasPlaneArrangement f.val := f.property.1 +theorem compactSupport (f : PlaneStep a) : PlaneCompactSupport f.val := f.property.2 + +@[simp] theorem translated_sign (l : PlaneCut) (u : CutRing × CutRing) + (p : GenericPlane a) : planeSign l (GenericPlane.shift (-u) p)= + planeSign (l.1,l.2+integralCutForm a l.1 u) p := by + unfold planeSign + apply decide_eq_decide.mpr + have he : integralCutForm a l.1 (-u) = -integralCutForm a l.1 u := by + rcases l with ⟨j,c⟩ + fin_cases j <;> simp [integralCutForm] <;> ring + simp only [GenericPlane.shift,cutForm_add,cutForm_ordinary,he,map_neg,map_add] + constructor <;> intro h <;> linarith + +theorem translated_arrangement (f : PlaneStep a) (u : CutRing × CutRing) : + HasPlaneArrangement (fun p => f.val (GenericPlane.shift (-u) p)) := by + classical + obtain ⟨S,hS⟩ := hasArrangement f + refine ⟨S.image (fun l => (l.1,l.2+integralCutForm a l.1 u)),fun p q hpq => ?_⟩ + apply hS + intro l hl + rw [translated_sign,translated_sign] + exact hpq _ (Finset.mem_image_of_mem _ hl) + +theorem translated_compact (f : PlaneStep a) (u : CutRing × CutRing) : + PlaneCompactSupport (fun p => f.val (GenericPlane.shift (-u) p)) := by + obtain ⟨R,hR⟩ := compactSupport f + refine ⟨R + |ordinary u.1|+|ordinary u.2|,fun p hp => ?_⟩ + apply hR + have h₁ : |p.val.1| ≤ |p.val.1-ordinary u.1|+|ordinary u.1| := by + simpa using abs_add_le (p.val.1-ordinary u.1) (ordinary u.1) + have h₂ : |p.val.2| ≤ |p.val.2-ordinary u.2|+|ordinary u.2| := by + simpa using abs_add_le (p.val.2-ordinary u.2) (ordinary u.2) + change R < |p.val.1+ordinary (-u).1| ∨ R < |p.val.2+ordinary (-u).2| + simp only [Prod.fst_neg,Prod.snd_neg,map_neg,← sub_eq_add_neg] + rcases hp with hp|hp + · left; linarith [abs_nonneg (ordinary u.2)] + · right; linarith [abs_nonneg (ordinary u.1)] + +noncomputable def translate (u : CutRing × CutRing) : PlaneStep a →ₗ[ℤ] PlaneStep a where + toFun f := ⟨fun p => f.val (GenericPlane.shift (-u) p), + translated_arrangement f u,translated_compact f u⟩ + map_add' _ _ := rfl + map_smul' _ _ := rfl + +@[simp] theorem translate_apply (u : CutRing × CutRing) (f : PlaneStep a) (p : GenericPlane a) : + (translate u f).val p=f.val (GenericPlane.shift (-u) p) := rfl + +noncomputable def representation (a : ℕ) : + Representation ℤ (Multiplicative (CutRing × CutRing)) (PlaneStep a) where + toFun u := translate u.toAdd + map_one' := by + ext f p + simp [translate] + map_mul' u v := by + ext f p + change f.val (GenericPlane.shift (-(u.toAdd+v.toAdd)) p)= + f.val (GenericPlane.shift (-v.toAdd) (GenericPlane.shift (-u.toAdd) p)) + rw [GenericPlane.shift_add] + abel_nf + +end PlaneStep + +abbrev PolygonGroupRing := MonoidAlgebra ℤ (Multiplicative (CutRing × CutRing)) + +noncomputable def PolygonCoefficientModule (a : ℕ) := (PlaneStep.representation a).asModule + +instance : AddGroup.FG CutRing := by + apply Module.Finite.iff_addGroup_fg.mp + infer_instance + +instance : IsNoetherianRing PolygonGroupRing := by + let : Algebra.FiniteType ℤ PolygonGroupRing := + MonoidAlgebra.finiteType_iff_group_fg.mpr inferInstance + exact Algebra.FiniteType.isNoetherianRing ℤ PolygonGroupRing + +end PlaneStepFunctions + +section PlaneArrangementGerms + +open Classical + +def TransverseDirection (a : ℕ) (v : ℝ × ℝ) : Prop := + ∀ j : Fin 4, cutForm a j v ≠ 0 + +noncomputable def planeSector (a : ℕ) (z v : ℝ × ℝ) : Set (ℝ × ℝ) := + {p | ∀ j : Fin 4, if cutForm a j v < 0 then cutForm a j p < cutForm a j z + else cutForm a j z < cutForm a j p} + +theorem planeSector_open (a : ℕ) (z v : ℝ × ℝ) : IsOpen (planeSector a z v) := by + have he : planeSector a z v = ⋂ j : Fin 4, + {p | if cutForm a j v < 0 then cutForm a j p < cutForm a j z + else cutForm a j z < cutForm a j p} := by ext; simp [planeSector] + rw [he] + apply isOpen_iInter_of_finite + intro j + split_ifs + · exact isOpen_lt (cutForm_continuous a j) continuous_const + · exact isOpen_lt continuous_const (cutForm_continuous a j) + +theorem planeSector_generic {a : ℕ} {z v : ℝ × ℝ} (hv : TransverseDirection a v) + {N : Set (ℝ × ℝ)} (hN : IsOpen N) (hz : z∈N) : + ∃ p : GenericPlane a, p.val∈N ∧ p.val∈planeSector a z v := by + let σ : Fin 4 → Bool := fun j => decide (cutForm a j v < 0) + have hactive (j : Fin 4) (_ : cutForm a j z=cutForm a j z) : + if σ j then cutForm a j (z+v) cutForm a j z) + z (z+v) σ hactive (fun _ hh => (hh rfl).elim) N hN hz + refine ⟨⟨p,hpg⟩,hp,?_⟩ + intro j + have hh := hσ j + simpa [σ] using hh + +noncomputable def arrangementNeighborhood (a : ℕ) (S : Finset PlaneCut) (z : ℝ × ℝ) : + Set (ℝ × ℝ) := ⋂ l∈S, if cutForm a l.1 z=ordinary l.2 then Set.univ + else if cutForm a l.1 z ?_⟩ + apply hS + intro l hl + rw [planeSign_neighborhood hq hqv hl,planeSign_neighborhood hp hpv hl] + +theorem IsPlaneGerm.unique {a : ℕ} {f : PlaneStep a} {z v : ℝ × ℝ} {m n : ℤ} + (hv : TransverseDirection a v) (hm : IsPlaneGerm f z v m) (hn : IsPlaneGerm f z v n) : + m=n := by + obtain ⟨N,hN,hz,hf⟩ := hm + obtain ⟨M,hM,hz',hg⟩ := hn + obtain ⟨p,hp,hpv⟩ := planeSector_generic hv (hN.inter hM) ⟨hz,hz'⟩ + exact (hf p hp.1 hpv).symm.trans (hg p hp.2 hpv) + +noncomputable def planeGerm {a : ℕ} (f : PlaneStep a) (z v : ℝ × ℝ) : ℤ := + if hv : TransverseDirection a v then Classical.choose (exists_planeGerm f z v hv) else 0 + +theorem planeGerm_spec {a : ℕ} (f : PlaneStep a) (z v : ℝ × ℝ) + (hv : TransverseDirection a v) : IsPlaneGerm f z v (planeGerm f z v) := by + rw [planeGerm,dite_eq_left hv] + exact Classical.choose_spec (exists_planeGerm f z v hv) + +theorem planeGerm_eq {a : ℕ} {f : PlaneStep a} {z v : ℝ × ℝ} {n : ℤ} + (hv : TransverseDirection a v) (hn : IsPlaneGerm f z v n) : planeGerm f z v=n := + (planeGerm_spec f z v hv).unique hv hn + +@[simp] theorem planeGerm_zero {a : ℕ} (z v : ℝ × ℝ) : + planeGerm (0 : PlaneStep a) z v=0 := by + by_cases hv : TransverseDirection a v + · exact planeGerm_eq hv ⟨Set.univ,isOpen_univ,Set.mem_univ z,fun _ _ _ => rfl⟩ + · simp [planeGerm,hv] + +@[simp] theorem planeGerm_add {a : ℕ} (f g : PlaneStep a) (z v : ℝ × ℝ) : + planeGerm (f+g) z v=planeGerm f z v+planeGerm g z v := by + by_cases hv : TransverseDirection a v + · obtain ⟨N,hN,hz,hf⟩ := planeGerm_spec f z v hv + obtain ⟨M,hM,hz',hg⟩ := planeGerm_spec g z v hv + apply planeGerm_eq hv + refine ⟨N∩M,hN.inter hM,⟨hz,hz'⟩,fun p hp hpv => ?_⟩ + exact congrArg₂ (·+·) (hf p hp.1 hpv) (hg p hp.2 hpv) + · simp [planeGerm,hv] + +@[simp] theorem planeGerm_smul {a : ℕ} (c : ℤ) (f : PlaneStep a) (z v : ℝ × ℝ) : + planeGerm (c • f) z v=c • planeGerm f z v := by + by_cases hv : TransverseDirection a v + · obtain ⟨N,hN,hz,hf⟩ := planeGerm_spec f z v hv + apply planeGerm_eq hv + exact ⟨N,hN,hz,fun p hp hpv => congrArg (c • ·) (hf p hp hpv)⟩ + · simp [planeGerm,hv] + +theorem planeGerm_evaluate {a : ℕ} (f : PlaneStep a) {S : Finset PlaneCut} + (hS : ∀ p q, (∀ l∈S, planeSign l p=planeSign l q) → f.val p=f.val q) + {z v : ℝ × ℝ} (hv : TransverseDirection a v) {p : GenericPlane a} + (hp : p.val∈arrangementNeighborhood a S z) (hpv : p.val∈planeSector a z v) : + f.val p=planeGerm f z v := by + obtain ⟨N,hN,hz,hf⟩ := planeGerm_spec f z v hv + obtain ⟨q,hq,hqv⟩ := planeSector_generic hv + ((arrangementNeighborhood_open a S z).inter hN) + ⟨self_mem_arrangementNeighborhood a S z,hz⟩ + have hpq : f.val p=f.val q := hS p q (fun l hl => + (planeSign_neighborhood hp hpv hl).trans (planeSign_neighborhood hq.1 hqv hl).symm) + exact hpq.trans (hf q hq.2 hqv) + +theorem planeGerm_congr_direction {a : ℕ} (f : PlaneStep a) (z : ℝ × ℝ) + {v w : ℝ × ℝ} (hv : TransverseDirection a v) (hw : TransverseDirection a w) + (hvw : ∀ j, (cutForm a j v<0 ↔ cutForm a j w<0)) : + planeGerm f z v=planeGerm f z w := by + apply planeGerm_eq hv + obtain ⟨N,hN,hz,hf⟩ := planeGerm_spec f z w hw + refine ⟨N,hN,hz,fun p hp hpv => hf p hp ?_⟩ + intro j + have hh := hpv j + simpa only [hvw j] using hh + +end PlaneArrangementGerms + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonAction.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..fec960b965a511a7765e061e57e17de026a4e987 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonAction.lean @@ -0,0 +1,222 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Arithmetic.PolygonArithmetic + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +section PolygonAction + +instance : Countable CutRing := Countable.of_equiv (ℤ × ℤ) (QuadraticAlgebra.equivProd 1 1).symm + +theorem fract_fract_add (x y : ℝ) : Int.fract (Int.fract x + y) = Int.fract (x + y) := by + change Int.fract (x - (⌊x⌋ : ℝ) + y) = _ + rw [sub_add_eq_add_sub, Int.fract_sub_intCast] + +noncomputable def translate (a : ℕ) (u : CutRing × CutRing) (p : GenericSquare a) : + GenericSquare a := by + let k : CutRing × CutRing := + ((⌊p.val.1 + ordinary u.1⌋ : ℤ), (⌊p.val.2 + ordinary u.2⌋ : ℤ)) + refine ⟨(Int.fract (p.val.1 + ordinary u.1), Int.fract (p.val.2 + ordinary u.2)), + ⟨Int.fract_nonneg _, Int.fract_lt_one _⟩, + ⟨Int.fract_nonneg _, Int.fract_lt_one _⟩, ?_⟩ + have h := avoidsCuts_translate p.property.2.2 (u - k) + convert h using 1 + simp only [k, Int.fract, Prod.fst_sub, Prod.snd_sub, map_sub, map_intCast] + apply Prod.ext <;> simp only [Prod.fst_add, Prod.snd_add] <;> ring + +@[simp] theorem translate_val (a : ℕ) (u : CutRing × CutRing) (p : GenericSquare a) : + (translate a u p).val = + (Int.fract (p.val.1 + ordinary u.1), Int.fract (p.val.2 + ordinary u.2)) := rfl + +@[simp] theorem translate_zero (a : ℕ) (p : GenericSquare a) : translate a 0 p = p := by + apply Subtype.ext + simp only [translate_val, Prod.fst_zero, Prod.snd_zero, map_zero, add_zero] + exact Prod.ext (Int.fract_eq_self.mpr p.property.1) (Int.fract_eq_self.mpr p.property.2.1) + +theorem translate_add (a : ℕ) (u v : CutRing × CutRing) (p : GenericSquare a) : + translate a (u + v) p = translate a u (translate a v p) := by + apply Subtype.ext + simp only [translate_val, Prod.fst_add, Prod.snd_add, map_add] + rw [fract_fract_add, fract_fract_add] + congr 1 <;> congr 1 <;> ring + +noncomputable def translation (a : ℕ) (u : CutRing × CutRing) : Equiv.Perm (GenericSquare a) where + toFun := translate a u + invFun := translate a (-u) + left_inv p := by rw [← translate_add, neg_add_cancel, translate_zero] + right_inv p := by rw [← translate_add, add_neg_cancel, translate_zero] + +@[simp] theorem translation_apply (a : ℕ) (u : CutRing × CutRing) (p : GenericSquare a) : + translation a u p = translate a u p := rfl + +@[simp] theorem translation_mul (a : ℕ) (u v : CutRing × CutRing) : + translation a (u + v) = translation a u * translation a v := by + ext p + exact translate_add a u v p + +theorem translation_period (a : ℕ) (u : CutRing × CutRing) (k : ℤ × ℤ) : + translation a (u + ((k.1 : CutRing), (k.2 : CutRing))) = translation a u := by + ext p + apply Subtype.ext + simp [translate_val] + +theorem translation_reduce (a : ℕ) (u : CutRing × CutRing) : + translation a u = translation a + ((u.1.im : CutRing) * cutTau, (u.2.im : CutRing) * cutTau) := by + have hu : u = ((u.1.im : CutRing) * cutTau, (u.2.im : CutRing) * cutTau) + + ((u.1.re : CutRing), (u.2.re : CutRing)) := by + apply Prod.ext <;> apply QuadraticAlgebra.ext <;> simp [cutTau] + calc + _ = translation a (((u.1.im : CutRing) * cutTau, (u.2.im : CutRing) * cutTau) + + ((u.1.re : CutRing), (u.2.re : CutRing))) := congrArg (translation a) hu + _ = _ := translation_period _ _ (u.1.re, u.2.re) + +theorem halfPlane_mem (a : ℕ) (j : Fin 4) (z : CutRing) : + halfPlane a j z ∈ polygonAlgebra a := + BooleanSubalgebra.subset_closure ⟨j, z, rfl⟩ + +noncomputable def wrapIndices (u : CutRing × CutRing) : Finset (ℤ × ℤ) := + (Finset.Icc ⌊ordinary u.1⌋ (⌊ordinary u.1⌋ + 1)) ×ˢ + (Finset.Icc ⌊ordinary u.2⌋ (⌊ordinary u.2⌋ + 1)) + +def wrapCell (a : ℕ) (u : CutRing × CutRing) (k : ℤ × ℤ) : Set (GenericSquare a) := + (halfPlane a 0 ((k.1 : CutRing) + 1 - u.1) ∩ + (halfPlane a 0 ((k.1 : CutRing) - u.1))ᶜ) ∩ + (halfPlane a 1 ((k.2 : CutRing) + 1 - u.2) ∩ + (halfPlane a 1 ((k.2 : CutRing) - u.2))ᶜ) + +theorem wrapCell_mem (a : ℕ) (u : CutRing × CutRing) (k : ℤ × ℤ) : + wrapCell a u k ∈ polygonAlgebra a := + BooleanSubalgebra.inf_mem + (BooleanSubalgebra.inf_mem (halfPlane_mem _ _ _) (BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _))) + (BooleanSubalgebra.inf_mem (halfPlane_mem _ _ _) (BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _))) + +theorem mem_wrapCell {a : ℕ} (u : CutRing × CutRing) (k : ℤ × ℤ) (p : GenericSquare a) : + p ∈ wrapCell a u k ↔ + ⌊p.val.1 + ordinary u.1⌋ = k.1 ∧ ⌊p.val.2 + ordinary u.2⌋ = k.2 := by + simp only [wrapCell, Set.mem_inter_iff, halfPlane, Set.mem_ofPred_eq, + Set.mem_compl_iff, cutForm, Matrix.cons_val_zero, Matrix.cons_val_one, + map_sub, map_add, map_one, map_intCast, not_lt, Int.floor_eq_iff] + constructor + · rintro ⟨⟨hx, hx'⟩, ⟨hy, hy'⟩⟩ + exact ⟨⟨by linarith, by linarith⟩, ⟨by linarith, by linarith⟩⟩ + · rintro ⟨⟨hx, hx'⟩, ⟨hy, hy'⟩⟩ + exact ⟨⟨by linarith, by linarith⟩, ⟨by linarith, by linarith⟩⟩ + +private theorem floor_wrap_mem {x : ℝ} (hx : x ∈ Set.Ico (0 : ℝ) 1) (t : ℝ) : + ⌊x + t⌋ ∈ Finset.Icc ⌊t⌋ (⌊t⌋ + 1) := by + rw [Finset.mem_Icc] + exact ⟨Int.floor_mono (by linarith [hx.1]), + (Int.floor_mono (show x + t ≤ t + 1 by linarith [hx.2])).trans_eq (Int.floor_add_one t)⟩ + +theorem point_wrap_mem {a : ℕ} (u : CutRing × CutRing) (p : GenericSquare a) : + (⌊p.val.1 + ordinary u.1⌋, ⌊p.val.2 + ordinary u.2⌋) ∈ wrapIndices u := by + exact Finset.mem_product.mpr + ⟨floor_wrap_mem p.property.1 _, floor_wrap_mem p.property.2.1 _⟩ + +theorem translate_on_wrap {a : ℕ} (u : CutRing × CutRing) (k : ℤ × ℤ) + {p : GenericSquare a} (hp : p ∈ wrapCell a u k) : + (translate a u p).val = p.val + + (ordinary (u.1 - (k.1 : CutRing)), ordinary (u.2 - (k.2 : CutRing))) := by + obtain ⟨h1, h2⟩ := (mem_wrapCell u k p).mp hp + simp only [translate_val, Int.fract, h1, h2, map_sub, map_intCast] + apply Prod.ext <;> simp only [Prod.fst_add, Prod.snd_add] <;> ring + +theorem preimage_halfPlane (a : ℕ) (u : CutRing × CutRing) (j : Fin 4) (z : CutRing) : + translate a u ⁻¹' halfPlane a j z = + ⋃ k ∈ wrapIndices u, wrapCell a u k ∩ + halfPlane a j (z - integralCutForm a j + (u.1 - (k.1 : CutRing), u.2 - (k.2 : CutRing))) := by + ext p + simp only [Set.mem_preimage, Set.mem_iUnion, Set.mem_inter_iff] + constructor + · intro hp + let k := (⌊p.val.1 + ordinary u.1⌋, ⌊p.val.2 + ordinary u.2⌋) + have hk : p ∈ wrapCell a u k := (mem_wrapCell u k p).mpr ⟨rfl, rfl⟩ + refine ⟨k, point_wrap_mem u p, hk, ?_⟩ + change cutForm a j (translate a u p).val < ordinary z at hp + rw [translate_on_wrap u k hk, cutForm_add, cutForm_ordinary a j (u.1 - (k.1 : CutRing), u.2 - (k.2 : CutRing))] at hp + change cutForm a j p.val < ordinary (z - _) + rw [map_sub] + linarith + · rintro ⟨k, _, hk, hp⟩ + change cutForm a j p.val < ordinary (z - _) at hp + rw [map_sub] at hp + change cutForm a j (translate a u p).val < ordinary z + rw [translate_on_wrap u k hk, cutForm_add, + cutForm_ordinary a j (u.1 - (k.1 : CutRing), u.2 - (k.2 : CutRing))] + linarith + +theorem polygon_preimage_translate {a : ℕ} (u : CutRing × CutRing) + {U : Set (GenericSquare a)} (hU : U ∈ polygonAlgebra a) : + translate a u ⁻¹' U ∈ polygonAlgebra a := by + apply polygon_induction (P := fun V => translate a u ⁻¹' V ∈ polygonAlgebra a) ?_ ?_ ?_ ?_ hU + · intro j z + rw [preimage_halfPlane] + exact BooleanSubalgebra.biSup_mem (wrapIndices u).finite_toSet + (fun k _ => BooleanSubalgebra.inf_mem (wrapCell_mem a u k) (halfPlane_mem _ _ _)) + · simpa using (BooleanSubalgebra.bot_mem : (∅ : Set (GenericSquare a)) ∈ polygonAlgebra a) + · intro U V hU hV; exact BooleanSubalgebra.sup_mem hU hV + · intro U hU; exact BooleanSubalgebra.compl_mem hU + +theorem polygon_image_translation {a : ℕ} (u : CutRing × CutRing) + {U : Set (GenericSquare a)} (hU : U ∈ polygonAlgebra a) : + translation a u '' U ∈ polygonAlgebra a := by + rw [(translation a u).image_eq_preimage_symm] + exact polygon_preimage_translate (-u) hU + +private theorem exists_in_interval_avoiding (l r : ℝ) (hlr : l < r) + (S : Set ℝ) (hS : S.Countable) : ∃ x ∈ Set.Ioo l r, x ∉ S := by + apply Set.not_subset.mp + intro h + have := Cardinal.Real.Ioo_countable_iff.mp (hS.mono h) + linarith + +theorem generic_rectangle (a : ℕ) (l₁ r₁ l₂ r₂ : ℝ) + (hl₁ : 0 ≤ l₁) (hr₁ : r₁ ≤ 1) (h₁ : l₁ < r₁) + (hl₂ : 0 ≤ l₂) (hr₂ : r₂ ≤ 1) (h₂ : l₂ < r₂) : + ∃ p : GenericSquare a, p.val.1 ∈ Set.Ioo l₁ r₁ ∧ p.val.2 ∈ Set.Ioo l₂ r₂ := by + obtain ⟨x, hx, hx'⟩ := exists_in_interval_avoiding l₁ r₁ h₁ + (Set.range ordinary) (Set.countable_range ordinary) + let t := Real.goldenRatio ^ a + have ht : t ≠ 0 := ne_of_gt (pow_pos Real.goldenRatio_pos a) + let S := Set.range ordinary ∪ Set.range (fun z : CutRing => ordinary z + t*x) ∪ + Set.range (fun z : CutRing => (x - ordinary z)/t) + have hS : S.Countable := ((Set.countable_range ordinary).union + (Set.countable_range _)).union (Set.countable_range _) + obtain ⟨y, hy, hy'⟩ := exists_in_interval_avoiding l₂ r₂ h₂ S hS + have hav : AvoidsCuts a (x,y) := by + intro j z hz + fin_cases j + · exact hx' ⟨z, by simpa [cutForm] using hz.symm⟩ + · apply hy' + exact Or.inl (Or.inl ⟨z, by simpa [cutForm] using hz.symm⟩) + · apply hy' + apply Or.inl ∘ Or.inr + refine ⟨z, ?_⟩ + change ordinary z + t*x = y + change y - t*x = ordinary z at hz + linarith + · apply hy' + apply Or.inr + refine ⟨z, ?_⟩ + apply (div_eq_iff ht).mpr + change x - t*y = ordinary z at hz + linarith + exact ⟨⟨(x,y), ⟨by linarith [hx.1], by linarith [hx.2]⟩, + ⟨by linarith [hy.1], by linarith [hy.2]⟩, hav⟩, hx, hy⟩ + +instance (a : ℕ) : Nonempty (GenericSquare a) := by + obtain ⟨p, _⟩ := generic_rectangle a 0 1 0 1 le_rfl le_rfl zero_lt_one le_rfl le_rfl zero_lt_one + exact ⟨p⟩ + +end PolygonAction + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonArea.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonArea.lean new file mode 100644 index 0000000000000000000000000000000000000000..81266c111cecc1ee36e177e5cb954d9843b555e5 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonArea.lean @@ -0,0 +1,235 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Arithmetic.PolygonArithmetic + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonArea +open Classical Set MeasureTheory + +local instance : Countable CutRing := + (QuadraticAlgebra.equivProd (1 : ℤ) 1).injective.countable + +theorem continuous_cutForm (a : ℕ) (j : Fin 4) : Continuous (cutForm a j) := by + change Continuous (fun p => cutForm a j p) + fin_cases j <;> dsimp [cutForm] <;> fun_prop + +theorem measurableSet_avoidsCuts (a : ℕ) : MeasurableSet {p : ℝ×ℝ | AvoidsCuts a p} := by + change MeasurableSet {p | ∀j z,cutForm a j p≠ordinary z} + simp only [ofPred_forall] + apply MeasurableSet.iInter + intro j + apply MeasurableSet.iInter + intro z + exact ((continuous_cutForm a j).measurable (measurableSet_singleton (ordinary z))).compl + +theorem volume_cut_level (a : ℕ) (j : Fin 4) (r : ℝ) : + volume {p : ℝ×ℝ | cutForm a j p=r}=0 := by + have hm : MeasurableSet {p : ℝ×ℝ | cutForm a j p=r} := + (continuous_cutForm a j).measurable (measurableSet_singleton r) + change ((volume : Measure ℝ).prod volume) _=0 + fin_cases j + · rw [Measure.prod_apply_symm hm] + simp [cutForm] + · rw [Measure.prod_apply hm] + simp [cutForm] + · rw [Measure.prod_apply hm] + have hy (x : ℝ) : {y : ℝ | y-Real.goldenRatio^a*x=r}={r+Real.goldenRatio^a*x} := by + ext y + simp only [mem_ofPred_eq,mem_singleton_iff] + constructor <;> intro h <;> linarith + simp only [cutForm,Set.preimage] + simp [hy] + · rw [Measure.prod_apply_symm hm] + have hx (y : ℝ) : {x : ℝ | x-Real.goldenRatio^a*y=r}={r+Real.goldenRatio^a*y} := by + ext x + simp only [mem_ofPred_eq,mem_singleton_iff] + constructor <;> intro h <;> linarith + simp only [cutForm,Set.preimage] + simp [hx] + +theorem ae_avoidsCuts (a : ℕ) : ∀ᵐp : ℝ×ℝ, AvoidsCuts a p := by + rw [ae_iff] + have he : {p : ℝ×ℝ | ¬AvoidsCuts a p}=⋃j : Fin 4,⋃z : CutRing,{p | cutForm a j p=ordinary z} := by + ext p + simp [AvoidsCuts] + rw [he] + exact measure_iUnion_null (fun j => measure_iUnion_null (fun z => volume_cut_level a j (ordinary z))) + +theorem measurableSet_genericSquare (a : ℕ) : + MeasurableSet {p : ℝ×ℝ | p.1∈Ico 0 1 ∧ p.2∈Ico 0 1 ∧ AvoidsCuts a p} := + (measurable_fst measurableSet_Ico).inter + ((measurable_snd measurableSet_Ico).inter (measurableSet_avoidsCuts a)) + +theorem volume_genericSquare (a : ℕ) : + volume {p : ℝ×ℝ | p.1∈Ico 0 1 ∧ p.2∈Ico 0 1 ∧ AvoidsCuts a p}=1 := by + have he : {p : ℝ×ℝ | p.1∈Ico 0 1 ∧ p.2∈Ico 0 1 ∧ AvoidsCuts a p} + =ᵐ[volume] (Ico (0:ℝ) 1)×ˢ(Ico (0:ℝ) 1) := by + filter_upwards [ae_avoidsCuts a] with p hp + apply propext + change (p.1∈Ico 0 1 ∧ p.2∈Ico 0 1 ∧ AvoidsCuts a p) ↔ + (p.1∈Ico 0 1 ∧ p.2∈Ico 0 1) + simp only [hp,and_true] + rw [measure_congr he] + change ((volume : Measure ℝ).prod volume) (Ico 0 1 ×ˢ Ico 0 1)=1 + rw [Measure.prod_prod] + simp + +end PolygonArea + +section PolygonJordan +open Classical Set MeasureTheory +namespace PolygonArea + +noncomputable def square : Set (ℝ×ℝ) := Ico (0:ℝ) 1 ×ˢ Ico (0:ℝ) 1 + +theorem null_frontier_inter {S T : Set (ℝ×ℝ)} + (hS : volume (frontier S)=0) (hT : volume (frontier T)=0) : + volume (frontier (S∩T))=0 := by + apply measure_mono_null (subset_trans (frontier_inter_subset S T) ?_) + (measure_union_null hS hT) + exact Set.union_subset_union Set.inter_subset_left Set.inter_subset_right + +theorem null_frontier_union {S T : Set (ℝ×ℝ)} + (hS : volume (frontier S)=0) (hT : volume (frontier T)=0) : + volume (frontier (S∪T))=0 := by + apply measure_mono_null (subset_trans (frontier_union_subset S T) ?_) + (measure_union_null hS hT) + exact Set.union_subset_union Set.inter_subset_left Set.inter_subset_right + +theorem null_frontier_diff {S T : Set (ℝ×ℝ)} + (hS : volume (frontier S)=0) (hT : volume (frontier T)=0) : + volume (frontier (S\T))=0 := by + change volume (frontier (S ∩ Tᶜ))=0 + exact null_frontier_inter hS (by simpa only [frontier_compl] using hT) + +theorem null_frontier_cut (a : ℕ) (j : Fin 4) (r : ℝ) : + volume (frontier {p : ℝ×ℝ | cutForm a j p ∃S : Set (ℝ×ℝ), S⊆square ∧ MeasurableSet S ∧ + volume (frontier S)=0 ∧ ∀x : GenericSquare a,x∈U ↔ x.val∈S) ?_ ?_ ?_ ?_ hU + · intro j z + refine ⟨square∩{p | cutForm a j p ⟨⟨x.property.1,x.property.2.1⟩,hx⟩,And.right⟩ + · exact ⟨∅,Set.empty_subset _,MeasurableSet.empty,by simp,by simp⟩ + · intro U V hU hV + obtain ⟨S,hS,hmS,hbS,heS⟩ := hU + obtain ⟨T,hT,hmT,hbT,heT⟩ := hV + exact ⟨S∪T,Set.union_subset hS hT,hmS.union hmT,null_frontier_union hbS hbT, + fun x => or_congr (heS x) (heT x)⟩ + · intro U hU + obtain ⟨S,hS,hmS,hbS,heS⟩ := hU + refine ⟨square\S,Set.sdiff_subset,(measurableSet_Ico.prod measurableSet_Ico).diff hmS, + null_frontier_diff null_frontier_square hbS,?_⟩ + intro x + change x∉U ↔ x.val∈square ∧ x.val∉S + exact ⟨fun hx => ⟨⟨x.property.1,x.property.2.1⟩,fun hs => hx ((heS x).mpr hs)⟩, + fun hx hu => hx.2 ((heS x).mp hu)⟩ + +noncomputable def area {a : ℕ} (U : polygonAlgebra a) : ENNReal := + volume (Subtype.val '' U.val) + +theorem image_eq_rep {a : ℕ} (U : polygonAlgebra a) {S : Set (ℝ×ℝ)} + (hS : S⊆square) (he : ∀x : GenericSquare a,x∈U.val ↔ x.val∈S) : + Subtype.val '' U.val=S∩{p | AvoidsCuts a p} := by + ext p + constructor + · rintro ⟨x,hx,rfl⟩ + exact ⟨(he x).mp hx,x.property.2.2⟩ + · rintro ⟨hp,hcut⟩ + have hsq := hS hp + exact ⟨⟨p,hsq.1,hsq.2,hcut⟩,(he _).mpr hp,rfl⟩ + +theorem area_eq_rep {a : ℕ} (U : polygonAlgebra a) {S : Set (ℝ×ℝ)} + (hS : S⊆square) (he : ∀x : GenericSquare a,x∈U.val ↔ x.val∈S) : area U=volume S := by + rw [area,image_eq_rep U hS he] + apply measure_congr + filter_upwards [ae_avoidsCuts a] with p hp + apply propext + exact ⟨And.left,fun h => ⟨h,hp⟩⟩ + +theorem measurable_image {a : ℕ} (U : polygonAlgebra a) : + MeasurableSet (Subtype.val '' U.val) := by + obtain ⟨S,hS,hm,hn,he⟩ := representative U.property + rw [image_eq_rep U hS he] + exact hm.inter (measurableSet_avoidsCuts a) + +theorem area_le_one {a : ℕ} (U : polygonAlgebra a) : area U≤1 := by + obtain ⟨S,hS,hm,hn,he⟩ := representative U.property + rw [area_eq_rep U hS he] + calc + volume S≤volume square := measure_mono hS + _=1 := by change ((volume : Measure ℝ).prod volume) (Ico 0 1 ×ˢ Ico 0 1)=1; simp + +theorem area_top (a : ℕ) : area (⊤ : polygonAlgebra a)=1 := by + change volume (Subtype.val '' (⊤ : polygonAlgebra a).val)=1 + have he : Subtype.val '' (⊤ : polygonAlgebra a).val= + {p : ℝ×ℝ | p.1∈Ico 0 1 ∧ p.2∈Ico 0 1 ∧ AvoidsCuts a p} := by + ext p + constructor + · rintro ⟨x,-,rfl⟩; exact x.property + · intro h; exact ⟨⟨p,h⟩,by trivial,rfl⟩ + rw [he] + exact volume_genericSquare a + +theorem closure_ae_eq {S : Set (ℝ×ℝ)} (hS : volume (frontier S)=0) : closure S=ᵐ[volume] S := by + have hn : ∀ᵐp : ℝ×ℝ,p∉frontier S := by + rw [ae_iff] + simpa only [not_not, Set.ofPred_mem_eq] using hS + filter_upwards [hn] with p hp + apply propext + constructor + · intro hx + exact interior_subset (show p∈interior S from by + by_contra hn + exact hp ⟨hx,hn⟩) + · intro hx + exact subset_closure hx + +theorem interior_ae_eq {S : Set (ℝ×ℝ)} (hS : volume (frontier S)=0) : interior S=ᵐ[volume] S := by + have hn : ∀ᵐp : ℝ×ℝ,p∉frontier S := by + rw [ae_iff] + simpa only [not_not, Set.ofPred_mem_eq] using hS + filter_upwards [hn] with p hp + apply propext + constructor + · intro hx + exact interior_subset hx + · intro hx + by_contra hn + exact hp ⟨subset_closure hx,hn⟩ + +end PolygonArea +end PolygonJordan + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonAreaAlgebra.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonAreaAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..a00148e6de5a6fad0ad4558edcf253f569675ad9 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonAreaAlgebra.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.Supported +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonArea + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonAreaAlgebra + +open Classical Set MeasureTheory +namespace PolygonArea + +@[simp] theorem area_bot (a : ℕ) : area (⊥ : polygonAlgebra a)=0 := by + change volume ((fun point : GenericSquare a => point.val) '' (∅ : Set (GenericSquare a)))=0 + simp + +theorem area_mono {a : ℕ} {U V : polygonAlgebra a} (h : U≤V) : area U≤area V := + measure_mono (Set.image_mono h) + +theorem area_eq_sum {a : ℕ} {ι : Type*} [Fintype ι] (U : polygonAlgebra a) + (f : ι → polygonAlgebra a) (he : U.val=⋃i,(f i).val) + (hd : Pairwise (fun i j => Disjoint (f i).val (f j).val)) : + area U=∑i,area (f i) := by + have hd' : Pairwise (fun i j => + Disjoint ((fun point : GenericSquare a => point.val) '' (f i).val) + ((fun point : GenericSquare a => point.val) '' (f j).val)) := by + intro i j hij + apply Set.disjoint_left.mpr + rintro _ ⟨x,hx,rfl⟩ ⟨y,hy,hyx⟩ + have : y=x := Subtype.ext hyx + exact Set.disjoint_left.mp (hd hij) hx (by simpa only [this] using hy) + change volume ((fun point : GenericSquare a => point.val) '' U.val)=_ + rw [he,Set.image_iUnion,measure_iUnion hd' (fun i => measurable_image (f i)),tsum_fintype] + rfl + +theorem area_sup_add_inf {a : ℕ} (U V : polygonAlgebra a) : + area (U⊔V)+area (U⊓V)=area U+area V := by + change volume ((fun point : GenericSquare a => point.val) '' (U.val∪V.val))+ + volume ((fun point : GenericSquare a => point.val) '' (U.val∩V.val))=_ + rw [Set.image_union,Set.image_inter (f := fun point : GenericSquare a => point.val) + Subtype.val_injective] + exact measure_union_add_inter _ (measurable_image V) + +theorem area_compl {a : ℕ} (U : polygonAlgebra a) : area U+area Uᶜ=1 := by + have h := area_sup_add_inf U Uᶜ + simpa only [sup_compl_eq_top,inf_compl_eq_bot,area_top,area_bot,add_zero] using h.symm + +theorem area_sup_le {a : ℕ} (U V : polygonAlgebra a) : area (U⊔V)≤area U+area V := by + change volume ((fun point : GenericSquare a => point.val) '' (U.val∪V.val))≤_ + rw [Set.image_union] + exact measure_union_le _ _ + +theorem area_finset_sup_le {a : ℕ} {ι : Type*} (s : Finset ι) (f : ι → polygonAlgebra a) : + area (s.sup f)≤∑i∈s,area (f i) := by + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => + rw [Finset.sup_insert,Finset.sum_insert hi] + exact (area_sup_le _ _).trans (add_le_add le_rfl ih) + +theorem area_translation_wrap {a : ℕ} (u : CutRing×CutRing) (k : ℤ×ℤ) + (U : polygonAlgebra a) (hU : U.val⊆wrapCell a u k) : + area (translatedPolygon u U)=area U := by + let v : ℝ×ℝ := (ordinary (u.1-(k.1:CutRing)),ordinary (u.2-(k.2:CutRing))) + have he : Subtype.val '' (translatedPolygon u U).val= + (fun p : ℝ×ℝ => p+v) '' (Subtype.val '' U.val) := by + ext p + constructor + · rintro ⟨y,⟨x,hx,rfl⟩,rfl⟩ + exact ⟨x.val,⟨x,hx,rfl⟩,(translate_on_wrap u k (hU hx)).symm⟩ + · rintro ⟨_,⟨x,hx,rfl⟩,rfl⟩ + exact ⟨translate a u x,⟨x,hx,rfl⟩,translate_on_wrap u k (hU hx)⟩ + change volume (Subtype.val '' (translatedPolygon u U).val)=_ + rw [he,Set.image_add_right,measure_preimage_add_right] + rfl + +theorem area_translation {a : ℕ} (u : CutRing×CutRing) (U : polygonAlgebra a) : + area (translatedPolygon u U)=area U := by + let W (k : wrapIndices u) : polygonAlgebra a := + U ⊓ ⟨wrapCell a u k.val,wrapCell_mem a u k.val⟩ + have hcov : U.val=⋃k,(W k).val := by + ext x + constructor + · intro hx + let k : wrapIndices u := ⟨(⌊x.val.1+ordinary u.1⌋,⌊x.val.2+ordinary u.2⌋),point_wrap_mem u x⟩ + exact Set.mem_iUnion.mpr ⟨k,hx,(mem_wrapCell u k.val x).mpr ⟨rfl,rfl⟩⟩ + · intro hx + obtain ⟨k,hk⟩ := Set.mem_iUnion.mp hx + exact hk.1 + have hdis : Pairwise (fun k l : wrapIndices u => Disjoint (W k).val (W l).val) := by + intro k l hkl + apply Set.disjoint_left.mpr + intro x hx hy + obtain ⟨hx₁,hx₂⟩ := (mem_wrapCell u k.val x).mp hx.2 + obtain ⟨hy₁,hy₂⟩ := (mem_wrapCell u l.val x).mp hy.2 + exact hkl (Subtype.ext (Prod.ext (hx₁.symm.trans hy₁) (hx₂.symm.trans hy₂))) + have he : (translatedPolygon u U).val=⋃k,(translatedPolygon u (W k)).val := by + change translation a u '' U.val=⋃k,translation a u '' (W k).val + rw [hcov,Set.image_iUnion] + have hd : Pairwise (fun k l : wrapIndices u => + Disjoint (translatedPolygon u (W k)).val (translatedPolygon u (W l)).val) := by + intro k l hkl + apply Set.disjoint_image_image + intro x hx y hy he + have heq := (translation a u).injective he + subst y + exact Set.disjoint_left.mp (hdis hkl) hx hy + rw [area_eq_sum _ _ he hd,area_eq_sum _ _ hcov hdis] + exact Finset.sum_congr rfl (fun k _ => area_translation_wrap u k.val (W k) (fun _ hx => hx.2)) + +end PolygonArea +end PolygonAreaAlgebra + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonBankEmbedding.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonBankEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..07392a684dcbe25160639bd5f407efc9da9edfe2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonBankEmbedding.lean @@ -0,0 +1,240 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonPiecewiseSlots + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonBankEmbedding + +open Classical Set +namespace PolygonObject + +structure BankEmbedding {a : ℕ} (U : PolygonObject a) (m : ℕ) where + emb : U.Point ↪ TrackPoint a m + table : HasTable (fun x => (⟨emb x,by trivial⟩ : (whole a m).Point)) + +namespace BankEmbedding +variable {a m : ℕ} {U : PolygonObject a} +instance : CoeFun (BankEmbedding U m) (fun _ => U.Point → TrackPoint a m) := ⟨fun f => f.emb⟩ + +theorem injective (f : BankEmbedding U m) : Function.Injective f := f.emb.injective + +theorem range_fiber_polygon (f : BankEmbedding U m) (i : Fin m) : + {x | (i,x)∈Set.range f}∈polygonAlgebra a := by + obtain ⟨S,hS,hcov⟩ := f.table + change Finset (Chart (a:=a) U.tracks m) at S + let Q (c : Chart (a:=a) U.tracks m) : polygonAlgebra a := + if c.target=i then translatedPolygon c.shift c.domain else ⊥ + have he : {x | (i,x)∈Set.range f}=(S.sup Q).val := by + rw [PolygonArea.val_finset_sup] + ext y + constructor + · rintro ⟨p,hp⟩ + obtain ⟨c,hc,hs,hx⟩ := hcov p + obtain ⟨hu,hf⟩ := hS c hc p.val.2 hx + have he : (⟨(c.source,p.val.2),hu⟩ : U.Point)=p := Subtype.ext (Prod.ext hs.symm rfl) + change f ⟨(c.source,p.val.2),hu⟩=(c.target,translate a c.shift p.val.2) at hf + rw [he,hp] at hf + refine Set.mem_iUnion₂.mpr ⟨c,hc,?_⟩ + have ht : c.target=i := (congrArg Prod.fst hf).symm + simp only [Q,ht,ite_true] + exact ⟨p.val.2,hx,(congrArg Prod.snd hf).symm⟩ + · intro hy + obtain ⟨c,hc,hy⟩ := Set.mem_iUnion₂.mp hy + by_cases ht : c.target=i + · simp only [Q,ht,ite_true] at hy + obtain ⟨x,hx,rfl⟩ := hy + obtain ⟨hu,he⟩ := hS c hc x hx + refine ⟨⟨(c.source,x),hu⟩,?_⟩ + change f ⟨(c.source,x),hu⟩=(c.target,translate a c.shift x) at he + change f ⟨(c.source,x),hu⟩=(i,translate a c.shift x) + exact he.trans (congrArg (fun j => (j,translate a c.shift x)) ht) + · simp only [Q,ht,ite_false] at hy + exact False.elim hy + rw [he] + exact (S.sup Q).property + +noncomputable def imageBank (f : BankEmbedding U m) (i : Fin m) : polygonAlgebra a := + ⟨{x | (i,x)∈Set.range f},range_fiber_polygon f i⟩ + +theorem imageBank_area_le (f : BankEmbedding U m) : + (∑i,PolygonArea.area (imageBank f i))≤∑r,PolygonArea.area (U.cell r) := by + obtain ⟨S,hS,hcov⟩ := f.table + change Finset (Chart (a:=a) U.tracks m) at S + let D (r : Fin U.tracks) (c : S) : polygonAlgebra a := + if c.val.source=r then c.val.domain else ⊥ + have hD (r : Fin U.tracks) (c : S) (x : GenericSquare a) : + x∈(D r c).val ↔ c.val.source=r ∧ x∈c.val.domain.val := by + by_cases h : c.val.source=r <;> simp [D,h] + have hd_sub (r : Fin U.tracks) (c : S) : D r c≤U.cell r := by + intro x hx + obtain ⟨hr,hx⟩ := (hD r c x).mp hx + have hu := (hS c.val c.property x hx).1 + simpa only [hr] using hu + have hd_cover (r : Fin U.tracks) (x : GenericSquare a) (hx : x∈(U.cell r).val) : + ∃c : S,x∈(D r c).val := by + obtain ⟨c,hc,hr,hd⟩ := hcov ⟨(r,x),hx⟩ + exact ⟨⟨c,hc⟩,(hD r ⟨c,hc⟩ x).mpr ⟨hr.symm,hd⟩⟩ + have ex (r : Fin U.tracks) := Fintype.exists_disjointed_le (D r) + choose P hP hSup hdisP using ex + have hcoverP (r : Fin U.tracks) : (U.cell r).val=⋃c,(P r c).val := by + have hv := congrArg (fun A : polygonAlgebra a => A.val) (hSup r) + simp only [PolygonArea.val_finset_sup,Finset.mem_univ,Set.iUnion_true] at hv + rw [hv] + ext x + exact ⟨fun hx => Set.mem_iUnion.mpr (hd_cover r x hx),fun hx => + by obtain ⟨c,hc⟩ := Set.mem_iUnion.mp hx;exact hd_sub r c hc⟩ + have hsumP (r : Fin U.tracks) : (∑c,PolygonArea.area (P r c))=PolygonArea.area (U.cell r) := by + symm + apply PolygonArea.area_eq_sum _ (P r) (hcoverP r) + intro c d hcd + have h : Disjoint (P r c) (P r d) := hdisP r hcd + rw [disjoint_iff] at h + exact Set.disjoint_iff_inter_eq_empty.mpr (congrArg (fun A : polygonAlgebra a => A.val) h) + let Q (i : Fin m) (r : Fin U.tracks) (c : S) : polygonAlgebra a := + if c.val.target=i then translatedPolygon c.val.shift (P r c) else ⊥ + have hbank (i : Fin m) : imageBank f i≤Finset.univ.sup (fun r => Finset.univ.sup (Q i r)) := by + intro y hy + obtain ⟨p,hpy⟩ := hy + have hx : p.val.2∈⋃c,(P p.val.1 c).val := by rw [←hcoverP];exact p.property + obtain ⟨c,hc⟩ := Set.mem_iUnion.mp hx + obtain ⟨hr,hd⟩ := (hD p.val.1 c p.val.2).mp (hP p.val.1 c hc) + obtain ⟨hu,he⟩ := hS c.val c.property p.val.2 hd + have he' : (⟨(c.val.source,p.val.2),hu⟩ : U.Point)=p := Subtype.ext (Prod.ext hr rfl) + change f ⟨(c.val.source,p.val.2),hu⟩=(c.val.target,translate a c.val.shift p.val.2) at he + rw [he',hpy] at he + simp only [PolygonArea.val_finset_sup] + refine Set.mem_iUnion₂.mpr ⟨p.val.1,Finset.mem_univ _,Set.mem_iUnion₂.mpr ⟨c,Finset.mem_univ _,?_⟩⟩ + have ht : c.val.target=i := (congrArg Prod.fst he).symm + simp only [Q,ht,ite_true] + exact ⟨p.val.2,hc,(congrArg Prod.snd he).symm⟩ + calc + (∑i,PolygonArea.area (imageBank f i)) ≤ ∑i,∑r,∑c,PolygonArea.area (Q i r c) := by + apply Finset.sum_le_sum + intro i _ + exact (PolygonArea.area_mono (hbank i)).trans ((PolygonArea.area_finset_sup_le _ _).trans + (Finset.sum_le_sum (fun r _ => PolygonArea.area_finset_sup_le _ _))) + _ = ∑r,∑c,PolygonArea.area (P r c) := by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro r _ + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro c _ + simp [Q,apply_ite,PolygonArea.area_bot,PolygonArea.area_translation] + _ = ∑r,PolygonArea.area (U.cell r) := Finset.sum_congr rfl (fun r _ => hsumP r) + +theorem exists_into {U V : Fin m → polygonAlgebra a} + (h : (∑i,PolygonArea.area (U i))<∑i,PolygonArea.area (V i)) : + ∃f : BankEmbedding (PolygonObject.mk m U) m,∀p,(f p).2∈(V (f p).1).val := by + obtain ⟨f,hf⟩ := PolygonGrid.strict_comparison U V h + exact ⟨⟨⟨fun p => (f p).val,fun _ _ he => f.injective (Subtype.ext he)⟩,hf⟩,fun p => (f p).property⟩ + +end BankEmbedding +end PolygonObject +end PolygonBankEmbedding + +section PolygonBankReserve + +open Classical Set +namespace PolygonObject +namespace BankEmbedding +variable {a m b : ℕ} + +noncomputable def inclusion (U : Fin m → polygonAlgebra a) : BankEmbedding (PolygonObject.mk m U) m := + ⟨⟨Subtype.val,Subtype.val_injective⟩,intoWhole_hasTable (identity_hasTable _)⟩ + +theorem exists_away (U B : Fin m → polygonAlgebra a) + (f : Fin b → BankEmbedding (PolygonObject.mk m U) m) + (h : (∑i,PolygonArea.area (B i))+(b+1:ENNReal)*(∑i,PolygonArea.area (U i)) < m) : + ∃g : BankEmbedding (PolygonObject.mk m U) m, + (∀p,(g p).2∉(B (g p).1).val) ∧ ∀j p q,g p≠f j q := by + let D (i : Fin m) : polygonAlgebra a := + B i ⊔ Finset.univ.sup (fun j => imageBank (f j) i) + let V (i : Fin m) : polygonAlgebra a := (D i)ᶜ + have hD : (∑i,PolygonArea.area (D i))≤ + (∑i,PolygonArea.area (B i))+(b:ENNReal)*(∑i,PolygonArea.area (U i)) := by + calc + _≤∑i,(PolygonArea.area (B i)+∑j,PolygonArea.area (imageBank (f j) i)) := by + apply Finset.sum_le_sum + intro i _ + exact (PolygonArea.area_sup_le _ _).trans (add_le_add le_rfl (PolygonArea.area_finset_sup_le _ _)) + _=(∑i,PolygonArea.area (B i))+∑j,∑i,PolygonArea.area (imageBank (f j) i) := by + rw [Finset.sum_add_distrib,Finset.sum_comm] + _≤(∑i,PolygonArea.area (B i))+∑_j : Fin b,∑i,PolygonArea.area (U i) := + add_le_add le_rfl (Finset.sum_le_sum (fun j _ => imageBank_area_le (f j))) + _=_ := by simp + have hDV : (∑i,PolygonArea.area (D i))+(∑i,PolygonArea.area (V i))=m := by + rw [←Finset.sum_add_distrib] + simp only [V,PolygonArea.area_compl,Finset.sum_const,Finset.card_univ,Fintype.card_fin,nsmul_eq_mul,mul_one] + have hV : (∑i,PolygonArea.area (U i))<∑i,PolygonArea.area (V i) := by + by_contra hn + have hh := (add_le_add hD (le_of_not_gt hn)) + rw [hDV] at hh + have he : (∑i,PolygonArea.area (B i))+(b:ENNReal)*(∑i,PolygonArea.area (U i))+ + (∑i,PolygonArea.area (U i)) = + (∑i,PolygonArea.area (B i))+(b+1:ENNReal)*(∑i,PolygonArea.area (U i)) := by + rw [add_mul,one_mul,add_assoc] + rw [he] at hh + exact (not_le_of_gt h) hh + obtain ⟨g,hg⟩ := exists_into hV + refine ⟨g,?_,?_⟩ + · intro p hB + exact hg p (Or.inl hB) + · intro j p q he + apply hg p + right + rw [PolygonArea.val_finset_sup] + refine Set.mem_iUnion₂.mpr ⟨j,Finset.mem_univ _,?_⟩ + exact ⟨q,he.symm⟩ + +theorem cycle_three {U : PolygonObject a} (f g h : BankEmbedding U m) + (hfg : ∀p q,f p≠g q) (hfh : ∀p q,f p≠h q) (hgh : ∀p q,g p≠h q) : + ∃ c : polygonAlternatingGroup a m, + (∀p,c.val.val (f p)=g p) ∧ + (∀y,(∀p,f p≠y) → (∀p,g p≠y) → (∀p,h p≠y) → c.val.val y=y) := by + let slots : Fin 3 → BankEmbedding U m := ![f,g,h] + have hinj : Function.Injective (fun p : Fin 3 × U.Point => slots p.1 p.2) := by + rintro ⟨i,p⟩ ⟨j,q⟩ he + have hij : i=j := by + fin_cases i <;> fin_cases j <;> simp only [slots] at he ⊢ + · exact False.elim (hfg p q he) + · exact False.elim (hfh p q he) + · exact False.elim (hfg q p he.symm) + · exact False.elim (hgh p q he) + · exact False.elim (hfh q p he.symm) + · exact False.elim (hgh q p he.symm) + subst j + exact Prod.ext rfl ((slots i).injective he) + let σ : Equiv.Perm (Fin 3) := Equiv.swap 0 1 * Equiv.swap 1 2 + have hσ : σ∈alternatingGroup (Fin 3) := by + simp [σ,Equiv.Perm.mem_alternatingGroup,Equiv.Perm.sign_mul] + obtain ⟨c,hc,hout⟩ := PolygonPiecewise.even_slots U (fun i => slots i) hinj (fun i => (slots i).table) σ hσ + refine ⟨c,?_,?_⟩ + · intro p + have hz : σ 0=1 := by decide + have hu := hc 0 p + rw [hz] at hu + exact hu + · intro y hyf hyg hyh + apply hout y + rintro ⟨⟨i,p⟩,he⟩ + fin_cases i + · exact hyf p he + · exact hyg p he + · exact hyh p he + +end BankEmbedding +end PolygonObject +end PolygonBankReserve + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonComponentCompletion.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonComponentCompletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc0fc7610939f7193889dc18a0252aad7a865140 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonComponentCompletion.lean @@ -0,0 +1,101 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Simplicial.PolygonMonoidalData + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonComponentCompletion + +open Classical CategoryTheory +namespace PolygonObject +variable {a : ℕ} + +abbrev Component (a : ℕ) := Skeleton (PolygonObject a) +noncomputable abbrev component (U : PolygonObject a) : Component a := toSkeleton U + +@[simp] theorem component_sum (U V : PolygonObject a) : + component (sum U V)=component U*component V := + Skeleton.toSkeleton_tensorObj U V + +theorem sum_standard (m n : ℕ) : sum (standard a m) (standard a n)=standard a (m+n) := by + unfold sum standard + congr 1 + funext i + induction i using Fin.addCases <;> simp only [Fin.addCases_left,Fin.addCases_right] + +@[simp] theorem component_standard_zero : component (standard a 0)=1 := by + rw [Skeleton.one_eq] + apply congrArg toSkeleton + change standard a 0=empty + unfold standard empty + congr 1 + funext i + exact Fin.elim0 i + +@[simp] theorem component_standard_add (m n : ℕ) : + component (standard a (m+n))=component (standard a m)*component (standard a n) := by + rw [←sum_standard,component_sum] + +theorem component_standard_pow (n : ℕ) : + component (standard a n)=component (standard a 1)^n := by + induction n with + | zero => simp + | succ n hn => rw [component_standard_add,hn,pow_succ] + +theorem component_complement (U : PolygonObject a) : + component U * component (complement U)=component (standard a U.tracks) := by + rw [←component_sum] + exact congr_toSkeleton_of_iso (complementIso U) + +abbrev CompletedComponent (a : ℕ) := Algebra.GrothendieckGroup (Component a) +noncomputable abbrev completedComponent (U : PolygonObject a) : CompletedComponent a := + Algebra.GrothendieckGroup.of (component U) + +theorem completion_eq_iff (U V : PolygonObject a) : + completedComponent U=completedComponent V ↔ + ∃ W : PolygonObject a, Nonempty (sum U W ≅ sum V W) := by + change (Localization.monoidOf (⊤ : Submonoid (Component a))) (component U)= + (Localization.monoidOf (⊤ : Submonoid (Component a))) (component V) ↔ _ + rw [Submonoid.LocalizationMap.eq_iff_exists] + constructor + · rintro ⟨c,hc⟩ + let W : PolygonObject a := (fromSkeleton (PolygonObject a)).obj c.val + refine ⟨W,⟨Skeleton.isoOfEq ?_⟩⟩ + change component (sum U W)=component (sum V W) + rw [component_sum,component_sum] + have he : component W=c.val := toSkeleton_fromSkeleton_obj c.val + rw [he,mul_comm (component U),mul_comm (component V)] + exact hc + · rintro ⟨W,hW⟩ + refine ⟨⟨component W,Submonoid.mem_top _⟩,?_⟩ + have hh := toSkeleton_eq_toSkeleton_iff.mpr hW + change component (sum U W)=component (sum V W) at hh + rw [component_sum,component_sum] at hh + simpa [mul_comm] using hh + +theorem neutral_component_eventually_standard (U : PolygonObject a) (r : ℕ) + (hU : completedComponent U=completedComponent (standard a r)) : + ∃ k : ℕ, Nonempty (sum U (standard a k) ≅ standard a (r+k)) := by + obtain ⟨V,hV⟩ := (completion_eq_iff U (standard a r)).mp hU + refine ⟨V.tracks,toSkeleton_eq_toSkeleton_iff.mp ?_⟩ + have hh := toSkeleton_eq_toSkeleton_iff.mpr hV + change component (sum U V)=component (sum (standard a r) V) at hh + rw [component_sum,component_sum] at hh + have he := congrArg (fun x : Component a => x*component (complement V)) hh + change component (sum U (standard a V.tracks))=component (standard a (r+V.tracks)) + rw [component_sum,component_standard_add] + simpa only [mul_assoc,component_complement] using he + +end PolygonObject +end PolygonComponentCompletion + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonDiagramRefinement.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonDiagramRefinement.lean new file mode 100644 index 0000000000000000000000000000000000000000..d974e27ab9b1024b0d39d3859464b46a74b7e8e3 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonDiagramRefinement.lean @@ -0,0 +1,131 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonTrajectoryStrata +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonObjectRefinement + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonDiagramRefinement + +open Classical CategoryTheory Set +namespace PolygonObject +variable {a : ℕ} + +theorem chart_target_track {U V : PolygonObject a} (f : U ⟶ V) + (c : Chart (a:=a) U.tracks V.tracks) (hc : c.Holds f.toEquiv) (x : U.Point) + (hx : c.Contains x) : (f.toEquiv x).val.1=c.target := by + obtain ⟨hu,he⟩ := hc x.val.2 hx.2 + have hpoint : (⟨(c.source,x.val.2),hu⟩ : U.Point)=x := + Subtype.ext (Prod.ext hx.1.symm rfl) + rw [hpoint] at he + exact congrArg Prod.fst he + +theorem targetTrack_fiber_polygon {U V : PolygonObject a} (f : U ⟶ V) + (i : Fin U.tracks) (j : Fin V.tracks) : + {z | ∃hz : z∈(U.cell i).val,(f.toEquiv ⟨(i,z),hz⟩).val.1=j}∈polygonAlgebra a := by + obtain ⟨s,hs,hcover⟩ := f.hasTable + have he : {z | ∃hz : z∈(U.cell i).val,(f.toEquiv ⟨(i,z),hz⟩).val.1=j} = + ⋃c∈s.filter (fun c => c.source=i ∧ c.target=j),c.domain.val := by + ext z + constructor + · rintro ⟨hz,hj⟩ + obtain ⟨c,hc,hz'⟩ := hcover ⟨(i,z),hz⟩ + exact Set.mem_iUnion₂.mpr ⟨c,Finset.mem_filter.mpr ⟨hc,hz'.1.symm, + (chart_target_track f c (hs c hc) ⟨(i,z),hz⟩ hz').symm.trans hj⟩,hz'.2⟩ + · intro hz + obtain ⟨c,hcf,hcz⟩ := Set.mem_iUnion₂.mp hz + obtain ⟨hcs,hci,hcj⟩ := Finset.mem_filter.mp hcf + obtain ⟨hz',hf⟩ := hs c hcs z hcz + subst i + exact ⟨hz',(chart_target_track f c (hs c hcs) ⟨(c.source,z),hz'⟩ ⟨rfl,hcz⟩).trans hcj⟩ + rw [he] + apply BooleanSubalgebra.biSup_mem (Finset.finite_toSet _) + intro c _ + exact c.domain.property + +abbrev ArrowLabel {U V : PolygonObject a} (f : U ⟶ V) := + Fin V.tracks × Set.range (pointShift f) + +noncomputable instance arrowLabel_fintype {U V : PolygonObject a} (f : U ⟶ V) : + Fintype (ArrowLabel f) := by + letI := (pointShift_finite_range f).fintype + exact inferInstance + +noncomputable def arrowLabel {U V : PolygonObject a} (f : U ⟶ V) (x : U.Point) : + ArrowLabel f := ⟨(f.toEquiv x).val.1,⟨pointShift f x,⟨x,rfl⟩⟩⟩ + +theorem arrowLabel_fiber_polygon {U V : PolygonObject a} (f : U ⟶ V) + (i : Fin U.tracks) (j : ArrowLabel f) : + {z | ∃hz : z∈(U.cell i).val,arrowLabel f ⟨(i,z),hz⟩=j}∈polygonAlgebra a := by + have he : {z | ∃hz : z∈(U.cell i).val,arrowLabel f ⟨(i,z),hz⟩=j} = + {z | ∃hz : z∈(U.cell i).val,(f.toEquiv ⟨(i,z),hz⟩).val.1=j.1} ∩ + {z | ∃hz : z∈(U.cell i).val,pointShift f ⟨(i,z),hz⟩=j.2.val} := by + ext z + constructor + · rintro ⟨hz,he⟩ + exact ⟨⟨hz,congrArg Prod.fst he⟩,⟨hz,congrArg (fun t => t.2.val) he⟩⟩ + · rintro ⟨⟨hz,ht⟩,⟨hz',hs⟩⟩ + exact ⟨hz,Prod.ext ht (Subtype.ext hs)⟩ + rw [he] + exact (polygonAlgebra a).inf_mem (targetTrack_fiber_polygon f i j.1) + (pointShift_fiber_polygon f i j.2.val) + +variable {κ : Type} [Fintype κ] {U : PolygonObject a} + {V : κ → PolygonObject a} + +noncomputable def diagramLabel (f : ∀k,U ⟶ V k) (x : U.Point) : + ∀k,ArrowLabel (f k) := fun k => arrowLabel (f k) x + +theorem diagramLabel_fiber_polygon (f : ∀k,U ⟶ V k) + (i : Fin U.tracks) (j : ∀k,ArrowLabel (f k)) : + {z | ∃hz : z∈(U.cell i).val,diagramLabel f ⟨(i,z),hz⟩=j}∈polygonAlgebra a := by + have he : {z | ∃hz : z∈(U.cell i).val,diagramLabel f ⟨(i,z),hz⟩=j} = + (U.cell i).val ∩ ⋂k : κ,{z | ∃hz : z∈(U.cell i).val,arrowLabel (f k) ⟨(i,z),hz⟩=j k} := by + ext z + constructor + · rintro ⟨hz,he⟩ + exact ⟨hz,Set.mem_iInter.mpr (fun k => ⟨hz,congrFun he k⟩)⟩ + · rintro ⟨hz,he⟩ + refine ⟨hz,?_⟩ + funext k + exact (Set.mem_iInter.mp he k).choose_spec + rw [he] + exact (polygonAlgebra a).inf_mem (U.cell i).property + (BooleanSubalgebra.iInf_mem (fun k => arrowLabel_fiber_polygon (f k) i (j k))) + +theorem exists_common_arrow_refinement (f : ∀k,U ⟶ V k) : + ∃ (W : PolygonObject a) (h : W ⟶ U), Positional h ∧ + ∃ (t : ∀k,Fin W.tracks → Fin (V k).tracks) + (d : κ → Fin W.tracks → CutRing × CutRing), + ∀k x,((h≫f k).toEquiv x).val= + (t k x.val.1,translate a (d k x.val.1) x.val.2) := by + let W := refinement U (diagramLabel f) (diagramLabel_fiber_polygon f) + let h := refinementArrow U (diagramLabel f) (diagramLabel_fiber_polygon f) + let lab (j : Fin W.tracks) := + ((Fintype.equivFin (Fin U.tracks × (∀k,ArrowLabel (f k)))).symm j).2 + refine ⟨W,h,refinementArrow_positional _ _ _, + (fun k j => (lab j k).1),(fun k j => (lab j k).2.val),?_⟩ + intro k x + have he := congrFun + (refinementArrow_label U (diagramLabel f) (diagramLabel_fiber_polygon f) x) k + apply Prod.ext + · change ((f k).toEquiv (h.toEquiv x)).val.1 = (lab x.val.1 k).1 + exact congrArg (fun t : ArrowLabel (f k) => t.1) he + · rw [arrow_comp_apply,pointShift_spec] + change translate a (pointShift (f k) (h.toEquiv x)) x.val.2 = _ + rw [show pointShift (f k) (h.toEquiv x)=(lab x.val.1 k).2.val from + congrArg (fun t => t.2.val) he] + +end PolygonObject +end PolygonDiagramRefinement + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonGridComparison.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonGridComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..b69a03f8f507ef440e778f7db8531aa9e824b5c2 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonGridComparison.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonGrid + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonGridComparison +open Classical Set MeasureTheory Metric +namespace PolygonGrid + +instance : IsLocallyFiniteMeasure (Measure.count : Measure ℕ) where + finiteAtNhds n := ⟨{n}, (isOpen_discrete _).mem_nhds rfl, by simp⟩ + +instance : IsLocallyFiniteMeasure μ := by + unfold μ + infer_instance + +instance : Measure.OuterRegular μ := by + unfold μ + infer_instance + +instance : Measure.InnerRegularCompactLTTop μ := by + unfold μ + infer_instance + +@[simp] theorem volume_region (m : ℕ) : μ (region m)=m := by + have he : {i : ℕ | i < m}=(Finset.range m : Set ℕ) := by ext i; simp + simp only [μ,region,Measure.prod_prod,he,Measure.count_apply_finset,Finset.card_range] + simp + +theorem compact_closure {m : ℕ} {S : Set PlaneTracks} (hS : S⊆region m) : IsCompact (closure S) := by + let K : Set PlaneTracks := (Finset.range m : Set ℕ) ×ˢ Icc (0:ℝ) 1 ×ˢ Icc (0:ℝ) 1 + have hK : IsCompact K := (Finset.finite_toSet _).isCompact.prod (isCompact_Icc.prod isCompact_Icc) + apply hK.of_isClosed_subset isClosed_closure + apply hK.isClosed.closure_subset_iff.mpr + intro p hp + have h := hS hp + exact ⟨by simpa using h.1,⟨h.2.1.1,h.2.1.2.le⟩,⟨h.2.2.1,h.2.2.2.le⟩⟩ + +theorem strict_grid_comparison {m : ℕ} {S T : Set PlaneTracks} + (hS : S⊆region m) (hT : T⊆region m) + (hμ : μ (closure S) < μ (interior T)) : + ∃ δ : ℝ, 0 < δ ∧ ∀ε : ℝ, 0 < ε → ε < δ → + ∃ (N : ℕ) (I J : Finset (Index m N)), Nonempty (I ↪ J) ∧ + S⊆⋃i∈I,cell ε i ∧ ∀j∈J,cell ε j⊆T := by + obtain ⟨r,hrS,hrT⟩ := exists_between hμ + obtain ⟨O,hSO,hO,hOr⟩ := (closure S).exists_isOpen_lt_of_lt r hrS + have hfinite : μ (interior T)≠⊤ := by + apply ne_top_of_le_ne_top (by simp : μ (region m)≠⊤) + exact measure_mono (Set.Subset.trans interior_subset hT) + obtain ⟨K,hKT,hK,hrK⟩ := isOpen_interior.measurableSet.exists_lt_isCompact_of_ne_top hfinite hrT + obtain ⟨δS,hδS,hOS⟩ := (compact_closure hS).exists_thickening_subset_open hO hSO + obtain ⟨δK,hδK,hTK⟩ := hK.exists_thickening_subset_open isOpen_interior hKT + refine ⟨min δS δK,lt_min hδS hδK,fun ε hε hδ => ?_⟩ + let N : ℕ := ⌈1/ε⌉₊+1 + have hN : 1/ε < (N:ℝ) := by + have h := Nat.le_ceil (1/ε) + dsimp [N] + simp only [Nat.cast_add,Nat.cast_one] + linarith + let hits (A : Set PlaneTracks) : Finset (Index m N) := Finset.univ.filter (fun i => (cell ε i∩A).Nonempty) + have cover (A : Set PlaneTracks) (hA : A⊆region m) : A⊆⋃i∈hits A,cell ε i := by + intro p hp + obtain ⟨i,hi⟩ := Set.mem_iUnion.mp (region_covered hε hN (hA hp)) + exact Set.mem_iUnion₂.mpr ⟨i,Finset.mem_filter.mpr ⟨Finset.mem_univ _,p,hi,hp⟩,hi⟩ + have inO : (⋃i∈hits S,cell ε i)⊆O := by + intro p hp + obtain ⟨i,hi,hp⟩ := Set.mem_iUnion₂.mp hp + obtain ⟨q,hq,hqS⟩ := (Finset.mem_filter.mp hi).2 + apply hOS + rw [mem_thickening_iff] + exact ⟨q,subset_closure hqS,(cell_dist hε hp hq).trans (hδ.trans_le (min_le_left _ _))⟩ + have inT : ∀j∈hits K,cell ε j⊆T := by + intro j hj p hp + obtain ⟨q,hq,hqK⟩ := (Finset.mem_filter.mp hj).2 + apply interior_subset + apply hTK + rw [mem_thickening_iff] + exact ⟨q,hqK,(cell_dist hε hp hq).trans (hδ.trans_le (min_le_right _ _))⟩ + have hKregion : K⊆region m := Set.Subset.trans hKT (Set.Subset.trans interior_subset hT) + have hmass : μ (⋃i∈hits S,cell ε i) < μ (⋃j∈hits K,cell ε j) := + lt_of_le_of_lt (measure_mono inO) ((hOr.trans hrK).trans_le (measure_mono (cover K hKregion))) + exact ⟨N,hits S,hits K,matching_of_volume hε _ _ hmass,cover S hS,inT⟩ + +end PolygonGrid +end PolygonGridComparison + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonGridEmbedding.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonGridEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..1899d0f1a70c3c6b36d1dda35744898a82ba1bee --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonGridEmbedding.lean @@ -0,0 +1,167 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.TupleChartDomain +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonGroupoid +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonTrackArea + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonGridEmbedding +open Classical Set +namespace PolygonGrid + +noncomputable def rectangle (a : ℕ) (r : CutRing) (i j : ℕ) : polygonAlgebra a := + ⟨(halfPlane a 0 (r*(i+1)) ∩ (halfPlane a 0 (r*i))ᶜ) ∩ + (halfPlane a 1 (r*(j+1)) ∩ (halfPlane a 1 (r*j))ᶜ), + BooleanSubalgebra.inf_mem + (BooleanSubalgebra.inf_mem (halfPlane_mem _ _ _) (BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _))) + (BooleanSubalgebra.inf_mem (halfPlane_mem _ _ _) (BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _)))⟩ + +@[simp] theorem mem_rectangle (a : ℕ) (r : CutRing) (i j : ℕ) (x : GenericSquare a) : + x∈(rectangle a r i j).val ↔ + x.val.1∈interval (ordinary r) i ∧ x.val.2∈interval (ordinary r) j := by + simp only [rectangle,halfPlane,interval,Set.mem_inter_iff,Set.mem_compl_iff, + Set.mem_ofPred_eq,Set.mem_Ico,cutForm,Matrix.cons_val_zero,Matrix.cons_val_one, + map_mul,map_add,map_natCast,map_one,not_lt] + tauto + +noncomputable def displacement {m N : ℕ} (r : CutRing) (i j : Index m N) : CutRing×CutRing := + (r*((j.2.1.val:CutRing)-i.2.1.val),r*((j.2.2.val:CutRing)-i.2.2.val)) + +theorem displacement_mem_cell {m N : ℕ} (r : CutRing) (i j : Index m N) + {x : ℝ×ℝ} (hx : (i.1.val,x)∈cell (ordinary r) i) : + (j.1.val,x+(ordinary (displacement r i j).1,ordinary (displacement r i j).2))∈ + cell (ordinary r) j := by + refine ⟨rfl,?_,?_⟩ + · have hxi := hx.2.1 + change ordinary r*i.2.1.val ≤ x.1 ∧ x.1 < ordinary r*(i.2.1.val+1) at hxi + change ordinary r*j.2.1.val ≤ x.1+ordinary (displacement r i j).1 ∧ + x.1+ordinary (displacement r i j).1 < ordinary r*(j.2.1.val+1) + simp only [displacement,map_mul,map_sub,map_natCast] + constructor <;> nlinarith [hxi.1,hxi.2] + · have hxi := hx.2.2 + change ordinary r*i.2.2.val ≤ x.2 ∧ x.2 < ordinary r*(i.2.2.val+1) at hxi + change ordinary r*j.2.2.val ≤ x.2+ordinary (displacement r i j).2 ∧ + x.2+ordinary (displacement r i j).2 < ordinary r*(j.2.2.val+1) + simp only [displacement,map_mul,map_sub,map_natCast] + constructor <;> nlinarith [hxi.1,hxi.2] + +theorem translate_displacement_mem {a m N : ℕ} (r : CutRing) (i j : Index m N) + {x : GenericSquare a} (hx : (i.1.val,x.val)∈cell (ordinary r) i) + (hj : cell (ordinary r) j⊆region m) : + (j.1.val,(translate a (displacement r i j) x).val)∈cell (ordinary r) j := by + have hd := displacement_mem_cell r i j hx + have hs := hj hd + have he : (translate a (displacement r i j) x).val = + x.val+(ordinary (displacement r i j).1,ordinary (displacement r i j).2) := by + apply Prod.ext + · exact Int.fract_eq_self.mpr hs.2.1 + · exact Int.fract_eq_self.mpr hs.2.2 + rwa [he] + +theorem exists_grid_side {δ : ℝ} (hδ : 0 < δ) : + ∃ b : ℕ, 0 < ordinary (shrinkingLevel b) ∧ ordinary (shrinkingLevel b)<δ := by + have hp : 0 < Real.goldenRatio-1 := sub_pos.mpr Real.one_lt_goldenRatio + have hlt : Real.goldenRatio-1<1 := by linarith [Real.goldenRatio_lt_two] + obtain ⟨b,hb⟩ := exists_pow_lt_of_lt_one hδ hlt + refine ⟨b,(shrinkingLevel_bounds b).1,?_⟩ + rw [ordinary_shrinkingLevel,pow_succ] + exact (mul_le_of_le_one_right (pow_nonneg hp.le _) hlt.le).trans_lt hb + +end PolygonGrid +end PolygonGridEmbedding + +section PolygonStrictComparison +open Classical Set +namespace PolygonGrid + +theorem strict_comparison {a m : ℕ} (U V : Fin m → polygonAlgebra a) + (harea : (∑i,PolygonArea.area (U i)) < ∑i,PolygonArea.area (V i)) : + ∃ f : (PolygonObject.mk m U).Point ↪ (PolygonObject.mk m V).Point, + PolygonObject.HasTable f := by + let PU : PolygonObject a := ⟨m,U⟩ + let PV : PolygonObject a := ⟨m,V⟩ + obtain ⟨S,hS,heS,hcS,hiS⟩ := bank_representative U + obtain ⟨T,hT,heT,hcT,hiT⟩ := bank_representative V + have hh : MeasureTheory.Measure.count.prod ((MeasureTheory.volume : MeasureTheory.Measure ℝ).prod + MeasureTheory.volume) (closure S) < μ (interior T) := by + change μ (closure S)<μ (interior T) + rwa [hcS,hiT] + obtain ⟨δ,hδ,hmatch⟩ := strict_grid_comparison hS hT hh + obtain ⟨b,hr,hrδ⟩ := exists_grid_side hδ + let r := shrinkingLevel b + obtain ⟨N,I,J,⟨route⟩,hcover,hinto⟩ := hmatch (ordinary r) hr hrδ + have getsrc (p : PU.Point) : ∃i : I,(p.val.1.val,p.val.2.val)∈cell (ordinary r) i.val := by + have hs : (p.val.1.val,p.val.2.val)∈S := (heS p.val.1 p.val.2).mpr p.property + obtain ⟨i,hi,hp⟩ := Set.mem_iUnion₂.mp (hcover hs) + exact ⟨⟨i,hi⟩,hp⟩ + choose src hsrc using getsrc + have src_eq (p : PU.Point) (i : I) (hi : (p.val.1.val,p.val.2.val)∈cell (ordinary r) i.val) : + src p=i := by + apply Subtype.ext + by_contra hn + exact Set.disjoint_left.mp (cells_disjoint hr hn) (hsrc p) hi + let out (p : PU.Point) : TrackPoint a m := + ((route (src p)).val.1,translate a (displacement r (src p).val (route (src p)).val) p.val.2) + have houtCell (p : PU.Point) : ( (out p).1.val,(out p).2.val)∈ + cell (ordinary r) (route (src p)).val := by + apply translate_displacement_mem r _ _ ⟨rfl,(hsrc p).2⟩ + exact Set.Subset.trans (hinto _ (route (src p)).property) hT + have houtV (p : PU.Point) : (out p).2∈(V (out p).1).val := by + apply (heT _ _).mp + exact hinto _ (route (src p)).property (houtCell p) + have hout_inj : Function.Injective out := by + intro p q hpq + have ht : (route (src p)).val=(route (src q)).val := by + by_contra hn + exact Set.disjoint_left.mp (cells_disjoint hr hn) (houtCell p) + (by simpa only [hpq] using houtCell q) + have hs : src p=src q := route.injective (Subtype.ext ht) + have htrack : p.val.1=q.val.1 := by + apply Fin.ext + exact (hsrc p).1.trans (by simpa only [hs] using (hsrc q).1.symm) + have hpoint : p.val.2=q.val.2 := by + have he := congrArg Prod.snd hpq + change translate a (displacement r (src p).val (route (src p)).val) p.val.2 = + translate a (displacement r (src q).val (route (src q)).val) q.val.2 at he + rw [hs] at he + exact (translation a _).injective he + exact Subtype.ext (Prod.ext htrack hpoint) + let f : PU.Point ↪ PV.Point := + ⟨fun p => ⟨out p,houtV p⟩,fun _ _ h => hout_inj (congrArg Subtype.val h)⟩ + let chart (i : I) : PolygonObject.Chart (a:=a) m m := + ⟨i.val.1,(route i).val.1,displacement r i.val (route i).val, + U i.val.1 ⊓ rectangle a r i.val.2.1.val i.val.2.2.val⟩ + refine ⟨f,Finset.univ.image chart,?_,?_⟩ + · intro c hc + obtain ⟨i,-,rfl⟩ := Finset.mem_image.mp hc + intro x hx + change x∈(U i.val.1).val ∧ x∈(rectangle a r i.val.2.1.val i.val.2.2.val).val at hx + refine ⟨hx.1,?_⟩ + have hcell : (i.val.1.val,x.val)∈cell (ordinary r) i.val := + ⟨rfl,(mem_rectangle a r _ _ x).mp hx.2⟩ + have hs := src_eq ⟨(i.val.1,x),hx.1⟩ i hcell + change out ⟨(i.val.1,x),hx.1⟩ = ((route i).val.1,translate a (displacement r i.val (route i).val) x) + simp only [out,hs] + · intro p + refine ⟨chart (src p),Finset.mem_image.mpr ⟨src p,Finset.mem_univ _,rfl⟩,?_,?_⟩ + · exact Fin.ext (hsrc p).1 + · change p.val.2∈(U (src p).val.1).val ∧ + p.val.2∈(rectangle a r (src p).val.2.1.val (src p).val.2.2.val).val + refine ⟨?_,(mem_rectangle a r _ _ _).mpr (hsrc p).2⟩ + have ht : p.val.1=(src p).val.1 := Fin.ext (hsrc p).1 + simpa only [←ht] using p.property + +end PolygonGrid +end PolygonStrictComparison + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonMatchingLaw.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonMatchingLaw.lean new file mode 100644 index 0000000000000000000000000000000000000000..bcd4ad7675154aa7d76a45b83bd718ce4027cb82 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonMatchingLaw.lean @@ -0,0 +1,101 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Amenability.SuccessfulLawCovariance + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonMatchingLaw +open Classical MeasureTheory Filter Set +open scoped Topology + +theorem matchingLaw_finite_weights {X : Type*} [MeasurableSpace X] [MeasurableSingletonClass X] + {a m : ℕ} (μ : Measure X) [IsProbabilityMeasure μ] (T : Finset X) + (hT : ∀ᵐx ∂μ,x∈T) (P : X → TrackPolygonPartition a m) : + ∃(S : Finset (polygonFullGroup a m)) (p : polygonFullGroup a m → ℝ), + (∀g,0 ≤ p g) ∧ (∀g∉S,p g=0) ∧ (∑g∈S,p g)=1 ∧ + ∀f : polygonFullGroup a m → ℝ,(∑g∈S,p g*f g)=∫x,matchingAverage (P x) f ∂μ := by + have hmass : (∑x∈T,μ.real {x})=1 := by + have hh := integral_of_finite_support μ T hT (fun _ => (1:ℝ)) + simpa using hh.symm + obtain ⟨S,p,hp,hs,hm,ht⟩ := finite_uniform_mixture T (fun x => μ.real {x}) + (fun x => matchingSupport (P x)) (fun _ _ => measureReal_nonneg) hmass + (fun x _ => matchingSupport_nonempty (P x)) + refine ⟨S,p,hp,hs,hm,?_⟩ + intro f + rw [integral_of_finite_support μ T hT] + exact ht f + +namespace BarrierMenu +variable {a m : ℕ} {ha : 0 < a} {F : Finset (polygonFullGroup a m)} (M : BarrierMenu a m ha F) + +theorem matching_expectation_covariance {η κ : ℝ} {n : ℕ} + (hQ : M.Q < sourceDyadicN n) (hB : M.B ≤ sourceDyadicN n) + (g : polygonFullGroup a m) (hg : g∈F) {δ : ℝ} + (hc : ObservableClose (jointBitFieldLaw (a:=a) (m:=m) (barrierEightDirections ha) + M.signals.eight (commonVertexDenominator_pos ha) η κ n) + ((jointBitFieldLaw (a:=a) (m:=m) (barrierEightDirections ha) M.signals.eight + (commonVertexDenominator_pos ha) η κ n).map (barrierBitsTransport g)) δ) + (f : polygonFullGroup a m → ℝ) (hf : ∀x,f x∈Icc (0:ℝ) 1) : + let μ := jointBitFieldLaw (a:=a) (m:=m) (barrierEightDirections ha) M.signals.eight + (commonVertexDenominator_pos ha) η κ n + |(∫b,matchingAverage (M.signals.sampledPartition n b) f ∂μ)- + (∫b,matchingAverage (M.signals.sampledPartition n b) (fun x => f (g*x)) ∂μ)| ≤ + 2*μ.real {b | ¬jointFieldSuccess (barrierEightDirections ha) M.signals.eight n b}+2*δ := by + dsimp only + obtain ⟨T,hT⟩ := jointBitFieldLaw_finite_support (a:=a) (m:=m) (barrierEightDirections ha) + M.signals.eight M.signals.eight_q (commonVertexDenominator_pos ha) η κ n + apply successful_law_covariance _ T hT (barrierBitsTransport g) + (jointBitReindex_measurable _ _ g) + {b | jointFieldSuccess (barrierEightDirections ha) M.signals.eight n b} + (jointFieldSuccess_measurable _ _ n) hc + (fun b => matchingAverage (M.signals.sampledPartition n b) f) + (fun b => matchingAverage (M.signals.sampledPartition n b) (fun x => f (g*x))) + (fun b => matchingAverage_range _ hf) + (fun b => matchingAverage_range _ (fun x => hf (g*x))) + intro b hb hb' + exact matchingAverage_transport (M.sampledPartition_arrow (sourceDyadicN_one_le n) hQ hB g hg b hb hb') f + +end BarrierMenu + +theorem polygonFullGroup_finiteTestReiter {a m : ℕ} (ha : 0 < a) : + FiniteTestReiter (polygonFullGroup a m) := by + intro F ε hε + obtain ⟨M⟩ := exists_barrierMenu ha F + obtain ⟨η,κ,hη,hη₁,hκ,ht⟩ := jointBitFieldLaw_transport (a:=a) (m:=m) + (barrierEightDirections ha) M.signals.eight (commonVertexDenominator_pos ha) F + (show 0 < ε/8 by linarith) + let μ (n : ℕ) := jointBitFieldLaw (a:=a) (m:=m) (barrierEightDirections ha) M.signals.eight + (commonVertexDenominator_pos ha) η κ n + have hs : ∀ᶠn : ℕ in atTop,(μ n).real + {b | ¬jointFieldSuccess (barrierEightDirections ha) M.signals.eight n b} < ε/8 := + (jointBitFieldLaw_success (a:=a) (m:=m) (barrierEightDirections ha) M.signals.eight + (commonVertexDenominator_pos ha) hη hκ).eventually (gt_mem_nhds (by linarith)) + have hscale : ∀ᶠn : ℕ in atTop,M.Q < sourceDyadicN n ∧ M.B ≤ sourceDyadicN n := by + filter_upwards [sourceDyadic_radius_eventually (max (M.Q+1) M.B)] with n hn + have hnN : (2:ℝ)^n ≤ sourceDyadicN n := by + unfold sourceDyadicN + exact pow_le_pow_right₀ (by norm_num) (by omega) + exact ⟨lt_of_lt_of_le (by linarith [(le_max_left (M.Q+1) M.B).trans hn]) hnN, + ((le_max_right (M.Q+1) M.B).trans hn).trans hnN⟩ + obtain ⟨n,hn,hsn,hN⟩ := (ht.and (hs.and hscale)).exists + obtain ⟨T,hT⟩ := jointBitFieldLaw_finite_support (a:=a) (m:=m) (barrierEightDirections ha) + M.signals.eight M.signals.eight_q (commonVertexDenominator_pos ha) η κ n + obtain ⟨S,p,hp,hsupp,hm,havg⟩ := matchingLaw_finite_weights (μ n) T hT (M.signals.sampledPartition n) + refine ⟨S,p,hp,hsupp,hm,?_⟩ + intro g hg f hf + rw [havg,havg] + have hh := M.matching_expectation_covariance hN.1 hN.2 g hg (hn g hg) f hf + exact hh.trans (by change 2*(μ n).real _+2*(ε/8) ≤ ε; linarith) + +end PolygonMatchingLaw + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonObjectRefinement.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonObjectRefinement.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbd2b8e334aed8669c410213a5a3e2a5ca1111b0 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonObjectRefinement.lean @@ -0,0 +1,128 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.CentralCovers.PairLawAssembly +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonGroupoid + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonObjectRefinement + +open Classical CategoryTheory Set +namespace PolygonObject +variable {a : ℕ} + +noncomputable def shifted (U : PolygonObject a) (d : Fin U.tracks → CutRing × CutRing) : + PolygonObject a := ⟨U.tracks,fun i => ⟨translation a (d i) '' (U.cell i).val, + polygon_image_translation _ (U.cell i).property⟩⟩ + +noncomputable def shiftEquiv (U : PolygonObject a) (d : Fin U.tracks → CutRing × CutRing) : + U.Point ≃ (shifted U d).Point where + toFun x := ⟨(x.val.1,translate a (d x.val.1) x.val.2),⟨x.val.2,x.property,rfl⟩⟩ + invFun y := ⟨(y.val.1,translate a (-d y.val.1) y.val.2),by + obtain ⟨x,hx,he⟩ := y.property + change translate a (-d y.val.1) y.val.2∈(U.cell y.val.1).val + rw [←he] + simpa only [translation_apply,←translate_add,neg_add_cancel,translate_zero] using hx⟩ + left_inv x := by + apply Subtype.ext + exact Prod.ext rfl (by + change translate a (-d x.val.1) (translate a (d x.val.1) x.val.2)=x.val.2 + rw [←translate_add,neg_add_cancel,translate_zero]) + right_inv y := by + apply Subtype.ext + exact Prod.ext rfl (by + change translate a (d y.val.1) (translate a (-d y.val.1) y.val.2)=y.val.2 + rw [←translate_add,add_neg_cancel,translate_zero]) + +noncomputable def shiftArrow (U : PolygonObject a) (d : Fin U.tracks → CutRing × CutRing) : + U ⟶ shifted U d where + toEquiv := shiftEquiv U d + hasTable := by + let c : Fin U.tracks → Chart (a:=a) U.tracks U.tracks := fun i => ⟨i,i,d i,U.cell i⟩ + refine ⟨Finset.univ.image c,?_,?_⟩ + · intro k hk + obtain ⟨i,_,rfl⟩ := Finset.mem_image.mp hk + intro x hx + exact ⟨hx,rfl⟩ + · intro x + exact ⟨c x.val.1,Finset.mem_image.mpr ⟨_,Finset.mem_univ _,rfl⟩,rfl,x.property⟩ + +@[simp] theorem shiftArrow_apply (U : PolygonObject a) (d : Fin U.tracks → CutRing × CutRing) + (x : U.Point) : (shiftArrow U d).toEquiv x= + ⟨(x.val.1,translate a (d x.val.1) x.val.2),⟨x.val.2,x.property,rfl⟩⟩ := rfl + +variable {κ : Type} [Fintype κ] + +noncomputable def refinement (U : PolygonObject a) (label : U.Point → κ) + (hpoly : ∀i k,{z | ∃hz : z∈(U.cell i).val,label ⟨(i,z),hz⟩=k}∈polygonAlgebra a) : + PolygonObject a := + ⟨Fintype.card (Fin U.tracks × κ),fun j => + let ik := (Fintype.equivFin (Fin U.tracks × κ)).symm j + ⟨{z | ∃hz : z∈(U.cell ik.1).val,label ⟨(ik.1,z),hz⟩=ik.2},hpoly ik.1 ik.2⟩⟩ + +noncomputable def refinementEquiv (U : PolygonObject a) (label : U.Point → κ) + (hpoly : ∀i k,{z | ∃hz : z∈(U.cell i).val,label ⟨(i,z),hz⟩=k}∈polygonAlgebra a) : + (refinement U label hpoly).Point ≃ U.Point where + toFun x := + ⟨(((Fintype.equivFin (Fin U.tracks × κ)).symm x.val.1).1,x.val.2),x.property.choose⟩ + invFun y := ⟨((Fintype.equivFin _) (y.val.1,label y),y.val.2),by + change ∃hz : _∈(U.cell _).val,label ⟨(_,y.val.2),hz⟩=_ + simp only [Equiv.symm_apply_apply] + exact ⟨y.property,True.intro⟩⟩ + left_inv x := by + apply Subtype.ext + change ((Fintype.equivFin (Fin U.tracks × κ)) + (((Fintype.equivFin (Fin U.tracks × κ)).symm x.val.1).1, + label ⟨(((Fintype.equivFin (Fin U.tracks × κ)).symm x.val.1).1,x.val.2),x.property.choose⟩),x.val.2)= + (x.val.1,x.val.2) + apply Prod.ext + · apply (Fintype.equivFin (Fin U.tracks × κ)).symm.injective + simp only [Equiv.symm_apply_apply] + exact Prod.ext rfl x.property.choose_spec + · rfl + right_inv y := by + apply Subtype.ext + exact Prod.ext (by simp) rfl + +noncomputable def refinementArrow (U : PolygonObject a) (label : U.Point → κ) + (hpoly : ∀i k,{z | ∃hz : z∈(U.cell i).val,label ⟨(i,z),hz⟩=k}∈polygonAlgebra a) : + refinement U label hpoly ⟶ U where + toEquiv := refinementEquiv U label hpoly + hasTable := by + let V := refinement U label hpoly + let c : Fin V.tracks → Chart (a:=a) V.tracks U.tracks := fun j => + ⟨j,((Fintype.equivFin (Fin U.tracks × κ)).symm j).1,0,V.cell j⟩ + refine ⟨Finset.univ.image c,?_,?_⟩ + · intro k hk + obtain ⟨j,_,rfl⟩ := Finset.mem_image.mp hk + intro x hx + refine ⟨hx,?_⟩ + change (((Fintype.equivFin (Fin U.tracks × κ)).symm j).1,x)= + (((Fintype.equivFin (Fin U.tracks × κ)).symm j).1,translate a 0 x) + rw [translate_zero] + · intro x + exact ⟨c x.val.1,Finset.mem_image.mpr ⟨_,Finset.mem_univ _,rfl⟩,rfl,x.property⟩ + +theorem refinementArrow_positional (U : PolygonObject a) (label : U.Point → κ) + (hpoly : ∀i k,{z | ∃hz : z∈(U.cell i).val,label ⟨(i,z),hz⟩=k}∈polygonAlgebra a) : + Positional (refinementArrow U label hpoly) := fun _ => rfl + +theorem refinementArrow_label (U : PolygonObject a) (label : U.Point → κ) + (hpoly : ∀i k,{z | ∃hz : z∈(U.cell i).val,label ⟨(i,z),hz⟩=k}∈polygonAlgebra a) + (x : (refinement U label hpoly).Point) : + label ((refinementArrow U label hpoly).toEquiv x)= + ((Fintype.equivFin (Fin U.tracks × κ)).symm x.val.1).2 := x.property.choose_spec + +end PolygonObject +end PolygonObjectRefinement + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonObjectSum.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonObjectSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..733164a98484a24a8e61670712f5dfad31bb8c68 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonObjectSum.lean @@ -0,0 +1,200 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonGroupoidTracks + +namespace OAI + +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +section PolygonObjectSum + +open Classical Set CategoryTheory +namespace PolygonObject +variable {a : ℕ} + +@[simp] theorem arrow_id_apply (U : PolygonObject a) (x : U.Point) : (𝟙 U : U ⟶ U).toEquiv x=x := rfl +@[simp] theorem arrow_comp_apply {U V W : PolygonObject a} (f : U ⟶ V) (g : V ⟶ W) (x : U.Point) : + (f≫g).toEquiv x=g.toEquiv (f.toEquiv x) := rfl + +noncomputable def sum (U V : PolygonObject a) : PolygonObject a := + ⟨U.tracks+V.tracks,Fin.addCases U.cell V.cell⟩ + +noncomputable def sumPointEquiv (U V : PolygonObject a) : + U.Point ⊕ V.Point ≃ (sum U V).Point where + toFun := Sum.elim + (fun x => ⟨(x.val.1.castAdd V.tracks,x.val.2),by simpa [sum] using x.property⟩) + (fun x => ⟨(x.val.1.natAdd U.tracks,x.val.2),by simpa [sum] using x.property⟩) + invFun x := Fin.addCases (motive:=fun i => x.val.2∈((sum U V).cell i).val → U.Point ⊕ V.Point) + (fun i => fun h : x.val.2∈((sum U V).cell (i.castAdd V.tracks)).val => + Sum.inl ⟨(i,x.val.2),by simpa [sum] using h⟩) + (fun i => fun h : x.val.2∈((sum U V).cell (i.natAdd U.tracks)).val => + Sum.inr ⟨(i,x.val.2),by simpa [sum] using h⟩) x.val.1 x.property + left_inv x := by cases x <;> simp + right_inv x := by + obtain ⟨⟨i,x⟩,hx⟩ := x + induction i using Fin.addCases <;> simp + +@[simp] theorem sumPointEquiv_inl (U V : PolygonObject a) (x : U.Point) : + (sumPointEquiv U V (.inl x)).val=(x.val.1.castAdd V.tracks,x.val.2) := rfl +@[simp] theorem sumPointEquiv_inr (U V : PolygonObject a) (x : V.Point) : + (sumPointEquiv U V (.inr x)).val=(x.val.1.natAdd U.tracks,x.val.2) := rfl + +theorem positional_hasTable {U V : PolygonObject a} (f : U.Point → V.Point) + (hf : ∀x,(f x).val.2=x.val.2) + (hpoly : ∀i j,{x : GenericSquare a | ∃hx : x∈(U.cell i).val, + (f ⟨(i,x),hx⟩).val.1=j} ∈ polygonAlgebra a) : HasTable f := by + let c : Fin U.tracks × Fin V.tracks → Chart (a:=a) U.tracks V.tracks := + fun ij => ⟨ij.1,ij.2,0,⟨_,hpoly ij.1 ij.2⟩⟩ + refine ⟨Finset.univ.image c,?_,?_⟩ + · intro d hd + obtain ⟨⟨i,j⟩,_,rfl⟩ := Finset.mem_image.mp hd + rintro x ⟨hx,hj⟩ + refine ⟨hx,?_⟩ + apply Prod.ext hj + exact (hf ⟨(i,x),hx⟩).trans (translate_zero a x).symm + · intro x + refine ⟨c (x.val.1,(f x).val.1),Finset.mem_image.mpr ⟨_,Finset.mem_univ _,rfl⟩,rfl,?_⟩ + exact ⟨x.property,rfl⟩ + +noncomputable def sumArrow {U V W Z : PolygonObject a} (f : U ⟶ W) (g : V ⟶ Z) : + sum U V ⟶ sum W Z where + toEquiv := (sumPointEquiv U V).symm.trans ((Equiv.sumCongr f.toEquiv g.toEquiv).trans (sumPointEquiv W Z)) + hasTable := by + obtain ⟨s,hs,hcover⟩ := f.hasTable + obtain ⟨t,ht,htcover⟩ := g.hasTable + let L : Chart (a:=a) U.tracks W.tracks → Chart (a:=a) (U.tracks+V.tracks) (W.tracks+Z.tracks) := + fun c => ⟨c.source.castAdd V.tracks,c.target.castAdd Z.tracks,c.shift,c.domain⟩ + let R : Chart (a:=a) V.tracks Z.tracks → Chart (a:=a) (U.tracks+V.tracks) (W.tracks+Z.tracks) := + fun c => ⟨c.source.natAdd U.tracks,c.target.natAdd W.tracks,c.shift,c.domain⟩ + refine ⟨s.image L ∪ t.image R,?_,?_⟩ + · intro c hc + rcases Finset.mem_union.mp hc with hc|hc + · obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + intro x hx + obtain ⟨hu,he⟩ := hs d hd x hx + refine ⟨by simpa [sum,L] using hu,?_⟩ + change (sumPointEquiv W Z (Equiv.sumCongr f.toEquiv g.toEquiv + ((sumPointEquiv U V).symm (sumPointEquiv U V (.inl ⟨(d.source,x),hu⟩))))).val=_ + rw [Equiv.symm_apply_apply] + change (sumPointEquiv W Z (.inl (f.toEquiv ⟨(d.source,x),hu⟩))).val=_ + rw [sumPointEquiv_inl,he] + rfl + · obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + intro x hx + obtain ⟨hv,he⟩ := ht d hd x hx + refine ⟨by simpa [sum,R] using hv,?_⟩ + change (sumPointEquiv W Z (Equiv.sumCongr f.toEquiv g.toEquiv + ((sumPointEquiv U V).symm (sumPointEquiv U V (.inr ⟨(d.source,x),hv⟩))))).val=_ + rw [Equiv.symm_apply_apply] + change (sumPointEquiv W Z (.inr (g.toEquiv ⟨(d.source,x),hv⟩))).val=_ + rw [sumPointEquiv_inr,he] + rfl + · intro x + obtain ⟨y,rfl⟩ := (sumPointEquiv U V).surjective x + cases y with + | inl y => + obtain ⟨c,hc,hy⟩ := hcover y + exact ⟨L c,Finset.mem_union_left _ (Finset.mem_image_of_mem L hc), + congrArg (Fin.castAdd V.tracks) hy.1,hy.2⟩ + | inr y => + obtain ⟨c,hc,hy⟩ := htcover y + exact ⟨R c,Finset.mem_union_right _ (Finset.mem_image_of_mem R hc), + congrArg (Fin.natAdd U.tracks) hy.1,hy.2⟩ + +@[simp] theorem sumArrow_inl {U V W Z : PolygonObject a} (f : U ⟶ W) (g : V ⟶ Z) (x : U.Point) : + (sumArrow f g).toEquiv (sumPointEquiv U V (.inl x))=sumPointEquiv W Z (.inl (f.toEquiv x)) := by + change sumPointEquiv W Z (Equiv.sumCongr f.toEquiv g.toEquiv ((sumPointEquiv U V).symm (sumPointEquiv U V (.inl x))))=_ + rw [Equiv.symm_apply_apply];rfl +@[simp] theorem sumArrow_inr {U V W Z : PolygonObject a} (f : U ⟶ W) (g : V ⟶ Z) (x : V.Point) : + (sumArrow f g).toEquiv (sumPointEquiv U V (.inr x))=sumPointEquiv W Z (.inr (g.toEquiv x)) := by + change sumPointEquiv W Z (Equiv.sumCongr f.toEquiv g.toEquiv ((sumPointEquiv U V).symm (sumPointEquiv U V (.inr x))))=_ + rw [Equiv.symm_apply_apply];rfl + +theorem sumArrow_id (U V : PolygonObject a) : sumArrow (𝟙 U) (𝟙 V)=𝟙 (sum U V) := by + apply Arrow.ext;apply Equiv.ext;intro x + obtain ⟨y,rfl⟩ := (sumPointEquiv U V).surjective x + cases y <;> simp + +theorem sumArrow_comp {U U' U'' V V' V'' : PolygonObject a} + (f : U ⟶ U') (f' : U' ⟶ U'') (g : V ⟶ V') (g' : V' ⟶ V'') : + sumArrow (f≫f') (g≫g')=sumArrow f g ≫ sumArrow f' g' := by + apply Arrow.ext;apply Equiv.ext;intro x + obtain ⟨y,rfl⟩ := (sumPointEquiv U V).surjective x + cases y <;> simp only [arrow_comp_apply,sumArrow_inl,sumArrow_inr] + +end PolygonObject +end PolygonObjectSum + +open Classical Set CategoryTheory +namespace PolygonObject +variable {a : ℕ} + +noncomputable def complement (U : PolygonObject a) : PolygonObject a := + ⟨U.tracks,fun i => (U.cell i)ᶜ⟩ + +noncomputable def splitPointEquiv (U : PolygonObject a) : + U.Point ⊕ (complement U).Point ≃ TrackPoint a U.tracks where + toFun := Sum.elim Subtype.val Subtype.val + invFun x := if hx : x.2∈(U.cell x.1).val then .inl ⟨x,hx⟩ else .inr ⟨x,hx⟩ + left_inv := by + rintro (x|x) + · dsimp only + exact dite_eq_left x.property + · dsimp only + exact dite_eq_right x.property + right_inv x := by dsimp;split <;> rfl + +@[simp] theorem splitPointEquiv_inl (U : PolygonObject a) (x : U.Point) : + splitPointEquiv U (.inl x)=x.val := rfl +@[simp] theorem splitPointEquiv_inr (U : PolygonObject a) (x : (complement U).Point) : + splitPointEquiv U (.inr x)=x.val := rfl + +noncomputable def complementArrow (U : PolygonObject a) : sum U (complement U) ⟶ standard a U.tracks where + toEquiv := (sumPointEquiv U (complement U)).symm.trans ((splitPointEquiv U).trans (standardPointEquiv a U.tracks).symm) + hasTable := by + let L (i : Fin U.tracks) : Chart (a:=a) (U.tracks+U.tracks) U.tracks := ⟨i.castAdd _,i,0,U.cell i⟩ + let R (i : Fin U.tracks) : Chart (a:=a) (U.tracks+U.tracks) U.tracks := ⟨i.natAdd _,i,0,(U.cell i)ᶜ⟩ + refine ⟨Finset.univ.image L ∪ Finset.univ.image R,?_,?_⟩ + · intro c hc + rcases Finset.mem_union.mp hc with hc|hc + · obtain ⟨i,_,rfl⟩ := Finset.mem_image.mp hc + intro x hx + refine ⟨by simpa [sum,complement,L] using hx,?_⟩ + change (splitPointEquiv U ((sumPointEquiv U (complement U)).symm + (sumPointEquiv U (complement U) (.inl ⟨(i,x),hx⟩))))=(i,translate a 0 x) + rw [Equiv.symm_apply_apply,splitPointEquiv_inl,translate_zero] + · obtain ⟨i,_,rfl⟩ := Finset.mem_image.mp hc + intro x hx + refine ⟨(sumPointEquiv U (complement U) (.inr ⟨(i,x),hx⟩)).property,?_⟩ + change (splitPointEquiv U ((sumPointEquiv U (complement U)).symm + (sumPointEquiv U (complement U) (.inr ⟨(i,x),hx⟩))))=(i,translate a 0 x) + rw [Equiv.symm_apply_apply,splitPointEquiv_inr,translate_zero] + rfl + · intro x + obtain ⟨y,rfl⟩ := (sumPointEquiv U (complement U)).surjective x + cases y with + | inl y => exact ⟨L y.val.1,Finset.mem_union_left _ (Finset.mem_image_of_mem L (Finset.mem_univ _)),rfl,y.property⟩ + | inr y => exact ⟨R y.val.1,Finset.mem_union_right _ (Finset.mem_image_of_mem R (Finset.mem_univ _)),rfl,y.property⟩ + +@[simp] theorem complementArrow_inl (U : PolygonObject a) (x : U.Point) : + ((complementArrow U).toEquiv (sumPointEquiv U (complement U) (.inl x))).val=x.val := by + change splitPointEquiv U ((sumPointEquiv U (complement U)).symm (sumPointEquiv U (complement U) (.inl x)))=x.val + rw [Equiv.symm_apply_apply];rfl +@[simp] theorem complementArrow_inr (U : PolygonObject a) (x : (complement U).Point) : + ((complementArrow U).toEquiv (sumPointEquiv U (complement U) (.inr x))).val=x.val := by + change splitPointEquiv U ((sumPointEquiv U (complement U)).symm (sumPointEquiv U (complement U) (.inr x)))=x.val + rw [Equiv.symm_apply_apply];rfl + +theorem complementArrow_positional (U : PolygonObject a) : Positional (complementArrow U) := by + intro x + obtain ⟨y,rfl⟩ := (sumPointEquiv U (complement U)).surjective x + cases y <;> simp only [complementArrow_inl,complementArrow_inr,sumPointEquiv_inl,sumPointEquiv_inr] + +noncomputable def complementIso (U : PolygonObject a) : sum U (complement U) ≅ standard a U.tracks := + asIso (complementArrow U) + +end PolygonObject + +end SimpleAmenable + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonPiecewiseSlots.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonPiecewiseSlots.lean new file mode 100644 index 0000000000000000000000000000000000000000..9837e2b3823a4490fe37857805f1fee07520239b --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonPiecewiseSlots.lean @@ -0,0 +1,175 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonPlacementArea + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonPiecewiseSlots + +open Classical Set +namespace PolygonArea + +@[simp] theorem val_finset_inf {a : ℕ} {ι : Type*} (s : Finset ι) (f : ι → polygonAlgebra a) : + (s.inf f).val=⋂i∈s,(f i).val := by + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => simp [Finset.inf_insert,BooleanSubalgebra.val_inf,ih] + +end PolygonArea +namespace PolygonObject + +noncomputable def whole (a m : ℕ) : PolygonObject a := ⟨m,fun _ => ⊤⟩ + +theorem intoWhole_hasTable {a : ℕ} {U V : PolygonObject a} {f : U.Point → V.Point} + (hf : HasTable f) : + HasTable (fun x => (⟨(f x).val,by trivial⟩ : (whole a V.tracks).Point)) := hf + +end PolygonObject +namespace PolygonPiecewise +variable {a m n : ℕ} + +theorem even_slots (U : PolygonObject a) (f : Fin n → U.Point → TrackPoint a m) + (hf : Function.Injective (fun p : Fin n × U.Point => f p.1 p.2)) + (ht : ∀i, PolygonObject.HasTable + (fun x => (⟨f i x,by trivial⟩ : (PolygonObject.whole a m).Point))) + (σ : Equiv.Perm (Fin n)) (hσ : σ∈alternatingGroup (Fin n)) : + ∃g : polygonAlternatingGroup a m, + (∀i x,g.val.val (f i x)=f (σ i) x) ∧ + (∀y∉Set.range (fun p : Fin n × U.Point => f p.1 p.2),g.val.val y=y) := by + change ∀i, ∃S : Finset (PolygonObject.Chart U.tracks m), + (∀c∈S,c.Holds (fun x => (⟨f i x,by trivial⟩ : (PolygonObject.whole a m).Point))) ∧ + (∀x : U.Point, ∃c∈S,c.Contains (V:=PolygonObject.whole a m) x) at ht + choose S hS hcover using ht + let C := ∀i : Fin n,{c : PolygonObject.Chart U.tracks m // c∈S i} + let D (r : Fin U.tracks) (c : C) : polygonAlgebra a := + U.cell r ⊓ Finset.univ.inf (fun i => if (c i).val.source=r then (c i).val.domain else ⊥) + have memD (r : Fin U.tracks) (c : C) (x : GenericSquare a) : + x∈(D r c).val ↔ x∈(U.cell r).val ∧ ∀i,(c i).val.source=r ∧ x∈(c i).val.domain.val := by + simp only [D,BooleanSubalgebra.val_inf,PolygonArea.val_finset_inf] + constructor + · rintro ⟨hx,hc⟩ + refine ⟨hx,fun i => ?_⟩ + have h := Set.mem_iInter₂.mp hc i (Finset.mem_univ i) + split_ifs at h with hi + · exact ⟨hi,h⟩ + · exact False.elim h + · rintro ⟨hx,hc⟩ + exact ⟨hx,Set.mem_iInter₂.mpr (fun i _ => by simp only [(hc i).1,ite_true];exact (hc i).2)⟩ + have covD (r : Fin U.tracks) (x : GenericSquare a) (hx : x∈(U.cell r).val) : + ∃c : C,x∈(D r c).val := by + have hc (i : Fin n) : ∃c : {c : PolygonObject.Chart U.tracks m // c∈S i}, + c.val.source=r ∧ x∈c.val.domain.val := by + obtain ⟨c,hc,hh⟩ := hcover i ⟨(r,x),hx⟩ + exact ⟨⟨c,hc⟩,hh.1.symm,hh.2⟩ + choose c hc using hc + exact ⟨c,(memD r c x).mpr ⟨hx,hc⟩⟩ + have hp (r : Fin U.tracks) := Fintype.exists_disjointed_le (D r) + choose P hP hSup hdis using hp + have coverP (r : Fin U.tracks) (x : GenericSquare a) (hx : x∈(U.cell r).val) : + ∃c : C,x∈(P r c).val := by + obtain ⟨c,hc⟩ := covD r x hx + have he := congrArg (fun Q : polygonAlgebra a => Q.val) (hSup r) + simp only [PolygonArea.val_finset_sup,Finset.mem_univ,Set.iUnion_true] at he + have hh : x∈⋃c,(D r c).val := Set.mem_iUnion.mpr ⟨c,hc⟩ + rw [←he] at hh + exact Set.mem_iUnion.mp hh + let J := Fin U.tracks × C + let cell (j : J) := P j.1 j.2 + let member (j : J) (p : U.Point) : Prop := p.val.1=j.1 ∧ p.val.2∈(cell j).val + have cell_sub (j : J) : (cell j).val⊆(U.cell j.1).val := + fun x hx => ((memD j.1 j.2 x).mp (hP j.1 j.2 hx)).1 + have member_unique (j l : J) (p : U.Point) (hj : member j p) (hl : member l p) : j=l := by + have hr : j.1=l.1 := hj.1.symm.trans hl.1 + apply Prod.ext hr + by_contra hc + have h : Disjoint (P j.1 j.2) (P j.1 l.2) := hdis j.1 hc + rw [disjoint_iff] at h + have he := congrArg (fun Q : polygonAlgebra a => Q.val) h + have hh : p.val.2∈(P j.1 j.2 ⊓ P j.1 l.2).val := ⟨hj.2,by simpa only [hr] using hl.2⟩ + rw [he] at hh + exact hh + let slots (j : J) (i : Fin n) : Fin m × (CutRing×CutRing) := ((j.2 i).val.target,(j.2 i).val.shift) + have chart_eq (j : J) (i : Fin n) (x : (cell j).val) : + f i ⟨(j.1,x.val),cell_sub j x.property⟩=SlotMap a m (cell j) (slots j) (i,x) := by + have hd := (memD j.1 j.2 x.val).mp (hP j.1 j.2 x.property) + obtain ⟨hu,he⟩ := hS i (j.2 i).val (j.2 i).property x.val (hd.2 i).2 + have hx : (⟨((j.2 i).val.source,x.val),hu⟩ : U.Point)= + ⟨(j.1,x.val),cell_sub j x.property⟩ := Subtype.ext (Prod.ext (hd.2 i).1 rfl) + change f i ⟨((j.2 i).val.source,x.val),hu⟩=SlotMap a m (cell j) (slots j) (i,x) at he + rwa [hx] at he + have slot_inj (j : J) : Function.Injective (SlotMap a m (cell j) (slots j)) := by + rintro ⟨i,x⟩ ⟨l,y⟩ h + rw [←chart_eq j i x,←chart_eq j l y] at h + have hh := @hf (i,⟨(j.1,x.val),cell_sub j x.property⟩) + (l,⟨(j.1,y.val),cell_sub j y.property⟩) h + apply Prod.ext + · exact congrArg (fun p : Fin n × U.Point => p.1) hh + · exact Subtype.ext (congrArg (fun p : Fin n × U.Point => p.2.val.2) hh) + let piece (j : J) : polygonAlternatingGroup a m := + ⟨slotHom (cell j) (slots j) (slot_inj j) σ,slotHom_alternating_mem _ _ _ hσ⟩ + have piece_on (j : J) (i : Fin n) (p : U.Point) : + (piece j).val.val (f i p)=if member j p then f (σ i) p else f i p := by + by_cases hp : member j p + · rw [ite_eq_left hp] + let x : (cell j).val := ⟨p.val.2,hp.2⟩ + have he : p=⟨(j.1,x.val),cell_sub j x.property⟩ := Subtype.ext (Prod.ext hp.1 rfl) + rw [he,chart_eq j i x] + exact (slotPerm_apply _ _ _ _ i x).trans (chart_eq j (σ i) x).symm + · rw [ite_eq_right hp] + apply slotPerm_apply_of_notMem + rintro ⟨⟨l,x⟩,he⟩ + rw [←chart_eq j l x] at he + have hh := @hf (l,⟨(j.1,x.val),cell_sub j x.property⟩) (i,p) he + have he' : (⟨(j.1,x.val),cell_sub j x.property⟩ : U.Point)=p := congrArg Prod.snd hh + exact hp ⟨(congrArg (fun p : U.Point => p.val.1) he').symm, + by simpa only [←he'] using x.property⟩ + have piece_out (j : J) (y : TrackPoint a m) + (hy : y∉Set.range (fun p : Fin n × U.Point => f p.1 p.2)) : (piece j).val.val y=y := by + apply slotPerm_apply_of_notMem + rintro ⟨⟨i,x⟩,he⟩ + exact hy ⟨(i,⟨(j.1,x.val),cell_sub j x.property⟩),(chart_eq j i x).trans he⟩ + have assemble (s : Finset J) : ∃g : polygonAlternatingGroup a m, + (∀i p,g.val.val (f i p)=if ∃j∈s,member j p then f (σ i) p else f i p) ∧ + (∀y∉Set.range (fun p : Fin n × U.Point => f p.1 p.2),g.val.val y=y) := by + induction s using Finset.induction_on with + | empty => exact ⟨1,by simp,fun _ _ => rfl⟩ + | @insert j s hj ih => + obtain ⟨g,hg,hout⟩ := ih + refine ⟨piece j*g,?_,?_⟩ + · intro i p + change (piece j).val.val (g.val.val (f i p))=_ + rw [hg] + by_cases hp : member j p + · have hn : ¬∃l∈s,member l p := by + rintro ⟨l,hl,hlp⟩ + exact hj ((member_unique j l p hp hlp).symm ▸ hl) + rw [ite_eq_right hn,piece_on,ite_eq_left hp,ite_eq_left ⟨j,Finset.mem_insert_self _ _,hp⟩] + · by_cases hs : ∃l∈s,member l p + · rw [ite_eq_left hs,piece_on,ite_eq_right hp] + rw [ite_eq_left (by obtain ⟨l,hl,hlp⟩ := hs;exact ⟨l,Finset.mem_insert_of_mem hl,hlp⟩)] + · have hn : ¬∃l∈insert j s,member l p := by simpa only [Finset.mem_insert,exists_prop, + or_and_right,exists_or,exists_eq_left] using not_or.mpr ⟨hp,hs⟩ + rw [ite_eq_right hs,piece_on,ite_eq_right hp,ite_eq_right hn] + · intro y hy + change (piece j).val.val (g.val.val y)=y + rw [hout y hy,piece_out j y hy] + obtain ⟨g,hg,hout⟩ := assemble Finset.univ + refine ⟨g,?_,hout⟩ + intro i p + rw [hg] + obtain ⟨c,hc⟩ := coverP p.val.1 p.val.2 p.property + exact ite_eq_left ⟨(p.val.1,c),Finset.mem_univ _,rfl,hc⟩ + +end PolygonPiecewise +end PolygonPiecewiseSlots + +end SimpleAmenable +end +end + +end OAI diff --git a/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonSmallPartition.lean b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonSmallPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1eb3721abcc9516944409f946705df0364b0337 --- /dev/null +++ b/lean/OAI/GroupTheory/SimpleAmenable/PolygonGeometry/PolygonSmallPartition.lean @@ -0,0 +1,164 @@ +import Mathlib +import OAI.GroupTheory.SimpleAmenable.Configurations.PolygonAlternatingExtension + +namespace OAI + +section +section +open scoped symmDiff +namespace SimpleAmenable +open scoped commutatorElement +open scoped commutatorElement +section PolygonSmallPartition + +open Classical Set MeasureTheory +namespace PolygonGrid + +noncomputable def strip (a : ℕ) (r : CutRing) (i : ℕ) : polygonAlgebra a := + ⟨halfPlane a 0 (r*(i+1)) ∩ (halfPlane a 0 (r*i))ᶜ, + BooleanSubalgebra.inf_mem (halfPlane_mem _ _ _) (BooleanSubalgebra.compl_mem (halfPlane_mem _ _ _))⟩ + +theorem mem_strip (a : ℕ) (r : CutRing) (i : ℕ) (x : GenericSquare a) : + x∈(strip a r i).val ↔ x.val.1∈interval (ordinary r) i := by + simp only [strip,halfPlane,interval,Set.mem_inter_iff,Set.mem_compl_iff,Set.mem_ofPred_eq, + Set.mem_Ico,cutForm,Matrix.cons_val_zero,map_mul,map_add,map_natCast,map_one,not_lt] + tauto + +theorem strip_area_le (a : ℕ) (r : CutRing) (i : ℕ) : + PolygonArea.area (strip a r i)≤ENNReal.ofReal (ordinary r) := by + have hs : Subtype.val '' (strip a r i).val⊆interval (ordinary r) i ×ˢ Ico (0:ℝ) 1 := by + rintro _ ⟨x,hx,rfl⟩ + exact ⟨(mem_strip a r i x).mp hx,x.property.2.1⟩ + calc + _≤(volume : Measure (ℝ×ℝ)) (interval (ordinary r) i ×ˢ Ico (0:ℝ) 1) := measure_mono hs + _=ENNReal.ofReal (ordinary r) := by + rw [show (volume : Measure (ℝ×ℝ))=Measure.prod (volume : Measure ℝ) volume from rfl] + simp only [Measure.prod_prod,interval,Real.volume_Ico,sub_zero,ENNReal.ofReal_one,mul_one] + congr 1 + ring + +theorem small_bank_cover {a m : ℕ} {ε : ℝ} (hε : 0<ε) : + ∃N : ℕ,∃P : Fin m × Fin N → Fin m → polygonAlgebra a, + (∀p : TrackPoint a m,∃j,p.2∈(P j p.1).val) ∧ + ∀j,(∑i,PolygonArea.area (P j i)) f.val p.val,fun _ _ he => Subtype.ext (f.val.injective he)⟩ + table := by + obtain ⟨S,hS,hcover⟩ := f.property + let conv (c : TableChart a m) : PolygonObject.Chart (a:=a) m m := + ⟨c.source,c.target,c.shift,U c.source ⊓ c.domain⟩ + refine ⟨S.image conv,?_,?_⟩ + · intro c hc + obtain ⟨d,hd,rfl⟩ := Finset.mem_image.mp hc + intro x hx + exact ⟨hx.1,hS d hd x hx.2⟩ + · intro p + obtain ⟨c,hc,hr,hx⟩ := hcover p.val + refine ⟨conv c,Finset.mem_image.mpr ⟨c,hc,rfl⟩,hr,?_,hx⟩ + simpa only [←hr] using p.property + +@[simp] theorem full_restrict_apply (f : polygonFullGroup a m) (U : Fin m → polygonAlgebra a) + (p : (PolygonObject.mk m U).Point) : full_restrict f U p=f.val p.val := rfl + +end PolygonObject.BankEmbedding +end PolygonSmallPartition + +section PolygonSmallSupport + +open Classical Set +namespace PolygonObject.BankEmbedding +variable {a m : ℕ} + +theorem small_support_coset (f : polygonFullGroup a m) {δ : ℝ} (hδ : 0<δ) : + ∃a₀ : polygonAlternatingGroup a m,∃S : Fin m → polygonAlgebra a, + (∑i,PolygonArea.area (S i)) s.sup (fun j => P j i)) := by + induction s using Finset.induction_on with + | empty => exact ⟨1,fun _ => ⊥,fun _ hp => False.elim hp,Or.inr (by simp)⟩ + | @insert j s hj ih => + obtain ⟨a₀,B,hfix,hB⟩ := ih + by_cases hsmallB : (∑i,PolygonArea.area (B i)ᶜ)