Download data/lean/OAI/Algebra/Homology/LinearDualHomotopy.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.31 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Homology/LinearDualHomotopy.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/Homology/LinearDualHomotopy.lean
-
curl -L -o LinearDualHomotopy.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Homology/LinearDualHomotopy.lean
5.31 kB
| /- | |
| Copyright 2026 The Formal Conjectures Authors. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| https://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| This file has been modified. | |
| -/ | |
| import OAI.Algebra.Homology.LinearDual | |
| import Mathlib.LinearAlgebra.Dual.Lemmas | |
| /-! # Linear Dual Homotopy -/ | |
| namespace OAI.Algebra.Homology.LinearDualHomotopy | |
| noncomputable section | |
| open _root_.CategoryTheory | |
| open _root_.CategoryTheory.ShortComplex | |
| open _root_.HomologicalComplex | |
| /-! | |
| # Constructions used only in proofs | |
| -/ | |
| open Limits | |
| universe u | |
| namespace CategoryTheory.ShortComplex | |
| variable {R : Type u} [CommRing R] | |
| /-- Dualising a splitting of a short complex of modules gives a splitting of the reversed dual | |
| short complex: the retraction and the section swap roles. -/ | |
| def Splitting.linearDual {S : ShortComplex (ModuleCat.{u} R)} (h : S.Splitting) : | |
| (LinearDual.CategoryTheory.ShortComplex.linearDual S).Splitting where | |
| r := ModuleCat.ofHom h.s.hom.dualMap | |
| s := ModuleCat.ofHom h.r.hom.dualMap | |
| f_r := by | |
| apply ModuleCat.hom_ext | |
| apply LinearMap.ext | |
| intro Ο | |
| change Module.Dual R S.Xβ at Ο | |
| exact LinearMap.ext fun x => congrArg Ο (ConcreteCategory.congr_hom h.s_g x) | |
| s_g := by | |
| apply ModuleCat.hom_ext | |
| apply LinearMap.ext | |
| intro Ο | |
| change Module.Dual R S.Xβ at Ο | |
| exact LinearMap.ext fun x => congrArg Ο (ConcreteCategory.congr_hom h.f_r x) | |
| id := by | |
| apply ModuleCat.hom_ext | |
| apply LinearMap.ext | |
| intro Ο | |
| change Module.Dual R S.Xβ at Ο | |
| refine LinearMap.ext fun x => ?_ | |
| change Ο (h.s.hom (S.g.hom x)) + Ο (S.f.hom (h.r.hom x)) = Ο x | |
| rw [β map_add] | |
| refine congrArg Ο ?_ | |
| have hx := ConcreteCategory.congr_hom h.id x | |
| change S.f.hom (h.r.hom x) + h.s.hom (S.g.hom x) = x at hx | |
| rw [add_comm] | |
| exact hx | |
| end CategoryTheory.ShortComplex | |
| namespace HomologicalComplex | |
| variable {R : Type u} [CommRing R] | |
| attribute [simp] LinearDual.HomologicalComplex.linearDualCochainComplex_X | |
| attribute [local implicit_reducible] shortComplexFunctor' shortComplexFunctor | |
| variable {K L M : ChainComplex (ModuleCat.{u} R) β} | |
| lemma ModuleCat.ofHom_sub.{v} {R : Type*} [Ring R] {M N : Type v} [AddCommGroup M] | |
| [Module R M] [AddCommGroup N] [Module R N] (f g : M ββ[R] N) : | |
| ModuleCat.ofHom (f - g) = ModuleCat.ofHom f - ModuleCat.ofHom g := rfl | |
| open Homotopy in | |
| /-- Algebraic duality sends a chain homotopy contravariantly to a cochain homotopy. -/ | |
| def linearDualHomotopy {f g : K βΆ L} (h : Homotopy f g) : | |
| Homotopy (LinearDual.HomologicalComplex.linearDualMap f) (LinearDual.HomologicalComplex.linearDualMap g) where | |
| hom i j := ModuleCat.ofHom (h.hom j i).hom.dualMap | |
| zero i j hij := by simp [h.zero j i hij] | |
| comm i := by | |
| cases i with | |
| | zero => | |
| rw [dNext_cochainComplex, prevD_zero_cochainComplex, LinearDual.HomologicalComplex.linearDualCochainComplex_d_succ] | |
| have h' : f.f 0 - g.f 0 = h.hom 0 1 β« L.d 1 0 := by | |
| simpa [dNext_zero_chainComplex _, prevD_chainComplex _, β sub_eq_iff_eq_add] using h.comm 0 | |
| simp [β ModuleCat.ofHom_comp, LinearMap.dualMap_comp_dualMap, β ModuleCat.hom_comp, β h', | |
| OAI.LinearAlgebra.Foundations.DualDefs.LinearMap.dualMap_sub, HomologicalComplex.ModuleCat.ofHom_sub] | |
| | succ n => | |
| rw [Homotopy.dNext_cochainComplex, Homotopy.prevD_succ_cochainComplex] | |
| have h': f.f (n + 1) - g.f (n + 1) = h.hom (n + 1) (n + 1 + 1) β« | |
| L.d (n + 1 + 1) (n + 1) + K.d (n + 1) n β« h.hom n (n + 1) := by | |
| simpa [dNext_succ_chainComplex _, prevD_chainComplex _, β sub_eq_iff_eq_add, | |
| add_comm (K.d _ _ β« _)] using h.comm (n + 1) | |
| simp [β ModuleCat.ofHom_comp, β ModuleCat.ofHom_add, LinearMap.dualMap_comp_dualMap, | |
| β ModuleCat.hom_comp, β OAI.LinearAlgebra.Foundations.DualDefs.LinearMap.dualMap_add, β ModuleCat.hom_add, β h'] | |
| /-- Algebraic duality sends a chain-homotopy equivalence contravariantly to a cochain-homotopy | |
| equivalence. -/ | |
| def linearDualHomotopyEquiv (e : HomotopyEquiv K L) : | |
| HomotopyEquiv (LinearDual.HomologicalComplex.linearDualCochainComplex L) (LinearDual.HomologicalComplex.linearDualCochainComplex K) where | |
| hom := LinearDual.HomologicalComplex.linearDualMap e.hom | |
| inv := LinearDual.HomologicalComplex.linearDualMap e.inv | |
| homotopyHomInvId := | |
| (Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_comp e.inv e.hom).symm).trans <| | |
| (linearDualHomotopy e.homotopyInvHomId).trans <| | |
| Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_id L) | |
| homotopyInvHomId := | |
| (Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_comp e.hom e.inv).symm).trans <| | |
| (linearDualHomotopy e.homotopyHomInvId).trans <| | |
| Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_id K) | |
| end HomologicalComplex | |
| end | |
| end OAI.Algebra.Homology.LinearDualHomotopy | |