Download data/lean/OAI/Algebra/Finitistic/Rectification/ColumnComplex.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.03 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Rectification/ColumnComplex.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/Finitistic/Rectification/ColumnComplex.lean
-
curl -L -o ColumnComplex.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Rectification/ColumnComplex.lean
6.03 kB
| import OAI.Algebra.Finitistic.Rectification.InducedColumns | |
| import Mathlib.Algebra.Category.ModuleCat.Limits | |
| import Mathlib.Algebra.Homology.Homotopy | |
| import Mathlib.Algebra.Homology.HomologicalComplexLimits | |
| namespace OAI | |
| open CategoryTheory CategoryTheory.Limits HomologicalComplex | |
| open scoped TensorProduct ModuleCat.Algebra | |
| noncomputable section | |
| namespace ExternalTensor.Section4 | |
| universe u | |
| variable (k B : Type u) [Field k] [Ring B] [Algebra k B] | |
| instance rightModuleK (N : ModuleCat.{u} Bα΅α΅α΅) : Module k N := | |
| Module.compHom N (algebraMap k Bα΅α΅α΅) | |
| instance rightModuleTower (N : ModuleCat.{u} Bα΅α΅α΅) : IsScalarTower k Bα΅α΅α΅ N where | |
| smul_assoc r b n := by | |
| change (r β’ b) β’ n = (algebraMap k Bα΅α΅α΅ r) β’ (b β’ n) | |
| rw [Algebra.smul_def, mul_smul] | |
| attribute [local instance] ExternalTensor.bimodule ExternalTensor.rightModule | |
| abbrev Enveloping := B β[k] Bα΅α΅α΅ | |
| abbrev RightComplex := CochainComplex (ModuleCat.{u} Bα΅α΅α΅) β€ | |
| abbrev BiComplex := CochainComplex (ModuleCat.{u} (Enveloping k B)) β€ | |
| /-- Induction by the actual left ideal Be, on right modules and maps. -/ | |
| def columnFunctor (e : B) : ModuleCat.{u} Bα΅α΅α΅ β₯€ ModuleCat.{u} (Enveloping k B) where | |
| obj N := ModuleCat.of _ (Column k B N e) | |
| map f := ModuleCat.ofHom (columnMap k e f.hom) | |
| map_id N := by apply ModuleCat.hom_ext; exact map_id | |
| map_comp f g := by | |
| apply ModuleCat.hom_ext | |
| simpa [columnMap] using (map_comp (k := k) (LinearMap.id) (LinearMap.id) f.hom g.hom) | |
| instance columnFunctor_additive (e : B) : (columnFunctor k B e).Additive where | |
| map_add := by intros; apply ModuleCat.hom_ext; exact map_add_right _ _ _ | |
| instance columnFunctor_linear (e : B) : (columnFunctor k B e).Linear k where | |
| map_smul f r := by | |
| apply ModuleCat.hom_ext | |
| apply LinearMap.ext | |
| intro x | |
| change ExternalTensor.map (k := k) LinearMap.id (r β’ f.hom) x = | |
| (algebraMap k (Enveloping k B) r) β’ (columnMap k e f.hom x) | |
| rw [map_smul_right] | |
| exact (IsScalarTower.algebraMap_smul (Enveloping k B) r _).symm | |
| abbrev columnComplex (e : B) : RightComplex B β₯€ BiComplex k B := | |
| (columnFunctor k B e).mapHomologicalComplex (ComplexShape.up β€) | |
| /-- Right multiplication on the left tensor factor, natural in the right module. -/ | |
| def pathNat (ei ej a : B) (ha : a * ei = a) : | |
| columnFunctor k B ej βΆ columnFunctor k B ei where | |
| app N := ModuleCat.ofHom (columnPath k ei ej a ha) | |
| naturality {N N'} f := by | |
| apply ModuleCat.hom_ext | |
| ext x | |
| induction x using TensorProduct.inductionOn with | |
| | tmul c n => rfl | |
| | add x y hx hy => | |
| exact (map_add _ _ _).trans ((congrArgβ (Β· + Β·) hx hy).trans (map_add _ _ _).symm) | |
| abbrev path (ei ej a : B) (ha : a * ei = a) (D : RightComplex B) : | |
| (columnComplex k B ej).obj D βΆ (columnComplex k B ei).obj D := | |
| ((pathNat k B ei ej a ha).mapHomologicalComplex (ComplexShape.up β€)).app D | |
| @[reassoc] theorem path_naturality (ei ej a : B) (ha : a * ei = a) | |
| {D E : RightComplex B} (f : D βΆ E) : | |
| (columnComplex k B ej).map f β« path k B ei ej a ha E = | |
| path k B ei ej a ha D β« (columnComplex k B ei).map f := | |
| ((pathNat k B ei ej a ha).mapHomologicalComplex (ComplexShape.up β€)).naturality f | |
| @[simp] theorem sum_f {C D : BiComplex k B} {I : Type} (s : Finset I) | |
| (f : I β (C βΆ D)) (n : β€) : (β i β s, f i).f n = β i β s, (f i).f n := | |
| map_sum (Hom.fAddMonoidHom n) f s | |
| @[simp] theorem sum_hom {S : Type*} [Ring S] {X Y : ModuleCat S} | |
| {I : Type} (s : Finset I) (f : I β (X βΆ Y)) : | |
| (β i β s, f i).hom = β i β s, (f i).hom := | |
| map_sum ModuleCat.homAddEquiv f s | |
| private theorem sum_smul_component_apply {R : Type u} [Ring R] [Algebra k R] | |
| {K L : CochainComplex (ModuleCat.{u} R) β€} {I J : Type} [Fintype I] [Fintype J] | |
| (r : I β J β k) (f : I β J β (K βΆ L)) (n : β€) (x : K.X n) : | |
| ((β i, β j, r i j β’ f i j).f n).hom x = | |
| β i, β j, algebraMap k R (r i j) β’ ((f i j).f n).hom x := by | |
| have eval_sum {I : Type} (s : Finset I) (g : I β (K βΆ L)) : | |
| (β i β s, g i).f n = β i β s, (g i).f n := | |
| map_sum (Hom.fAddMonoidHom n) g s | |
| simp only [eval_sum, smul_f_apply, ModuleCat.hom_sum, | |
| ModuleCat.hom_smul, LinearMap.sum_apply, LinearMap.smul_apply] | |
| rfl | |
| /-- The vertex-zero component vanishes by the actual quadratic relation in B. -/ | |
| theorem paths_relation {A J : Type} [Fintype A] [Fintype J] | |
| (eβ eβ eβ : B) (a : A β B) (b : J β B) | |
| (ha : β i, a i * eβ = a i) (hb : β j, b j * eβ = b j) | |
| (r : A β J β k) (hr : β i, β j, r i j β’ (b j * a i) = 0) | |
| (D : RightComplex B) : | |
| β i, β j, r i j β’ (path k B eβ eβ (b j) (hb j) D β« | |
| path k B eβ eβ (a i) (ha i) D) = 0 := by | |
| apply Hom.ext | |
| funext n | |
| apply ModuleCat.hom_ext | |
| apply LinearMap.ext | |
| intro x | |
| induction x using TensorProduct.inductionOn with | |
| | add x y hx hy => | |
| exact (map_add _ _ _).trans ((congrArgβ (Β· + Β·) hx hy).trans (map_add _ _ _).symm) | |
| | tmul c v => | |
| erw [sum_smul_component_apply] | |
| change (β i, β j, (algebraMap k (Enveloping k B) (r i j)) β’ | |
| ((pathMap eβ eβ (a i) (ha i) (pathMap eβ eβ (b j) (hb j) c)) ββ[k] v)) = 0 | |
| simp only [IsScalarTower.algebraMap_smul, TensorProduct.smul_tmul', | |
| β TensorProduct.sum_tmul] | |
| have hz : (β i, β j, r i j β’ | |
| pathMap eβ eβ (a i) (ha i) (pathMap eβ eβ (b j) (hb j) c)) = 0 := by | |
| apply Subtype.ext | |
| change ((leftIdeal B eβ).subtype.restrictScalars k) | |
| (β i, β j, r i j β’ pathMap eβ eβ (a i) (ha i) | |
| (pathMap eβ eβ (b j) (hb j) c)) = 0 | |
| simp only [map_sum, map_smul, LinearMap.restrictScalars_apply, | |
| Submodule.subtype_apply, pathMap_apply] | |
| calc | |
| _ = (c : B) * (β i, β j, r i j β’ (b j * a i)) := by | |
| simp only [Finset.mul_sum, Algebra.mul_smul_comm, mul_assoc] | |
| _ = 0 := by rw [hr, mul_zero] | |
| rw [hz, TensorProduct.zero_tmul] | |
| end ExternalTensor.Section4 | |
| end | |
| end OAI | |