Buckets:
| import Mathlib | |
| import OAI.Geometry.Borsuk.Simplicial.SubdivSimplex | |
| namespace OAI | |
| namespace BorsukNine.SimplicialChains | |
| open Finset | |
| variable {V W : Type*} [DecidableEq V] [DecidableEq W] | |
| omit [DecidableEq V] in | |
| lemma simplex_mem_degree_all (K : PreAbstractSimplicialComplex V) (s : Finset V) : | |
| simplex K s ∈ degreeChains K s.card := by | |
| classical | |
| by_cases hs : s ∈ K | |
| · exact simplex_mem_degree K hs | |
| · simp only [simplex, dite_eq_right hs] | |
| exact Submodule.zero_mem _ | |
| lemma subdivSimplex_degree (L : PreAbstractSimplicialComplex W) (b : Finset V → W) | |
| (s : Finset V) : subdivSimplex L b s ∈ degreeChains L s.card := by | |
| induction s using Finset.strongInductionOn with | |
| | _ s ih => | |
| rcases s.eq_empty_or_nonempty with rfl | hn | |
| · rw [subdivSimplex_empty] | |
| exact Submodule.zero_mem _ | |
| by_cases hc : s.card = 1 | |
| · rw [subdivSimplex_one L b hc, hc] | |
| exact simplex_mem_degree_all L {b s} | |
| · rw [subdivSimplex_many L b hn hc] | |
| have hsum : (∑ a ∈ s, subdivSimplex L b (s.erase a)) ∈ degreeChains L (s.card-1) := by | |
| apply Submodule.sum_mem | |
| intro a ha | |
| have hh := ih (s.erase a) (Finset.erase_ssubset ha) | |
| simpa only [Finset.card_erase_of_mem ha] using hh | |
| have hpos := hn.card_pos | |
| simpa only [Submodule.mem_comap, Nat.sub_add_cancel hpos] using | |
| cone_degree L (b s) (s.card-1) hsum | |
| def SubdivisionCarrier (K : PreAbstractSimplicialComplex V) (L : PreAbstractSimplicialComplex W) | |
| (b : Finset V → W) : Prop := | |
| ∀ s ∈ K, ∀ t : Finset W, t.Nonempty → ↑t ⊆ vertexCarrier b s → t ∈ L | |
| omit [DecidableEq V] [DecidableEq W] in | |
| lemma SubdivisionCarrier.center (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) (hb : SubdivisionCarrier K L b) | |
| {s : Finset V} (hs : s ∈ K) : {b s} ∈ L := | |
| hb s hs {b s} (Finset.singleton_nonempty _) (Finset.singleton_subset_set_iff.mpr | |
| (center_mem_carrier b (K.isRelLowerSet_faces hs).1)) | |
| lemma subdivSimplex_augmentation (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) (hb : SubdivisionCarrier K L b) | |
| {s : Finset V} (hs : s ∈ K) : | |
| augmentation L (subdivSimplex L b s) = augmentation K (simplex K s) := by | |
| rw [augmentation_simplex K hs] | |
| by_cases hc : s.card = 1 | |
| · rw [subdivSimplex_one L b hc, augmentation_simplex L (hb.center K L b hs)] | |
| simp [hc] | |
| · rw [ite_eq_right hc] | |
| exact augmentation_eq_zero_of_degree L _ hc (subdivSimplex_degree L b s) | |
| noncomputable def subdivMap (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) : Chain K →ₗ[F₂] Chain L := | |
| Finsupp.linearCombination F₂ (fun s => subdivSimplex L b s.val) | |
| lemma subdivMap_simplex (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) {s : Finset V} (hs : s ∈ K) : | |
| subdivMap K L b (simplex K s) = subdivSimplex L b s := by | |
| simp [simplex_of_mem K hs, subdivMap, Finsupp.linearCombination_single] | |
| lemma subdivMap_simplex_subset (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) {s t : Finset V} | |
| (ht : t ∈ K) (hs : s ⊆ t) : subdivMap K L b (simplex K s) = subdivSimplex L b s := by | |
| rcases s.eq_empty_or_nonempty with rfl | hn | |
| · simp | |
| · exact subdivMap_simplex K L b ((K.isRelLowerSet_faces ht).2 hs hn) | |
| lemma subdivMap_augmentation (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) (hb : SubdivisionCarrier K L b) : | |
| (augmentation L).comp (subdivMap K L b) = augmentation K := by | |
| apply Finsupp.lhom_ext | |
| intro s r | |
| have hs := subdivSimplex_augmentation K L b hb s.property | |
| have hm := subdivMap_simplex K L b s.property | |
| rw [simplex_of_mem K s.property] at hs hm | |
| have he : Finsupp.single s r = r • Finsupp.single s (1 : F₂) := by simp | |
| simp only [LinearMap.comp_apply, he, map_smul, hm, hs] | |
| lemma subdivMap_boundary_simplex (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) {s : Finset V} (hs : s ∈ K) : | |
| subdivMap K L b (boundary K (simplex K s)) = | |
| ∑ a ∈ s, subdivSimplex L b (s.erase a) := by | |
| rw [boundary_simplex K hs, map_sum] | |
| apply Finset.sum_congr rfl | |
| intro a _ | |
| exact subdivMap_simplex_subset K L b hs (Finset.erase_subset a s) | |
| lemma subdivSimplex_boundary (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) (hb : SubdivisionCarrier K L b) | |
| {s : Finset V} (hs : s ∈ K) : | |
| boundary L (subdivSimplex L b s) = subdivMap K L b (boundary K (simplex K s)) := by | |
| induction s using Finset.strongInductionOn with | |
| | _ s ih => | |
| have hn := (K.isRelLowerSet_faces hs).1 | |
| by_cases hc : s.card = 1 | |
| · obtain ⟨a, rfl⟩ := Finset.card_eq_one.mp hc | |
| rw [subdivSimplex_one L b hc, boundary_simplex L (hb.center K L b hs), | |
| boundary_simplex K hs] | |
| simp | |
| · have hd : boundary L (subdivMap K L b (boundary K (simplex K s))) = 0 := by | |
| have he : boundary L (subdivMap K L b (boundary K (simplex K s))) = | |
| subdivMap K L b (boundary K (boundary K (simplex K s))) := by | |
| rw [boundary_simplex K hs] | |
| simp only [map_sum] | |
| apply Finset.sum_congr rfl | |
| intro a ha | |
| rcases (s.erase a).eq_empty_or_nonempty with heq | hne | |
| · simp [heq] | |
| · have hK : s.erase a ∈ K := (K.isRelLowerSet_faces hs).2 (Finset.erase_subset a s) hne | |
| rw [subdivMap_simplex K L b hK] | |
| exact ih (s.erase a) (Finset.erase_ssubset ha) hK | |
| rw [he, boundary_twice_simplex K hs, map_zero] | |
| have hε : augmentation L (subdivMap K L b (boundary K (simplex K s))) = 0 := by | |
| have hh := LinearMap.congr_fun (subdivMap_augmentation K L b hb) | |
| (boundary K (simplex K s)) | |
| rw [LinearMap.comp_apply, augmentation_boundary_simplex K hs] at hh | |
| exact hh | |
| have hcone : ∀ t ∈ (subdivMap K L b (boundary K (simplex K s))).support, | |
| insert (b s) t.val ∈ L := by | |
| rw [subdivMap_boundary_simplex K L b hs] | |
| intro t ht | |
| obtain ⟨a, ha, hta⟩ := support_sum_chains L s _ ht | |
| have ht' := (subdivSimplex_carrier L b _ hta).trans | |
| (vertexCarrier_mono b (Finset.erase_subset a s)) | |
| apply hb s hs _ (Finset.insert_nonempty _ _) | |
| rw [Finset.coe_insert] | |
| exact Set.insert_subset (center_mem_carrier b hn) ht' | |
| rw [subdivSimplex_many L b hn hc, ← subdivMap_boundary_simplex K L b hs, | |
| cone_boundary L (b s) _ hcone, hd, hε, map_zero, zero_smul, add_zero, add_zero] | |
| lemma subdivMap_boundary (K : PreAbstractSimplicialComplex V) | |
| (L : PreAbstractSimplicialComplex W) (b : Finset V → W) (hb : SubdivisionCarrier K L b) : | |
| (boundary L).comp (subdivMap K L b) = (subdivMap K L b).comp (boundary K) := by | |
| apply Finsupp.lhom_ext | |
| intro s r | |
| have hs := subdivSimplex_boundary K L b hb s.property | |
| have hm := subdivMap_simplex K L b s.property | |
| rw [simplex_of_mem K s.property] at hs hm | |
| have he : Finsupp.single s r = r • Finsupp.single s (1 : F₂) := by simp | |
| simp only [LinearMap.comp_apply, he, map_smul, hm, hs] | |
| end BorsukNine.SimplicialChains | |
| end OAI | |
Xet Storage Details
- Size:
- 7.3 kB
- Xet hash:
- c2286a1d5b0cbfc63f07c8797f2cd1de6e10b7d3ea8c0ca2dcd38c5868b1c9bb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.