Theorem: Cardinal.nat_coe_dvd_iff
File: Mathlib/SetTheory/Cardinal/Divisibility.lean

tactic: refine ⟨?_, fun ⟨h, ht⟩ => ⟨h, mod_cast ht⟩⟩
state_before: a b : Cardinal.{u}
n m : ℕ
⊢ ↑n ∣ ↑m ↔ n ∣ m
state_after: a b : Cardinal.{u}
n m : ℕ
⊢ ↑n ∣ ↑m → n ∣ m

tactic: rintro ⟨k, hk⟩
state_before: a b : Cardinal.{u}
n m : ℕ
⊢ ↑n ∣ ↑m → n ∣ m
state_after: case intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
⊢ n ∣ m

tactic: have : ↑m < ℵ₀ := nat_lt_aleph0 m
state_before: case intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
⊢ n ∣ m
state_after: case intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
this : ↑m < ℵ₀
⊢ n ∣ m

tactic: rw [hk, mul_lt_aleph0_iff] at this
state_before: case intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
this : ↑m < ℵ₀
⊢ n ∣ m
state_after: case intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
this : ↑n = 0 ∨ k = 0 ∨ ↑n < ℵ₀ ∧ k < ℵ₀
⊢ n ∣ m

tactic: rcases this with (h | h | ⟨-, hk'⟩)
state_before: case intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
this : ↑n = 0 ∨ k = 0 ∨ ↑n < ℵ₀ ∧ k < ℵ₀
⊢ n ∣ m
state_after: case intro.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
h : ↑n = 0
⊢ n ∣ m

case intro.inr.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
h : k = 0
⊢ n ∣ m

case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m

tactic: iterate 2 simp only [h, mul_zero, zero_mul, Nat.cast_eq_zero] at hk; simp [hk]
state_before: case intro.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
h : ↑n = 0
⊢ n ∣ m

case intro.inr.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
h : k = 0
⊢ n ∣ m

case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m
state_after: case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m

tactic: lift k to ℕ using hk'
state_before: case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m
state_after: case intro.inr.inr.intro.intro
a b : Cardinal.{u}
n m k : ℕ
hk : ↑m = ↑n * ↑k
⊢ n ∣ m

tactic: exact ⟨k, mod_cast hk⟩
state_before: case intro.inr.inr.intro.intro
a b : Cardinal.{u}
n m k : ℕ
hk : ↑m = ↑n * ↑k
⊢ n ∣ m
state_after: no goals

tactic: simp only [h, mul_zero, zero_mul, Nat.cast_eq_zero] at hk
state_before: case intro.inr.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
h : k = 0
⊢ n ∣ m

case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m
state_after: case intro.inr.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
h : k = 0
hk : m = 0
⊢ n ∣ m

case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m

tactic: simp [hk]
state_before: case intro.inr.inl
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
h : k = 0
hk : m = 0
⊢ n ∣ m

case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m
state_after: case intro.inr.inr.intro
a b : Cardinal.{u}
n m : ℕ
k : Cardinal.{u_1}
hk : ↑m = ↑n * k
hk' : k < ℵ₀
⊢ n ∣ m