File: Mathlib/RingTheory/Kaehler/Basic.lean

full_name: KaehlerDifferential.ideal
code: /-- The kernel of the multiplication map `S ⊗[R] S →ₐ[R] S`. -/
abbrev KaehlerDifferential.ideal : Ideal (S ⊗[R] S) 
goal: Ideal (TensorProduct R S S)

full_name: KaehlerDifferential.one_smul_sub_smul_one_mem_ideal
code: theorem KaehlerDifferential.one_smul_sub_smul_one_mem_ideal (a : S) :
    (1 : S) ⊗ₜ[R] a - a ⊗ₜ[R] (1 : S) ∈ KaehlerDifferential.ideal R S 
goal: 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ KaehlerDifferential.ideal R S

full_name: Derivation.tensorProductTo
code: /-- For a `R`-derivation `S → M`, this is the map `S ⊗[R] S →ₗ[S] M` sending `s ⊗ₜ t ↦ s • D t`. -/
def Derivation.tensorProductTo (D : Derivation R S M) : S ⊗[R] S →ₗ[S] M 
goal: TensorProduct R S S →ₗ[S] M

full_name: Derivation.tensorProductTo_tmul
code: theorem Derivation.tensorProductTo_tmul (D : Derivation R S M) (s t : S) :
    D.tensorProductTo (s ⊗ₜ t) = s • D t 
goal: D.tensorProductTo (s ⊗ₜ[R] t) = s • D t

full_name: Derivation.tensorProductTo_mul
code: theorem Derivation.tensorProductTo_mul (D : Derivation R S M) (x y : S ⊗[R] S) :
    D.tensorProductTo (x * y) =
      TensorProduct.lmul' (S := S) R x • D.tensorProductTo y +
        TensorProduct.lmul' (S := S) R y • D.tensorProductTo x 
goal: D.tensorProductTo (x * y) =
  (Algebra.TensorProduct.lmul' R) x • D.tensorProductTo y + (Algebra.TensorProduct.lmul' R) y • D.tensorProductTo x

full_name: KaehlerDifferential.submodule_span_range_eq_ideal
code: /-- The kernel of `S ⊗[R] S →ₐ[R] S` is generated by `1 ⊗ s - s ⊗ 1` as a `S`-module. -/
theorem KaehlerDifferential.submodule_span_range_eq_ideal :
    Submodule.span S (Set.range fun s : S => (1 : S) ⊗ₜ[R] s - s ⊗ₜ[R] (1 : S)) =
      (KaehlerDifferential.ideal R S).restrictScalars S 
goal: Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) =
  Submodule.restrictScalars S (KaehlerDifferential.ideal R S)

full_name: KaehlerDifferential.span_range_eq_ideal
code: theorem KaehlerDifferential.span_range_eq_ideal :
    Ideal.span (Set.range fun s : S => (1 : S) ⊗ₜ[R] s - s ⊗ₜ[R] (1 : S)) =
      KaehlerDifferential.ideal R S 
goal: Ideal.span (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) = KaehlerDifferential.ideal R S

full_name: KaehlerDifferential
code: /-- The module of Kähler differentials (Kahler differentials, Kaehler differentials).
This is implemented as `I / I ^ 2` with `I` the kernel of the multiplication map `S ⊗[R] S →ₐ[R] S`.
To view elements as a linear combination of the form `s • D s'`, use
`KaehlerDifferential.tensorProductTo_surjective` and `Derivation.tensorProductTo_tmul`.

We also provide the notation `Ω[S⁄R]` for `KaehlerDifferential R S`.
Note that the slash is `\textfractionsolidus`.
-/
def KaehlerDifferential : Type v 
goal: Type v

full_name: instAddCommGroupKaehlerDifferential
code: instance : AddCommGroup (KaehlerDifferential R S) 
goal: AddCommGroup (Ω[S⁄R])

full_name: KaehlerDifferential.module
code: instance KaehlerDifferential.module : Module (S ⊗[R] S) (KaehlerDifferential R S) 
goal: Module (TensorProduct R S S) (Ω[S⁄R])

full_name: «_aux_Mathlib_RingTheory_Kaehler_Basic___macroRules_termΩ[_⁄_]_1»
code: @[inherit_doc KaehlerDifferential]
notation:100 "Ω[" S "⁄" R "]" => KaehlerDifferential R S
goal: Lean.Macro

full_name: _aux_Mathlib_RingTheory_Kaehler_Basic___unexpand_KaehlerDifferential_1
code: @[inherit_doc KaehlerDifferential]
notation:100 "Ω[" S "⁄" R "]" => KaehlerDifferential R S
goal: Lean.PrettyPrinter.Unexpander

full_name: instNonemptyKaehlerDifferential
code: instance : Nonempty (Ω[S⁄R]) 
goal: Nonempty (Ω[S⁄R])

full_name: KaehlerDifferential.module'
code: instance KaehlerDifferential.module' {R' : Type*} [CommRing R'] [Algebra R' S]
    [SMulCommClass R R' S] :
    Module R' (Ω[S⁄R]) 
goal: Module R' (Ω[S⁄R])

full_name: instIsScalarTowerTensorProductKaehlerDifferential
code: instance : IsScalarTower S (S ⊗[R] S) (Ω[S⁄R]) 
goal: IsScalarTower S (TensorProduct R S S) (Ω[S⁄R])

full_name: KaehlerDifferential.isScalarTower_of_tower
code: instance KaehlerDifferential.isScalarTower_of_tower {R₁ R₂ : Type*} [CommRing R₁] [CommRing R₂]
    [Algebra R₁ S] [Algebra R₂ S] [SMul R₁ R₂]
    [SMulCommClass R R₁ S] [SMulCommClass R R₂ S] [IsScalarTower R₁ R₂ S] :
    IsScalarTower R₁ R₂ (Ω[S⁄R]) 
goal: IsScalarTower R₁ R₂ (Ω[S⁄R])

full_name: KaehlerDifferential.isScalarTower'
code: instance KaehlerDifferential.isScalarTower' : IsScalarTower R (S ⊗[R] S) (Ω[S⁄R]) 
goal: IsScalarTower R (TensorProduct R S S) (Ω[S⁄R])

full_name: KaehlerDifferential.fromIdeal
code: /-- The quotient map `I → Ω[S⁄R]` with `I` being the kernel of `S ⊗[R] S → S`. -/
def KaehlerDifferential.fromIdeal : KaehlerDifferential.ideal R S →ₗ[S ⊗[R] S] Ω[S⁄R] 
goal: ↥(KaehlerDifferential.ideal R S) →ₗ[TensorProduct R S S] Ω[S⁄R]

full_name: KaehlerDifferential.DLinearMap
code: /-- (Implementation) The underlying linear map of the derivation into `Ω[S⁄R]`. -/
def KaehlerDifferential.DLinearMap : S →ₗ[R] Ω[S⁄R] 
goal: S →ₗ[R] Ω[S⁄R]

full_name: KaehlerDifferential.DLinearMap_apply
code: theorem KaehlerDifferential.DLinearMap_apply (s : S) :
    KaehlerDifferential.DLinearMap R S s =
      (KaehlerDifferential.ideal R S).toCotangent
        ⟨1 ⊗ₜ s - s ⊗ₜ 1, KaehlerDifferential.one_smul_sub_smul_one_mem_ideal R s⟩ 
goal: (KaehlerDifferential.DLinearMap R S) s = (KaehlerDifferential.ideal R S).toCotangent ⟨1 ⊗ₜ[R] s - s ⊗ₜ[R] 1, ⋯⟩

full_name: KaehlerDifferential.D
code: /-- The universal derivation into `Ω[S⁄R]`. -/
def KaehlerDifferential.D : Derivation R S (Ω[S⁄R]) 
goal: Derivation R S (Ω[S⁄R])

full_name: KaehlerDifferential.D_apply
code: theorem KaehlerDifferential.D_apply (s : S) :
    KaehlerDifferential.D R S s =
      (KaehlerDifferential.ideal R S).toCotangent
        ⟨1 ⊗ₜ s - s ⊗ₜ 1, KaehlerDifferential.one_smul_sub_smul_one_mem_ideal R s⟩ 
goal: (KaehlerDifferential.D R S) s = (KaehlerDifferential.ideal R S).toCotangent ⟨1 ⊗ₜ[R] s - s ⊗ₜ[R] 1, ⋯⟩

full_name: KaehlerDifferential.span_range_derivation
code: theorem KaehlerDifferential.span_range_derivation :
    Submodule.span S (Set.range <| KaehlerDifferential.D R S) = ⊤ 
goal: Submodule.span S (Set.range ⇑(KaehlerDifferential.D R S)) = ⊤

full_name: KaehlerDifferential.subsingleton_of_surjective
code: /-- `Ω[S⁄R]` is trivial if `R → S` is surjective.
Also see `Algebra.FormallyUnramified.iff_subsingleton_kaehlerDifferential`. -/
lemma KaehlerDifferential.subsingleton_of_surjective (h : Function.Surjective (algebraMap R S)) :
    Subsingleton (Ω[S⁄R]) 
goal: Subsingleton (Ω[S⁄R])

full_name: Derivation.liftKaehlerDifferential
code: /-- The linear map from `Ω[S⁄R]`, associated with a derivation. -/
def Derivation.liftKaehlerDifferential (D : Derivation R S M) : Ω[S⁄R] →ₗ[S] M 
goal: Ω[S⁄R] →ₗ[S] M

full_name: Derivation.liftKaehlerDifferential_apply
code: theorem Derivation.liftKaehlerDifferential_apply (D : Derivation R S M) (x) :
    D.liftKaehlerDifferential ((KaehlerDifferential.ideal R S).toCotangent x) =
      D.tensorProductTo x 
goal: D.liftKaehlerDifferential ((KaehlerDifferential.ideal R S).toCotangent x) = D.tensorProductTo ↑x

full_name: Derivation.liftKaehlerDifferential_comp
code: theorem Derivation.liftKaehlerDifferential_comp (D : Derivation R S M) :
    D.liftKaehlerDifferential.compDer (KaehlerDifferential.D R S) = D 
goal: D.liftKaehlerDifferential.compDer (KaehlerDifferential.D R S) = D

full_name: Derivation.liftKaehlerDifferential_comp_D
code: @[simp]
theorem Derivation.liftKaehlerDifferential_comp_D (D' : Derivation R S M) (x : S) :
    D'.liftKaehlerDifferential (KaehlerDifferential.D R S x) = D' x 
goal: D'.liftKaehlerDifferential ((KaehlerDifferential.D R S) x) = D' x

full_name: Derivation.liftKaehlerDifferential_unique
code: @[ext]
theorem Derivation.liftKaehlerDifferential_unique (f f' : Ω[S⁄R] →ₗ[S] M)
    (hf : f.compDer (KaehlerDifferential.D R S) = f'.compDer (KaehlerDifferential.D R S)) :
    f = f' 
goal: f = f'

full_name: Derivation.liftKaehlerDifferential_D
code: theorem Derivation.liftKaehlerDifferential_D :
    (KaehlerDifferential.D R S).liftKaehlerDifferential = LinearMap.id 
goal: (KaehlerDifferential.D R S).liftKaehlerDifferential = LinearMap.id

full_name: KaehlerDifferential.D_tensorProductTo
code: theorem KaehlerDifferential.D_tensorProductTo (x : KaehlerDifferential.ideal R S) :
    (KaehlerDifferential.D R S).tensorProductTo x =
      (KaehlerDifferential.ideal R S).toCotangent x 
goal: (KaehlerDifferential.D R S).tensorProductTo ↑x = (KaehlerDifferential.ideal R S).toCotangent x

full_name: KaehlerDifferential.tensorProductTo_surjective
code: theorem KaehlerDifferential.tensorProductTo_surjective :
    Function.Surjective (KaehlerDifferential.D R S).tensorProductTo 
goal: Function.Surjective ⇑(KaehlerDifferential.D R S).tensorProductTo

full_name: KaehlerDifferential.linearMapEquivDerivation
code: /-- The `S`-linear maps from `Ω[S⁄R]` to `M` are (`S`-linearly) equivalent to `R`-derivations
from `S` to `M`.  -/
@[simps! symm_apply apply_apply]
def KaehlerDifferential.linearMapEquivDerivation : (Ω[S⁄R] →ₗ[S] M) ≃ₗ[S] Derivation R S M 
goal: (Ω[S⁄R] →ₗ[S] M) ≃ₗ[S] Derivation R S M

full_name: KaehlerDifferential.linearMapEquivDerivation_symm_apply
code: /-- The `S`-linear maps from `Ω[S⁄R]` to `M` are (`S`-linearly) equivalent to `R`-derivations
from `S` to `M`.  -/
@[simps! symm_apply apply_apply]
def KaehlerDifferential.linearMapEquivDerivation : (Ω[S⁄R] →ₗ[S] M) ≃ₗ[S] Derivation R S M 
goal: (KaehlerDifferential.linearMapEquivDerivation R S).symm D = D.liftKaehlerDifferential

full_name: KaehlerDifferential.linearMapEquivDerivation_apply_apply
code: /-- The `S`-linear maps from `Ω[S⁄R]` to `M` are (`S`-linearly) equivalent to `R`-derivations
from `S` to `M`.  -/
@[simps! symm_apply apply_apply]
def KaehlerDifferential.linearMapEquivDerivation : (Ω[S⁄R] →ₗ[S] M) ≃ₗ[S] Derivation R S M 
goal: ∀ (a : S), ((KaehlerDifferential.linearMapEquivDerivation R S) m) a = m ((KaehlerDifferential.D R S) a)

full_name: KaehlerDifferential.quotientCotangentIdealRingEquiv
code: /-- The quotient ring of `S ⊗ S ⧸ J ^ 2` by `Ω[S⁄R]` is isomorphic to `S`. -/
def KaehlerDifferential.quotientCotangentIdealRingEquiv :
    (S ⊗ S ⧸ KaehlerDifferential.ideal R S ^ 2) ⧸ (KaehlerDifferential.ideal R S).cotangentIdeal ≃+*
      S 
goal: (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2) ⧸ (KaehlerDifferential.ideal R S).cotangentIdeal ≃+* S

full_name: KaehlerDifferential.quotientCotangentIdeal
code: /-- The quotient ring of `S ⊗ S ⧸ J ^ 2` by `Ω[S⁄R]` is isomorphic to `S` as an `S`-algebra. -/
def KaehlerDifferential.quotientCotangentIdeal :
    ((S ⊗ S ⧸ KaehlerDifferential.ideal R S ^ 2) ⧸
        (KaehlerDifferential.ideal R S).cotangentIdeal) ≃ₐ[S] S 
goal: ((TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2) ⧸ (KaehlerDifferential.ideal R S).cotangentIdeal) ≃ₐ[S] S

full_name: KaehlerDifferential.End_equiv_aux
code: theorem KaehlerDifferential.End_equiv_aux (f : S →ₐ[R] S ⊗ S ⧸ KaehlerDifferential.ideal R S ^ 2) :
    (Ideal.Quotient.mkₐ R (KaehlerDifferential.ideal R S).cotangentIdeal).comp f =
        IsScalarTower.toAlgHom R S _ ↔
      (TensorProduct.lmul' R : S ⊗[R] S →ₐ[R] S).kerSquareLift.comp f = AlgHom.id R S 
goal: (Ideal.Quotient.mkₐ R (KaehlerDifferential.ideal R S).cotangentIdeal).comp f =
    IsScalarTower.toAlgHom R S
      ((TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2) ⧸ (KaehlerDifferential.ideal R S).cotangentIdeal) ↔
  (Algebra.TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R S

full_name: smul_SSmod_SSmod
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
local instance smul_SSmod_SSmod : SMul (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2)
    (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2) 
goal: SMul (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2) (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)

full_name: isScalarTower_S_right
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
@[nolint defLemma]
local instance isScalarTower_S_right :
    IsScalarTower S (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2)
      (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2) 
goal: IsScalarTower S (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)
  (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)

full_name: isScalarTower_R_right
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
@[nolint defLemma]
local instance isScalarTower_R_right :
    IsScalarTower R (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2)
      (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2) 
goal: IsScalarTower R (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)
  (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)

full_name: isScalarTower_SS_right
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
@[nolint defLemma]
local instance isScalarTower_SS_right : IsScalarTower (S ⊗[R] S)
    (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2) (S ⊗[R] S ⧸ KaehlerDifferential.ideal R S ^ 2) 
goal: IsScalarTower (TensorProduct R S S) (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)
  (TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2)

full_name: instS
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
local instance instS : Module S (KaehlerDifferential.ideal R S).cotangentIdeal 
goal: Module S ↥(KaehlerDifferential.ideal R S).cotangentIdeal

full_name: instR
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
local instance instR : Module R (KaehlerDifferential.ideal R S).cotangentIdeal 
goal: Module R ↥(KaehlerDifferential.ideal R S).cotangentIdeal

full_name: instSS
code: /-- A shortcut instance to prevent timing out. Hopefully to be removed in the future. -/
local instance instSS : Module (S ⊗[R] S) (KaehlerDifferential.ideal R S).cotangentIdeal 
goal: Module (TensorProduct R S S) ↥(KaehlerDifferential.ideal R S).cotangentIdeal

full_name: KaehlerDifferential.endEquivDerivation'
code: /-- Derivations into `Ω[S⁄R]` is equivalent to derivations
into `(KaehlerDifferential.ideal R S).cotangentIdeal`. -/
noncomputable def KaehlerDifferential.endEquivDerivation' :
    Derivation R S (Ω[S⁄R]) ≃ₗ[R] Derivation R S (ideal R S).cotangentIdeal 
goal: Derivation R S (Ω[S⁄R]) ≃ₗ[R] Derivation R S ↥(KaehlerDifferential.ideal R S).cotangentIdeal

full_name: KaehlerDifferential.endEquivAuxEquiv
code: /-- (Implementation) An `Equiv` version of `KaehlerDifferential.End_equiv_aux`.
Used in `KaehlerDifferential.endEquiv`. -/
def KaehlerDifferential.endEquivAuxEquiv :
    { f //
        (Ideal.Quotient.mkₐ R (KaehlerDifferential.ideal R S).cotangentIdeal).comp f =
          IsScalarTower.toAlgHom R S _ } ≃
      { f // (TensorProduct.lmul' R : S ⊗[R] S →ₐ[R] S).kerSquareLift.comp f = AlgHom.id R S } 
goal: { f //
    (Ideal.Quotient.mkₐ R (KaehlerDifferential.ideal R S).cotangentIdeal).comp f =
      IsScalarTower.toAlgHom R S
        ((TensorProduct R S S ⧸ KaehlerDifferential.ideal R S ^ 2) ⧸ (KaehlerDifferential.ideal R S).cotangentIdeal) } ≃
  { f // (Algebra.TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R S }

full_name: KaehlerDifferential.endEquiv
code: /--
The endomorphisms of `Ω[S⁄R]` corresponds to sections of the surjection `S ⊗[R] S ⧸ J ^ 2 →ₐ[R] S`,
with `J` being the kernel of the multiplication map `S ⊗[R] S →ₐ[R] S`.
-/
noncomputable def KaehlerDifferential.endEquiv :
    Module.End S (Ω[S⁄R]) ≃
      { f // (TensorProduct.lmul' R : S ⊗[R] S →ₐ[R] S).kerSquareLift.comp f = AlgHom.id R S } 
goal: Module.End S (Ω[S⁄R]) ≃ { f // (Algebra.TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R S }

full_name: KaehlerDifferential.ideal_fg
code: theorem KaehlerDifferential.ideal_fg [EssFiniteType R S] :
    (KaehlerDifferential.ideal R S).FG 
goal: (KaehlerDifferential.ideal R S).FG

full_name: KaehlerDifferential.finite
code: instance KaehlerDifferential.finite [EssFiniteType R S] :
    Module.Finite S (Ω[S⁄R]) 
goal: Module.Finite S (Ω[S⁄R])

full_name: KaehlerDifferential.kerTotal
code: /-- The `S`-submodule of `S →₀ S` (the direct sum of copies of `S` indexed by `S`) generated by
the relations:
1. `dx + dy = d(x + y)`
2. `x dy + y dx = d(x * y)`
3. `dr = 0` for `r ∈ R`
where `db` is the unit in the copy of `S` with index `b`.

This is the kernel of the surjection `Finsupp.total S Ω[S⁄R] S (KaehlerDifferential.D R S)`.
See `KaehlerDifferential.kerTotal_eq` and `KaehlerDifferential.total_surjective`.
-/
noncomputable def KaehlerDifferential.kerTotal : Submodule S (S →₀ S) 
goal: Submodule S (S →₀ S)

full_name: «_aux_Mathlib_RingTheory_Kaehler_Basic___macroRules_term_𝖣__1»
code: local notation3 x "𝖣" y => DFunLike.coe (KaehlerDifferential.kerTotal R S).mkQ (single y x)
goal: Lean.Macro

full_name: KaehlerDifferential.kerTotal_mkQ_single_add
code: theorem KaehlerDifferential.kerTotal_mkQ_single_add (x y z) : (z𝖣x + y) = (z𝖣x) + z𝖣y 
goal: (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single (x + y) z) =
  (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single x z) +
    (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single y z)

full_name: KaehlerDifferential.kerTotal_mkQ_single_mul
code: theorem KaehlerDifferential.kerTotal_mkQ_single_mul (x y z) :
    (z𝖣x * y) = ((z * x)𝖣y) + (z * y)𝖣x 
goal: (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single (x * y) z) =
  (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single y (z * x)) +
    (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single x (z * y))

full_name: KaehlerDifferential.kerTotal_mkQ_single_algebraMap
code: theorem KaehlerDifferential.kerTotal_mkQ_single_algebraMap (x y) : (y𝖣algebraMap R S x) = 0 
goal: (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single ((algebraMap R S) x) y) = 0

full_name: KaehlerDifferential.kerTotal_mkQ_single_algebraMap_one
code: theorem KaehlerDifferential.kerTotal_mkQ_single_algebraMap_one (x) : (x𝖣1) = 0 
goal: (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single 1 x) = 0

full_name: KaehlerDifferential.kerTotal_mkQ_single_smul
code: theorem KaehlerDifferential.kerTotal_mkQ_single_smul (r : R) (x y) : (y𝖣r • x) = r • y𝖣x 
goal: (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single (r • x) y) =
  r • (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single x y)

full_name: KaehlerDifferential.derivationQuotKerTotal
code: /-- The (universal) derivation into `(S →₀ S) ⧸ KaehlerDifferential.kerTotal R S`. -/
noncomputable def KaehlerDifferential.derivationQuotKerTotal :
    Derivation R S ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) 
goal: Derivation R S ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S)

full_name: KaehlerDifferential.derivationQuotKerTotal_apply
code: theorem KaehlerDifferential.derivationQuotKerTotal_apply (x) :
    KaehlerDifferential.derivationQuotKerTotal R S x = 1𝖣x 
goal: (KaehlerDifferential.derivationQuotKerTotal R S) x = (KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single x 1)

full_name: KaehlerDifferential.derivationQuotKerTotal_lift_comp_total
code: theorem KaehlerDifferential.derivationQuotKerTotal_lift_comp_total :
    (KaehlerDifferential.derivationQuotKerTotal R S).liftKaehlerDifferential.comp
        (Finsupp.total S (Ω[S⁄R]) S (KaehlerDifferential.D R S)) =
      Submodule.mkQ _ 
goal: (KaehlerDifferential.derivationQuotKerTotal R S).liftKaehlerDifferential ∘ₗ
    Finsupp.total S (Ω[S⁄R]) S ⇑(KaehlerDifferential.D R S) =
  (KaehlerDifferential.kerTotal R S).mkQ

full_name: KaehlerDifferential.kerTotal_eq
code: theorem KaehlerDifferential.kerTotal_eq :
    LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S (KaehlerDifferential.D R S)) =
      KaehlerDifferential.kerTotal R S 
goal: LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ⇑(KaehlerDifferential.D R S)) = KaehlerDifferential.kerTotal R S

full_name: KaehlerDifferential.total_surjective
code: theorem KaehlerDifferential.total_surjective :
    Function.Surjective (Finsupp.total S (Ω[S⁄R]) S (KaehlerDifferential.D R S)) 
goal: Function.Surjective ⇑(Finsupp.total S (Ω[S⁄R]) S ⇑(KaehlerDifferential.D R S))

full_name: KaehlerDifferential.quotKerTotalEquiv_symm_apply
code: /-- `Ω[S⁄R]` is isomorphic to `S` copies of `S` with kernel `KaehlerDifferential.kerTotal`. -/
@[simps!]
noncomputable def KaehlerDifferential.quotKerTotalEquiv :
    ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) ≃ₗ[S] Ω[S⁄R] 
goal: (KaehlerDifferential.quotKerTotalEquiv R S).symm a =
  (KaehlerDifferential.derivationQuotKerTotal R S).liftKaehlerDifferential a

full_name: KaehlerDifferential.quotKerTotalEquiv
code: /-- `Ω[S⁄R]` is isomorphic to `S` copies of `S` with kernel `KaehlerDifferential.kerTotal`. -/
@[simps!]
noncomputable def KaehlerDifferential.quotKerTotalEquiv :
    ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) ≃ₗ[S] Ω[S⁄R] 
goal: ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) ≃ₗ[S] Ω[S⁄R]

full_name: KaehlerDifferential.quotKerTotalEquiv_apply
code: /-- `Ω[S⁄R]` is isomorphic to `S` copies of `S` with kernel `KaehlerDifferential.kerTotal`. -/
@[simps!]
noncomputable def KaehlerDifferential.quotKerTotalEquiv :
    ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) ≃ₗ[S] Ω[S⁄R] 
goal: ∀ (a : (S →₀ S) ⧸ (KaehlerDifferential.kerTotal R S).toAddSubgroup),
  (KaehlerDifferential.quotKerTotalEquiv R S) a =
    (QuotientAddGroup.lift (KaehlerDifferential.kerTotal R S).toAddSubgroup
        (Finsupp.total S (Ω[S⁄R]) S ⇑(KaehlerDifferential.D R S)).toAddMonoidHom ⋯)
      a

full_name: KaehlerDifferential.quotKerTotalEquiv_symm_comp_D
code: theorem KaehlerDifferential.quotKerTotalEquiv_symm_comp_D :
    (KaehlerDifferential.quotKerTotalEquiv R S).symm.toLinearMap.compDer
        (KaehlerDifferential.D R S) =
      KaehlerDifferential.derivationQuotKerTotal R S 
goal: (↑(KaehlerDifferential.quotKerTotalEquiv R S).symm).compDer (KaehlerDifferential.D R S) =
  KaehlerDifferential.derivationQuotKerTotal R S

full_name: termFinsupp_map._@.Mathlib.RingTheory.Kaehler.Basic._hyg.10094
code: macro "finsupp_map" : term =>
  `((Finsupp.mapRange.linearMap (Algebra.linearMap A B)).comp
    (Finsupp.lmapDomain A A (algebraMap A B)))
goal: Lean.ParserDescr

full_name: _aux_Mathlib_RingTheory_Kaehler_Basic___macroRules_termFinsupp_map_1
code: macro "finsupp_map" : term =>
  `((Finsupp.mapRange.linearMap (Algebra.linearMap A B)).comp
    (Finsupp.lmapDomain A A (algebraMap A B)))
goal: Lean.Macro

full_name: KaehlerDifferential.kerTotal_map
code: /--
Given the commutative diagram
```
A --→ B
↑     ↑
|     |
R --→ S
```
The kernel of the presentation `⊕ₓ B dx ↠ Ω_{B/S}` is spanned by the image of the
kernel of `⊕ₓ A dx ↠ Ω_{A/R}` and all `ds` with `s : S`.
See `kerTotal_map'` for the special case where `R = S`.
-/
theorem KaehlerDifferential.kerTotal_map (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A).map finsupp_map ⊔
        Submodule.span A (Set.range fun x : S => .single (algebraMap S B x) (1 : B)) =
      (KaehlerDifferential.kerTotal S B).restrictScalars _ 
goal: Submodule.map (Finsupp.mapRange.linearMap (Algebra.linearMap A B) ∘ₗ Finsupp.lmapDomain A A ⇑(algebraMap A B))
      (KaehlerDifferential.kerTotal R A) ⊔
    Submodule.span A (Set.range fun x => Finsupp.single ((algebraMap S B) x) 1) =
  Submodule.restrictScalars A (KaehlerDifferential.kerTotal S B)

full_name: KaehlerDifferential.kerTotal_map'
code: /--
This is a special case of `kerTotal_map` where `R = S`.
The kernel of the presentation `⊕ₓ B dx ↠ Ω_{B/R}` is spanned by the image of the
kernel of `⊕ₓ A dx ↠ Ω_{A/R}` and all `da` with `a : A`.
-/
theorem KaehlerDifferential.kerTotal_map' (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A ⊔
      Submodule.span A (Set.range fun x ↦ .single (algebraMap R A x) 1)).map finsupp_map =
      (KaehlerDifferential.kerTotal R B).restrictScalars _ 
goal: Submodule.map (Finsupp.mapRange.linearMap (Algebra.linearMap A B) ∘ₗ Finsupp.lmapDomain A A ⇑(algebraMap A B))
    (KaehlerDifferential.kerTotal R A ⊔ Submodule.span A (Set.range fun x => Finsupp.single ((algebraMap R A) x) 1)) =
  Submodule.restrictScalars A (KaehlerDifferential.kerTotal R B)

full_name: KaehlerDifferential.map
code: /-- The map `Ω[A⁄R] →ₗ[A] Ω[B⁄S]` given a square
```
A --→ B
↑     ↑
|     |
R --→ S
```
-/
def KaehlerDifferential.map : Ω[A⁄R] →ₗ[A] Ω[B⁄S] 
goal: Ω[A⁄R] →ₗ[A] Ω[B⁄S]

full_name: KaehlerDifferential.map_compDer
code: theorem KaehlerDifferential.map_compDer :
    (KaehlerDifferential.map R S A B).compDer (KaehlerDifferential.D R A) =
      ((KaehlerDifferential.D S B).restrictScalars R).compAlgebraMap A 
goal: (KaehlerDifferential.map R S A B).compDer (KaehlerDifferential.D R A) =
  Derivation.compAlgebraMap A (Derivation.restrictScalars R (KaehlerDifferential.D S B))

full_name: KaehlerDifferential.map_D
code: @[simp]
theorem KaehlerDifferential.map_D (x : A) :
    KaehlerDifferential.map R S A B (KaehlerDifferential.D R A x) =
      KaehlerDifferential.D S B (algebraMap A B x) 
goal: (KaehlerDifferential.map R S A B) ((KaehlerDifferential.D R A) x) = (KaehlerDifferential.D S B) ((algebraMap A B) x)

full_name: KaehlerDifferential.ker_map
code: theorem KaehlerDifferential.ker_map :
    LinearMap.ker (KaehlerDifferential.map R S A B) =
      (((kerTotal S B).restrictScalars A).comap finsupp_map).map
        (Finsupp.total A (Ω[A⁄R]) A (D R A)) 
goal: LinearMap.ker (KaehlerDifferential.map R S A B) =
  Submodule.map (Finsupp.total A (Ω[A⁄R]) A ⇑(KaehlerDifferential.D R A))
    (Submodule.comap (Finsupp.mapRange.linearMap (Algebra.linearMap A B) ∘ₗ Finsupp.lmapDomain A A ⇑(algebraMap A B))
      (Submodule.restrictScalars A (KaehlerDifferential.kerTotal S B)))

full_name: KaehlerDifferential.ker_map_of_surjective
code: lemma KaehlerDifferential.ker_map_of_surjective (h : Function.Surjective (algebraMap A B)) :
    LinearMap.ker (map R R A B) =
      (LinearMap.ker finsupp_map).map (Finsupp.total A _ A (D R A)) 
goal: LinearMap.ker (KaehlerDifferential.map R R A B) =
  Submodule.map (Finsupp.total A (Ω[A⁄R]) A ⇑(KaehlerDifferential.D R A))
    (LinearMap.ker (Finsupp.mapRange.linearMap (Algebra.linearMap A B) ∘ₗ Finsupp.lmapDomain A A ⇑(algebraMap A B)))

full_name: KaehlerDifferential.map_surjective_of_surjective
code: theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B) 
goal: Function.Surjective ⇑(KaehlerDifferential.map R S A B)

full_name: KaehlerDifferential.map_surjective
code: theorem KaehlerDifferential.map_surjective :
    Function.Surjective (KaehlerDifferential.map R S B B) 
goal: Function.Surjective ⇑(KaehlerDifferential.map R S B B)

full_name: KaehlerDifferential.mapBaseChange
code: /-- The lift of the map `Ω[A⁄R] →ₗ[A] Ω[B⁄R]` to the base change along `A → B`.
This is the first map in the exact sequence `B ⊗[A] Ω[A⁄R] → Ω[B⁄R] → Ω[B⁄A] → 0`. -/
noncomputable def KaehlerDifferential.mapBaseChange : B ⊗[A] Ω[A⁄R] →ₗ[B] Ω[B⁄R] 
goal: TensorProduct A B (Ω[A⁄R]) →ₗ[B] Ω[B⁄R]

full_name: KaehlerDifferential.mapBaseChange_tmul
code: @[simp]
theorem KaehlerDifferential.mapBaseChange_tmul (x : B) (y : Ω[A⁄R]) :
    KaehlerDifferential.mapBaseChange R A B (x ⊗ₜ y) = x • KaehlerDifferential.map R R A B y 
goal: (KaehlerDifferential.mapBaseChange R A B) (x ⊗ₜ[A] y) = x • (KaehlerDifferential.map R R A B) y

full_name: KaehlerDifferential.range_mapBaseChange
code: lemma KaehlerDifferential.range_mapBaseChange :
    LinearMap.range (mapBaseChange R A B) = LinearMap.ker (map R A B B) 
goal: LinearMap.range (KaehlerDifferential.mapBaseChange R A B) = LinearMap.ker (KaehlerDifferential.map R A B B)

full_name: KaehlerDifferential.exact_mapBaseChange_map
code: /-- The sequence `B ⊗[A] Ω[A⁄R] → Ω[B⁄R] → Ω[B⁄A] → 0` is exact.
Also see `KaehlerDifferential.map_surjective`. -/
lemma KaehlerDifferential.exact_mapBaseChange_map :
    Function.Exact (mapBaseChange R A B) (map R A B B) 
goal: Function.Exact ⇑(KaehlerDifferential.mapBaseChange R A B) ⇑(KaehlerDifferential.map R A B B)

full_name: KaehlerDifferential.kerToTensor
code: /-- The map `I → B ⊗[A] B ⊗[A] Ω[A⁄R]` where `I = ker(A → B)`. -/
@[simps]
noncomputable
def KaehlerDifferential.kerToTensor :
    RingHom.ker (algebraMap A B) →ₗ[A] B ⊗[A] Ω[A⁄R] 
goal: ↥(RingHom.ker (algebraMap A B)) →ₗ[A] TensorProduct A B (Ω[A⁄R])

full_name: KaehlerDifferential.kerToTensor_apply
code: /-- The map `I → B ⊗[A] B ⊗[A] Ω[A⁄R]` where `I = ker(A → B)`. -/
@[simps]
noncomputable
def KaehlerDifferential.kerToTensor :
    RingHom.ker (algebraMap A B) →ₗ[A] B ⊗[A] Ω[A⁄R] 
goal: (KaehlerDifferential.kerToTensor R A B) x = 1 ⊗ₜ[A] (KaehlerDifferential.D R A) ↑x

full_name: KaehlerDifferential.kerCotangentToTensor
code: /-- The map `I/I² → B ⊗[A] B ⊗[A] Ω[A⁄R]` where `I = ker(A → B)`. -/
noncomputable
def KaehlerDifferential.kerCotangentToTensor :
    (RingHom.ker (algebraMap A B)).Cotangent →ₗ[A] B ⊗[A] Ω[A⁄R] 
goal: (RingHom.ker (algebraMap A B)).Cotangent →ₗ[A] TensorProduct A B (Ω[A⁄R])

full_name: KaehlerDifferential.kerCotangentToTensor_toCotangent
code: @[simp]
lemma KaehlerDifferential.kerCotangentToTensor_toCotangent (x) :
    kerCotangentToTensor R A B (Ideal.toCotangent _ x) = 1 ⊗ₜ D _ _ x.1 
goal: (KaehlerDifferential.kerCotangentToTensor R A B) ((RingHom.ker (algebraMap A B)).toCotangent x) =
  1 ⊗ₜ[A] (KaehlerDifferential.D R A) ↑x

full_name: KaehlerDifferential.range_kerCotangentToTensor
code: theorem KaehlerDifferential.range_kerCotangentToTensor
    (h : Function.Surjective (algebraMap A B)) :
    LinearMap.range (kerCotangentToTensor R A B) =
      (LinearMap.ker (KaehlerDifferential.mapBaseChange R A B)).restrictScalars A 
goal: LinearMap.range (KaehlerDifferential.kerCotangentToTensor R A B) =
  Submodule.restrictScalars A (LinearMap.ker (KaehlerDifferential.mapBaseChange R A B))

full_name: KaehlerDifferential.exact_kerCotangentToTensor_mapBaseChange
code: theorem KaehlerDifferential.exact_kerCotangentToTensor_mapBaseChange
    (h : Function.Surjective (algebraMap A B)) :
    Function.Exact (kerCotangentToTensor R A B) (KaehlerDifferential.mapBaseChange R A B) 
goal: Function.Exact ⇑(KaehlerDifferential.kerCotangentToTensor R A B) ⇑(KaehlerDifferential.mapBaseChange R A B)

full_name: KaehlerDifferential.mapBaseChange_surjective
code: lemma KaehlerDifferential.mapBaseChange_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.mapBaseChange R A B) 
goal: Function.Surjective ⇑(KaehlerDifferential.mapBaseChange R A B)