Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | This file has been modified. |
| 17 | -/ |
| 18 | |
| 19 | import Mathlib.Algebra.TrivSqZeroExt.Basic |
| 20 | import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation |
| 21 | import Mathlib.LinearAlgebra.ExteriorPower.Basic |
| 22 | import Mathlib.RingTheory.Kaehler.Basic |
| 23 | |
| 24 | namespace OAI.Algebra.DeRham.Basic |
| 25 | |
| 26 | open _root_.Algebra |
| 27 | |
| 28 | /-! |
| 29 | # Algebraic de Rham forms |
| 30 | |
| 31 | Relative differential forms of degree `p` are the exterior powers `⋀[A]^p Ω[A⁄R]` of the module |
| 32 | of relative Kähler differentials, built from Mathlib's `exteriorPower` and `KaehlerDifferential`. |
| 33 | Since `⋀[A]^p M` is a submodule of `ExteriorAlgebra A M`, all degrees live inside the single |
| 34 | algebra `ExtAlg R A = ⋀ Ω[A⁄R]`, and the exterior derivative is constructed once and for all on |
| 35 | that algebra. |
| 36 | |
| 37 | ## The exterior derivative |
| 38 | |
| 39 | The exterior derivative is the odd degree-one `R`-derivation `d` of `⋀ Ω[A⁄R]` extending the |
| 40 | universal derivation `A → Ω[A⁄R]`. It is obtained from a universal property: an odd derivation |
| 41 | is encoded by an algebra map `x ↦ (x, d x)` into an auxiliary square-zero ring `Sq R A` with |
| 42 | additive group `⋀ Ω[A⁄R] × ⋀ Ω[A⁄R]`. Its multiplication `(x, u) * (y, v) = (x * y, involute x * |
| 43 | v + u * y)` encodes the graded Leibniz rule. Here `involute` is the grade involution, so |
| 44 | `involute x = (-1) ^ p * x` on a form of degree `p`, and the rule read off from that product is |
| 45 | the usual `d (x * y) = d x * y + (-1) ^ p * x * d y`. |
| 46 | |
| 47 | Giving `Sq R A` the twisted `A`-algebra structure `a ↦ (a, d a)` turns that algebra map into |
| 48 | an `A`-algebra map, so it is produced in two steps: |
| 49 | |
| 50 | * the universal property of `Ω[A⁄R]` applied to the derivation `a ↦ (d a, 0)` gives an |
| 51 | `A`-linear `phi : Ω[A⁄R] → Sq R A`, of the form `ω ↦ (ω, d ω)`; |
| 52 | * the universal property of the exterior algebra applied to `phi` gives `deRhamHom`, and `d` is |
| 53 | its second component `extDeriv`. |
| 54 | |
| 55 | The identities `d ∘ d = 0`, the graded Leibniz rule, and the fact that `d` raises the degree by |
| 56 | one then follow by induction on the exterior algebra. |
| 57 | |
| 58 | ## Main definitions |
| 59 | |
| 60 | * `Algebra.DeRham.Form R A p`: differential forms of degree `p`, that is `⋀[A]^p Ω[A⁄R]`; |
| 61 | * `Algebra.DeRham.differential`: the exterior derivative `Form R A p →ₗ[R] Form R A (p + 1)`; |
| 62 | * `Algebra.DeRham.mk R A p a₀ v`: the form `a₀ * d v₀ ∧ ... ∧ d vₚ₋₁`; these span `Form R A p` |
| 63 | over `R`, by `Algebra.DeRham.span_mk`; |
| 64 | * `Algebra.DeRham.map`: functoriality along an `R`-algebra homomorphism. |
| 65 | -/ |
| 66 | |
| 67 | noncomputable section |
| 68 | |
| 69 | universe u |
| 70 | |
| 71 | section |
| 72 | section |
| 73 | |
| 74 | open CliffordAlgebra (involute involute_ι) |
| 75 | open TrivSqZeroExt (fst snd) |
| 76 | |
| 77 | variable (R A : Type u) [CommRing R] [CommRing A] [Algebra R A] |
| 78 | |
| 79 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. This is the exterior algebra |
| 80 | `⋀_A Ω_{A/R}` of the module of Kähler differentials. Its degree-`p` part is the module of |
| 81 | relative differential `p`-forms, generated by expressions `a₀ da₁ ∧ ⋯ ∧ daₚ`. -/ |
| 82 | abbrev ExtAlg : Type u := ExteriorAlgebra A Ω[A⁄R] |
| 83 | |
| 84 | variable {R A} |
| 85 | |
| 86 | /-- A single differential anticommutes with every homogeneous factor, which globally reads as |
| 87 | commuting past the grade involution. -/ |
| 88 | |
| 89 | lemma ι_mul_eq_involute_mul_ι (m : Ω[A⁄R]) (y : ExtAlg R A) : |
| 90 | ExteriorAlgebra.ι A m * y = involute y * ExteriorAlgebra.ι A m := by |
| 91 | |
| 92 | induction y using ExteriorAlgebra.induction with |
| 93 | | algebraMap a => rw [AlgHom.commutes, Algebra.commutes] |
| 94 | | ι n => |
| 95 | rw [involute_ι, neg_mul, eq_neg_iff_add_eq_zero] |
| 96 | exact ExteriorAlgebra.ι_add_mul_swap m n |
| 97 | | mul y z hy hz => rw [← mul_assoc, hy, mul_assoc, hz, ← mul_assoc, map_mul] |
| 98 | | add y z hy hz => rw [mul_add, hy, hz, map_add, add_mul] |
| 99 | |
| 100 | variable (R A) |
| 101 | |
| 102 | /-- The square-zero extension of the exterior algebra. Its multiplication is |
| 103 | `(x, u) * (y, v) = (x * y, involute x * v + u * y)`, encoding the graded Leibniz rule. |
| 104 | The synonym unfolds in implicit arguments so that Mathlib's projections apply directly, but stays |
| 105 | opaque to typeclass synthesis to keep the twisted ring and scalar actions separate. -/ |
| 106 | @[implicit_reducible] def Sq : Type u := TrivSqZeroExt (ExtAlg R A) (ExtAlg R A) |
| 107 | |
| 108 | namespace Sq |
| 109 | |
| 110 | instance instRing : Ring (_root_.OAI.Algebra.DeRham.Basic.Sq R A) := by |
| 111 | -- Only the left action is twisted; these instances stay local to the ring construction. |
| 112 | letI : SMul (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) := ⟨fun x v => involute x * v⟩ |
| 113 | letI : Module (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) := |
| 114 | Module.compHom (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) (involute (R := A) (M := Ω[A⁄R])).toRingHom |
| 115 | letI : SMulCommClass (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A)ᵐᵒᵖ (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) := |
| 116 | ⟨fun x y u => (mul_assoc (involute x) u y.unop).symm⟩ |
| 117 | exact inferInstanceAs (Ring (TrivSqZeroExt (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A))) |
| 118 | |
| 119 | variable {R A} |
| 120 | |
| 121 | @[simp] lemma fst_add (s t : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : fst (s + t) = fst s + fst t := rfl |
| 122 | |
| 123 | @[simp] lemma snd_add (s t : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : snd (s + t) = snd s + snd t := rfl |
| 124 | |
| 125 | @[simp] lemma fst_mul (s t : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : fst (s * t) = fst s * fst t := rfl |
| 126 | |
| 127 | @[simp] lemma fst_one : fst (1 : _root_.OAI.Algebra.DeRham.Basic.Sq R A) = 1 := rfl |
| 128 | |
| 129 | @[simp] lemma snd_one : snd (1 : _root_.OAI.Algebra.DeRham.Basic.Sq R A) = 0 := rfl |
| 130 | |
| 131 | @[simp] lemma snd_mul (s t : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : |
| 132 | snd (s * t) = involute (fst s) * snd t + snd s * fst t := rfl |
| 133 | |
| 134 | end Sq |
| 135 | |
| 136 | /-- For a commutative `R`-algebra `A`, let `E = ⋀_A Ω_{A/R}` be the exterior algebra of Kähler |
| 137 | differentials. This ring homomorphism `A → Sq R A = E × E` sends `a` to `(a,da)`, with `a` in |
| 138 | degree zero and its differential in degree one. It defines the `A`-algebra structure on `Sq`. -/ |
| 139 | def twist : A →+* _root_.OAI.Algebra.DeRham.Basic.Sq R A where |
| 140 | toFun a := (algebraMap A (ExtAlg R A) a, |
| 141 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A a)) |
| 142 | map_one' := by apply TrivSqZeroExt.ext <;> simp |
| 143 | map_mul' a b := by |
| 144 | apply TrivSqZeroExt.ext |
| 145 | · exact map_mul (algebraMap A (ExtAlg R A)) a b |
| 146 | · change ExteriorAlgebra.ι A (KaehlerDifferential.D R A (a * b)) = |
| 147 | involute (algebraMap A (ExtAlg R A) a) * |
| 148 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A b) + |
| 149 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) * algebraMap A (ExtAlg R A) b |
| 150 | simp [Algebra.smul_def, Algebra.commutes (R := A) b (ExteriorAlgebra.ι A _)] |
| 151 | map_zero' := by apply TrivSqZeroExt.ext <;> simp |
| 152 | map_add' a b := by |
| 153 | apply TrivSqZeroExt.ext |
| 154 | · exact map_add (algebraMap A (ExtAlg R A)) a b |
| 155 | · exact map_add ((ExteriorAlgebra.ι A).compDer (KaehlerDifferential.D R A)) a b |
| 156 | |
| 157 | @[simp] lemma fst_twist (a : A) : |
| 158 | fst (twist R A a) = algebraMap A (ExtAlg R A) a := rfl |
| 159 | |
| 160 | @[simp] lemma snd_twist (a : A) : |
| 161 | snd (twist R A a) = ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) := rfl |
| 162 | |
| 163 | lemma twist_commutes (a : A) (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : twist R A a * s = s * twist R A a := by |
| 164 | apply TrivSqZeroExt.ext |
| 165 | · simpa using Algebra.commutes a (fst s) |
| 166 | · simp only [_root_.OAI.Algebra.DeRham.Basic.Sq.snd_mul, fst_twist, snd_twist, AlgHom.commutes, |
| 167 | ι_mul_eq_involute_mul_ι (KaehlerDifferential.D R A a) (fst s)] |
| 168 | rw [Algebra.commutes a (snd s)] |
| 169 | abel |
| 170 | |
| 171 | -- This scalar action includes `d a`, so it is not the componentwise action on `TrivSqZeroExt`. |
| 172 | instance : Algebra A (_root_.OAI.Algebra.DeRham.Basic.Sq R A) := (twist R A).toAlgebra' (twist_commutes R A) |
| 173 | |
| 174 | instance : Algebra R (_root_.OAI.Algebra.DeRham.Basic.Sq R A) := |
| 175 | ((twist R A).comp (algebraMap R A)).toAlgebra' fun _ s => twist_commutes R A _ s |
| 176 | |
| 177 | instance : IsScalarTower R A (_root_.OAI.Algebra.DeRham.Basic.Sq R A) := .of_algebraMap_eq fun _ => rfl |
| 178 | |
| 179 | namespace Sq |
| 180 | |
| 181 | variable {R A} |
| 182 | |
| 183 | @[simp] lemma fst_algebraMap (a : A) : |
| 184 | fst (algebraMap A (_root_.OAI.Algebra.DeRham.Basic.Sq R A) a) = algebraMap A (_root_.OAI.Algebra.DeRham.Basic.ExtAlg R A) a := rfl |
| 185 | |
| 186 | @[simp] lemma snd_algebraMap (a : A) : |
| 187 | snd (algebraMap A (_root_.OAI.Algebra.DeRham.Basic.Sq R A) a) = ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) := rfl |
| 188 | |
| 189 | @[simp] lemma fst_smul (a : A) (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : fst (a • s) = a • fst s := rfl |
| 190 | |
| 191 | lemma snd_smul (a : A) (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : |
| 192 | snd (a • s) = a • snd s + |
| 193 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) * fst s := by |
| 194 | simp [Algebra.smul_def, snd_mul, fst_algebraMap, snd_algebraMap, AlgHom.commutes] |
| 195 | |
| 196 | @[simp] lemma fst_smul_base (r : R) (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : fst (r • s) = r • fst s := rfl |
| 197 | |
| 198 | @[simp] lemma snd_smul_base (r : R) (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : snd (r • s) = r • snd s := by |
| 199 | rw [← algebraMap_smul A r s, snd_smul, algebraMap_smul] |
| 200 | simp |
| 201 | |
| 202 | end Sq |
| 203 | |
| 204 | namespace Sq |
| 205 | |
| 206 | /-- For a commutative `R`-algebra `A`, let `E = ⋀_A Ω_{A/R}` be the exterior algebra of Kähler |
| 207 | differentials. For the `A`-algebra structure `a ↦ (a,da)` on `Sq R A = E × E`, this is the first |
| 208 | projection `(x,u) ↦ x` as an `A`-algebra homomorphism. -/ |
| 209 | def fstAlgHom : _root_.OAI.Algebra.DeRham.Basic.Sq R A →ₐ[A] _root_.OAI.Algebra.DeRham.Basic.ExtAlg R A where |
| 210 | toFun := fst |
| 211 | map_one' := rfl |
| 212 | map_mul' _ _ := rfl |
| 213 | map_zero' := rfl |
| 214 | map_add' _ _ := rfl |
| 215 | commutes' _ := rfl |
| 216 | |
| 217 | @[simp] lemma fstAlgHom_apply (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : fstAlgHom R A s = fst s := rfl |
| 218 | |
| 219 | /-- For a commutative `R`-algebra `A`, let `E = ⋀_A Ω_{A/R}` be the exterior algebra of Kähler |
| 220 | differentials. This is the second projection `(x,u) ↦ u` from `Sq R A = E × E` as an `R`-linear |
| 221 | map. -/ |
| 222 | def sndLinear : _root_.OAI.Algebra.DeRham.Basic.Sq R A →ₗ[R] _root_.OAI.Algebra.DeRham.Basic.ExtAlg R A where |
| 223 | toFun := snd |
| 224 | map_add' _ _ := rfl |
| 225 | map_smul' := snd_smul_base |
| 226 | |
| 227 | @[simp] lemma sndLinear_apply (s : _root_.OAI.Algebra.DeRham.Basic.Sq R A) : sndLinear R A s = snd s := rfl |
| 228 | |
| 229 | end Sq |
| 230 | |
| 231 | /-- For a commutative `R`-algebra `A`, let `E = ⋀_A Ω_{A/R}` be the exterior algebra of Kähler |
| 232 | differentials. This `R`-derivation `A → Sq R A = E × E` sends `a` to `(da,0)`. The target uses |
| 233 | the `A`-action defined by `a ↦ (a,da)`. -/ |
| 234 | def epsDerivation : Derivation R A (_root_.OAI.Algebra.DeRham.Basic.Sq R A) where |
| 235 | toFun a := TrivSqZeroExt.inl (ExteriorAlgebra.ι A (KaehlerDifferential.D R A a)) |
| 236 | map_add' a b := by apply TrivSqZeroExt.ext <;> simp |
| 237 | map_smul' r a := by apply TrivSqZeroExt.ext <;> simp |
| 238 | map_one_eq_zero' := by apply TrivSqZeroExt.ext <;> simp |
| 239 | leibniz' a b := by |
| 240 | apply TrivSqZeroExt.ext |
| 241 | · simp |
| 242 | · simp [_root_.OAI.Algebra.DeRham.Basic.Sq.snd_smul, ExteriorAlgebra.ι_add_mul_swap] |
| 243 | |
| 244 | /-- For a commutative `R`-algebra `A`, let `E = ⋀_A Ω_{A/R}` be the exterior algebra of Kähler |
| 245 | differentials. This `A`-linear map `Ω_{A/R} → Sq R A = E × E` sends `da` to `(da,0)`, using the |
| 246 | target action `a ↦ (a,da)`. In particular, it sends `a db` to `(a db,da ∧ db)`. -/ |
| 247 | def phi : Ω[A⁄R] →ₗ[A] _root_.OAI.Algebra.DeRham.Basic.Sq R A := (epsDerivation R A).liftKaehlerDifferential |
| 248 | |
| 249 | @[simp] lemma phi_D (a : A) : |
| 250 | phi R A (KaehlerDifferential.D R A a) = |
| 251 | TrivSqZeroExt.inl (ExteriorAlgebra.ι A (KaehlerDifferential.D R A a)) := |
| 252 | (epsDerivation R A).liftKaehlerDifferential_comp_D a |
| 253 | |
| 254 | /-- To prove a statement about every Kähler differential it suffices to treat the exact ones |
| 255 | `d a` and to check closure under zero, sums, and scalars. -/ |
| 256 | @[elab_as_elim] |
| 257 | lemma D_induction {motive : Ω[A⁄R] → Prop} (ω : Ω[A⁄R]) |
| 258 | (D : ∀ a : A, motive (KaehlerDifferential.D R A a)) (zero : motive 0) |
| 259 | (add : ∀ x y, motive x → motive y → motive (x + y)) |
| 260 | (smul : ∀ (a : A) x, motive x → motive (a • x)) : motive ω := by |
| 261 | have hω : ω ∈ Submodule.span A (Set.range (KaehlerDifferential.D R A)) := by |
| 262 | rw [KaehlerDifferential.span_range_derivation]; trivial |
| 263 | induction hω using Submodule.span_induction with |
| 264 | | mem _ hx => obtain ⟨a, rfl⟩ := hx; exact D a |
| 265 | | zero => exact zero |
| 266 | | add x y _ _ hx hy => exact add x y hx hy |
| 267 | | smul a x _ hx => exact smul a x hx |
| 268 | |
| 269 | @[simp] lemma fst_phi (ω : Ω[A⁄R]) : fst (phi R A ω) = ExteriorAlgebra.ι A ω := by |
| 270 | have h : (_root_.OAI.Algebra.DeRham.Basic.Sq.fstAlgHom R A).toLinearMap.comp (phi R A) = ExteriorAlgebra.ι A := by |
| 271 | refine LinearMap.ext_on (KaehlerDifferential.span_range_derivation R A) ?_ |
| 272 | rintro _ ⟨a, rfl⟩ |
| 273 | simp |
| 274 | exact congrArg (fun f => f ω) h |
| 275 | |
| 276 | lemma snd_phi_smul (a : A) (ω : Ω[A⁄R]) : |
| 277 | snd (phi R A (a • ω)) = |
| 278 | a • snd (phi R A ω) + |
| 279 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) * ExteriorAlgebra.ι A ω := by |
| 280 | rw [map_smul, _root_.OAI.Algebra.DeRham.Basic.Sq.snd_smul, fst_phi] |
| 281 | |
| 282 | /-- The exterior derivative of a differential is an even element, so it commutes with everything |
| 283 | of degree one. -/ |
| 284 | lemma involute_snd_phi (ω : Ω[A⁄R]) : |
| 285 | involute (snd (phi R A ω)) = snd (phi R A ω) := by |
| 286 | induction ω using D_induction with |
| 287 | | D a => simp |
| 288 | | zero => simp |
| 289 | | add x y hx hy => simp [hx, hy] |
| 290 | | smul a x hx => |
| 291 | rw [snd_phi_smul, map_add, map_smul, hx, map_mul, involute_ι, involute_ι, neg_mul_neg] |
| 292 | |
| 293 | lemma phi_mul_self (ω : Ω[A⁄R]) : phi R A ω * phi R A ω = 0 := by |
| 294 | apply TrivSqZeroExt.ext |
| 295 | · simp |
| 296 | · rw [_root_.OAI.Algebra.DeRham.Basic.Sq.snd_mul, fst_phi, involute_ι, neg_mul, TrivSqZeroExt.snd_zero, |
| 297 | ι_mul_eq_involute_mul_ι, involute_snd_phi, neg_add_cancel] |
| 298 | |
| 299 | /-- For a commutative `R`-algebra `A`, let `E = ⋀_A Ω_{A/R}` be the exterior algebra of Kähler |
| 300 | differentials. With `A` acting on `Sq R A = E × E` by `a ↦ (a,da)`, this `A`-algebra |
| 301 | homomorphism sends `da` to `(da,0)`. On an arbitrary form `ω` its value is `(ω,dω)`; the second |
| 302 | component defines the exterior derivative. -/ |
| 303 | def deRhamHom : ExtAlg R A →ₐ[A] _root_.OAI.Algebra.DeRham.Basic.Sq R A := |
| 304 | ExteriorAlgebra.lift A ⟨phi R A, phi_mul_self R A⟩ |
| 305 | |
| 306 | @[simp] lemma deRhamHom_ι (ω : Ω[A⁄R]) : |
| 307 | deRhamHom R A (ExteriorAlgebra.ι A ω) = phi R A ω := |
| 308 | ExteriorAlgebra.lift_ι_apply A _ _ ω |
| 309 | |
| 310 | @[simp] lemma fst_deRhamHom (x : ExtAlg R A) : fst (deRhamHom R A x) = x := by |
| 311 | have h : (_root_.OAI.Algebra.DeRham.Basic.Sq.fstAlgHom R A).comp (deRhamHom R A) = AlgHom.id A (ExtAlg R A) := by |
| 312 | apply ExteriorAlgebra.hom_ext |
| 313 | ext ω |
| 314 | simp |
| 315 | exact AlgHom.congr_fun h x |
| 316 | |
| 317 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. Write `E = ⋀_A Ω_{A/R}` for the |
| 318 | exterior algebra of Kähler differentials. The exterior derivative is the `R`-linear map `d : E → |
| 319 | E` determined by `d(a) = da`, `d(da) = 0`, and `d(ωη) = dω η + (-1)^p ω dη` for `ω` of degree |
| 320 | `p`. It raises degree by one. -/ |
| 321 | def extDeriv : ExtAlg R A →ₗ[R] ExtAlg R A := |
| 322 | (_root_.OAI.Algebra.DeRham.Basic.Sq.sndLinear R A).comp ((deRhamHom R A).toLinearMap.restrictScalars R) |
| 323 | |
| 324 | @[simp] lemma extDeriv_ι (ω : Ω[A⁄R]) : |
| 325 | extDeriv R A (ExteriorAlgebra.ι A ω) = snd (phi R A ω) := by |
| 326 | simp [extDeriv] |
| 327 | |
| 328 | @[simp] lemma extDeriv_algebraMap (a : A) : |
| 329 | extDeriv R A (algebraMap A (ExtAlg R A) a) = |
| 330 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) := by |
| 331 | show snd (deRhamHom R A (algebraMap A (ExtAlg R A) a)) = _ |
| 332 | rw [AlgHom.commutes] |
| 333 | rfl |
| 334 | |
| 335 | /-- The exterior derivative is an odd derivation of the exterior algebra. -/ |
| 336 | lemma extDeriv_mul (x y : ExtAlg R A) : |
| 337 | extDeriv R A (x * y) = |
| 338 | involute x * extDeriv R A y + extDeriv R A x * y := by |
| 339 | show snd (deRhamHom R A (x * y)) = _ |
| 340 | simp only [map_mul, _root_.OAI.Algebra.DeRham.Basic.Sq.snd_mul, fst_deRhamHom] |
| 341 | rfl |
| 342 | |
| 343 | /-- Multiplying forms adds their degrees. -/ |
| 344 | lemma mul_mem_exteriorPower {m n : ℕ} {x y : ExtAlg R A} |
| 345 | (hx : x ∈ ⋀[A]^m Ω[A⁄R]) (hy : y ∈ ⋀[A]^n Ω[A⁄R]) : |
| 346 | x * y ∈ ⋀[A]^(m + n) Ω[A⁄R] := by |
| 347 | rw [ExteriorAlgebra.exteriorPower, pow_add] |
| 348 | exact Submodule.mul_mem_mul hx hy |
| 349 | |
| 350 | lemma ι_mem_exteriorPower (ω : Ω[A⁄R]) : |
| 351 | ExteriorAlgebra.ι A ω ∈ ⋀[A]^1 Ω[A⁄R] := by simp |
| 352 | |
| 353 | |
| 354 | lemma snd_phi_mem (ω : Ω[A⁄R]) : snd (phi R A ω) ∈ ⋀[A]^2 Ω[A⁄R] := by |
| 355 | |
| 356 | induction ω using D_induction with |
| 357 | | D a => simp |
| 358 | | zero => simp |
| 359 | | add x y hx hy => rw [map_add, TrivSqZeroExt.snd_add]; exact Submodule.add_mem _ hx hy |
| 360 | | smul a x hx => |
| 361 | rw [snd_phi_smul] |
| 362 | exact Submodule.add_mem _ (Submodule.smul_mem _ _ hx) |
| 363 | (mul_mem_exteriorPower R A (ι_mem_exteriorPower R A _) (ι_mem_exteriorPower R A _)) |
| 364 | |
| 365 | /-- The exterior derivative raises the degree of a form by one. -/ |
| 366 | lemma extDeriv_mem (p : ℕ) {x : ExtAlg R A} (hx : x ∈ ⋀[A]^p Ω[A⁄R]) : |
| 367 | extDeriv R A x ∈ ⋀[A]^(p + 1) Ω[A⁄R] := by |
| 368 | induction p generalizing x with |
| 369 | | zero => |
| 370 | rw [ExteriorAlgebra.exteriorPower, pow_zero, Submodule.one_eq_range] at hx |
| 371 | obtain ⟨a, rfl⟩ := hx |
| 372 | simp |
| 373 | | succ p ih => |
| 374 | rw [ExteriorAlgebra.exteriorPower, pow_succ'] at hx |
| 375 | refine Submodule.mul_induction_on hx ?_ ?_ |
| 376 | · rintro m hm n hn |
| 377 | obtain ⟨ω, rfl⟩ := hm |
| 378 | rw [extDeriv_mul, involute_ι, extDeriv_ι] |
| 379 | refine Submodule.add_mem _ ?_ ?_ |
| 380 | · rw [neg_mul] |
| 381 | have := mul_mem_exteriorPower R A (ι_mem_exteriorPower R A ω) (ih hn) |
| 382 | rw [show 1 + (p + 1) = p + 1 + 1 by omega] at this |
| 383 | exact Submodule.neg_mem _ this |
| 384 | · have := mul_mem_exteriorPower R A (snd_phi_mem R A ω) hn |
| 385 | rwa [show 2 + p = p + 1 + 1 by omega] at this |
| 386 | · intro x y hx hy |
| 387 | rw [map_add] |
| 388 | exact Submodule.add_mem _ hx hy |
| 389 | |
| 390 | /-! ### Differential forms -/ |
| 391 | |
| 392 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. The relative differential |
| 393 | `p`-forms form the module `⋀^p_A Ω_{A/R}`, the `p`-th exterior power of the module of Kähler |
| 394 | differentials. Its elements are sums of expressions `a₀ da₁ ∧ ⋯ ∧ daₚ`. -/ |
| 395 | abbrev Form (p : ℕ) : Type u := ↥(⋀[A]^p Ω[A⁄R]) |
| 396 | |
| 397 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. This `R`-linear exterior |
| 398 | derivative maps relative differential `p`-forms to `(p+1)`-forms. On generators it sends `a₀ da₁ |
| 399 | ∧ ⋯ ∧ daₚ` to `da₀ ∧ da₁ ∧ ⋯ ∧ daₚ`. -/ |
| 400 | def differential (p : ℕ) : Form R A p →ₗ[R] Form R A (p + 1) where |
| 401 | toFun x := ⟨extDeriv R A x, extDeriv_mem R A p x.2⟩ |
| 402 | map_add' _ _ := Subtype.ext (map_add (extDeriv R A) _ _) |
| 403 | map_smul' r _ := Subtype.ext (map_smul (extDeriv R A) r _) |
| 404 | |
| 405 | @[simp] lemma coe_differential (p : ℕ) (x : Form R A p) : |
| 406 | (differential R A p x : ExtAlg R A) = extDeriv R A x := rfl |
| 407 | |
| 408 | lemma extDeriv_smul (a : A) (x : ExtAlg R A) : |
| 409 | extDeriv R A (a • x) = |
| 410 | a • extDeriv R A x + |
| 411 | ExteriorAlgebra.ι A (KaehlerDifferential.D R A a) * x := by |
| 412 | simp [Algebra.smul_def, extDeriv_mul, AlgHom.commutes, extDeriv_algebraMap] |
| 413 | |
| 414 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. For a family `v₀, …, v_{p-1}` |
| 415 | in `A`, this is the relative differential form `dv₀ ∧ ⋯ ∧ dv_{p-1}`. The empty wedge, for `p = |
| 416 | 0`, is the constant zero-form `1`. -/ |
| 417 | def exact (p : ℕ) (v : Fin p → A) : Form R A p := |
| 418 | exteriorPower.ιMulti A p fun i => KaehlerDifferential.D R A (v i) |
| 419 | |
| 420 | @[simp] lemma coe_exact (p : ℕ) (v : Fin p → A) : |
| 421 | (_root_.OAI.Algebra.DeRham.Basic.exact R A p v : ExtAlg R A) = |
| 422 | ExteriorAlgebra.ιMulti A p fun i => KaehlerDifferential.D R A (v i) := rfl |
| 423 | |
| 424 | /-- Wedges of exact forms are closed. -/ |
| 425 | lemma extDeriv_exact (p : ℕ) (v : Fin p → A) : |
| 426 | extDeriv R A (_root_.OAI.Algebra.DeRham.Basic.exact R A p v : ExtAlg R A) = 0 := by |
| 427 | induction p with |
| 428 | | zero => |
| 429 | rw [coe_exact, ExteriorAlgebra.ιMulti_zero_apply, |
| 430 | ← map_one (algebraMap A (ExtAlg R A)), extDeriv_algebraMap] |
| 431 | simp |
| 432 | | succ p ih => |
| 433 | rw [coe_exact, ExteriorAlgebra.ιMulti_succ_apply, extDeriv_mul, involute_ι, |
| 434 | extDeriv_ι, phi_D, TrivSqZeroExt.snd_inl, zero_mul, add_zero] |
| 435 | have : (Matrix.vecTail fun i => KaehlerDifferential.D R A (v i)) = |
| 436 | fun i => KaehlerDifferential.D R A (Matrix.vecTail v i) := rfl |
| 437 | rw [this, ← coe_exact R A p (Matrix.vecTail v), ih (Matrix.vecTail v), mul_zero] |
| 438 | |
| 439 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. For `a₀ ∈ A` and a family `v₀, |
| 440 | …, v_{p-1}` in `A`, this constructs the relative differential `p`-form `a₀ dv₀ ∧ ⋯ ∧ dv_{p-1}` |
| 441 | in `⋀^p_A Ω_{A/R}`. -/ |
| 442 | def mk (p : ℕ) (a₀ : A) (v : Fin p → A) : Form R A p := a₀ • _root_.OAI.Algebra.DeRham.Basic.exact R A p v |
| 443 | |
| 444 | @[simp] lemma coe_mk (p : ℕ) (a₀ : A) (v : Fin p → A) : |
| 445 | (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v : ExtAlg R A) = |
| 446 | a₀ • ExteriorAlgebra.ιMulti A p fun i => KaehlerDifferential.D R A (v i) := rfl |
| 447 | |
| 448 | @[simp] lemma differential_mk (p : ℕ) (a₀ : A) (v : Fin p → A) : |
| 449 | differential R A p (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v) = _root_.OAI.Algebra.DeRham.Basic.mk R A (p + 1) 1 (Fin.cons a₀ v) := by |
| 450 | refine Subtype.ext ?_ |
| 451 | rw [coe_differential, coe_mk, coe_mk, extDeriv_smul, ← coe_exact, extDeriv_exact, |
| 452 | smul_zero, zero_add, one_smul, ExteriorAlgebra.ιMulti_succ_apply] |
| 453 | rfl |
| 454 | |
| 455 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. This `R`-linear map sends `a ∈ |
| 456 | A` to the corresponding degree-zero relative differential form in `⋀^0_A Ω_{A/R}`. -/ |
| 457 | def ofFunction : A →ₗ[R] Form R A 0 where |
| 458 | toFun a := _root_.OAI.Algebra.DeRham.Basic.mk R A 0 a Fin.elim0 |
| 459 | map_add' a b := by simp [_root_.OAI.Algebra.DeRham.Basic.mk, add_smul] |
| 460 | map_smul' r a := by simp [_root_.OAI.Algebra.DeRham.Basic.mk, smul_assoc] |
| 461 | |
| 462 | lemma ofFunction_apply (a : A) : ofFunction R A a = _root_.OAI.Algebra.DeRham.Basic.mk R A 0 a Fin.elim0 := rfl |
| 463 | |
| 464 | /-- Let `R` be a commutative ring and `A` a commutative `R`-algebra. This `R`-linear map sends `r ∈ |
| 465 | R` to the zero-form given by its image in `A` under the algebra structure map. -/ |
| 466 | def ofConstant : R →ₗ[R] Form R A 0 := |
| 467 | (ofFunction R A).comp (Algebra.linearMap R A) |
| 468 | |
| 469 | lemma ofConstant_apply (r : R) : |
| 470 | ofConstant R A r = ofFunction R A (algebraMap R A r) := rfl |
| 471 | |
| 472 | @[simp] lemma differential_ofFunction_algebraMap (r : R) : |
| 473 | differential R A 0 (ofFunction R A (algebraMap R A r)) = 0 := by |
| 474 | refine Subtype.ext ?_ |
| 475 | rw [ofFunction_apply, coe_differential, coe_mk, extDeriv_smul, ← coe_exact, |
| 476 | extDeriv_exact, smul_zero, zero_add] |
| 477 | simp |
| 478 | |
| 479 | @[simp] lemma differential_ofConstant (r : R) : |
| 480 | differential R A 0 (ofConstant R A r) = 0 := by |
| 481 | rw [ofConstant_apply, differential_ofFunction_algebraMap] |
| 482 | |
| 483 | /-! ### Generators -/ |
| 484 | |
| 485 | /-- Exact forms span the differential forms of degree `p` over `A`. -/ |
| 486 | lemma span_exact (p : ℕ) : |
| 487 | Submodule.span A (Set.range fun v : Fin p → A => _root_.OAI.Algebra.DeRham.Basic.exact R A p v) = ⊤ := by |
| 488 | rw [← top_le_iff, ← exteriorPower.ιMulti_span_of_span A p Ω[A⁄R] |
| 489 | (KaehlerDifferential.span_range_derivation R A), Submodule.span_le] |
| 490 | rintro _ ⟨w, hw, rfl⟩ |
| 491 | choose v hv using fun i => hw ⟨i, rfl⟩ |
| 492 | exact Submodule.subset_span ⟨v, congrArg _ (funext hv)⟩ |
| 493 | |
| 494 | /-- Forms `a₀ * d a₁ ∧ ⋯ ∧ d aₚ` span the differential forms of degree `p` over the base ring. -/ |
| 495 | lemma span_mk (p : ℕ) : |
| 496 | Submodule.span R (Set.range fun av : A × (Fin p → A) => _root_.OAI.Algebra.DeRham.Basic.mk R A p av.1 av.2) = ⊤ := by |
| 497 | have key : ∀ x : Form R A p, |
| 498 | x ∈ Submodule.span A (Set.range fun v : Fin p → A => _root_.OAI.Algebra.DeRham.Basic.exact R A p v) → ∀ a : A, |
| 499 | a • x ∈ Submodule.span R (Set.range fun av : A × (Fin p → A) => _root_.OAI.Algebra.DeRham.Basic.mk R A p av.1 av.2) := by |
| 500 | intro x hx |
| 501 | induction hx using Submodule.span_induction with |
| 502 | | mem y hy => obtain ⟨v, rfl⟩ := hy; exact fun a => Submodule.subset_span ⟨(a, v), rfl⟩ |
| 503 | | zero => simp |
| 504 | | add y z _ _ hy hz => |
| 505 | exact fun a => by rw [smul_add]; exact Submodule.add_mem _ (hy a) (hz a) |
| 506 | | smul b y _ hy => exact fun a => by rw [smul_smul]; exact hy _ |
| 507 | exact top_unique fun x _ => by simpa using key x (by rw [span_exact]; trivial) 1 |
| 508 | |
| 509 | /-- Two `R`-linear maps out of degree `p` forms agreeing on the generators are equal. -/ |
| 510 | lemma linearMap_ext {M : Type*} [AddCommGroup M] [Module R M] {p : ℕ} |
| 511 | {F G : Form R A p →ₗ[R] M} (h : ∀ a₀ v, F (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v) = G (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v)) : F = G := |
| 512 | LinearMap.ext_on (span_mk R A p) (by rintro _ ⟨⟨a₀, v⟩, rfl⟩; exact h a₀ v) |
| 513 | |
| 514 | @[simp] lemma mk_smul_coeff (p : ℕ) (r : R) (a₀ : A) (v : Fin p → A) : |
| 515 | _root_.OAI.Algebra.DeRham.Basic.mk R A p (r • a₀) v = r • _root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v := |
| 516 | smul_assoc r a₀ _ |
| 517 | |
| 518 | @[simp] lemma mk_zero_coeff (p : ℕ) (v : Fin p → A) : _root_.OAI.Algebra.DeRham.Basic.mk R A p 0 v = 0 := |
| 519 | zero_smul A _ |
| 520 | |
| 521 | /-- To prove a statement about every differential form of degree `p` it suffices to treat the |
| 522 | generators `a₀ * d v₀ ∧ ... ∧ d vₚ₋₁` and to check closure under zero, sums, and scalars. -/ |
| 523 | @[elab_as_elim] |
| 524 | lemma mk_induction {p : ℕ} {motive : Form R A p → Prop} (x : Form R A p) |
| 525 | (mk : ∀ (a₀ : A) (v : Fin p → A), motive (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v)) |
| 526 | (zero : motive 0) (add : ∀ x y, motive x → motive y → motive (x + y)) |
| 527 | (smul : ∀ (r : R) x, motive x → motive (r • x)) : motive x := by |
| 528 | have hx : x ∈ Submodule.span R |
| 529 | (Set.range fun av : A × (Fin p → A) => _root_.OAI.Algebra.DeRham.Basic.mk R A p av.1 av.2) := by |
| 530 | rw [span_mk]; trivial |
| 531 | induction hx using Submodule.span_induction with |
| 532 | | mem y hy => obtain ⟨⟨a₀, v⟩, rfl⟩ := hy; exact mk a₀ v |
| 533 | | zero => exact zero |
| 534 | | add y z _ _ hy hz => exact add y z hy hz |
| 535 | | smul r y _ hy => exact smul r y hy |
| 536 | |
| 537 | /-! ### Functoriality -/ |
| 538 | |
| 539 | section Tower |
| 540 | |
| 541 | variable (B : Type u) [CommRing B] [Algebra R B] [Algebra A B] [IsScalarTower R A B] |
| 542 | |
| 543 | /-- Let `R → A → B` be a tower of commutative algebras. This `A`-algebra homomorphism `⋀_A Ω_{A/R} → |
| 544 | ⋀_B Ω_{B/R}` sends `a` to its image in `B` and `da` to the differential of that image. -/ |
| 545 | def extAlgMap : ExtAlg R A →ₐ[A] ExtAlg R B := |
| 546 | ExteriorAlgebra.lift A |
| 547 | ⟨((ExteriorAlgebra.ι B).restrictScalars A).comp (KaehlerDifferential.map R R A B), |
| 548 | fun _ => ExteriorAlgebra.ι_sq_zero _⟩ |
| 549 | |
| 550 | @[simp] lemma extAlgMap_ι (ω : Ω[A⁄R]) : |
| 551 | extAlgMap R A B (ExteriorAlgebra.ι A ω) = |
| 552 | ExteriorAlgebra.ι B (KaehlerDifferential.map R R A B ω) := |
| 553 | ExteriorAlgebra.lift_ι_apply A _ _ ω |
| 554 | |
| 555 | @[simp] lemma extAlgMap_algebraMap (a : A) : |
| 556 | extAlgMap R A B (algebraMap A (ExtAlg R A) a) = |
| 557 | algebraMap B (ExtAlg R B) (algebraMap A B a) := by aesop |
| 558 | |
| 559 | @[simp] lemma extAlgMap_algebraMap_base (r : R) : |
| 560 | extAlgMap R A B (algebraMap R (ExtAlg R A) r) = algebraMap R (ExtAlg R B) r := by simp |
| 561 | |
| 562 | |
| 563 | lemma extAlgMap_ιMulti (p : ℕ) (w : Fin p → Ω[A⁄R]) : |
| 564 | |
| 565 | extAlgMap R A B (ExteriorAlgebra.ιMulti A p w) = |
| 566 | ExteriorAlgebra.ιMulti B p fun i => KaehlerDifferential.map R R A B (w i) := by |
| 567 | induction p with |
| 568 | | zero => simp [ExteriorAlgebra.ιMulti_zero_apply] |
| 569 | | succ p ih => |
| 570 | rw [ExteriorAlgebra.ιMulti_succ_apply, map_mul, extAlgMap_ι, |
| 571 | ExteriorAlgebra.ιMulti_succ_apply, ih (Matrix.vecTail w)] |
| 572 | rfl |
| 573 | |
| 574 | lemma extAlgMap_mem (p : ℕ) {x : ExtAlg R A} (hx : x ∈ ⋀[A]^p Ω[A⁄R]) : |
| 575 | extAlgMap R A B x ∈ ⋀[B]^p Ω[B⁄R] := by |
| 576 | induction p generalizing x with |
| 577 | | zero => |
| 578 | rw [ExteriorAlgebra.exteriorPower, pow_zero, Submodule.one_eq_range] at hx |
| 579 | obtain ⟨a, rfl⟩ := hx |
| 580 | rw [ExteriorAlgebra.exteriorPower, pow_zero, Submodule.one_eq_range] |
| 581 | exact ⟨algebraMap A B a, (extAlgMap_algebraMap R A B a).symm⟩ |
| 582 | | succ p ih => |
| 583 | rw [ExteriorAlgebra.exteriorPower, pow_succ'] at hx |
| 584 | refine Submodule.mul_induction_on hx ?_ ?_ |
| 585 | · rintro _ ⟨ω, rfl⟩ n hn |
| 586 | rw [map_mul, extAlgMap_ι] |
| 587 | have := mul_mem_exteriorPower R B |
| 588 | (ι_mem_exteriorPower R B (KaehlerDifferential.map R R A B ω)) (ih hn) |
| 589 | rwa [show 1 + p = p + 1 by omega] at this |
| 590 | · intro x y hx hy |
| 591 | rw [map_add] |
| 592 | exact Submodule.add_mem _ hx hy |
| 593 | |
| 594 | /-- Let `R → A → B` be a tower of commutative algebras. For a natural number `p`, this `R`-linear |
| 595 | map from relative `p`-forms of `A` to those of `B` applies `A → B` to each coefficient and each |
| 596 | function appearing in `a₀ da₁ ∧ ⋯ ∧ daₚ`. -/ |
| 597 | def mapTower (p : ℕ) : Form R A p →ₗ[R] Form R B p where |
| 598 | toFun x := ⟨extAlgMap R A B x, extAlgMap_mem R A B p x.2⟩ |
| 599 | map_add' x y := Subtype.ext (map_add (extAlgMap R A B) _ _) |
| 600 | map_smul' r x := Subtype.ext (by |
| 601 | show extAlgMap R A B (r • (x : ExtAlg R A)) = r • extAlgMap R A B (x : ExtAlg R A) |
| 602 | rw [Algebra.smul_def, map_mul, extAlgMap_algebraMap_base, Algebra.smul_def]) |
| 603 | |
| 604 | @[simp] lemma coe_mapTower (p : ℕ) (x : Form R A p) : |
| 605 | (mapTower R A B p x : ExtAlg R B) = extAlgMap R A B x := rfl |
| 606 | |
| 607 | end Tower |
| 608 | |
| 609 | section AlgHomMap |
| 610 | |
| 611 | variable {A} |
| 612 | variable {B C : Type u} [CommRing B] [CommRing C] [Algebra R B] [Algebra R C] |
| 613 | |
| 614 | /-- Let `A` and `B` be commutative algebras over a commutative ring `R`, and let `f : A → B` be an |
| 615 | `R`-algebra homomorphism. This induced map on relative `p`-forms sends `a₀ da₁ ∧ ⋯ ∧ daₚ` to |
| 616 | `f(a₀) d(f(a₁)) ∧ ⋯ ∧ d(f(aₚ))`. -/ |
| 617 | def map (f : A →ₐ[R] B) (p : ℕ) : Form R A p →ₗ[R] Form R B p := |
| 618 | letI := f.toAlgebra |
| 619 | haveI : IsScalarTower R A B := IsScalarTower.of_algebraMap_eq fun r => (f.commutes r).symm |
| 620 | mapTower R A B p |
| 621 | |
| 622 | @[simp] lemma map_mk (f : A →ₐ[R] B) (p : ℕ) (a₀ : A) (v : Fin p → A) : |
| 623 | _root_.OAI.Algebra.DeRham.Basic.map R f p (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v) = _root_.OAI.Algebra.DeRham.Basic.mk R B p (f a₀) fun i => f (v i) := by |
| 624 | let _ := f.toAlgebra |
| 625 | refine Subtype.ext ?_ |
| 626 | show extAlgMap R A B (_root_.OAI.Algebra.DeRham.Basic.mk R A p a₀ v : ExtAlg R A) = |
| 627 | ((_root_.OAI.Algebra.DeRham.Basic.mk R B p (f a₀) fun i => f (v i) : Form R B p) : ExtAlg R B) |
| 628 | rw [coe_mk, coe_mk, map_smul, extAlgMap_ιMulti] |
| 629 | have hfam : (fun i => KaehlerDifferential.map R R A B (KaehlerDifferential.D R A (v i))) = |
| 630 | fun i => KaehlerDifferential.D R B (f (v i)) := by |
| 631 | funext i |
| 632 | exact KaehlerDifferential.map_D R R A B (v i) |
| 633 | rw [hfam] |
| 634 | exact (algebraMap_smul (R := A) B a₀ _).symm |
| 635 | |
| 636 | @[simp] lemma map_id (p : ℕ) : _root_.OAI.Algebra.DeRham.Basic.map R (AlgHom.id R A) p = LinearMap.id := |
| 637 | linearMap_ext R A fun a₀ v => by simp |
| 638 | |
| 639 | @[simp] lemma map_comp (f : A →ₐ[R] B) (g : B →ₐ[R] C) (p : ℕ) : |
| 640 | _root_.OAI.Algebra.DeRham.Basic.map R (g.comp f) p = (_root_.OAI.Algebra.DeRham.Basic.map R g p).comp (_root_.OAI.Algebra.DeRham.Basic.map R f p) := |
| 641 | linearMap_ext R A fun a₀ v => by simp |
| 642 | |
| 643 | @[simp] lemma map_ofFunction (f : A →ₐ[R] B) (a : A) : |
| 644 | _root_.OAI.Algebra.DeRham.Basic.map R f 0 (ofFunction R A a) = ofFunction R B (f a) := by |
| 645 | rw [ofFunction_apply, map_mk, ofFunction_apply] |
| 646 | congr 1 |
| 647 | exact funext fun i : Fin 0 => i.elim0 |
| 648 | |
| 649 | @[simp] lemma map_ofConstant (f : A →ₐ[R] B) (r : R) : |
| 650 | _root_.OAI.Algebra.DeRham.Basic.map R f 0 (ofConstant R A r) = ofConstant R B r := by |
| 651 | rw [ofConstant_apply, map_ofFunction, f.commutes, ofConstant_apply] |
| 652 | |
| 653 | end AlgHomMap |
| 654 | |
| 655 | end |
| 656 | end |
| 657 | |
| 658 | end |
| 659 | |
| 660 | end OAI.Algebra.DeRham.Basic |