case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ ↑(factorization n) p < n

case neg
n p : ℕ
hn : n ≠ 0
pp : ¬Prime p
⊢ ↑(factorization n) p < n
n p : ℕ
hn : n ≠ 0
⊢ ↑(factorization n) p < n
by_cases pp : p.Prime
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ ↑(factorization n) p < n
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ ↑(factorization n) p < n

case neg
n p : ℕ
hn : n ≠ 0
pp : ¬Prime p
⊢ ↑(factorization n) p < n
case neg =>
  simp [factorization_eq_zero_of_non_prime n pp]
  exact hn.bot_lt
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ p ^ ↑(factorization n) p < p ^ n
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ ↑(factorization n) p < n
rw [← pow_lt_iff_lt_right pp.two_le]
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ n < p ^ n
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ p ^ ↑(factorization n) p < p ^ n
apply lt_of_le_of_lt (ord_proj_le p hn)
no goals
case pos
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ n < p ^ n
exact lt_of_lt_of_le (lt_two_pow n) (pow_le_pow_of_le_left pp.two_le n)
n p : ℕ
hn : n ≠ 0
pp : ¬Prime p
⊢ 0 < n
n p : ℕ
hn : n ≠ 0
pp : ¬Prime p
⊢ ↑(factorization n) p < n
simp [factorization_eq_zero_of_non_prime n pp]
no goals
n p : ℕ
hn : n ≠ 0
pp : ¬Prime p
⊢ 0 < n
exact hn.bot_lt