-
Notifications
You must be signed in to change notification settings - Fork 0
/
pigeonhole_init.lean
68 lines (49 loc) · 1.16 KB
/
pigeonhole_init.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
def injective {X Y} (f : X → Y)
:= ∀ x₁ x₂, f x₁ = f x₂ → x₁ = x₂
def range {X Y} (f : X → Y)
:= { y | ∃ x, f x = y }
/--
Type of pairs (k,p) where k
is a natural number and p is a witness to the proof that k < n.
-/
def finite_subset (n : ℕ) := Σ' k, k < n
def lift_finite (m n : ℕ) (p : m < n) : finite_subset m → finite_subset n
:= λ k, ⟨k.1, lt.trans k.2 p⟩
lemma pred_exists (n : ℕ) (p: n > 0) : exists k, nat.succ k = n
:=
begin
induction n with d hd,
{sorry},
{ existsi d,
refl}
end
lemma succ_greater_than_nat (n : ℕ) : nat.succ n > n
:=
begin
induction n with d hd,
{sorry},
{sorry}
end
/--
Pigeonhole principle, induction on n
-/
theorem pigeonhole_principle
(n m : ℕ)
(f : finite_subset n → finite_subset m)
: (n > m) → ¬(injective f)
:= begin
intros n_gt_m f_injective,
induction m with d hd,
{
cases pred_exists n n_gt_m with k hk,
let n_gt_k := succ_greater_than_nat k,
rw hk at n_gt_k,
let fk := f ⟨k, n_gt_k⟩,
let fk2 := fk.2,
sorry
},
{
sorry
},
end
#print pigeonhole_principle