-- Mathlib/RingTheory/Unramified/Basic.lean
theorem iff_comp_injective :
    FormallyUnramified R A ↔
      ∀ ⦃B : Type u⦄ [CommRing B],
        ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥),
          Function.Injective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I)

Proof state:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a.refine_1
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom ^ 2 = ⊥

Tactic:
rw [AlgHom.ker_kerSquareLift]

Result:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a.refine_1
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ (RingHom.ker (TensorProduct.lmul' R).toRingHom).cotangentIdeal ^ 2 = ⊥

Proof state:
case mpr
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
⊢ FormallyUnramified R A

Tactic:
constructor

Result:
case mpr.subsingleton_kaehlerDifferential
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
⊢ Subsingleton (Ω[A⁄R])

Proof state:
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ FormallyUnramified R A ↔
    ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
      I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp

Tactic:
constructor

Result:
case mp
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ FormallyUnramified R A →
    ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
      I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp

case mpr
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ (∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
      I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp) →
    FormallyUnramified R A

Proof state:
case mp
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ FormallyUnramified R A →
    ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
      I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp

Tactic:
intros

Result:
case mp
R : Type v
inst✝⁴ : CommRing R
A : Type u
inst✝³ : CommRing A
inst✝² : Algebra R A
a✝ : FormallyUnramified R A
B✝ : Type u
inst✝¹ : CommRing B✝
inst✝ : Algebra R B✝
I✝ : Ideal B✝
x✝ : I✝ ^ 2 = ⊥
⊢ Function.Injective (Ideal.Quotient.mkₐ R I✝).comp

Proof state:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ f₁ = f₂

Tactic:
ext1

Result:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ ↑f₁ = ↑f₂

Proof state:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ ↑f₁ = ↑f₂

Tactic:
refine H
  (RingHom.ker (TensorProduct.lmul' R (S := A)).kerSquareLift.toRingHom) ?_ ?_

Result:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a.refine_1
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom ^ 2 = ⊥

case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a.refine_2
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ (Ideal.Quotient.mkₐ R (RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom)).comp ↑f₁ =
    (Ideal.Quotient.mkₐ R (RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom)).comp ↑f₂

Proof state:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a.refine_2
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
⊢ (Ideal.Quotient.mkₐ R (RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom)).comp ↑f₁ =
    (Ideal.Quotient.mkₐ R (RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom)).comp ↑f₂

Tactic:
ext x

Result:
case mpr.subsingleton_kaehlerDifferential.mk.intro.intro.a.refine_2.H
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
h : Nontrivial (Ω[A⁄R])
f₁ f₂ : { f // (TensorProduct.lmul' R).kerSquareLift.comp f = AlgHom.id R A }
e : f₁ ≠ f₂
x : A
⊢ ((Ideal.Quotient.mkₐ R (RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom)).comp ↑f₁) x =
    ((Ideal.Quotient.mkₐ R (RingHom.ker (TensorProduct.lmul' R).kerSquareLift.toRingHom)).comp ↑f₂) x

Proof state:
case mpr
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ (∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
      I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp) →
    FormallyUnramified R A

Tactic:
intro H

Result:
case mpr
R : Type v
inst✝² : CommRing R
A : Type u
inst✝¹ : CommRing A
inst✝ : Algebra R A
H :
  ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
⊢ FormallyUnramified R A

Proof state:
case mp
R : Type v
inst✝⁴ : CommRing R
A : Type u
inst✝³ : CommRing A
inst✝² : Algebra R A
a✝ : FormallyUnramified R A
B✝ : Type u
inst✝¹ : CommRing B✝
inst✝ : Algebra R B✝
I✝ : Ideal B✝
x✝ : I✝ ^ 2 = ⊥
⊢ Function.Injective (Ideal.Quotient.mkₐ R I✝).comp

Tactic:
exact comp_injective _ ‹_›

Result:
no goals