Theorem: Algebra.FormallySmooth.of_split
File: Mathlib/RingTheory/Smooth/Basic.lean

Proof steps:
state_before: R S : Type u
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
P A : Type u
inst✝⁴ : CommRing A
inst✝³ : Algebra R A
inst✝² : CommRing P
inst✝¹ : Algebra R P
I : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝ : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
⊢ FormallySmooth R A
state_after: case comp_surjective
R S : Type u
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
P A : Type u
inst✝⁴ : CommRing A
inst✝³ : Algebra R A
inst✝² : CommRing P
inst✝¹ : Algebra R P
I : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝ : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
⊢ ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Surjective (Ideal.Quotient.mkₐ R I).comp
tactic: constructor
state_before: case comp_surjective
R S : Type u
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
P A : Type u
inst✝⁴ : CommRing A
inst✝³ : Algebra R A
inst✝² : CommRing P
inst✝¹ : Algebra R P
I : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝ : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
⊢ ∀ ⦃B : Type u⦄ [inst : CommRing B] [inst_1 : Algebra R B] (I : Ideal B),
    I ^ 2 = ⊥ → Function.Surjective (Ideal.Quotient.mkₐ R I).comp
state_after: case comp_surjective
R S : Type u
inst✝⁸ : CommRing R
inst✝⁷ : CommSemiring S
P A : Type u
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : CommRing P
inst✝³ : Algebra R P
I✝ : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝² : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
i : A →ₐ[R] C ⧸ I
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = i
tactic: intro C _ _ I hI i
state_before: case comp_surjective
R S : Type u
inst✝⁸ : CommRing R
inst✝⁷ : CommSemiring S
P A : Type u
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : CommRing P
inst✝³ : Algebra R P
I✝ : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝² : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
i : A →ₐ[R] C ⧸ I
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = i
state_after: case comp_surjective
R S : Type u
inst✝⁸ : CommRing R
inst✝⁷ : CommSemiring S
P A : Type u
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : CommRing P
inst✝³ : Algebra R P
I✝ : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝² : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
i : A →ₐ[R] C ⧸ I
l : P ⧸ RingHom.ker f.toRingHom ^ 2 →ₐ[R] C :=
  Ideal.Quotient.liftₐ (RingHom.ker f.toRingHom ^ 2) (lift I ⋯ (i.comp f)) ⋯
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = i
tactic: let l : P ⧸ (RingHom.ker f.toRingHom) ^ 2 →ₐ[R] C := by
    refine Ideal.Quotient.liftₐ _ (FormallySmooth.lift I ⟨2, hI⟩ (i.comp f)) ?_
    have : RingHom.ker f ≤ I.comap (FormallySmooth.lift I ⟨2, hI⟩ (i.comp f)) := by
      rintro x (hx : f x = 0)
      have : _ = i (f x) := (FormallySmooth.mk_lift I ⟨2, hI⟩ (i.comp f) x : _)
      rwa [hx, map_zero, ← Ideal.Quotient.mk_eq_mk, Submodule.Quotient.mk_eq_zero] at this
    intro x hx
    have := (Ideal.pow_right_mono this 2).trans (Ideal.le_comap_pow _ 2) hx
    rwa [hI] at this
state_before: case comp_surjective
R S : Type u
inst✝⁸ : CommRing R
inst✝⁷ : CommSemiring S
P A : Type u
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : CommRing P
inst✝³ : Algebra R P
I✝ : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝² : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
i : A →ₐ[R] C ⧸ I
l : P ⧸ RingHom.ker f.toRingHom ^ 2 →ₐ[R] C :=
  Ideal.Quotient.liftₐ (RingHom.ker f.toRingHom ^ 2) (lift I ⋯ (i.comp f)) ⋯
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = i
state_after: case comp_surjective
R S : Type u
inst✝⁸ : CommRing R
inst✝⁷ : CommSemiring S
P A : Type u
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : CommRing P
inst✝³ : Algebra R P
I✝ : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝² : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
i : A →ₐ[R] C ⧸ I
l : P ⧸ RingHom.ker f.toRingHom ^ 2 →ₐ[R] C :=
  Ideal.Quotient.liftₐ (RingHom.ker f.toRingHom ^ 2) (lift I ⋯ (i.comp f)) ⋯
this : i.comp f.kerSquareLift = (Ideal.Quotient.mkₐ R I).comp l
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = i
tactic: have : i.comp f.kerSquareLift = (Ideal.Quotient.mkₐ R _).comp l := by
    apply AlgHom.coe_ringHom_injective
    apply Ideal.Quotient.ringHom_ext
    ext x
    exact (FormallySmooth.mk_lift I ⟨2, hI⟩ (i.comp f) x).symm
state_before: case comp_surjective
R S : Type u
inst✝⁸ : CommRing R
inst✝⁷ : CommSemiring S
P A : Type u
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : CommRing P
inst✝³ : Algebra R P
I✝ : Ideal P
f : P →ₐ[R] A
hf : Function.Surjective ⇑f
inst✝² : FormallySmooth R P
g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2
hg : f.kerSquareLift.comp g = AlgHom.id R A
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
i : A →ₐ[R] C ⧸ I
l : P ⧸ RingHom.ker f.toRingHom ^ 2 →ₐ[R] C :=
  Ideal.Quotient.liftₐ (RingHom.ker f.toRingHom ^ 2) (lift I ⋯ (i.comp f)) ⋯
this : i.comp f.kerSquareLift = (Ideal.Quotient.mkₐ R I).comp l
⊢ ∃ a, (Ideal.Quotient.mkₐ R I).comp a = i
state_after: no goals
tactic: exact ⟨l.comp g, by rw [← AlgHom.comp_assoc, ← this, AlgHom.comp_assoc, hg, AlgHom.comp_id]⟩