Download data/lean/OAI/GroupTheory/SimpleOvergroups/FamilyTables.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.51 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleOvergroups/FamilyTables.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/GroupTheory/SimpleOvergroups/FamilyTables.lean
-
curl -L -o FamilyTables.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/GroupTheory/SimpleOvergroups/FamilyTables.lean
7.51 kB
| import Mathlib | |
| import OAI.Computability.FiniteCompiler.Quotients | |
| import OAI.GroupTheory.SimpleOvergroups.ContextualTables | |
| namespace OAI | |
| namespace SimpleFInftyOvergroups.ContextualEncoding | |
| open FiniteAlgebraicEnvelopes.Bootstrap Relation | |
| namespace DelimiterCode | |
| variable {A B S : Type*} | |
| def alphabet (C : DelimiterCode A S) : Set S := | |
| {s | s = C.start β¨ s = C.stop β¨ β a, s β C.body a} | |
| theorem mem_alphabet_of_mem_encode (C : DelimiterCode A S) {s : S} {w : List A} | |
| (hs : s β C.encode w) : s β C.alphabet := by | |
| obtain β¨a, _, haβ© := List.mem_flatMap.mp hs | |
| simp only [block, List.mem_cons, List.mem_append, List.not_mem_nil, or_false] at ha | |
| rcases ha with h | h | h | |
| Β· exact Or.inl h | |
| Β· exact Or.inr (Or.inr β¨a, hβ©) | |
| Β· exact Or.inr (Or.inl h) | |
| theorem avoids_of_not_mem_alphabet (C : DelimiterCode A S) {s : S} | |
| (hs : s β C.alphabet) (w : List A) : s β C.encode w := | |
| fun h => hs (C.mem_alphabet_of_mem_encode h) | |
| theorem disjoint_infix (C : DelimiterCode A S) (D : DelimiterCode B S) | |
| (hd : Disjoint C.alphabet D.alphabet) {u : List A} {v : List B} | |
| (hv : v β []) (he : D.encode v <:+: C.encode u) : False := by | |
| have hn : D.encode v β [] := fun h => hv ((D.encode_eq_nil _).mp h) | |
| obtain β¨s, hsβ© := List.exists_mem_of_ne_nil _ hn | |
| exact (Set.disjoint_left.mp hd) (C.mem_alphabet_of_mem_encode (he.subset hs)) | |
| (D.mem_alphabet_of_mem_encode hs) | |
| theorem disjoint_overlap (C : DelimiterCode A S) (D : DelimiterCode B S) | |
| (hd : Disjoint C.alphabet D.alphabet) {u : List A} {v : List B} {p m q : List S} | |
| (hm : m β []) (he : C.encode u = p++m) (hf : D.encode v = m++q) : False := by | |
| obtain β¨s, hsβ© := List.exists_mem_of_ne_nil _ hm | |
| exact (Set.disjoint_left.mp hd) | |
| (C.mem_alphabet_of_mem_encode (by rw [he]; exact List.mem_append_right _ hs)) | |
| (D.mem_alphabet_of_mem_encode (by rw [hf]; exact List.mem_append_left _ hs)) | |
| end DelimiterCode | |
| namespace Families | |
| variable {I S : Type*} {A Q : I β Type*} [Fintype I] [Fintype S] | |
| variable {r : S β S β Prop} [Std.Trichotomous r] | |
| variable (C : β i, DelimiterCode (A i) S) (E : β i, FiniteSearch (C i)) | |
| (wf : WellFounded r) (q : β i, List (A i) β Option (Q i)) (z : S) | |
| noncomputable def table (n : β) : List (List S Γ List S) := | |
| Base.absorption z ++ (Static.letters I).flatMap (fun i => CodeTable.table (C i) (E i) wf (q i) z n) | |
| omit [Std.Trichotomous r] in | |
| theorem mem_table [Std.Trichotomous r] {n : β} {p : List S Γ List S} : p β table C E wf q z n β | |
| p β Base.absorption z β¨ β i, p β CodeTable.table (C i) (E i) wf (q i) z n := by | |
| classical | |
| simp [table, Static.letters] | |
| theorem absorbs (n : β) : Absorbs (table C E wf q z n) z := by | |
| classical | |
| intro a | |
| constructor <;> apply (mem_table C E wf q z).mpr <;> apply Or.inl <;> | |
| apply (Base.mem_absorption z).mpr | |
| Β· exact β¨a, Or.inl rfl, rflβ© | |
| Β· exact β¨a, Or.inr rfl, rflβ© | |
| theorem preserves_zero (hz : β i, z β (C i).alphabet) (n : β) : | |
| β p β table C E wf q z n, z β p.1 β z β p.2 := by | |
| classical | |
| intro β¨u,vβ© hp hu | |
| rcases (mem_table C E wf q z).mp hp with hp | β¨i,hpβ© | |
| Β· obtain β¨a,_,rflβ© := (Base.mem_absorption z).mp hp | |
| simp | |
| Β· obtain β¨w,_,_,_,rfl,_β© := (CodeTable.mem_table (C i) (E i) wf (q i) z).mp hp | |
| exact ((hz i) ((C i).mem_alphabet_of_mem_encode hu)).elim | |
| theorem critical (hz : β i, z β (C i).alphabet) | |
| (hd : β i j, i β j β Disjoint (C i).alphabet (C j).alphabet) {n : β} | |
| (hzero : β i, q i [] β none) | |
| (hc : β i, CodeTable.Contextual (C i) (q i) n) | |
| (hi : β i, CodeTable.ZeroIdeal (C i) (q i) n) : Critical (table C E wf q z n) n := by | |
| classical | |
| let rs := table C E wf q z n | |
| have hza : Absorbs rs z := absorbs C E wf q z n | |
| have hp := preserves_zero C E wf q z hz n | |
| have ht (i) : β p β CodeTable.table (C i) (E i) wf (q i) z n, p β rs := | |
| fun _ h => (mem_table C E wf q z).mpr (.inr β¨i,hβ©) | |
| have hzeroPeak {w u v : List S} (hw : z β w) (hu : Step rs w u) (hv : Step rs w v) : | |
| Join (Steps rs) u v := | |
| β¨[z], absorbs_mem hza (step_preserves_letter hp hw hu), | |
| absorbs_mem hza (step_preserves_letter hp hw hv)β© | |
| have hnabs {u v : List S} (h : z β u) : (u,v) β Base.absorption z := by | |
| intro hh | |
| obtain β¨a,ha,_β© := (Base.mem_absorption z).mp hh | |
| rcases ha with rfl | rfl <;> simp at h | |
| constructor | |
| Β· intro u u' v v' hu hv x y he hlen | |
| by_cases huz : z β u | |
| Β· apply hzeroPeak huz | |
| Β· simpa using Step.apply hu [] [] | |
| Β· simpa only [he] using Step.apply hv x y | |
| have hvz : z β v := fun hh => huz (by simp [he,hh]) | |
| have hut := (mem_table C E wf q z).mp hu | |
| have hvt := (mem_table C E wf q z).mp hv | |
| simp only [hnabs huz, hnabs hvz, false_or] at hut hvt | |
| obtain β¨i,huiβ© := hut | |
| obtain β¨j,hvjβ© := hvt | |
| by_cases hij : i = j | |
| Β· subst j | |
| exact CodeTable.critical_containment (C i) (E i) wf (q i) z | |
| (hzero i) hza (ht i) (hc i) (hi i) hui hvj he hlen | |
| Β· obtain β¨a,_,_,_,rfl,_β© := (CodeTable.mem_table (C i) (E i) wf (q i) z).mp hui | |
| obtain β¨b,_,hb,_,rfl,_β© := (CodeTable.mem_table (C j) (E j) wf (q j) z).mp hvj | |
| exact ((C i).disjoint_infix (C j) (hd i j hij) hb β¨x,y,he.symmβ©).elim | |
| Β· intro u u' v v' hu hv p m t hm he hh hlen | |
| by_cases hwz : z β p++m++t | |
| Β· apply hzeroPeak hwz | |
| Β· simpa only [he, List.nil_append, List.append_assoc] using Step.apply hu [] t | |
| Β· simpa only [hh, List.append_nil, List.append_assoc] using Step.apply hv p [] | |
| have huz : z β u := fun h => hwz (by simp [βhe,h]) | |
| have hvz : z β v := fun h => hwz (by simpa only [List.append_assoc,βhh,List.mem_append] using Or.inr h) | |
| have hut := (mem_table C E wf q z).mp hu | |
| have hvt := (mem_table C E wf q z).mp hv | |
| simp only [hnabs huz, hnabs hvz, false_or] at hut hvt | |
| obtain β¨i,huiβ© := hut | |
| obtain β¨j,hvjβ© := hvt | |
| by_cases hij : i = j | |
| Β· subst j | |
| exact CodeTable.critical_overlap (C i) (E i) wf (q i) z | |
| (hzero i) hza (ht i) (hc i) (hi i) hui hvj hm he hh hlen | |
| Β· obtain β¨a,_,_,_,rfl,_β© := (CodeTable.mem_table (C i) (E i) wf (q i) z).mp hui | |
| obtain β¨b,_,_,_,rfl,_β© := (CodeTable.mem_table (C j) (E j) wf (q j) z).mp hvj | |
| exact ((C i).disjoint_overlap (C j) (hd i j hij) hm he hh).elim | |
| theorem decreasing (n : β) : β p β table C E wf q z n, List.Shortlex r p.2 p.1 := by | |
| classical | |
| intro β¨u,vβ© hp | |
| rcases (mem_table C E wf q z).mp hp with hp | β¨i,hpβ© | |
| Β· obtain β¨a,ha,rflβ© := (Base.mem_absorption z).mp hp | |
| rcases ha with rfl | rfl <;> exact List.Shortlex.of_length_lt (by simp) | |
| Β· exact CodeTable.decreasing (C i) (E i) wf (q i) z n (u,v) hp | |
| theorem stable {k n : β} (hkn : k β€ n) : | |
| Selectors.BoundedEq (table C E wf q z k) (table C E wf q z n) k := by | |
| intro p hp | |
| simp only [mem_table] | |
| exact or_congr Iff.rfl (exists_congr (fun i => CodeTable.stable (C i) (E i) wf (q i) z hkn p hp)) | |
| theorem good_at (hz : β i, z β (C i).alphabet) | |
| (hd : β i j, i β j β Disjoint (C i).alphabet (C j).alphabet) {n : β} | |
| (hzero : β i, q i [] β none) | |
| (hc : β i, CodeTable.Contextual (C i) (q i) n) | |
| (hi : β i, CodeTable.ZeroIdeal (C i) (q i) n) : | |
| GoodTable (r := r) (fun n => Part.some (table C E wf q z n)) n := | |
| β¨_, Part.mem_some_iff.mpr rfl, decreasing C E wf q z n, | |
| critical C E wf q z hz hd hzero hc hiβ© | |
| end Families | |
| end SimpleFInftyOvergroups.ContextualEncoding | |
| end OAI | |