-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChapter_9.v
318 lines (270 loc) · 5.96 KB
/
Chapter_9.v
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
(* Authors: Anders Kaseorg, Chelsea Voss. *)
Axiom Bird : Type.
Axiom Call : Bird -> Bird -> Bird.
Notation "A $ B" := (Call A B) (at level 50).
Definition composes A B C : Prop :=
forall x, C $ x = A $ (B $ x).
Definition is_compose compose := forall A B, composes A B (compose A B).
Definition mockingbird M : Prop :=
forall x, M $ x = x $ x.
Definition fond A B : Prop := A $ B = B.
Theorem Problem_1 :
forall compose,
is_compose compose ->
forall M,
mockingbird M ->
forall A, exists B, fond A B.
Proof.
intros.
exists (M $ compose A M).
congruence.
Qed.
(*YA*)
Definition egocentric x : Prop := x $ x = x.
Theorem Problem_2 :
forall compose,
is_compose compose ->
forall M,
mockingbird M ->
exists e, egocentric e.
Proof.
intros.
exists (M $ compose M M).
congruence.
Qed.
Definition agree A B x : Prop := A $ x = B $ x.
Definition agreeable A : Prop := forall B, exists x, agree A B x.
Theorem Problem_3 :
forall compose,
is_compose compose ->
forall A,
agreeable A ->
forall B, exists C, fond B C.
Proof.
intros.
destruct H0 with (compose B A) as [D].
exists (A $ D).
congruence.
Qed.
Theorem Problem_4 :
forall compose,
is_compose compose ->
forall A B C,
composes A B C ->
agreeable C ->
agreeable A.
Proof.
intros.
intro D.
destruct H1 with (compose D B) as [x].
exists (B $ x).
congruence.
Qed.
Theorem Problem_5 :
forall compose,
is_compose compose ->
forall A B C,
exists D,
forall x,
D $ x = A $ (B $ (C $ x)).
Proof.
intros.
exists (compose A (compose B C)).
congruence.
Qed.
Definition compatible A B : Prop := exists x y, A $ x = y /\ B $ y = x.
Theorem Problem_6 :
forall compose,
is_compose compose ->
forall M,
mockingbird M ->
forall A B, compatible A B.
Proof.
intros.
exists (M $ compose (compose B A) M).
exists (A $ (M $ compose (compose B A) M)).
split; congruence.
Qed.
Definition happy A : Prop := compatible A A.
Theorem Problem_7 :
forall A B, fond A B -> happy A.
Proof.
intros.
exists B, B.
split; congruence.
Qed.
Definition normal A := exists B, fond A B.
Theorem Problem_8 :
forall compose,
is_compose compose ->
forall Ha,
happy Ha ->
exists N, normal N.
Proof.
intros.
exists (compose Ha Ha).
destruct H0.
exists x.
destruct H0.
destruct H0.
congruence.
Qed.
Definition fixated A B := forall y, A $ y = B.
Definition hopelessly_egocentric B := fixated B B.
Definition kestrel K := forall x, fixated (K $ x) x.
Theorem Problem_9 :
forall compose,
is_compose compose ->
forall M,
mockingbird M ->
forall K,
kestrel K ->
exists B, hopelessly_egocentric B.
Proof.
intros.
exists (M $ compose K M).
congruence.
Qed.
Theorem Problem_10 :
forall x y, fixated x y -> fond x y.
Proof.
congruence.
Qed.
Theorem Problem_11 :
forall K, kestrel K -> egocentric K -> hopelessly_egocentric K.
Proof.
congruence.
Qed.
Theorem Problem_12 :
forall K, kestrel K -> forall x, egocentric (K $ x) -> fond K x.
Proof.
congruence.
Qed.
Theorem Problem_13 :
forall A, hopelessly_egocentric A -> forall x y, A $ x = A $ y.
Proof.
congruence.
Qed.
Theorem Problem_14 :
forall A, hopelessly_egocentric A -> forall x y, A $ x $ y = A.
Proof.
congruence.
Qed.
Theorem Problem_15 :
forall A, hopelessly_egocentric A -> forall x, hopelessly_egocentric (A $ x).
Proof.
congruence.
Qed.
Theorem Problem_16 :
forall K, kestrel K -> forall x y, K $ x = K $ y -> x = y.
Proof.
intros.
replace x with (K $ x $ K); congruence.
Qed.
Theorem Problem_17 :
forall B x y, fixated B x -> fixated B y -> x = y.
Proof.
intros.
replace x with (B $ B); congruence.
Qed.
Theorem Problem_18 :
forall K, kestrel K -> forall x, fond K (K $ x) -> fond K x.
Proof.
intros.
apply Problem_16 with K; congruence.
Qed.
Definition lonely (B : Bird) : Prop := forall x, B = x.
Theorem Problem_19 :
forall K, kestrel K -> egocentric K -> lonely K.
Proof.
intros.
intro.
apply Problem_16 with K; congruence.
Qed.
Definition identity I := forall x, I $ x = x.
Theorem Problem_20 :
forall I, identity I -> agreeable I -> forall B, exists x, fond B x.
Proof.
intros.
destruct H0 with B.
exists x.
congruence.
Qed.
Theorem Problem_21 :
forall I, identity I -> (forall B, exists x, fond B x) -> agreeable I.
Proof.
intros.
intro.
destruct H0 with B.
exists x.
congruence.
Qed.
Theorem Problem_22 :
forall I, identity I ->
(forall A B, compatible A B) ->
(forall C, normal C) /\ agreeable I.
Proof.
split.
- intros.
destruct H0 with C I.
exists x.
destruct H1.
destruct H1.
congruence.
- intro B.
destruct H0 with B I.
exists x.
destruct H1.
destruct H1.
congruence.
Qed.
Theorem Problem_23 :
forall I, identity I -> hopelessly_egocentric I -> lonely I.
Proof.
congruence.
Qed.
Definition lark L := forall x y, (L $ x) $ y = x $ (y $ y).
Theorem Problem_24 :
forall L, lark L -> forall I, identity I -> exists M, mockingbird M.
Proof.
intros.
exists (L $ I).
congruence.
Qed.
Theorem Problem_25 :
forall L, lark L -> forall A, exists B, fond A B.
Proof.
intros.
exists (L $ A $ (L $ A)).
congruence.
Qed.
Definition attractive A := forall B, fond B A.
Theorem Problem_26 :
forall L, lark L -> hopelessly_egocentric L -> attractive L.
Proof.
intros.
intro.
transitivity (L $ L); congruence.
Qed.
Theorem Problem_27 :
forall L, lark L -> forall K, kestrel K -> fond L K -> exists B, lark B /\ kestrel B.
Proof.
intros.
replace L with K in H.
- exists K; tauto.
- apply Problem_19; congruence.
Qed.
Theorem Problem_28 :
forall K, kestrel K -> forall L, lark L -> fond K L -> forall B, fond B L.
Proof.
intros.
apply Problem_26; congruence.
Qed.
Theorem Problem_29 :
forall L, lark L -> exists B, egocentric B.
Proof.
intros.
exists (L $ L $ L $ (L $ L $ L) $ (L $ L $ L $ (L $ L $ L))).
congruence.
Qed.
(*End*)