Skip to content

Commit

Permalink
[Usa1992P1] simplifications suggested by tryAtEachStep
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Nov 17, 2024
1 parent 6eca465 commit c5f4c4e
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Compfiles/Usa1992P1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ lemma Finset.range_prod_odd
exact Nat.lt_add_right 1 hi
exact hs i this
· apply hs
rw [Finset.mem_range]
exact lt_add_one n
exact Finset.self_mem_range_succ n

lemma lemma3 {m : ℕ} (hm : (m % 10) + 1 < 10) :
(Nat.digits 10 (m + 1)).sum = (Nat.digits 10 m).sum + 1 := by
Expand Down Expand Up @@ -519,15 +518,6 @@ problem usa1992_p1 (n : ℕ) :
case zero => simp
case succ n ih2 =>
rw [Finset.prod_range_succ]
have h10 : 1 ≤ (10 ^ 2 ^ (n + 1) - 1) := by
have h11 : 22 ^ (n + 1) := by
rw [pow_add, pow_one]
have h12 : 12 ^ n := Nat.one_le_two_pow
exact Nat.le_mul_of_pos_left 2 h12
have one_le_ten : 110 := by norm_num
have h13 : 10 ^ 210 ^ 2 ^ (n + 1) :=
Nat.pow_le_pow_of_le_right one_le_ten h11
omega
exact le_mul_of_le_of_one_le ih2 (ha1 (n + 1))

-- Now b_n = b_{n-1}10^N - b_{n-1}, where N = 2^n.
Expand Down

0 comments on commit c5f4c4e

Please sign in to comment.