Download data/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean
-
curl -L -o Configuration.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleAmenable/Homology/Configuration.lean
11.3 kB
| 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 | |
| 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) | |
| 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 | |