-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRenombramiento_de_variables.lean
70 lines (60 loc) · 1.14 KB
/
Renombramiento_de_variables.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
-- Renombramiento de variables
-- ===========================
import tactic
variables (P Q : ℤ → Prop)
-- ----------------------------------------------------
-- Ejercicio ?. Demostrar que si
-- ∀ n, P n
-- ∀ n, P (n-1) → Q n
-- entonces
-- ∀ n, Q n
-- ----------------------------------------------------
-- 1ª demostración
example
(hP : ∀ n, P n)
(hPQ : ∀ n, P (n-1) → Q n)
: ∀ n, Q n :=
begin
intro n,
apply hPQ,
rename_var n m at hP,
exact hP (n-1),
end
-- 2ª demostración
example
(hP : ∀ n, P n)
(hPQ : ∀ n, P (n-1) → Q n)
: ∀ n, Q n :=
begin
intro a,
apply hPQ,
exact hP (a-1),
end
-- 3ª demostración
example
(hP : ∀ n, P n)
(hPQ : ∀ n, P (n-1) → Q n)
: ∀ n, Q n :=
begin
intro a,
exact hPQ a (hP (a-1)),
end
-- 4ª demostración
example
(hP : ∀ n, P n)
(hPQ : ∀ n, P (n-1) → Q n)
: ∀ n, Q n :=
λ a, hPQ a (hP (a-1))
-- 5ª demostración
example
(hP : ∀ n, P n)
(hPQ : ∀ n, P (n-1) → Q n)
: ∀ n, Q n :=
-- by hint
by tauto
-- 6ª demostración
example
(hP : ∀ n, P n)
(hPQ : ∀ n, P (n-1) → Q n)
: ∀ n, Q n :=
by finish