Theorem: IsFractionRing.integerNormalization_eq_zero_iff
File: Mathlib/RingTheory/Localization/Integral.lean

tactic: refine Polynomial.ext_iff.trans (Polynomial.ext_iff.trans ?_).symm
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
⊢ integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0
state_after: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
⊢ (∀ (n : ℕ), p.coeff n = coeff 0 n) ↔ ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n

tactic: obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
⊢ (∀ (n : ℕ), p.coeff n = coeff 0 n) ↔ ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
state_after: case intro.mk
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
⊢ (∀ (n : ℕ), p.coeff n = coeff 0 n) ↔ ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n

tactic: constructor <;> intro h i
state_before: case intro.mk
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
⊢ (∀ (n : ℕ), p.coeff n = coeff 0 n) ↔ ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
state_after: case intro.mk.mp
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), p.coeff n = coeff 0 n
i : ℕ
⊢ (integerNormalization (nonZeroDivisors A) p).coeff i = coeff 0 i

case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
⊢ p.coeff i = coeff 0 i

tactic: rw [coeff_zero, ← to_map_eq_zero_iff (K := K), hb i, h i, coeff_zero, smul_zero]
state_before: case intro.mk.mp
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), p.coeff n = coeff 0 n
i : ℕ
⊢ (integerNormalization (nonZeroDivisors A) p).coeff i = coeff 0 i
state_after: no goals

tactic: have hi := h i
state_before: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
⊢ p.coeff i = coeff 0 i
state_after: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (integerNormalization (nonZeroDivisors A) p).coeff i = coeff 0 i
⊢ p.coeff i = coeff 0 i

tactic: rw [Polynomial.coeff_zero, ← @to_map_eq_zero_iff A _ K, hb i, Algebra.smul_def] at hi
state_before: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (integerNormalization (nonZeroDivisors A) p).coeff i = coeff 0 i
⊢ p.coeff i = coeff 0 i
state_after: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
⊢ p.coeff i = coeff 0 i

tactic: apply Or.resolve_left (eq_zero_or_eq_zero_of_mul_eq_zero hi)
state_before: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
⊢ p.coeff i = coeff 0 i
state_after: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
⊢ ¬(algebraMap A K) ↑⟨b, nonzero⟩ = 0

tactic: intro h
state_before: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
⊢ ¬(algebraMap A K) ↑⟨b, nonzero⟩ = 0
state_after: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h✝ : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
h : (algebraMap A K) ↑⟨b, nonzero⟩ = 0
⊢ False

tactic: apply mem_nonZeroDivisors_iff_ne_zero.mp nonzero
state_before: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h✝ : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
h : (algebraMap A K) ↑⟨b, nonzero⟩ = 0
⊢ False
state_after: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h✝ : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
h : (algebraMap A K) ↑⟨b, nonzero⟩ = 0
⊢ b = 0

tactic: exact to_map_eq_zero_iff.mp h
state_before: case intro.mk.mpr
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommRing S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommRing P
A : Type u_4
K : Type u_5
C : Type u_6
inst✝⁵ : CommRing A
inst✝⁴ : IsDomain A
inst✝³ : Field K
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : CommRing C
p : K[X]
b : A
nonzero : b ∈ nonZeroDivisors A
hb : ∀ (i : ℕ), (algebraMap A K) ((integerNormalization (nonZeroDivisors A) p).coeff i) = ↑⟨b, nonzero⟩ • p.coeff i
h✝ : ∀ (n : ℕ), (integerNormalization (nonZeroDivisors A) p).coeff n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑⟨b, nonzero⟩ * p.coeff i = 0
h : (algebraMap A K) ↑⟨b, nonzero⟩ = 0
⊢ b = 0
state_after: no goals