Theorem: Subalgebra.inv_mem_of_root_of_coeff_zero_ne_zero
File: Mathlib/RingTheory/Algebraic.lean

tactic: suffices (x⁻¹ : L) = (-p.coeff 0)⁻¹ • aeval x (divX p) by
  rw [this]
  exact A.smul_mem (aeval x _).2 _
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
⊢ (↑x)⁻¹ ∈ A

tactic: have : aeval (x : L) p = 0 := by rw [Subalgebra.aeval_coe, aeval_eq, Subalgebra.coe_zero]
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
⊢ (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))

tactic: rw [inv_eq_of_root_of_coeff_zero_ne_zero this coeff_zero_ne, div_eq_inv_mul, Algebra.smul_def]
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
this : ↑(aeval ↑x) p = 0
⊢ (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))

tactic: simp only [aeval_coe, Submonoid.coe_mul, Subsemiring.coe_toSubmonoid, coe_toSubsemiring,
  coe_algebraMap]
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
this : ↑(aeval ↑x) p = 0
⊢ -((↑(algebraMap K L) (coeff p 0))⁻¹ * ↑(aeval ↑x) (divX p)) =
    ↑(↑(algebraMap K ((fun x => { x // x ∈ A }) (divX p))) (-coeff p 0)⁻¹ * ↑(aeval x) (divX p))

tactic: rw [map_inv₀, map_neg, inv_neg, neg_mul]
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
this : ↑(aeval ↑x) p = 0
⊢ -((↑(algebraMap K L) (coeff p 0))⁻¹ * ↑(↑(aeval x) (divX p))) =
    ↑(algebraMap K L) (-coeff p 0)⁻¹ * ↑(↑(aeval x) (divX p))

tactic: rw [this]
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
this : (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))
⊢ (↑x)⁻¹ ∈ A

tactic: exact A.smul_mem (aeval x _).2 _
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
this : (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))
⊢ ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p)) ∈ A

tactic: rw [Subalgebra.aeval_coe, aeval_eq, Subalgebra.coe_zero]
state_before: R : Type ?u.788449
S : Type ?u.788452
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : CommRing S
K : Type u_2
L : Type u_1
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
A : Subalgebra K L
x : { x // x ∈ A }
p : K[X]
aeval_eq : ↑(aeval x) p = 0
coeff_zero_ne : coeff p 0 ≠ 0
⊢ ↑(aeval ↑x) p = 0