Theorem: Nat.div_div_div_eq_div
File: Mathlib/Data/Nat/Defs.lean

tactic: simp
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
x✝¹ x✝ : ℕ
dvd : x✝¹ ∣ 0
dvd2 : 0 ∣ x✝
⊢ x✝ / (0 / x✝¹) / x✝¹ = x✝ / 0
state_after: no goals

tactic: simp at dvd
state_before: a✝ b c d m n k : ℕ
p q : ℕ → Prop
a x✝ : ℕ
dvd : 0 ∣ a + 1
dvd2 : a + 1 ∣ x✝
⊢ x✝ / ((a + 1) / 0) / 0 = x✝ / (a + 1)
state_after: no goals

tactic: have a_split : a + 1 ≠ 0 := succ_ne_zero a
state_before: a✝ b c✝ d m n k : ℕ
p q : ℕ → Prop
a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)
state_after: a✝ b c✝ d m n k : ℕ
p q : ℕ → Prop
a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
a_split : a + 1 ≠ 0
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)

tactic: have c_split : c + 1 ≠ 0 := succ_ne_zero c
state_before: a✝ b c✝ d m n k : ℕ
p q : ℕ → Prop
a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
a_split : a + 1 ≠ 0
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)
state_after: a✝ b c✝ d m n k : ℕ
p q : ℕ → Prop
a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)

tactic: rcases dvd2 with ⟨k, rfl⟩
state_before: a✝ b c✝ d m n k : ℕ
p q : ℕ → Prop
a c x✝ : ℕ
dvd : c + 1 ∣ a + 1
dvd2 : a + 1 ∣ x✝
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)
state_after: case intro
a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
dvd : c + 1 ∣ a + 1
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k : ℕ
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)

tactic: rcases dvd with ⟨k2, pr⟩
state_before: case intro
a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
dvd : c + 1 ∣ a + 1
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k : ℕ
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)
state_after: case intro.intro
a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)

tactic: have k2_nonzero : k2 ≠ 0 := fun k2_zero => by simp [k2_zero] at pr
state_before: case intro.intro
a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)
state_after: case intro.intro
a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
k2_nonzero : k2 ≠ 0
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)

tactic: rw [Nat.mul_div_cancel_left k (Nat.pos_of_ne_zero a_split), pr,
  Nat.mul_div_cancel_left k2 (Nat.pos_of_ne_zero c_split), Nat.mul_comm ((c + 1) * k2) k, ←
  Nat.mul_assoc k (c + 1) k2, Nat.mul_div_cancel _ (Nat.pos_of_ne_zero k2_nonzero),
  Nat.mul_div_cancel _ (Nat.pos_of_ne_zero c_split)]
state_before: case intro.intro
a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
k2_nonzero : k2 ≠ 0
⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)
state_after: no goals

tactic: simp [k2_zero] at pr
state_before: a✝ b c✝ d m n k✝ : ℕ
p q : ℕ → Prop
a c : ℕ
a_split : a + 1 ≠ 0
c_split : c + 1 ≠ 0
k k2 : ℕ
pr : a + 1 = (c + 1) * k2
k2_zero : k2 = 0
⊢ False
state_after: no goals