-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathM_D_aux.prf
More file actions
547 lines (546 loc) · 23.6 KB
/
M_D_aux.prf
File metadata and controls
547 lines (546 loc) · 23.6 KB
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
(M_D_aux
(neg_is_minus 0
(neg_is_minus-1 nil 3887767996 ("" (grind) nil nil)
((neg_M_D const-decl "[T -> nbit]" M_D_aux nil)
(b2n const-decl "nbit" bit nil)
(O const-decl "T3" function_props nil)
(M_D const-decl "[T -> nbit]" M_D_aux nil))
shostak))
(union_dual 0
(union_dual-1 nil 3887768006 ("" (grind) nil nil)
((nnint_times_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
(even_times_int_is_even application-judgement "even_int" integers
nil)
(int_times_even_is_even application-judgement "even_int" integers
nil)
(M_D const-decl "[T -> nbit]" M_D_aux nil)
(member const-decl "bool" sets nil)
(union const-decl "set" sets nil) (b2n const-decl "nbit" bit nil)
(O const-decl "T3" function_props nil)
(neg_M_D const-decl "[T -> nbit]" M_D_aux nil))
shostak))
(intersection_is_product 0
(intersection_is_product-1 nil 3887768013 ("" (grind) nil nil)
((nnint_times_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
(even_times_int_is_even application-judgement "even_int" integers
nil)
(M_D const-decl "[T -> nbit]" M_D_aux nil)
(member const-decl "bool" sets nil)
(intersection const-decl "set" sets nil)
(b2n const-decl "nbit" bit nil)
(O const-decl "T3" function_props nil))
shostak))
(M_D_sum_TCC1 0
(M_D_sum_TCC1-1 nil 3888313880 ("" (use "finite_subset[T]") nil nil)
((T formal-nonempty-type-decl nil M_D_aux nil)
(finite_subset formula-decl nil finite_sets nil))
nil (M_D_sum subtype "M_D_aux.a" "finite_set[T]")))
(M_D_sum 0
(M_D_sum-1 nil 3887768031
("" (induct "D" :name "finite_set_induction_rest[T]")
(("1" (lemma "card_emptyset[T]")
(("1" (skolem-typepred)
(("1" (expand "subset?")
(("1" (ground)
(("1" (case "a!1 = emptyset[T]")
(("1" (grind) nil nil)
("2" (hide 2) (("2" (grind-with-ext) nil nil)) nil))
nil))
nil))
nil))
nil))
nil)
("2" (skolem-typepred)
(("2" (ground)
(("2" (skolem-typepred)
(("2" (inst -2 "remove(choose(SS!1),a!1)")
(("2"
(case "subset?(a!1, SS!1) => subset?(remove(choose(SS!1), a!1), rest(SS!1))")
(("1" (ground)
(("1" (expand "sum" 2)
(("1"
(lemma "card_remove[T]"
("x" "choose(SS!1)" "S" "SS!1"))
(("1" (ground)
(("1"
(lemma "card_remove[T]"
("x" "choose(SS!1)" "S" "a!1"))
(("1" (expand "M_D")
(("1" (expand "o ")
(("1" (expand "b2n")
(("1"
(case "a!1(choose(SS!1))")
(("1"
(replace -1 * LR t)
(("1"
(lemma
"sum_f_g"
("S"
"rest(SS!1)"
"f"
"LAMBDA (x: T):
IF remove(choose(SS!1), a!1)(x) THEN 1 ELSE 0 ENDIF"
"g"
"LAMBDA (x: T): IF a!1(x) THEN 1 ELSE 0 ENDIF"))
(("1"
(ground)
(("1"
(skolem-typepred)
(("1"
(case
"remove(choose(SS!1), a!1)(x!1) = a!1(x!1)")
(("1"
(replace -1 * LR)
(("1" (propax) nil nil))
nil)
("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil)
("2"
(replace -1 * LR t)
(("2"
(lemma
"sum_f_g"
("S"
"rest(SS!1)"
"f"
"LAMBDA (x: T):
IF remove(choose(SS!1), a!1)(x) THEN 1 ELSE 0 ENDIF"
"g"
"LAMBDA (x: T): IF a!1(x) THEN 1 ELSE 0 ENDIF"))
(("2"
(ground)
(("2"
(skolem-typepred)
(("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
("2" (hide -2 3)
(("2" (expand "subset?")
(("2" (ground)
(("2" (skosimp)
(("2" (expand "member")
(("2" (expand "remove")
(("2" (prop) (("2" (grind) nil nil)) nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
("3" (hide 2)
(("3" (lemma "finite_subset[T]") (("3" (propax) nil nil)) nil))
nil))
nil)
((finite_subset formula-decl nil finite_sets nil)
(non_empty_finite_set type-eq-decl nil finite_sets nil)
(NOT const-decl "[bool -> bool]" booleans nil) nil
(rest const-decl "set" sets nil)
(nnint_plus_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
nil (int_minus_int_is_int application-judgement "int" integers nil)
(b2n const-decl "nbit" bit nil)
(real_ge_is_total_order name-judgement "(total_order?[real])"
real_props nil)
(posint_plus_nnint_is_posint application-judgement "posint"
integers nil)
(/= const-decl "boolean" notequal nil)
(injective? const-decl "bool" functions nil)
(sum_f_g formula-decl nil finite_sets_sum finite_sets)
(IF const-decl "[boolean, T, T -> T]" if_def nil)
(O const-decl "T3" function_props nil)
(card_remove formula-decl nil finite_sets nil) nil
(subset_is_partial_order name-judgement "(partial_order?[set[T]])"
sets_lemmas nil)
(remove const-decl "set" sets nil)
(nonempty? const-decl "bool" sets nil)
(choose const-decl "(p)" sets nil)
(card_emptyset formula-decl nil finite_sets nil)
(emptyset const-decl "set" sets nil)
(member const-decl "bool" sets nil)
(empty? const-decl "bool" sets nil) nil nil
(finite_emptyset name-judgement "finite_set" finite_sets nil)
(finite_set_induction_rest formula-decl nil finite_sets_inductions
finite_sets)
(T formal-nonempty-type-decl nil M_D_aux nil)
(M_D const-decl "[T -> nbit]" M_D_aux nil)
(nbit type-eq-decl nil bit nil) (< const-decl "bool" reals nil)
(sum def-decl "R" finite_sets_sum finite_sets)
(+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
(restrict const-decl "R" restrict nil)
(numfield nonempty-type-eq-decl nil number_fields nil)
(card const-decl "{n: nat | n = Card(S)}" finite_sets nil)
(Card const-decl "nat" finite_sets nil)
(nat nonempty-type-eq-decl nil naturalnumbers nil)
(>= const-decl "bool" reals nil)
(int nonempty-type-eq-decl nil integers nil)
(integer_pred const-decl "[rational -> boolean]" integers nil)
(rational nonempty-type-from-decl nil rationals nil)
(rational_pred const-decl "[real -> boolean]" rationals nil)
(real nonempty-type-from-decl nil reals nil)
(real_pred const-decl "[number_field -> boolean]" reals nil)
(number_field nonempty-type-from-decl nil number_fields nil)
(number_field_pred const-decl "[number -> boolean]" number_fields
nil)
(= const-decl "[T, T -> boolean]" equalities nil)
(number nonempty-type-decl nil numbers nil)
(pred type-eq-decl nil defined_types nil)
(boolean nonempty-type-decl nil booleans nil)
(bool nonempty-type-eq-decl nil booleans nil)
(set type-eq-decl nil sets nil)
(is_finite const-decl "bool" finite_sets nil)
(finite_set type-eq-decl nil finite_sets nil)
(IMPLIES const-decl "[bool, bool -> bool]" booleans nil)
(subset? const-decl "bool" sets nil)
(real_plus_real_is_real application-judgement "real" reals nil))
nil))
(union_dual3 0
(union_dual3-1 nil 3888315037
("" (skolem-typepred)
(("" (expand "M_D")
(("" (expand "b2n")
(("" (expand "o")
(("" (expand "Union")
(("" (lift-if)
(("" (ground)
(("1" (skolem-typepred)
(("1" (expand "extend")
(("1" (ground)
(("1" (expand "restrict")
(("1" (lemma "neg_is_minus")
(("1" (lemma "product_eq_funs")
(("1" (inst?)
(("1"
(inst
-1
"lambda (s: finite_set[T]): 1 - M_D(s)(x!1)")
(("1"
(ground)
(("1"
(replace -1 * LR t)
(("1"
(lemma
"product_x"
("x"
"a!1"
"S"
"A!1"
"f"
"LAMBDA (s: finite_set[T]): 1 - M_D(s)(x!1)"))
(("1"
(ground)
(("1"
(replace -1 * LR t)
(("1"
(case "M_D(a!1)(x!1) = 1")
(("1" (grind) nil nil)
("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil)
("2"
(hide 2)
(("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
("2" (expand "restrict")
(("2" (lemma "product_eq_funs")
(("2"
(inst -1 "A!1"
"LAMBDA (s: finite_set[T]): neg_M_D(s)(x!1)"
"LAMBDA (s: finite_set[T]): 1 - M_D(s)(x!1)")
(("2" (ground)
(("1" (replace -1 * LR t)
(("1" (case "FORALL (a: (A!1)): NOT a(x!1)")
(("1" (hide 1)
(("1"
(lemma
"product_eq_funs"
("S"
"A!1"
"f"
"LAMBDA (s: finite_set[T]): 1 - M_D(s)(x!1)"
"g"
"LAMBDA (s: finite_set[T]): 1"))
(("1"
(lemma
"product_const"
("S" "A!1" "c" "1"))
(("1"
(ground)
(("1"
(replace -1 * LR t)
(("1"
(replace -1 * LR t)
(("1"
(lemma "expt_1i")
(("1" (grind) nil nil))
nil))
nil))
nil)
("2"
(hide 2)
(("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil)
("2" (hide 3) (("2" (grind) nil nil))
nil))
nil))
nil)
("2" (hide 2 3)
(("2" (use "neg_is_minus")
(("2" (grind) nil nil)) nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
(nil (M_D const-decl "[T -> nbit]" M_D_aux nil)
(O const-decl "T3" function_props nil)
(finite_extend application-judgement "finite_set[T]"
extend_set_props nil)
(product_const formula-decl nil finite_sets_product_real
finite_sets)
(expt_1i formula-decl nil exponentiation nil)
(card const-decl "{n: nat | n = Card(S)}" finite_sets nil)
(Card const-decl "nat" finite_sets nil)
(expt def-decl "real" exponentiation nil)
(^ const-decl "real" exponentiation nil)
(posnat_expt application-judgement "posnat" exponentiation nil)
(minus_int_is_int application-judgement "int" integers nil)
(posint_exp application-judgement "posint" exponentiation nil)
(extend const-decl "R" extend nil)
(FALSE const-decl "bool" booleans nil)
(setof type-eq-decl nil defined_types nil)
(int_times_int_is_int application-judgement "int" integers nil)
(neg_is_minus formula-decl nil M_D_aux nil)
(number nonempty-type-decl nil numbers nil)
(number_field_pred const-decl "[number -> boolean]" number_fields
nil)
(number_field nonempty-type-from-decl nil number_fields nil)
(real_pred const-decl "[number_field -> boolean]" reals nil)
(real nonempty-type-from-decl nil reals nil)
(rational_pred const-decl "[real -> boolean]" rationals nil)
(rational nonempty-type-from-decl nil rationals nil)
(integer_pred const-decl "[rational -> boolean]" integers nil)
(int nonempty-type-eq-decl nil integers nil)
(>= const-decl "bool" reals nil)
(nat nonempty-type-eq-decl nil naturalnumbers nil)
(< const-decl "bool" reals nil) (nbit type-eq-decl nil bit nil)
(neg_M_D const-decl "[T -> nbit]" M_D_aux nil) nil
(* const-decl "[numfield, numfield -> numfield]" number_fields nil)
(product_x formula-decl nil finite_sets_product finite_sets)
(injective? const-decl "bool" functions nil)
(/= const-decl "boolean" notequal nil)
(member const-decl "bool" sets nil)
(remove const-decl "set" sets nil)
(empty? const-decl "bool" sets nil)
(= const-decl "[T, T -> boolean]" equalities nil) nil
(real_ge_is_total_order name-judgement "(total_order?[real])"
real_props nil)
(odd_minus_odd_is_even application-judgement "even_int" integers
nil)
(- const-decl "[numfield, numfield -> numfield]" number_fields nil)
(numfield nonempty-type-eq-decl nil number_fields nil)
(product_eq_funs formula-decl nil finite_sets_product_real
finite_sets)
(restrict const-decl "R" restrict nil)
(int_minus_int_is_int application-judgement "int" integers nil)
(Union const-decl "set" sets nil) (b2n const-decl "nbit" bit nil)
(finite_set type-eq-decl nil finite_sets nil)
(is_finite const-decl "bool" finite_sets nil)
(set type-eq-decl nil sets nil)
(T formal-nonempty-type-decl nil M_D_aux nil)
(NOT const-decl "[bool -> bool]" booleans nil)
(bool nonempty-type-eq-decl nil booleans nil)
(boolean nonempty-type-decl nil booleans nil))
shostak))
(intersection_is_product3 0
(intersection_is_product3-1 nil 3888308362
("" (skolem-typepred)
(("" (expand "Intersection")
((""
(lemma "product_eq_funs"
("S" "A!1" "f" "LAMBDA (s: finite_set[T]): M_D(s)(x!1)" "g"
"LAMBDA (s: finite_set[T]): 1"))
(("" (lemma "expt_1i")
(("" (lemma "product_const" ("S" "A!1" "c" "1"))
(("" (expand "restrict")
(("" (expand "M_D")
(("" (expand "b2n")
(("" (expand "o")
(("" (lift-if)
(("" (ground)
(("1" (replace -2 * LR t)
(("1" (replace -2 * LR t)
(("1" (grind) nil nil)) nil))
nil)
("2" (skolem-typepred)
(("2"
(lemma "product_x"
("x" "a!1" "S" "A!1" "f"
"LAMBDA (s: finite_set[T]): IF s(x!1) THEN 1 ELSE 0 ENDIF"))
(("1" (replace -3 * LR t)
(("1"
(replace -3 * LR t)
(("1"
(inst?)
(("1"
(replace -3 * LR t)
(("1"
(beta -1)
(("1" (ground) nil nil))
nil))
nil))
nil))
nil))
nil)
("2" (grind) nil nil))
nil))
nil)
("3" (grind) nil nil)
("4" (case "EXISTS (a:(A!1)): NOT a(x!1)")
(("1" (hide 1 3)
(("1" (skolem-typepred)
(("1"
(lemma
"product_x"
("x"
"a!1"
"S"
"A!1"
"f"
"LAMBDA (s: finite_set[T]): IF s(x!1) THEN 1 ELSE 0 ENDIF"))
(("1"
(replace -1 * LR t)
(("1"
(beta 2)
(("1"
(lift-if 2)
(("1" (grind) nil nil))
nil))
nil))
nil))
nil))
nil))
nil)
("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
((Intersection const-decl "set" sets nil)
(expt_1i formula-decl nil exponentiation nil)
(restrict const-decl "R" restrict nil)
(b2n const-decl "nbit" bit nil)
(/= const-decl "boolean" notequal nil)
(remove const-decl "set" sets nil)
(even_times_int_is_even application-judgement "even_int" integers
nil)
(A!1 skolem-const-decl "finite_set[finite_set[T]]" M_D_aux nil)
(a!1 skolem-const-decl
"(extend[setof[T], finite_set[T], bool, FALSE](A!1))" M_D_aux nil)
(setof type-eq-decl nil defined_types nil)
(FALSE const-decl "bool" booleans nil)
(extend const-decl "R" extend nil)
(empty? const-decl "bool" sets nil)
(member const-decl "bool" sets nil)
(finite_remove application-judgement "finite_set[finite_set[T]]"
M_D_aux nil)
(nnint_times_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
(finite_extend application-judgement "finite_set[T]"
extend_set_props nil)
(AND const-decl "[bool, bool -> bool]" booleans nil)
(product_x formula-decl nil finite_sets_product finite_sets)
(IF const-decl "[boolean, T, T -> T]" if_def nil)
(numfield nonempty-type-eq-decl nil number_fields nil)
(* const-decl "[numfield, numfield -> numfield]" number_fields nil)
(minus_int_is_int application-judgement "int" integers nil)
(posnat_expt application-judgement "posnat" exponentiation nil)
(real_ge_is_total_order name-judgement "(total_order?[real])"
real_props nil)
(^ const-decl "real" exponentiation nil)
(injective? const-decl "bool" functions nil)
(expt def-decl "real" exponentiation nil)
(card const-decl "{n: nat | n = Card(S)}" finite_sets nil)
(Card const-decl "nat" finite_sets nil)
(= const-decl "[T, T -> boolean]" equalities nil)
(posint_exp application-judgement "posint" exponentiation nil)
(product_nat application-judgement "nat" M_D_aux nil)
(O const-decl "T3" function_props nil)
(product_const formula-decl nil finite_sets_product_real
finite_sets)
(product_eq_funs formula-decl nil finite_sets_product_real
finite_sets)
(number nonempty-type-decl nil numbers nil)
(number_field_pred const-decl "[number -> boolean]" number_fields
nil)
(number_field nonempty-type-from-decl nil number_fields nil)
(real_pred const-decl "[number_field -> boolean]" reals nil)
(real nonempty-type-from-decl nil reals nil)
(rational_pred const-decl "[real -> boolean]" rationals nil)
(rational nonempty-type-from-decl nil rationals nil)
(integer_pred const-decl "[rational -> boolean]" integers nil)
(int nonempty-type-eq-decl nil integers nil)
(>= const-decl "bool" reals nil)
(nat nonempty-type-eq-decl nil naturalnumbers nil)
(< const-decl "bool" reals nil) (nbit type-eq-decl nil bit nil)
(M_D const-decl "[T -> nbit]" M_D_aux nil)
(finite_set type-eq-decl nil finite_sets nil)
(is_finite const-decl "bool" finite_sets nil)
(set type-eq-decl nil sets nil)
(T formal-nonempty-type-decl nil M_D_aux nil)
(NOT const-decl "[bool -> bool]" booleans nil)
(bool nonempty-type-eq-decl nil booleans nil)
(boolean nonempty-type-decl nil booleans nil))
shostak)))