Download data/lean/OAI/Geometry/HyperbolicGroups/BoundaryIndex.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.97 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/HyperbolicGroups/BoundaryIndex.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/HyperbolicGroups/BoundaryIndex.lean
-
curl -L -o BoundaryIndex.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/HyperbolicGroups/BoundaryIndex.lean
4.97 kB
Lean 4 Β· 6
declarations fullstatements
| import Mathlib | |
| import OAI.Geometry.HyperbolicGroups.BoundaryList | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| namespace HyperbolicObstruction.PictureSwitch | |
| open Equiv Equiv.Perm | |
| Classical.propDecidable | |
| variable {D S L : Type*} [DecidableEq D] | |
| /-- A literal indexed match between two enumerated boundaries. Repeated | |
| edge letters are not quotiented: this map uses the unique side positions. -/ | |
| def boundaryIndex (xs : List D) (ys : List S) (hlen : xs.length = ys.length) | |
| (x : D) (hx : x β xs) : S := | |
| ys[xs.idxOf x]'(by rw [β hlen]; exact List.idxOf_lt_length_iff.mpr hx) | |
| lemma boundaryIndex_get (xs : List D) (ys : List S) (hn : xs.Nodup) | |
| (hlen : xs.length = ys.length) (i : β) (hi : i < xs.length) : | |
| boundaryIndex xs ys hlen xs[i] (List.getElem_mem hi) = ys[i]'(by omega) := by | |
| have hh : xs.idxOf xs[i] < xs.length := List.idxOf_lt_length_iff.mpr (List.getElem_mem hi) | |
| have he : xs.idxOf xs[i] = i := hn.getElem_inj_iff.mp (List.getElem_idxOf hh) | |
| simp only [boundaryIndex,he] | |
| lemma boundaryIndex_label (xs : List D) (ys : List S) (hlen : xs.length = ys.length) | |
| (label : D β L) (edge : S β L) (he : xs.map label = ys.map edge) | |
| (x : D) (hx : x β xs) : edge (boundaryIndex xs ys hlen x hx) = label x := by | |
| have hi : xs.idxOf x < xs.length := List.idxOf_lt_length_iff.mpr hx | |
| have h := congrArg (fun l => l[xs.idxOf x]?) he | |
| simp only [List.getElem?_map,List.getElem?_eq_getElem hi, | |
| List.getElem?_eq_getElem (show xs.idxOf x < ys.length by omega),Option.map_some, | |
| Option.some.injEq,List.getElem_idxOf] at h | |
| exact h.symm | |
| lemma boundaryIndex_inj (xs : List D) (ys : List S) (hny : ys.Nodup) | |
| (hlen : xs.length = ys.length) {x y : D} (hx : x β xs) (hy : y β xs) | |
| (he : boundaryIndex xs ys hlen x hx = boundaryIndex xs ys hlen y hy) : x = y := by | |
| have hi := hny.getElem_inj_iff.mp he | |
| have hx' := List.getElem_idxOf (List.idxOf_lt_length_iff.mpr hx) | |
| have hy' := List.getElem_idxOf (List.idxOf_lt_length_iff.mpr hy) | |
| have ht : xs[xs.idxOf x]'(List.idxOf_lt_length_iff.mpr hx) = | |
| xs[xs.idxOf y]'(List.idxOf_lt_length_iff.mpr hy) := by simp only [hi] | |
| exact hx'.symm.trans (ht.trans hy') | |
| variable [DecidableEq S] | |
| lemma boundaryIndex_commute {f : Perm D} {t : Perm S} {xs : List D} {ys : List S} | |
| (hf : IsBoundary f xs) (ht : IsBoundary t ys) (hlen : xs.length = ys.length) | |
| (x : D) (hx : x β xs) : | |
| boundaryIndex xs ys hlen (f x) (hf.invariant hx) = t (boundaryIndex xs ys hlen x hx) := by | |
| obtain β¨i,hi,rflβ© := List.getElem_of_mem hx | |
| have hn : 0 < xs.length := (Nat.zero_le i).trans_lt hi | |
| have hn' : 0 < ys.length := by omega | |
| rw [boundaryIndex_get xs ys hf.nodup hlen i hi,ht.turn _ (List.getElem_mem (by omega)), | |
| List.formPerm_apply_getElem ys ht.nodup i (by omega)] | |
| have he : f xs[i] = xs[(i+1)%xs.length]'(Nat.mod_lt _ hn) := | |
| (hf.turn _ (List.getElem_mem hi)).trans (List.formPerm_apply_getElem xs hf.nodup i hi) | |
| simp only [he,boundaryIndex_get xs ys hf.nodup hlen,hlen] | |
| /-- Build a coherent index map by selecting one boundary match PER FACE, | |
| not independently per side. This is the coherence step between | |
| word van Kampen diagrams and actual cellular pictures. -/ | |
| theorem indexedFaceMap_exists (f : Perm D) (t : Perm S) (label : D β L) (edge : S β L) | |
| (h : β x : D, β xs : List D, β ys : List S, | |
| IsBoundary f xs β§ x β xs β§ IsBoundary t ys β§ xs.map label = ys.map edge) : | |
| β j : D β S, IndexedFaceMap f t j β§ β x, edge (j x) = label x := by | |
| let F := Quotient (SameCycle.setoid f) | |
| let cls : D β F := Quotient.mk _ | |
| let xs : F β List D := fun c => (h c.out).choose | |
| let ys : F β List S := fun c => (h c.out).choose_spec.choose | |
| have hd : β c : F, IsBoundary f (xs c) β§ c.out β xs c β§ | |
| IsBoundary t (ys c) β§ (xs c).map label = (ys c).map edge := | |
| fun c => (h c.out).choose_spec.choose_spec | |
| have hlen : β c, (xs c).length = (ys c).length := fun c => by | |
| have hh := congrArg List.length (hd c).2.2.2 | |
| simpa only [List.length_map] using hh | |
| have hm : β x, x β xs (cls x) := by | |
| intro x | |
| exact (hd (cls x)).1.mem_of_sameCycle (hd (cls x)).2.1 | |
| (Quotient.exact (Quotient.out_eq' (cls x))) | |
| have hc : β x, cls (f x) = cls x := fun x => | |
| Quotient.sound (SameCycle.rfl.apply_right.symm) | |
| let j : D β S := fun x => boundaryIndex (xs (cls x)) (ys (cls x)) (hlen _) x (hm x) | |
| refine β¨j,β¨?_,?_β©,?_β© | |
| Β· intro x | |
| dsimp only [j] | |
| simp only [hc x] | |
| exact boundaryIndex_commute (hd (cls x)).1 (hd (cls x)).2.2.1 (hlen _) x (hm x) | |
| Β· intro x y hxy he | |
| have hec : cls x = cls y := Quotient.sound hxy | |
| dsimp only [j] at he | |
| simp only [β hec] at he | |
| exact boundaryIndex_inj _ _ (hd (cls x)).2.2.1.nodup (hlen _) (hm x) (hec βΈ hm y) he | |
| Β· intro x | |
| exact boundaryIndex_label _ _ (hlen _) label edge (hd (cls x)).2.2.2 x (hm x) | |
| end HyperbolicObstruction.PictureSwitch | |
| end | |
| end | |
| section | |
| end | |
| end | |
| end OAI | |
Outline