Theorem: RatFunc.num_dvd
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: constructor
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hp : p ≠ 0
⊢ x.num ∣ p ↔ ∃ q, q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q
state_after: case mp
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hp : p ≠ 0
⊢ x.num ∣ p → ∃ q, q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q

case mpr
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hp : p ≠ 0
⊢ (∃ q, q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q) → x.num ∣ p

tactic: rintro ⟨q, rfl⟩
state_before: case mp
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hp : p ≠ 0
⊢ x.num ∣ p → ∃ q, q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q
state_after: case mp.intro
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
⊢ ∃ q_1, q_1 ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) (x.num * q) / (algebraMap K[X] (RatFunc K)) q_1

tactic: obtain ⟨_hx, hq⟩ := mul_ne_zero_iff.mp hp
state_before: case mp.intro
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
⊢ ∃ q_1, q_1 ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) (x.num * q) / (algebraMap K[X] (RatFunc K)) q_1
state_after: case mp.intro.intro
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ ∃ q_1, q_1 ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) (x.num * q) / (algebraMap K[X] (RatFunc K)) q_1

tactic: use denom x * q
state_before: case mp.intro.intro
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ ∃ q_1, q_1 ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) (x.num * q) / (algebraMap K[X] (RatFunc K)) q_1
state_after: case h
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ x.denom * q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) (x.num * q) / (algebraMap K[X] (RatFunc K)) (x.denom * q)

tactic: rw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, div_self, mul_one, num_div_denom]
state_before: case h
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ x.denom * q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) (x.num * q) / (algebraMap K[X] (RatFunc K)) (x.denom * q)
state_after: case h
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ x.denom * q ≠ 0 ∧ x = x

case h
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ (algebraMap K[X] (RatFunc K)) q ≠ 0

tactic: exact ⟨mul_ne_zero (denom_ne_zero x) hq, rfl⟩
state_before: case h
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ x.denom * q ≠ 0 ∧ x = x
state_after: no goals

tactic: exact algebraMap_ne_zero hq
state_before: case h
K : Type u
inst✝ : Field K
x : RatFunc K
q : K[X]
hp : x.num * q ≠ 0
_hx : x.num ≠ 0
hq : q ≠ 0
⊢ (algebraMap K[X] (RatFunc K)) q ≠ 0
state_after: no goals

tactic: rintro ⟨q, hq, rfl⟩
state_before: case mpr
K : Type u
inst✝ : Field K
x : RatFunc K
p : K[X]
hp : p ≠ 0
⊢ (∃ q, q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q) → x.num ∣ p
state_after: case mpr.intro.intro
K : Type u
inst✝ : Field K
p : K[X]
hp : p ≠ 0
q : K[X]
hq : q ≠ 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).num ∣ p

tactic: exact num_div_dvd p hq
state_before: case mpr.intro.intro
K : Type u
inst✝ : Field K
p : K[X]
hp : p ≠ 0
q : K[X]
hq : q ≠ 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).num ∣ p
state_after: no goals