Theorem: Algebra.FormallyUnramified.comp
File: Mathlib/RingTheory/Unramified/Basic.lean

Proof steps:
state_before: R : Type u
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : CommSemiring A
inst✝⁶ : Algebra R A
B : Type u
inst✝⁵ : Semiring B
inst✝⁴ : Algebra R B
inst✝³ : Algebra A B
inst✝² : IsScalarTower R A B
inst✝¹ : FormallyUnramified R A
inst✝ : FormallyUnramified A B
⊢ FormallyUnramified R B
state_after: case comp_injective
R : Type u
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : CommSemiring A
inst✝⁶ : Algebra R A
B : Type u
inst✝⁵ : Semiring B
inst✝⁴ : Algebra R B
inst✝³ : Algebra A B
inst✝² : IsScalarTower R A B
inst✝¹ : FormallyUnramified R A
inst✝ : FormallyUnramified A B
⊢ ∀ ⦃B_1 : Type u⦄ [inst : CommRing B_1] [inst_1 : Algebra R B_1] (I : Ideal B_1),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
tactic: constructor
state_before: case comp_injective
R : Type u
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : CommSemiring A
inst✝⁶ : Algebra R A
B : Type u
inst✝⁵ : Semiring B
inst✝⁴ : Algebra R B
inst✝³ : Algebra A B
inst✝² : IsScalarTower R A B
inst✝¹ : FormallyUnramified R A
inst✝ : FormallyUnramified A B
⊢ ∀ ⦃B_1 : Type u⦄ [inst : CommRing B_1] [inst_1 : Algebra R B_1] (I : Ideal B_1),
    I ^ 2 = ⊥ → Function.Injective (Ideal.Quotient.mkₐ R I).comp
state_after: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
⊢ f₁ = f₂
tactic: intro C _ _ I hI f₁ f₂ e
state_before: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
⊢ f₁ = f₂
state_after: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
⊢ f₁ = f₂
tactic: have e' :=
    FormallyUnramified.lift_unique I ⟨2, hI⟩ (f₁.comp <| IsScalarTower.toAlgHom R A B)
      (f₂.comp <| IsScalarTower.toAlgHom R A B) (by rw [← AlgHom.comp_assoc, e, AlgHom.comp_assoc])
state_before: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
⊢ f₁ = f₂
state_after: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
⊢ f₁ = f₂
tactic: letI := (f₁.comp (IsScalarTower.toAlgHom R A B)).toRingHom.toAlgebra
state_before: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
⊢ f₁ = f₂
state_after: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
⊢ f₁ = f₂
tactic: let F₁ : B →ₐ[A] C := { f₁ with commutes' := fun r => rfl }
state_before: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
⊢ f₁ = f₂
state_after: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
⊢ f₁ = f₂
tactic: let F₂ : B →ₐ[A] C := { f₂ with commutes' := AlgHom.congr_fun e'.symm }
state_before: case comp_injective
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
⊢ f₁ = f₂
state_after: case comp_injective.H
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
x : B
⊢ f₁ x = f₂ x
tactic: ext1 x
state_before: case comp_injective.H
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
x : B
⊢ f₁ x = f₂ x
state_after: case comp_injective.H
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
x : B
⊢ F₁ x = F₂ x
tactic: change F₁ x = F₂ x
state_before: case comp_injective.H
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
x : B
⊢ F₁ x = F₂ x
state_after: case comp_injective.H.e_a
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
x : B
⊢ F₁ = F₂
tactic: congr
state_before: case comp_injective.H.e_a
R : Type u
inst✝¹⁰ : CommSemiring R
A : Type u
inst✝⁹ : CommSemiring A
inst✝⁸ : Algebra R A
B : Type u
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R B
inst✝⁵ : Algebra A B
inst✝⁴ : IsScalarTower R A B
inst✝³ : FormallyUnramified R A
inst✝² : FormallyUnramified A B
C : Type u
inst✝¹ : CommRing C
inst✝ : Algebra R C
I : Ideal C
hI : I ^ 2 = ⊥
f₁ f₂ : B →ₐ[R] C
e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂
e' : f₁.comp (IsScalarTower.toAlgHom R A B) = f₂.comp (IsScalarTower.toAlgHom R A B)
this : Algebra A C := (f₁.comp (IsScalarTower.toAlgHom R A B)).toAlgebra
F₁ : B →ₐ[A] C := { toRingHom := f₁.toRingHom, commutes' := ⋯ }
F₂ : B →ₐ[A] C := { toRingHom := f₂.toRingHom, commutes' := ⋯ }
x : B
⊢ F₁ = F₂
state_after: no goals
tactic: exact FormallyUnramified.ext I ⟨2, hI⟩ (AlgHom.congr_fun e)