-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPruebas_de_P→Q,P→¬Q⊢¬P.lean
126 lines (111 loc) · 1.77 KB
/
Pruebas_de_P→Q,P→¬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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
-- Pruebas de P → Q, P → ¬Q ⊢ ¬P
-- =============================
import tactic
variables (P Q : Prop)
-- ----------------------------------------------------
-- Ej. 1. (p. 16) Demostrar
-- P → Q, P → ¬Q ⊢ ¬P
-- ----------------------------------------------------
-- 1ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
assume h3 : P,
have h4 : Q,
from h1 h3,
have h5 : ¬Q,
from h2 h3,
show false,
from h5 h4
-- 2ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
assume h3 : P,
have h4 : Q := h1 h3,
have h5 : ¬Q := h2 h3,
show false,
from h5 h4
-- 3ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
assume h3 : P,
show false,
from (h2 h3) (h1 h3)
-- 4ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
assume h3 : P, (h2 h3) (h1 h3)
-- 5ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
λ h, (h2 h) (h1 h)
-- 6ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
begin
intro h,
have h3 : ¬Q := h2 h,
apply h3,
apply h1,
exact h,
end
-- 7ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
begin
intro h,
have h3 : ¬Q := h2 h,
apply h3,
exact h1 h,
end
-- 8ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
begin
intro h,
have h3 : ¬Q := h2 h,
exact h3 (h1 h),
end
-- 9ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
begin
intro h,
exact (h2 h) (h1 h),
end
-- 10ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
λ h, (h2 h) (h1 h)
-- 11ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
-- by hint
by finish
-- 12ª demostración
example
(h1 : P → Q)
(h2 : P → ¬Q)
: ¬P :=
by tauto!