Theorem: one_lt_natDegree_of_irrational_root
File: Mathlib/Data/Real/Irrational.lean

tactic: by_contra rid
state_before: x : ℝ
p : ℤ[X]
hx : Irrational x
p_nonzero : p ≠ 0
x_is_root : (aeval x) p = 0
⊢ 1 < p.natDegree
state_after: x : ℝ
p : ℤ[X]
hx : Irrational x
p_nonzero : p ≠ 0
x_is_root : (aeval x) p = 0
rid : ¬1 < p.natDegree
⊢ False

tactic: rcases exists_eq_X_add_C_of_natDegree_le_one (not_lt.1 rid) with ⟨a, b, rfl⟩
state_before: x : ℝ
p : ℤ[X]
hx : Irrational x
p_nonzero : p ≠ 0
x_is_root : (aeval x) p = 0
rid : ¬1 < p.natDegree
⊢ False
state_after: case intro.intro
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
rid : ¬1 < (C a * X + C b).natDegree
⊢ False

tactic: clear rid
state_before: case intro.intro
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
rid : ¬1 < (C a * X + C b).natDegree
⊢ False
state_after: case intro.intro
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
⊢ False

tactic: have : (a : ℝ) * x = -b := by simpa [eq_neg_iff_add_eq_zero] using x_is_root
state_before: case intro.intro
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
⊢ False
state_after: case intro.intro
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : ↑a * x = -↑b
⊢ False

tactic: rcases em (a = 0) with (rfl | ha)
state_before: case intro.intro
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : ↑a * x = -↑b
⊢ False
state_after: case intro.intro.inl
x : ℝ
hx : Irrational x
b : ℤ
p_nonzero : C 0 * X + C b ≠ 0
x_is_root : (aeval x) (C 0 * X + C b) = 0
this : ↑0 * x = -↑b
⊢ False

case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : ↑a * x = -↑b
ha : ¬a = 0
⊢ False

tactic: simpa [eq_neg_iff_add_eq_zero] using x_is_root
state_before: x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
⊢ ↑a * x = -↑b
state_after: no goals

tactic: obtain rfl : b = 0 := by simpa
state_before: case intro.intro.inl
x : ℝ
hx : Irrational x
b : ℤ
p_nonzero : C 0 * X + C b ≠ 0
x_is_root : (aeval x) (C 0 * X + C b) = 0
this : ↑0 * x = -↑b
⊢ False
state_after: case intro.intro.inl
x : ℝ
hx : Irrational x
p_nonzero : C 0 * X + C 0 ≠ 0
x_is_root : (aeval x) (C 0 * X + C 0) = 0
this : ↑0 * x = -↑0
⊢ False

tactic: simp at p_nonzero
state_before: case intro.intro.inl
x : ℝ
hx : Irrational x
p_nonzero : C 0 * X + C 0 ≠ 0
x_is_root : (aeval x) (C 0 * X + C 0) = 0
this : ↑0 * x = -↑0
⊢ False
state_after: no goals

tactic: simpa
state_before: x : ℝ
hx : Irrational x
b : ℤ
p_nonzero : C 0 * X + C b ≠ 0
x_is_root : (aeval x) (C 0 * X + C b) = 0
this : ↑0 * x = -↑b
⊢ b = 0
state_after: no goals

tactic: rw [mul_comm, ← eq_div_iff_mul_eq, eq_comm] at this
state_before: case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : ↑a * x = -↑b
ha : ¬a = 0
⊢ False
state_after: case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : -↑b / ↑a = x
ha : ¬a = 0
⊢ False

case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : x * ↑a = -↑b
ha : ¬a = 0
⊢ ↑a ≠ 0

tactic: refine hx ⟨-b / a, ?_⟩
state_before: case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : -↑b / ↑a = x
ha : ¬a = 0
⊢ False
state_after: case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : -↑b / ↑a = x
ha : ¬a = 0
⊢ ↑(-↑b / ↑a) = x

tactic: assumption_mod_cast
state_before: case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : -↑b / ↑a = x
ha : ¬a = 0
⊢ ↑(-↑b / ↑a) = x
state_after: no goals

tactic: assumption_mod_cast
state_before: case intro.intro.inr
x : ℝ
hx : Irrational x
a b : ℤ
p_nonzero : C a * X + C b ≠ 0
x_is_root : (aeval x) (C a * X + C b) = 0
this : x * ↑a = -↑b
ha : ¬a = 0
⊢ ↑a ≠ 0
state_after: no goals