Theorem: Algebra.FinitePresentation.equiv
File: Mathlib/RingTheory/FinitePresentation.lean

tactic: obtain ⟨n, f, hf⟩ := hfp
state_before: R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
hfp : FinitePresentation R A
e : A ≃ₐ[R] B
⊢ FinitePresentation R B

tactic: use n, AlgHom.comp (↑e) f
state_before: case intro.intro
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ FinitePresentation R B

tactic: constructor
state_before: case intro.intro
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ Surjective ↑(AlgHom.comp (↑e) f) ∧ Ideal.FG (RingHom.ker ↑(AlgHom.comp (↑e) f))

tactic: suffices hker : (RingHom.ker (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom) = RingHom.ker f.toRingHom
state_before: case intro.intro.right
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ Ideal.FG (RingHom.ker ↑(AlgHom.comp (↑e) f))

tactic: rw [AlgHom.coe_comp]
state_before: case intro.intro.left
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ Surjective ↑(AlgHom.comp (↑e) f)

tactic: exact Function.Surjective.comp e.surjective hf.1
state_before: case intro.intro.left
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ Surjective (↑↑e ∘ ↑f)

tactic: rw [hker]
state_before: case intro.intro.right
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
hker : RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f
⊢ Ideal.FG (RingHom.ker ↑(AlgHom.comp (↑e) f))

tactic: exact hf.2
state_before: case intro.intro.right
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
hker : RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f
⊢ Ideal.FG (RingHom.ker ↑f)

tactic: have hco : (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom = RingHom.comp (e.toRingEquiv : A ≃+* B)
  f.toRingHom := by
  have h : (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom =
    e.toAlgHom.toRingHom.comp f.toRingHom := rfl
  have h1 : ↑e.toRingEquiv = e.toAlgHom.toRingHom := rfl
  rw [h, h1]
state_before: case hker
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f

tactic: rw [RingHom.ker_eq_comap_bot, hco, ← Ideal.comap_comap, ← RingHom.ker_eq_comap_bot,
  RingHom.ker_coe_equiv (AlgEquiv.toRingEquiv e), RingHom.ker_eq_comap_bot]
state_before: case hker
R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
hco : ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f
⊢ RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f

tactic: have h : (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom =
  e.toAlgHom.toRingHom.comp f.toRingHom := rfl
state_before: R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
⊢ ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f

tactic: have h1 : ↑e.toRingEquiv = e.toAlgHom.toRingHom := rfl
state_before: R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
h : ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑↑e ↑f
⊢ ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f

tactic: rw [h, h1]
state_before: R : Type w₁
A : Type w₂
B : Type w₃
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Algebra R A
inst✝¹ : CommRing B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
n : ℕ
f : MvPolynomial (Fin n) R →ₐ[R] A
hf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)
h : ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑↑e ↑f
h1 : ↑(AlgEquiv.toRingEquiv e) = ↑↑e
⊢ ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f