Skip to content

Commit 16067e3

Browse files
committed
Update Fri Nov 8 00:54:05 EST 2024
1 parent 7fd74e1 commit 16067e3

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

Math2001/Homework/hw8.lean

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/- Copyright (c) Heather Macbeth, 2024. All rights reserved. -/
2+
import Mathlib.Tactic.GCongr
3+
import Library.Basic
4+
import AutograderLib
5+
6+
macro_rules | `(tactic| gcongr_discharger) => `(tactic| numbers)
7+
math2001_init
8+
9+
namespace Nat
10+
11+
/-! # Homework 8
12+
13+
Don't forget to compare with the text version,
14+
https://github.com/hrmacbeth/math2001/wiki/Homework-8,
15+
for clearer statements and any special instructions. -/
16+
17+
18+
def B : ℕ → ℚ
19+
| 0 => 0
20+
| n + 1 => B n + (n + 1 : ℚ) ^ 2
21+
22+
@[autograded 4]
23+
theorem problem1 (n : ℕ) : B n = n * (n + 1) * (2 * n + 1) / 6 := by
24+
sorry
25+
26+
27+
def S : ℕ → ℚ
28+
| 0 => 1
29+
| n + 1 => S n + 1 / 2 ^ (n + 1)
30+
31+
@[autograded 4]
32+
theorem problem2 (n : ℕ) : S n = 2 - 1 / 2 ^ n := by
33+
sorry
34+
35+
36+
def a : ℕ → ℤ
37+
| 0 => 4
38+
| n + 1 => 3 * a n - 5
39+
40+
@[autograded 4]
41+
theorem problem3 : forall_sufficiently_large (n : ℕ), a n ≥ 10 * 2 ^ n := by
42+
sorry
43+
44+
45+
def c : ℕ → ℤ
46+
| 0 => 3
47+
| 1 => 2
48+
| n + 2 => 4 * c n
49+
50+
@[autograded 4]
51+
theorem problem4 (n : ℕ) : c n = 2 * 2 ^ n + (-2) ^ n := by
52+
sorry
53+
54+
55+
def q : ℕ → ℤ
56+
| 0 => 1
57+
| 1 => 2
58+
| n + 2 => 2 * q (n + 1) - q n + 6 * n + 6
59+
60+
@[autograded 4]
61+
theorem problem5 (n : ℕ) : q n = (n:ℤ) ^ 3 + 1 := by
62+
sorry
63+
64+
65+
@[autograded 5]
66+
theorem problem6 (n : ℕ) (hn : 0 < n) : ∃ a x, Odd x ∧ n = 2 ^ a * x := by
67+
sorry

0 commit comments

Comments
 (0)