-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPruebas_de_¬P→Q,¬Q⊢P.lean
96 lines (81 loc) · 1.35 KB
/
Pruebas_de_¬P→Q,¬Q⊢P.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
-- Pruebas de ¬P → Q, ¬Q ⊢ P
-- =========================
-- ----------------------------------------------------
-- Ej. 1. (p. 7) Demostrar
-- ¬P → Q, ¬Q ⊢ P
-- ----------------------------------------------------
import tactic
variables (P Q : Prop)
open_locale classical
-- 1ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
have h3 : ¬¬P, from mt h1 h2,
show P, from not_not.mp h3
-- 2ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
not_not.mp (mt h1 h2)
-- 3ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
begin
by_contra h3,
apply h2,
exact h1 h3,
end
-- 4ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
begin
by_contra h3,
exact h2 (h1 h3),
end
-- 5ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
by_contra (λ h3, h2 (h1 h3))
-- 6ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
by_contra (λ h3, (h2 ∘ h1) h3)
-- 7ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
by_contra (h2 ∘ h1)
-- 8ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
-- by library_search
not_not.mp (mt h1 h2)
-- 9ª demostración
example
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
-- by hint
by tauto
-- 10ª demostración
lemma aux
(h1 : ¬P → Q)
(h2 : ¬Q)
: P :=
-- by hint
by finish
-- #print axioms aux