Theorem: Ideal.mem_leadingCoeff
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: rw [leadingCoeff, Submodule.mem_iSup_of_directed]
state_before: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ x ∈ I.leadingCoeff ↔ ∃ p ∈ I, p.leadingCoeff = x
state_after: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ i, x ∈ I.leadingCoeffNth i) ↔ ∃ p ∈ I, p.leadingCoeff = x

case H
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ Directed (fun x x_1 => x ≤ x_1) fun n => I.leadingCoeffNth n

tactic: intro i j
state_before: case H
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ Directed (fun x x_1 => x ≤ x_1) fun n => I.leadingCoeffNth n
state_after: case H
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
i j : ℕ
⊢ ∃ z,
    (fun x x_1 => x ≤ x_1) ((fun n => I.leadingCoeffNth n) i) ((fun n => I.leadingCoeffNth n) z) ∧
      (fun x x_1 => x ≤ x_1) ((fun n => I.leadingCoeffNth n) j) ((fun n => I.leadingCoeffNth n) z)

tactic: exact
  ⟨i + j, I.leadingCoeffNth_mono (Nat.le_add_right _ _),
    I.leadingCoeffNth_mono (Nat.le_add_left _ _)⟩
state_before: case H
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
i j : ℕ
⊢ ∃ z,
    (fun x x_1 => x ≤ x_1) ((fun n => I.leadingCoeffNth n) i) ((fun n => I.leadingCoeffNth n) z) ∧
      (fun x x_1 => x ≤ x_1) ((fun n => I.leadingCoeffNth n) j) ((fun n => I.leadingCoeffNth n) z)
state_after: no goals

tactic: simp only [mem_leadingCoeffNth]
state_before: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ i, x ∈ I.leadingCoeffNth i) ↔ ∃ p ∈ I, p.leadingCoeff = x
state_after: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ i, ∃ p ∈ I, p.degree ≤ ↑i ∧ p.leadingCoeff = x) ↔ ∃ p ∈ I, p.leadingCoeff = x

tactic: constructor
state_before: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ i, ∃ p ∈ I, p.degree ≤ ↑i ∧ p.leadingCoeff = x) ↔ ∃ p ∈ I, p.leadingCoeff = x
state_after: case mp
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ i, ∃ p ∈ I, p.degree ≤ ↑i ∧ p.leadingCoeff = x) → ∃ p ∈ I, p.leadingCoeff = x

case mpr
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ p ∈ I, p.leadingCoeff = x) → ∃ i, ∃ p ∈ I, p.degree ≤ ↑i ∧ p.leadingCoeff = x

tactic: rintro ⟨p, hpI, rfl⟩
state_before: case mpr
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ p ∈ I, p.leadingCoeff = x) → ∃ i, ∃ p ∈ I, p.degree ≤ ↑i ∧ p.leadingCoeff = x
state_after: case mpr.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
p : R[X]
hpI : p ∈ I
⊢ ∃ i, ∃ p_1 ∈ I, p_1.degree ≤ ↑i ∧ p_1.leadingCoeff = p.leadingCoeff

tactic: exact ⟨natDegree p, p, hpI, degree_le_natDegree, rfl⟩
state_before: case mpr.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
p : R[X]
hpI : p ∈ I
⊢ ∃ i, ∃ p_1 ∈ I, p_1.degree ≤ ↑i ∧ p_1.leadingCoeff = p.leadingCoeff
state_after: no goals

tactic: rintro ⟨i, p, hpI, _, rfl⟩
state_before: case mp
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
x : R
⊢ (∃ i, ∃ p ∈ I, p.degree ≤ ↑i ∧ p.leadingCoeff = x) → ∃ p ∈ I, p.leadingCoeff = x
state_after: case mp.intro.intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
i : ℕ
p : R[X]
hpI : p ∈ I
left✝ : p.degree ≤ ↑i
⊢ ∃ p_1 ∈ I, p_1.leadingCoeff = p.leadingCoeff

tactic: exact ⟨p, hpI, rfl⟩
state_before: case mp.intro.intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
i : ℕ
p : R[X]
hpI : p ∈ I
left✝ : p.degree ≤ ↑i
⊢ ∃ p_1 ∈ I, p_1.leadingCoeff = p.leadingCoeff
state_after: no goals