-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPropiedad:_∃k,nIk+1⊢nM0.lean
70 lines (61 loc) · 1.23 KB
/
Propiedad:_∃k,nIk+1⊢nM0.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
69
70
-- Propiedad: ∃ k, n = k + 1 ⊢ n > 0
-- =================================
import tactic
variable (n : ℕ)
-- ----------------------------------------------------
-- Ejercicio. Demostrar que si
-- ∃ k, n = k + 1
-- entonces
-- n > 0
-- ----------------------------------------------------
-- 1ª demostración
example
(h : ∃ k : ℕ, n = k + 1)
: n > 0 :=
begin
cases h with k₀ hk₀,
rw hk₀,
exact nat.succ_pos k₀,
end
-- 2ª demostración
example
(h : ∃ k : ℕ, n = k + 1)
: n > 0 :=
begin
cases h with k₀ hk₀,
rw hk₀,
linarith,
end
-- 3ª demostración
example
(h : ∃ k : ℕ, n = k + 1)
: n > 0 :=
begin
cases h,
linarith,
end
-- 4ª demostración
example
(h : ∃ k : ℕ, n = k + 1)
: n > 0 :=
exists.elim h
( assume k₀,
assume hk₀ : n = k₀ + 1,
show n > 0, from
calc n = k₀ + 1 : hk₀
... > 0 : nat.succ_pos k₀)
-- 5ª demostración
example
(h : ∃ k : ℕ, n = k + 1)
: n > 0 :=
exists.elim h
( assume k₀,
assume hk₀ : n = k₀ + 1,
show n > 0, from
calc n = k₀ + 1 : hk₀
... > 0 : by linarith)
-- 5ª demostración
example
(h : ∃ k : ℕ, n = k + 1)
: n > 0 :=
exists.elim h (λ _ _, by linarith)