Buckets:
| import Mathlib | |
| import OAI.Geometry.Borsuk.Simplicial.SimplexMemDegreeAll | |
| namespace OAI | |
| namespace BorsukNine.SimplicialChains | |
| open Finset | |
| abbrev SignedVertex := ℕ × Bool | |
| def flip : SignedVertex ≃ SignedVertex := | |
| Equiv.prodCongr (Equiv.refl ℕ) Equiv.boolNot | |
| @[simp] lemma flip_apply (v : SignedVertex) : flip v = (v.1, !v.2) := rfl | |
| lemma flip_involutive : Function.Involutive flip := by | |
| intro v | |
| simp | |
| lemma flip_ne (v : SignedVertex) : flip v ≠ v := by | |
| intro equality | |
| exact Bool.not_ne_self v.2 (congrArg Prod.snd equality) | |
| def cross (n : ℕ) : PreAbstractSimplicialComplex SignedVertex where | |
| faces := {s | s.Nonempty ∧ (∀ v ∈ s, v.1 < n) ∧ Set.InjOn Prod.fst (s : Set SignedVertex)} | |
| isRelLowerSet_faces := by | |
| intro s hs | |
| refine ⟨hs.1, ?_⟩ | |
| intro t hts ht | |
| exact ⟨ht, fun v hv => hs.2.1 v (hts hv), hs.2.2.mono hts⟩ | |
| lemma cross_mem (n : ℕ) (s : Finset SignedVertex) : | |
| s ∈ cross n ↔ s.Nonempty ∧ (∀ v ∈ s, v.1 < n) ∧ Set.InjOn Prod.fst (s : Set SignedVertex) := | |
| Iff.rfl | |
| lemma cross_flip_forward (n : ℕ) (s : Finset SignedVertex) (hs : s ∈ cross n) : | |
| s.image flip ∈ cross n := by | |
| refine ⟨hs.1.image _, ?_, ?_⟩ | |
| · intro v hv | |
| obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hv | |
| exact hs.2.1 w hw | |
| · intro v hv w hw he | |
| obtain ⟨v', hv', rfl⟩ := Finset.mem_image.mp hv | |
| obtain ⟨w', hw', rfl⟩ := Finset.mem_image.mp hw | |
| exact congrArg flip (hs.2.2 hv' hw' he) | |
| lemma cross_flip (n : ℕ) (s : Finset SignedVertex) : | |
| s ∈ cross n ↔ s.image flip ∈ cross n := by | |
| refine ⟨cross_flip_forward n s, ?_⟩ | |
| intro hs | |
| have h := cross_flip_forward n _ hs | |
| rw [Finset.image_image] at h | |
| have hh : flip ∘ flip = id := funext flip_involutive | |
| simpa only [hh, Finset.image_id] using h | |
| lemma cross_free (n : ℕ) (s : Finset SignedVertex) (hs : s ∈ cross n) : | |
| s.image flip ≠ s := by | |
| intro he | |
| obtain ⟨v, hv⟩ := hs.1 | |
| have hv' : flip v ∈ s := he ▸ Finset.mem_image_of_mem flip hv | |
| exact flip_ne v (hs.2.2 hv' hv rfl) | |
| lemma cross_card (n : ℕ) (s : Finset SignedVertex) (hs : s ∈ cross n) : s.card ≤ n := by | |
| calc | |
| s.card = (s.image Prod.fst).card := (Finset.card_image_iff.mpr hs.2.2).symm | |
| _ ≤ (Finset.range n).card := Finset.card_le_card (by | |
| intro i hi | |
| obtain ⟨v, hv, rfl⟩ := Finset.mem_image.mp hi | |
| exact Finset.mem_range.mpr (hs.2.1 v hv)) | |
| _ = n := Finset.card_range n | |
| lemma cross_singleton (n i : ℕ) (hi : i < n) (b : Bool) : | |
| ({(i,b)} : Finset SignedVertex) ∈ cross n := by | |
| refine ⟨Finset.singleton_nonempty _, ?_, ?_⟩ | |
| · simpa using hi | |
| · simpa only [Finset.coe_singleton] using Set.injOn_singleton Prod.fst (i,b) | |
| lemma cross_insert (n i : ℕ) (hi : i < n) (s : Finset SignedVertex) | |
| (hs : s ∈ cross n) (hsi : ∀ v ∈ s, v.1 < i) (b : Bool) : | |
| insert (i,b) s ∈ cross n := by | |
| refine ⟨Finset.insert_nonempty _ _, ?_, ?_⟩ | |
| · intro v hv | |
| rcases Finset.mem_insert.mp hv with rfl | hv | |
| · exact hi | |
| · exact hs.2.1 v hv | |
| · intro v hv w hw he | |
| rcases Finset.mem_insert.mp hv with rfl | hv <;> | |
| rcases Finset.mem_insert.mp hw with rfl | hw | |
| · rfl | |
| · exact False.elim ((ne_of_lt (hsi w hw)) he.symm) | |
| · exact False.elim ((ne_of_lt (hsi v hv)) he) | |
| · exact hs.2.2 hv hw he | |
| variable {V W : Type*} [DecidableEq V] [DecidableEq W] | |
| omit [DecidableEq V] in | |
| lemma support_mapChains_injective (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (f : V → W) (hf : Function.Injective f) | |
| (c : Chain K) {t : {s : Finset W // s ∈ L}} | |
| (ht : t ∈ (mapChains K L f c).support) : | |
| ∃ s ∈ c.support, t.val = s.val.image f := by | |
| obtain ⟨s, hs, hst⟩ := support_linearMap K L (mapChains K L f) c ht | |
| rw [mapChains_simplex K L f s.property, mapSimplex, | |
| ite_eq_left (Finset.card_image_iff.mpr hf.injOn), mem_support_simplex] at hst | |
| exact ⟨s, hs, hst⟩ | |
| lemma normMap_sq (K : PreAbstractSimplicialComplex V) (e : V ≃ V) | |
| (he : ∀ s, s ∈ K ↔ s.image e ∈ K) (hi : Function.Involutive e) : | |
| (normMap K e).comp (normMap K e) = 0 := by | |
| rw [normMap_eq K e he] | |
| exact SmithTheory.involutionNorm_sq _ (faceEquiv_involutive K e he hi) | |
| lemma normMap_degree (K : PreAbstractSimplicialComplex V) (e : V ≃ V) | |
| (he : ∀ s ∈ K, s.image e ∈ K) (d : ℕ) : | |
| degreeChains K d ≤ (degreeChains K d).comap (normMap K e) := by | |
| intro c hc | |
| exact (degreeChains K d).add_mem hc (mapChains_degree K K e he d hc) | |
| noncomputable def crossTower (n : ℕ) : ℕ → Chain (cross n) | |
| | 0 => simplex (cross n) {(0,false)} | |
| | i+1 => cone (cross n) (i+1,false) (normMap (cross n) flip (crossTower n i)) | |
| lemma crossTower_support (n i : ℕ) {s : {s : Finset SignedVertex // s ∈ cross n}} | |
| (hs : s ∈ (crossTower n i).support) : ∀ v ∈ s.val, v.1 ≤ i := by | |
| induction i generalizing s with | |
| | zero => | |
| have he := (mem_support_simplex (cross n) {(0,false)} s).mp hs | |
| rw [he] | |
| intro v hv | |
| have he' := Finset.mem_singleton.mp hv | |
| exact he' ▸ Nat.le_refl 0 | |
| | succ i ih => | |
| obtain ⟨t, ht, _, he⟩ := support_cone (cross n) (i+1,false) _ hs | |
| rw [he] | |
| intro v hv | |
| rcases Finset.mem_insert.mp hv with rfl | hv | |
| · exact le_rfl | |
| · have hu : t ∈ (crossTower n i).support ∪ | |
| (mapChains (cross n) (cross n) flip (crossTower n i)).support := | |
| Finsupp.support_add ht | |
| rcases Finset.mem_union.mp hu with ht | ht | |
| · exact (ih ht v hv).trans (Nat.le_succ i) | |
| · obtain ⟨u, hu, he⟩ := support_mapChains_injective (cross n) (cross n) flip | |
| flip.injective _ ht | |
| rw [he] at hv | |
| obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hv | |
| exact (ih hu w hw).trans (Nat.le_succ i) | |
| lemma crossTower_degree (n i : ℕ) : crossTower n i ∈ degreeChains (cross n) (i+1) := by | |
| induction i with | |
| | zero => exact simplex_mem_degree_all (cross n) {(0,false)} | |
| | succ i ih => | |
| exact cone_degree (cross n) (i+1,false) (i+1) | |
| (normMap_degree (cross n) flip (cross_flip_forward n) (i+1) ih) | |
| lemma crossTower_cone_faces (n i : ℕ) (hi : i+1 < n) | |
| {s : {s : Finset SignedVertex // s ∈ cross n}} | |
| (hs : s ∈ (normMap (cross n) flip (crossTower n i)).support) : | |
| insert (i+1,false) s.val ∈ cross n := by | |
| apply cross_insert n (i+1) hi s.val s.property | |
| intro v hv | |
| have hu : s ∈ (crossTower n i).support ∪ | |
| (mapChains (cross n) (cross n) flip (crossTower n i)).support := | |
| Finsupp.support_add hs | |
| rcases Finset.mem_union.mp hu with hs | hs | |
| · exact Nat.lt_succ_of_le (crossTower_support n i hs v hv) | |
| · obtain ⟨t, ht, he⟩ := support_mapChains_injective (cross n) (cross n) flip | |
| flip.injective _ hs | |
| rw [he] at hv | |
| obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hv | |
| exact Nat.lt_succ_of_le (crossTower_support n i ht w hw) | |
| lemma crossTower_norm_boundary (n i : ℕ) (hi : i < n) : | |
| boundary (cross n) (normMap (cross n) flip (crossTower n i)) = 0 := by | |
| induction i with | |
| | zero => | |
| have hc := LinearMap.congr_fun (boundary_normMap (cross n) flip (cross_flip_forward n)) | |
| (crossTower n 0) | |
| rw [LinearMap.comp_apply, LinearMap.comp_apply] at hc | |
| rw [hc] | |
| change normMap (cross n) flip (boundary (cross n) (simplex (cross n) {(0,false)})) = 0 | |
| rw [boundary_simplex (cross n) (cross_singleton n 0 hi false)] | |
| simp | |
| | succ i ih => | |
| have hc := LinearMap.congr_fun (boundary_normMap (cross n) flip (cross_flip_forward n)) | |
| (crossTower n (i+1)) | |
| rw [LinearMap.comp_apply, LinearMap.comp_apply] at hc | |
| rw [hc] | |
| change normMap (cross n) flip (boundary (cross n) | |
| (cone (cross n) (i+1,false) (normMap (cross n) flip (crossTower n i)))) = 0 | |
| rw [cone_boundary (cross n) _ _ (fun s hs => crossTower_cone_faces n i hi hs), | |
| ih (by omega)] | |
| have ha := LinearMap.congr_fun (augmentation_normMap (cross n) flip (cross_flip_forward n)) | |
| (crossTower n i) | |
| rw [LinearMap.comp_apply, LinearMap.zero_apply] at ha | |
| rw [ha, map_zero, zero_smul, add_zero, add_zero] | |
| exact LinearMap.congr_fun (normMap_sq (cross n) flip (cross_flip n) flip_involutive) _ | |
| lemma crossTower_boundary (n i : ℕ) (hi : i+1 < n) : | |
| boundary (cross n) (crossTower n (i+1)) = normMap (cross n) flip (crossTower n i) := by | |
| change boundary (cross n) (cone (cross n) (i+1,false) | |
| (normMap (cross n) flip (crossTower n i))) = _ | |
| rw [cone_boundary (cross n) _ _ (fun s hs => crossTower_cone_faces n i hi hs), | |
| crossTower_norm_boundary n i (by omega)] | |
| have ha := LinearMap.congr_fun (augmentation_normMap (cross n) flip (cross_flip_forward n)) | |
| (crossTower n i) | |
| rw [LinearMap.comp_apply, LinearMap.zero_apply] at ha | |
| rw [ha, map_zero, zero_smul, add_zero, add_zero] | |
| lemma crossTower_augmentation (n : ℕ) (hn : 0 < n) : | |
| augmentation (cross n) (crossTower n 0) = 1 := by | |
| rw [crossTower, augmentation_simplex (cross n) (cross_singleton n 0 hn false)] | |
| simp | |
| end BorsukNine.SimplicialChains | |
| end OAI | |
Xet Storage Details
- Size:
- 8.99 kB
- Xet hash:
- 46397b46a96054df140aa8d446473e9dfb78f3fa15bbc6140dd8899250447fe8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.