Theorem: Nat.ord_compl_dvd_ord_compl_of_dvd
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rcases em' p.Prime with (pp | pp)
state_before: a b : ℕ
hab : a ∣ b
p : ℕ
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: rcases eq_or_ne b 0 with (rfl | hb0)
state_before: case inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: rcases eq_or_ne a 0 with (rfl | ha0)
state_before: case inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: have ha := (Nat.div_pos (ord_proj_le p ha0) (ord_proj_pos a p)).ne'
state_before: case inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: have hb := (Nat.div_pos (ord_proj_le p hb0) (ord_proj_pos b p)).ne'
state_before: case inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
ha : a / p ^ ↑(factorization a) p ≠ 0
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: rw [← factorization_le_iff_dvd ha hb, factorization_ord_compl a p, factorization_ord_compl b p]
state_before: case inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
ha : a / p ^ ↑(factorization a) p ≠ 0
hb : b / p ^ ↑(factorization b) p ≠ 0
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: intro q
state_before: case inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
ha : a / p ^ ↑(factorization a) p ≠ 0
hb : b / p ^ ↑(factorization b) p ≠ 0
⊢ Finsupp.erase p (factorization a) ≤ Finsupp.erase p (factorization b)

tactic: rcases eq_or_ne q p with (rfl | hqp)
state_before: case inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
ha : a / p ^ ↑(factorization a) p ≠ 0
hb : b / p ^ ↑(factorization b) p ≠ 0
q : ℕ
⊢ ↑(Finsupp.erase p (factorization a)) q ≤ ↑(Finsupp.erase p (factorization b)) q

tactic: simp_rw [erase_ne hqp]
state_before: case inr.inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
ha : a / p ^ ↑(factorization a) p ≠ 0
hb : b / p ^ ↑(factorization b) p ≠ 0
q : ℕ
hqp : q ≠ p
⊢ ↑(Finsupp.erase p (factorization a)) q ≤ ↑(Finsupp.erase p (factorization b)) q

tactic: exact (factorization_le_iff_dvd ha0 hb0).2 hab q
state_before: case inr.inr.inr.inr
a b : ℕ
hab : a ∣ b
p : ℕ
pp : Prime p
hb0 : b ≠ 0
ha0 : a ≠ 0
ha : a / p ^ ↑(factorization a) p ≠ 0
hb : b / p ^ ↑(factorization b) p ≠ 0
q : ℕ
hqp : q ≠ p
⊢ ↑(factorization a) q ≤ ↑(factorization b) q

tactic: simp [pp, hab]
state_before: case inl
a b : ℕ
hab : a ∣ b
p : ℕ
pp : ¬Prime p
⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p

tactic: simp
state_before: case inr.inl
a p : ℕ
pp : Prime p
hab : a ∣ 0
⊢ a / p ^ ↑(factorization a) p ∣ 0 / p ^ ↑(factorization 0) p

tactic: cases hb0 (zero_dvd_iff.1 hab)
state_before: case inr.inr.inl
b p : ℕ
pp : Prime p
hb0 : b ≠ 0
hab : 0 ∣ b
⊢ 0 / p ^ ↑(factorization 0) p ∣ b / p ^ ↑(factorization b) p

tactic: simp
state_before: case inr.inr.inr.inl
a b : ℕ
hab : a ∣ b
hb0 : b ≠ 0
ha0 : a ≠ 0
q : ℕ
pp : Prime q
ha : a / q ^ ↑(factorization a) q ≠ 0
hb : b / q ^ ↑(factorization b) q ≠ 0
⊢ ↑(Finsupp.erase q (factorization a)) q ≤ ↑(Finsupp.erase q (factorization b)) q