Theorem: Algebra.Presentation.span_range_relation_eq_ker_localizationAway
File: Mathlib/RingTheory/Presentation.lean

tactic: have : aeval (S₁ := S) (Generators.localizationAway r).val =
    (mvPolynomialQuotientEquiv S r).toAlgHom.comp
      (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1})) := by
  ext x
  simp only [Generators.localizationAway_vars, aeval_X, Generators.localizationAway_val,
    AlgEquiv.toAlgHom_eq_coe, AlgHom.coe_comp, AlgHom.coe_coe, Ideal.Quotient.mkₐ_eq_mk,
    Function.comp_apply]
  rw [IsLocalization.Away.mvPolynomialQuotientEquiv_apply, aeval_X]
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
⊢ Ideal.span {C r * X () - 1} = RingHom.ker (aeval (Generators.localizationAway r).val)
state_after: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} = RingHom.ker (aeval (Generators.localizationAway r).val)

tactic: rw [this]
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} = RingHom.ker (aeval (Generators.localizationAway r).val)
state_after: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    RingHom.ker ((↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1})))

tactic: erw [← RingHom.comap_ker]
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    RingHom.ker ((↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1})))
state_after: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    Ideal.comap (↑(Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1})))
      (RingHom.ker (↑(mvPolynomialQuotientEquiv S r)).toRingHom)

tactic: simp only [Generators.localizationAway_vars, AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe,
  AlgEquiv.toAlgHom_toRingHom]
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    Ideal.comap (↑(Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1})))
      (RingHom.ker (↑(mvPolynomialQuotientEquiv S r)).toRingHom)
state_after: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    Ideal.comap (↑(Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))) (RingHom.ker ↑(mvPolynomialQuotientEquiv S r))

tactic: show Ideal.span {C r * X () - 1} = Ideal.comap _ (RingHom.ker (mvPolynomialQuotientEquiv S r))
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    Ideal.comap (↑(Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))) (RingHom.ker ↑(mvPolynomialQuotientEquiv S r))
state_after: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    Ideal.comap (↑(Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))) (RingHom.ker (mvPolynomialQuotientEquiv S r))

tactic: simp [RingHom.ker_equiv, ← RingHom.ker_eq_comap_bot]
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
this :
  aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
⊢ Ideal.span {C r * X () - 1} =
    Ideal.comap (↑(Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))) (RingHom.ker (mvPolynomialQuotientEquiv S r))
state_after: no goals

tactic: ext x
state_before: R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
⊢ aeval (Generators.localizationAway r).val =
    (↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))
state_after: case hf
R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
x : (Generators.localizationAway r).vars
⊢ (aeval (Generators.localizationAway r).val) (X x) =
    ((↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))) (X x)

tactic: simp only [Generators.localizationAway_vars, aeval_X, Generators.localizationAway_val,
  AlgEquiv.toAlgHom_eq_coe, AlgHom.coe_comp, AlgHom.coe_coe, Ideal.Quotient.mkₐ_eq_mk,
  Function.comp_apply]
state_before: case hf
R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
x : (Generators.localizationAway r).vars
⊢ (aeval (Generators.localizationAway r).val) (X x) =
    ((↑(mvPolynomialQuotientEquiv S r)).comp (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1}))) (X x)
state_after: case hf
R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
x : (Generators.localizationAway r).vars
⊢ invSelf r = (mvPolynomialQuotientEquiv S r) ((Ideal.Quotient.mk (Ideal.span {C r * X () - 1})) (X x))

tactic: rw [IsLocalization.Away.mvPolynomialQuotientEquiv_apply, aeval_X]
state_before: case hf
R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Presentation R S
r : R
inst✝ : IsLocalization.Away r S
x : (Generators.localizationAway r).vars
⊢ invSelf r = (mvPolynomialQuotientEquiv S r) ((Ideal.Quotient.mk (Ideal.span {C r * X () - 1})) (X x))
state_after: no goals