l3lab/ntp-mathlib huggingface dataset:
/-- A linear equivalence between `Dual M ⊗ Dual N` and `Dual (M ⊗ N)` given bases for `M` and `N`.
It sends `f ⊗ g` to the composition of `TensorProduct.map f g` with the natural
isomorphism `R ⊗ R ≃ R`.
-/
@[simps!]
noncomputable def dualDistribEquivOfBasis (b : Basis ι R M) (c : Basis κ R N) :
    Dual R M ⊗[R] Dual R N ≃ₗ[R] Dual R (M ⊗[R] N) := by
  

Proof state:
R : Type u_1
A : Type u_2
M : Type u_3
N : Type u_4
ι : Type u_5
κ : Type u_6
inst✝⁸ : DecidableEq ι
inst✝⁷ : DecidableEq κ
inst✝⁶ : Fintype ι
inst✝⁵ : Fintype κ
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
⊢ Dual R M ⊗[R] Dual R N ≃ₗ[R] Dual R (M ⊗[R] N)

Next tactic:
refine' LinearEquiv.ofLinear (dualDistrib R M N) (dualDistribInvOfBasis b c) _ _
/-- A linear equivalence between `Dual M ⊗ Dual N` and `Dual (M ⊗ N)` given bases for `M` and `N`.
It sends `f ⊗ g` to the composition of `TensorProduct.map f g` with the natural
isomorphism `R ⊗ R ≃ R`.
-/
@[simps!]
noncomputable def dualDistribEquivOfBasis (b : Basis ι R M) (c : Basis κ R N) :
    Dual R M ⊗[R] Dual R N ≃ₗ[R] Dual R (M ⊗[R] N) := by
  refine' LinearEquiv.ofLinear (dualDistrib R M N) (dualDistribInvOfBasis b c) _ _
  · 

Proof state:
case refine'_1
R : Type u_1
A : Type u_2
M : Type u_3
N : Type u_4
ι : Type u_5
κ : Type u_6
inst✝⁸ : DecidableEq ι
inst✝⁷ : DecidableEq κ
inst✝⁶ : Fintype ι
inst✝⁵ : Fintype κ
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
⊢ comp (dualDistrib R M N) (dualDistribInvOfBasis b c) = LinearMap.id

Next tactic:
exact dualDistrib_dualDistribInvOfBasis_left_inverse _ _
/-- A linear equivalence between `Dual M ⊗ Dual N` and `Dual (M ⊗ N)` given bases for `M` and `N`.
It sends `f ⊗ g` to the composition of `TensorProduct.map f g` with the natural
isomorphism `R ⊗ R ≃ R`.
-/
@[simps!]
noncomputable def dualDistribEquivOfBasis (b : Basis ι R M) (c : Basis κ R N) :
    Dual R M ⊗[R] Dual R N ≃ₗ[R] Dual R (M ⊗[R] N) := by
  refine' LinearEquiv.ofLinear (dualDistrib R M N) (dualDistribInvOfBasis b c) _ _
  · exact dualDistrib_dualDistribInvOfBasis_left_inverse _ _
  · 

Proof state:
case refine'_2
R : Type u_1
A : Type u_2
M : Type u_3
N : Type u_4
ι : Type u_5
κ : Type u_6
inst✝⁸ : DecidableEq ι
inst✝⁷ : DecidableEq κ
inst✝⁶ : Fintype ι
inst✝⁵ : Fintype κ
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
⊢ comp (dualDistribInvOfBasis b c) (dualDistrib R M N) = LinearMap.id

Next tactic:
exact dualDistrib_dualDistribInvOfBasis_right_inverse _ _
theorem support_deriv_subset : support (deriv f) ⊆ tsupport f := by
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
⊢ support (deriv f) ⊆ tsupport f

Next tactic:
intro x
theorem support_deriv_subset : support (deriv f) ⊆ tsupport f := by
  intro x
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
x : 𝕜
⊢ x ∈ support (deriv f) → x ∈ tsupport f

Next tactic:
rw [← not_imp_not]
theorem support_deriv_subset : support (deriv f) ⊆ tsupport f := by
  intro x
  rw [← not_imp_not]
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
x : 𝕜
⊢ x ∉ tsupport f → x ∉ support (deriv f)

Next tactic:
intro h2x
theorem support_deriv_subset : support (deriv f) ⊆ tsupport f := by
  intro x
  rw [← not_imp_not]
  intro h2x
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
x : 𝕜
h2x : x ∉ tsupport f
⊢ x ∉ support (deriv f)

Next tactic:
rw [not_mem_tsupport_iff_eventuallyEq] at h2x
theorem support_deriv_subset : support (deriv f) ⊆ tsupport f := by
  intro x
  rw [← not_imp_not]
  intro h2x
  rw [not_mem_tsupport_iff_eventuallyEq] at h2x
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
x : 𝕜
h2x : f =ᶠ[nhds x] 0
⊢ x ∉ support (deriv f)

Next tactic:
exact nmem_support.mpr (h2x.deriv_eq.trans (deriv_const x 0))
theorem coeffIntegerNormalization_of_not_mem_support (p : S[X]) (i : ℕ) (h : coeff p i = 0) :
    coeffIntegerNormalization M p i = 0 := by
  

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
h : coeff p i = 0
⊢ coeffIntegerNormalization M p i = 0

Next tactic:
simp only [coeffIntegerNormalization, h, mem_support_iff, eq_self_iff_true, not_true, Ne.def,
    dif_neg, not_false_iff]
theorem coeffIntegerNormalization_mem_support (p : S[X]) (i : ℕ)
    (h : coeffIntegerNormalization M p i ≠ 0) : i ∈ p.support := by
  

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
h : coeffIntegerNormalization M p i ≠ 0
⊢ i ∈ support p

Next tactic:
contrapose h
theorem coeffIntegerNormalization_mem_support (p : S[X]) (i : ℕ)
    (h : coeffIntegerNormalization M p i ≠ 0) : i ∈ p.support := by
  contrapose h
  

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
h : i ∉ support p
⊢ ¬coeffIntegerNormalization M p i ≠ 0

Next tactic:
rw [Ne.def, Classical.not_not, coeffIntegerNormalization, dif_neg h]
@[simp]
theorem integerNormalization_coeff (p : S[X]) (i : ℕ) :
    (integerNormalization M p).coeff i = coeffIntegerNormalization M p i := by
  

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
⊢ coeff (integerNormalization M p) i = coeffIntegerNormalization M p i

Next tactic:
simp (config := { contextual := true }) [integerNormalization, coeff_monomial,
    coeffIntegerNormalization_of_not_mem_support]
theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by
  

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
⊢ ∃ b, ∀ (i : ℕ), (algebraMap R S) (coeff (integerNormalization M p) i) = ↑b • coeff p i

Next tactic:
use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by
  use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
  

Proof state:
case h
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
inst✝ : IsLocalization M S
p : S[X]
⊢ ∀ (i : ℕ),
    (algebraMap R S) (coeff (integerNormalization M p) i) =
      ↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i

Next tactic:
intro i
theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by
  use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
  intro i
  

Proof state:
case h
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
⊢ (algebraMap R S) (coeff (integerNormalization M p) i) =
    ↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i

Next tactic:
rw [integerNormalization_coeff, coeffIntegerNormalization]
theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by
  use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
  intro i
  rw [integerNormalization_coeff, coeffIntegerNormalization]
  

Proof state:
case h
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
⊢ (algebraMap R S)
      (if hi : i ∈ support p then
        choose
          (_ :
            IsInteger R
              (↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i))
      else 0) =
    ↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i

Next tactic:
split_ifs with hi
theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by
  use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
  intro i
  rw [integerNormalization_coeff, coeffIntegerNormalization]
  split_ifs with hi
  · 

Proof state:
case pos
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
hi : i ∈ support p
⊢ (algebraMap R S)
      (choose
        (_ :
          IsInteger R
            (↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i))) =
    ↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i

Next tactic:
exact
      Classical.choose_spec
        (Classical.choose_spec (exist_integer_multiples_of_finset M (p.support.image p.coeff))
          (p.coeff i) (Finset.mem_image.mpr ⟨i, hi, rfl⟩))
theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by
  use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
  intro i
  rw [integerNormalization_coeff, coeffIntegerNormalization]
  split_ifs with hi
  · exact
      Classical.choose_spec
        (Classical.choose_spec (exist_integer_multiples_of_finset M (p.support.image p.coeff))
          (p.coeff i) (Finset.mem_image.mpr ⟨i, hi, rfl⟩))
  · 

Proof state:
case neg
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
inst✝ : IsLocalization M S
p : S[X]
i : ℕ
hi : i ∉ support p
⊢ (algebraMap R S) 0 = ↑(choose (_ : ∃ b, ∀ a ∈ Finset.image (coeff p) (support p), IsInteger R (↑b • a))) • coeff p i

Next tactic:
rw [RingHom.map_zero, not_mem_support_iff.mp hi, smul_zero]
theorem integerNormalization_map_to_map (p : S[X]) :
    ∃ b : M, (integerNormalization M p).map (algebraMap R S) = (b : R) • p :=
  let ⟨b, hb⟩ := integerNormalization_spec M p
  ⟨b,
    Polynomial.ext fun i => by
      

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
b : ↥M
hb : ∀ (i : ℕ), (algebraMap R S) (coeff (integerNormalization M p) i) = ↑b • coeff p i
i : ℕ
⊢ coeff (Polynomial.map (algebraMap R S) (integerNormalization M p)) i = coeff (↑b • p) i

Next tactic:
rw [coeff_map, coeff_smul]
theorem integerNormalization_map_to_map (p : S[X]) :
    ∃ b : M, (integerNormalization M p).map (algebraMap R S) = (b : R) • p :=
  let ⟨b, hb⟩ := integerNormalization_spec M p
  ⟨b,
    Polynomial.ext fun i => by
      rw [coeff_map, coeff_smul]
      

Proof state:
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
inst✝ : IsLocalization M S
p : S[X]
b : ↥M
hb : ∀ (i : ℕ), (algebraMap R S) (coeff (integerNormalization M p) i) = ↑b • coeff p i
i : ℕ
⊢ (algebraMap R S) (coeff (integerNormalization M p) i) = ↑b • coeff p i

Next tactic:
exact hb i
theorem integerNormalization_eval₂_eq_zero (g : S →+* R') (p : S[X]) {x : R'}
    (hx : eval₂ g x p = 0) : eval₂ (g.comp (algebraMap R S)) x (integerNormalization M p) = 0 :=
  let ⟨b, hb⟩ := integerNormalization_map_to_map M p
  _root_.trans (eval₂_map (algebraMap R S) g x).symm
    (by 

Proof state:
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
inst✝¹ : IsLocalization M S
R' : Type u_4
inst✝ : CommRing R'
g : S →+* R'
p : S[X]
x : R'
hx : eval₂ g x p = 0
b : ↥M
hb : Polynomial.map (algebraMap R S) (integerNormalization M p) = ↑b • p
⊢ eval₂ g x (Polynomial.map (algebraMap R S) (integerNormalization M p)) = 0

Next tactic:
rw [hb, ← IsScalarTower.algebraMap_smul S (b : R) p, eval₂_smul, hx, mul_zero]
theorem integerNormalization_aeval_eq_zero [Algebra R R'] [Algebra S R'] [IsScalarTower R S R']
    (p : S[X]) {x : R'} (hx : aeval x p = 0) : aeval x (integerNormalization M p) = 0 := by
  

Proof state:
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
inst✝⁴ : IsLocalization M S
R' : Type u_4
inst✝³ : CommRing R'
inst✝² : Algebra R R'
inst✝¹ : Algebra S R'
inst✝ : IsScalarTower R S R'
p : S[X]
x : R'
hx : (aeval x) p = 0
⊢ (aeval x) (integerNormalization M p) = 0

Next tactic:
rw [aeval_def, IsScalarTower.algebraMap_eq R S R',
    integerNormalization_eval₂_eq_zero _ (algebraMap _ _) _ hx]
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  

Proof state:
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

Next tactic:
refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  

Proof state:
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 : ℕ), coeff p n = coeff 0 n) ↔ ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n

Next tactic:
obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
⊢ (∀ (n : ℕ), coeff p n = coeff 0 n) ↔ ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n

Next tactic:
constructor
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> 

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
⊢ (∀ (n : ℕ), coeff p n = coeff 0 n) → ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n

Next tactic:
intro h i
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> 

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
⊢ (∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n) → ∀ (n : ℕ), coeff p n = coeff 0 n

Next tactic:
intro h i
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> intro h i
  · -- Porting note: avoided some defeq abuse
    

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
h : ∀ (n : ℕ), coeff p n = coeff 0 n
i : ℕ
⊢ coeff (integerNormalization (nonZeroDivisors A) p) i = coeff 0 i

Next tactic:
rw [coeff_zero, ← to_map_eq_zero_iff (K := K), hb i, h i, coeff_zero, smul_zero]
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> intro h i
  · -- Porting note: avoided some defeq abuse
    rw [coeff_zero, ← to_map_eq_zero_iff (K := K), hb i, h i, coeff_zero, smul_zero]
  · 

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
h : ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n
i : ℕ
⊢ coeff p i = coeff 0 i

Next tactic:
have hi := h i
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> intro h i
  · -- Porting note: avoided some defeq abuse
    rw [coeff_zero, ← to_map_eq_zero_iff (K := K), hb i, h i, coeff_zero, smul_zero]
  · have hi := h i
    

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
h : ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n
i : ℕ
hi : coeff (integerNormalization (nonZeroDivisors A) p) i = coeff 0 i
⊢ coeff p i = coeff 0 i

Next tactic:
rw [Polynomial.coeff_zero, ← @to_map_eq_zero_iff A _ K, hb i, Algebra.smul_def] at hi
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> intro h i
  · -- Porting note: avoided some defeq abuse
    rw [coeff_zero, ← to_map_eq_zero_iff (K := K), hb i, h i, coeff_zero, smul_zero]
  · have hi := h i
    rw [Polynomial.coeff_zero, ← @to_map_eq_zero_iff A _ K, hb i, Algebra.smul_def] at hi
    

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
h : ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑{ val := b, property := nonzero } * coeff p i = 0
⊢ coeff p i = coeff 0 i

Next tactic:
apply Or.resolve_left (eq_zero_or_eq_zero_of_mul_eq_zero hi)
theorem integerNormalization_eq_zero_iff {p : K[X]} :
    integerNormalization (nonZeroDivisors A) p = 0 ↔ p = 0 := by
  refine' Polynomial.ext_iff.trans (Polynomial.ext_iff.trans _).symm
  obtain ⟨⟨b, nonzero⟩, hb⟩ := integerNormalization_spec (nonZeroDivisors A) p
  constructor <;> intro h i
  · -- Porting note: avoided some defeq abuse
    rw [coeff_zero, ← to_map_eq_zero_iff (K := K), hb i, h i, coeff_zero, smul_zero]
  · have hi := h i
    rw [Polynomial.coeff_zero, ← @to_map_eq_zero_iff A _ K, hb i, Algebra.smul_def] at hi
    apply Or.resolve_left (eq_zero_or_eq_zero_of_mul_eq_zero hi)
    

Proof state:
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) (coeff (integerNormalization (nonZeroDivisors A) p) i) =
      ↑{ val := b, property := nonzero } • coeff p i
h : ∀ (n : ℕ), coeff (integerNormalization (nonZeroDivisors A) p) n = coeff 0 n
i : ℕ
hi : (algebraMap A K) ↑{ val := b, property := nonzero } * coeff p i = 0
⊢ ¬(algebraMap A K) ↑{ val := b, property := nonzero } = 0

Next tactic:
intro h