forked from jrh13/hol-light
-
Notifications
You must be signed in to change notification settings - Fork 12
/
CHANGES
14156 lines (9866 loc) · 495 KB
/
CHANGES
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
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
* *****************************************************************
* NB: This CHANGES file no longer gives a comprehensive list of *
* changes made to the system. In particular, most changes in the *
* Multivariate theories are excluded, simply because there are *
* so many of them that tracking them would be tedious. For more *
* detailed update lists, consult the git logs ("git log" if you *
* have the system downloaed) or the list of commits on the Web *
* page: https://github.com/jrh13/hol-light/commits/master *
* *****************************************************************
Thu 17th Nov 2016 arith.ml, real.ml, int.ml, iterate.ml
Added a miscellany of trivial but handy theorems:
INTER_NUMSEG =
|- !m n p q. (m..n) INTER (p..q) = MAX m p..MIN n q
INT_SGNS_EQ =
|- !x y.
int_sgn x = int_sgn y <=>
(x = &0 <=> y = &0) /\ (x > &0 <=> y > &0) /\ (x < &0 <=> y < &0)
INT_SGNS_EQ_ALT =
|- !x y.
int_sgn x = int_sgn y <=>
(x = &0 ==> y = &0) /\ (x > &0 ==> y > &0) /\ (x < &0 ==> y < &0)
LDIV_LT_EQ =
|- !a b n. ~(a = 0) ==> (n < b DIV a <=> a * (n + 1) <= b)
RDIV_LT_EQ =
|- !a b n. ~(a = 0) ==> (b DIV a < n <=> b < a * n)
REAL_SGNS_EQ =
|- !x y.
real_sgn x = real_sgn y <=>
(x = &0 <=> y = &0) /\ (x > &0 <=> y > &0) /\ (x < &0 <=> y < &0)
REAL_SGNS_EQ_ALT =
|- !x y.
real_sgn x = real_sgn y <=>
(x = &0 ==> y = &0) /\ (x > &0 ==> y > &0) /\ (x < &0 ==> y < &0)
Mon 24th Oct 2016 wf.ml
Added the following theorem about defining recursive functions based on an
existential condition, after finally getting tired of effectively proving
special cases using the same reasoning:
WF_REC_EXISTS : thm =
|- WF (<<)
==> (!P. (!f g x y.
(!z. z << x ==> f z = g z) ==> (P f x y <=> P g x y)) /\
(!f x. (!z. z << x ==> P f z (f z)) ==> (?y. P f x y))
==> (?f. !x. P f x (f x)))
Sun 23rd Oct 2016 sets.ml, Library/isum.ml, Library/products.ml
Added the following occasionally handy manipulative theorem for iterated
operations, the generic one and various instances:
ITERATE_UNIV =
|- !op. monoidal op
==> (!f s.
support op f (:A) SUBSET s
==> iterate op s f = iterate op (:A) f)
NSUM_UNIV =
|- !f s. support (+) f (:A) SUBSET s ==> nsum s f = nsum (:A) f
SUM_UNIV =
|- !f s. support (+) f (:A) SUBSET s ==> sum s f = sum (:A) f
ISUM_UNIV =
|- !f s. support (+) f (:A) SUBSET s ==> isum s f = isum (:A) f
NPRODUCT_UNIV =
|- !f s. support (*) f (:A) SUBSET s ==> nproduct s f = nproduct (:A) f
PRODUCT_UNIV =
|- !f s. support (*) f (:A) SUBSET s ==> product s f = product (:A) f
Thu 6th Oct 2016 preterm.ml, bool.ml, impconv.ml, nums.ml
Removed a few bindings that generate "unused variable" warnings from OCaml.
Thu 6th Oct 2016 calc_rat.ml, Multivariate/complexes.ml
Improved REAL_FIELD so that it does a somewhat better job of handling
denominators of the form "c pow n" where c is a rational number and
n is non-constant (actually the new version marginally improves the
case where c is variable too, e.g. REAL_FIELD `&n pow n / &n pow n = &1`).
The main differences are that prenormalization does not distribute
"inv" through "pow" in the case of a non-constant power, and then the
nonzeroness-proving logic uses obvious facts like ~(x = 0) ==> ~(x^n = 0).
For instance things like this now just work:
REAL_FIELD `&2 pow m * x / &2 pow (n + m) * &2 pow n = x`;;
Also made a completely analogous change to COMPLEX_FIELD so for example
COMPLEX_FIELD `Cx(&2) pow n / Cx(&2) pow n = Cx(&1)`;;
Tue 4th Oct 2016 int.ml
Added the trivial but convenient theorem:
INTEGER_REAL_OF_INT = |- !x. integer(real_of_int x)
Tue 4th Oct 2016 Minisat/minisat_prove.ml
Fixed a long-standing and trivial bug in the preprocessing into clause form,
where definitionalization was missing a "mk_neg" in the code processing
implications, meaning they were partly confused with disjunctions. This must
have been able to lurk for such a long time because most of the tests are
already in clausal form.
Tue 27th Sep 2016 Library/floor.ml
Added a few more theorems about the "floor" function:
REAL_FLOOR_FLOOR_DIV =
|- !x n. floor (floor x / &n) = floor (x / &n)
REAL_FLOOR_LT =
|- !x n. integer n ==> (floor x < n <=> x < n)
REAL_FLOOR_TRIANGLE =
|- !x y.
floor x + floor y <= floor (x + y) /\
floor (x + y) <= (floor x + floor y) + &1
REAL_LT_FLOOR =
|- !x n. integer n ==> (n < floor x <=> n <= x - &1)
and renamed the existing REAL_FLOOR_LT to REAL_FLOOR_LT_REFL:
|- !x. floor x < x <=> ~integer x
Fri 9th Sep 2016 passim
Changed all (?) instances of "&" to "&&" and "or" to "||" to avoid any
OCaml "deprecated" warnings which will presumably soon enough become
actual errors.
Fri 9th Sep 2016 parser.ml, theorems.ml, help.ml, Examples/mizar.ml, Examples/sos.ml, miz3/miz3.ml, Help/*.doc
Renamed the parser "or" combinator from "||" to "|||", which is a bit of
a mouthful but still quite intuitive. This seemed worth doing in principle
given that "||" is overwriting an OCaml builtin, and I was more motivated
because the word "or" is now depracated in favour of "||" for the logical
"or" operation.
Fri 2nd Sep 2016 Library/card.ml
Added a couple more lemmas about bounding cardinalities of "sequences"
(expressed via cardinal exponentiation for maximum generality):
CARD_EXP_LE_REAL =
|- !s t. s <=_c (:real) /\ COUNTABLE t ==> s ^_c t <=_c (:real)
CARD_EXP_EQ_REAL =
|- !s. COUNTABLE s /\ ~(s = {}) ==> (:real) ^_c s =_c (:real)
Thu 25th Aug 2016 Library/sets.ml
Added a number of simple results about the COUNTABLE case of the new
constructs "UNION_OF" and "INTERSECTION_OF". This is the immediately
most useful case in topology, but one could of course reasonably
add "FINITE" or more general variants too.
COUNTABLE_INTERSECTION_OF_COMPLEMENT =
|- !P s. (COUNTABLE INTERSECTION_OF P) s <=>
(COUNTABLE UNION_OF (\s. P((:A) DIFF s))) ((:A) DIFF s)
COUNTABLE_INTERSECTION_OF_IDEMPOT =
|- !P:(A->bool)->bool.
COUNTABLE INTERSECTION_OF COUNTABLE INTERSECTION_OF P =
COUNTABLE INTERSECTION_OF P
COUNTABLE_INTERSECTION_OF_INC =
|- !P s:A->bool. P s ==> (COUNTABLE INTERSECTION_OF P) s
COUNTABLE_INTERSECTION_OF_INTER =
|- !P s t. (COUNTABLE INTERSECTION_OF P) s /\
(COUNTABLE INTERSECTION_OF P) t
==> (COUNTABLE INTERSECTION_OF P) (s INTER t)
COUNTABLE_INTERSECTION_OF_INTERS =
|- !P u:(A->bool)->bool.
COUNTABLE u /\ (!s. s IN u ==> (COUNTABLE INTERSECTION_OF P) s)
==> (COUNTABLE INTERSECTION_OF P) (INTERS u)
COUNTABLE_INTERSECTION_OF_UNION =
|- !P:(A->bool)->bool.
(!s t. P s /\ P t ==> P(s UNION t))
==> (!s t. (COUNTABLE INTERSECTION_OF P) s /\
(COUNTABLE INTERSECTION_OF P) t
==> (COUNTABLE INTERSECTION_OF P) (s UNION t))
COUNTABLE_UNION_OF_ASCENDING =
|- !P s:A->bool.
P {} /\ (!t u. P t /\ P u ==> P(t UNION u))
==> ((COUNTABLE UNION_OF P) s <=>
?t. (!n. P(t n)) /\
(!n. t n SUBSET t(SUC n)) /\
UNIONS {t n | n IN (:num)} = s)
COUNTABLE_UNION_OF_COMPLEMENT =
|- !P s. (COUNTABLE UNION_OF P) s <=>
(COUNTABLE INTERSECTION_OF (\s. P((:A) DIFF s))) ((:A) DIFF s)
COUNTABLE_UNION_OF_EXPLICIT =
|- !P s:A->bool.
P {}
==> ((COUNTABLE UNION_OF P) s <=>
?t. (!n. P(t n)) /\ UNIONS {t n | n IN (:num)} = s)
COUNTABLE_UNION_OF_IDEMPOT =
|- !P:(A->bool)->bool.
COUNTABLE UNION_OF COUNTABLE UNION_OF P = COUNTABLE UNION_OF P
COUNTABLE_UNION_OF_INC =
|- !P s:A->bool. P s ==> (COUNTABLE UNION_OF P) s
COUNTABLE_UNION_OF_INTER =
|- !P:(A->bool)->bool.
(!s t. P s /\ P t ==> P(s INTER t))
==> (!s t. (COUNTABLE UNION_OF P) s /\ (COUNTABLE UNION_OF P) t
==> (COUNTABLE UNION_OF P) (s INTER t))
COUNTABLE_UNION_OF_UNION =
|- !P s t. (COUNTABLE UNION_OF P) s /\ (COUNTABLE UNION_OF P) t
==> (COUNTABLE UNION_OF P) (s UNION t)
COUNTABLE_UNION_OF_UNIONS =
|- !P u:(A->bool)->bool.
COUNTABLE u /\ (!s. s IN u ==> (COUNTABLE UNION_OF P) s)
==> (COUNTABLE UNION_OF P) (UNIONS u)
Fri 19th Aug 2016 sets.ml
Added a few basic theorems, one trivial but very useful fact that
complementation is an involution, and a few basic general properties
of the "UNION_OF" and "INTERSECTION_OF" constructs:
COMPL_COMPL =
|- !s. (:A) DIFF ((:A) DIFF s) = s
INTERSECTION_OF_INC =
|- !P Q s:A->bool. P {s} /\ Q s ==> (P INTERSECTION_OF Q) s
INTERSECTION_OF_MONO =
|- !P Q Q' s:A->bool.
(P INTERSECTION_OF Q) s /\ (!x. Q x ==> Q' x)
==> (P INTERSECTION_OF Q') s
UNION_OF_INC =
|- !P Q s:A->bool. P {s} /\ Q s ==> (P UNION_OF Q) s
UNION_OF_MONO =
|- !P Q Q' s:A->bool.
(P UNION_OF Q) s /\ (!x. Q x ==> Q' x) ==> (P UNION_OF Q') s
Fri 12th Aug 2016 sets.ml
Added two natural infix constants "UNION_OF" and "INTERSECTION_OF" for the
useful and otherwise longwinded idiom that a set is a suitable (e.g. finite or
countable or pairwise disjoint) union/intersection of "somethings". Typical
examples are topological: `fsigma = COUNTABLE UNION_OF closed` etc.
UNION_OF =
|- !P Q. P UNION_OF Q =
(\s. ?u. P u /\ (!c. c IN u ==> Q c) /\ UNIONS u = s)
INTERSECTION_OF =
|- !P Q. P INTERSECTION_OF Q =
(\s. ?u. P u /\ (!c. c IN u ==> Q c) /\ INTERS u = s)
Sat 9th Jul 2016 Makefile
Added yet another disjunct to the OCaml and camlp5 version case split
for 4.03 and 6.15 respectively (Flemming Andersen pointed out that
this combination failed).
Sun 3rd Jul 2016 cart.ml
Added a finite-forcing Cartesian product for type indices (a natural thing to
have by analogy with finite_sum and finite_diff, and also requested on
hol-info by Abid Rauf):
finite_prod_tybij =
|- (!a. mk_finite_prod(dest_finite_prod a) = a) /\
(!r. r IN 1..dimindex(:A) * dimindex(:B) <=>
dest_finite_prod(mk_finite_prod r) = r)
FINITE_PROD_IMAGE =
|- (:(A,B)finite_prod) =
IMAGE mk_finite_prod (1..dimindex(:A) * dimindex(:B))
DIMINDEX_HAS_SIZE_FINITE_PROD =
|- (:(M,N)finite_prod) HAS_SIZE dimindex(:M) * dimindex(:N)
DIMINDEX_FINITE_PROD =
|- dimindex(:(M,N)finite_prod) = dimindex(:M) * dimindex(:N)
Sun 3rd Jul 2016 sets.ml, cart.ml
Added analogous theorems about distributing intersections over
Cartesian products, in two forms:
CROSS_INTERS =
|- (!s f. s CROSS (INTERS f) =
if f = {} then s CROSS UNIV else INTERS {s CROSS t | t IN f}) /\
(!f t. (INTERS f) CROSS t =
if f = {} then UNIV CROSS t else INTERS {s CROSS t | s IN f})
CROSS_INTERS_INTERS =
|- !f g. (INTERS f) CROSS (INTERS g) =
if f = {} then INTERS {UNIV CROSS t | t IN g}
else if g = {} then INTERS {s CROSS UNIV | s IN f}
else INTERS {s CROSS t | s IN f /\ t IN g}
PCROSS_INTERS =
|- (!s f. s PCROSS (INTERS f) =
if f = {} then s PCROSS UNIV
else INTERS {s PCROSS t | t IN f}) /\
(!f t. (INTERS f) PCROSS t =
if f = {} then UNIV PCROSS t else INTERS {s PCROSS t | s IN f})
PCROSS_INTERS_INTERS =
|- !f g. (INTERS f) PCROSS (INTERS g) =
if f = {} then INTERS {UNIV PCROSS t | t IN g}
else if g = {} then INTERS {s PCROSS UNIV | s IN f}
else INTERS {s PCROSS t | s IN f /\ t IN g}
Fri 24th Jun 2016 lists.ml
Added a definition of "list_of_seq" mapping a sequence s and length n
to the list [s_0,...,s_{n-1}], and various basic list theorems:
APPEND_LCANCEL =
|- !l1 l2 l3. APPEND l1 l2 = APPEND l1 l3 <=> l2 = l3
APPEND_RCANCEL =
|- !l1 l2 l3. APPEND l1 l3 = APPEND l2 l3 <=> l1 = l2
BUTLAST_APPEND =
|- !l m.
BUTLAST (APPEND l m) =
(if m = [] then BUTLAST l else APPEND l (BUTLAST m))
EL_LIST_OF_SEQ =
|- !s m n. m < n ==> EL m (list_of_seq s n) = s m
LENGTH_LIST_OF_SEQ =
|- !s n. LENGTH (list_of_seq s n) = n
LIST_EQ =
|- !l1 l2.
l1 = l2 <=>
LENGTH l1 = LENGTH l2 /\ (!n. n < LENGTH l2 ==> EL n l1 = EL n l2)
LIST_OF_SEQ_EQ_NIL =
|- !s n. list_of_seq s n = [] <=> n = 0
list_of_seq =
|- list_of_seq s 0 = [] /\
list_of_seq s (SUC n) = APPEND (list_of_seq s n) [s n]
Fri 24th Jun 2016 sets.ml
Added a few more handy set lemmas
INTER_INTERS =
|- (!f s. s INTER INTERS f =
if f = {} then s else INTERS {s INTER t | t IN f}) /\
(!f s. INTERS f INTER s =
if f = {} then s else INTERS {t INTER s | t IN f})
FINITE_UNIV_PAIR =
|- FINITE(:A#A) <=> FINITE(:A)
INFINITE_UNIV_PAIR =
|- INFINITE(:A#A) <=> INFINITE(:A)
Tue 14th Jun 2016 sets.ml
Added a few handy set theory lemmas, mainly on a theme of finite subsets
of the union of a chain:
CARD_LE_UNIONS_CHAIN =
|- !f n.
(!t u. t IN f /\ u IN f ==> t SUBSET u \/ u SUBSET t) /\
(!t. t IN f ==> FINITE t /\ CARD t <= n)
==> FINITE (UNIONS f) /\ CARD (UNIONS f) <= n
CHOOSE_SUBSET_EQ =
|- !n s. FINITE s ==> n <= CARD s <=> (?t. t SUBSET s /\ t HAS_SIZE n)
FINITE_SUBSET_UNIONS =
|- !f s.
FINITE s /\ s SUBSET UNIONS f
==> (?f'. FINITE f' /\ f' SUBSET f /\ s SUBSET UNIONS f')
FINITE_SUBSET_UNIONS_CHAIN =
|- !f s.
FINITE s /\
s SUBSET UNIONS f /\
~(f = {}) /\
(!t u. t IN f /\ u IN f ==> t SUBSET u \/ u SUBSET t)
==> (?t. t IN f /\ s SUBSET t)
INTERS_IN_CHAIN =
|- !f. FINITE f /\
~(f = {}) /\
(!s t. s IN f /\ t IN f ==> s SUBSET t \/ t SUBSET s)
==> INTERS f IN f
UNIONS_IN_CHAIN =
|- !f. FINITE f /\
~(f = {}) /\
(!s t. s IN f /\ t IN f ==> s SUBSET t \/ t SUBSET s)
==> UNIONS f IN f
Sat 4th Jun 2016 Examples/division_algebras.ml [new file]
Added a new example with two nonexistence proofs for division algebras in
higher dimensions; these are fairly straightforward corollaries of some
Multivariate results like the global inverse function theorem.
Sat 4th Jun 2016 sets.ml
Added an equivalential form of an existing theorem:
INFINITE_ENUMERATE_EQ =
|- !s. INFINITE s <=>
(?r. (!m n. m < n ==> r m < r n) /\ IMAGE r (:num) = s)
Wed 25th May 2016 sets.ml
Added the simple fact that the "proper subset" relation on a finite
set is wellfounded:
WF_PSUBSET = |- !s. FINITE s ==> WF (\t1 t2. t1 PSUBSET t2 /\ t2 SUBSET s)
Sat 7th May 2016 Library/floor.ml
Added RATIONAL_BETWEEN_EQ =
|- !a b. (?q. rational q /\ a < q /\ q < b) <=> a < b
Fri 29th Apr 2016 Library/card.ml
Added two theorems asserting that a countable chain has an "equivalent"
omega-indexed chain:
COUNTABLE_ASCENDING_CHAIN =
|- !f:(A->bool)->bool.
COUNTABLE f /\ ~(f = {}) /\
(!s t. s IN f /\ t IN f ==> s SUBSET t \/ t SUBSET s)
==> ?u. (!n. u(n) IN f) /\ (!n. u(n) SUBSET u(SUC n)) /\
UNIONS {u n | n IN (:num)} = UNIONS f
COUNTABLE_DESCENDING_CHAIN =
|- !f:(A->bool)->bool.
COUNTABLE f /\ ~(f = {}) /\
(!s t. s IN f /\ t IN f ==> s SUBSET t \/ t SUBSET s)
==> ?u. (!n. u(n) IN f) /\ (!n. u(SUC n) SUBSET u(n)) /\
INTERS {u n | n IN (:num)} = INTERS f
Sat 23rd Apr 2016 Library/products.ml
Added two obvious theorems about the sizes of cartesian products:
HAS_SIZE_CART =
|- !P m.
(!i. 1 <= i /\ i <= dimindex (:N) ==> {x | P i x} HAS_SIZE m i)
==> {v | !i. 1 <= i /\ i <= dimindex (:N) ==> P i (v$i)} HAS_SIZE
nproduct (1..dimindex (:N)) m
CARD_CART =
|- !P. (!i. 1 <= i /\ i <= dimindex (:N) ==> FINITE {x | P i x})
==> CARD {v | !i. 1 <= i /\ i <= dimindex (:N) ==> P i (v$i)} =
nproduct (1..dimindex (:N)) (\i. CARD {x | P i x})
Wed 13th Apr 2016 Library/wo.ml, Library/card.ml
Added a few basic theorems including the fact that a toset contains a
cofinal woset.
COUNTABLE_FL =
|- !l. COUNTABLE(fl l) <=> COUNTABLE l
FINITE_FL =
|- !l. FINITE(fl l) <=> FINITE l
FL =
|- !l. fl l = {x | ?y. l(x,y) \/ l(y,x)}
FL_SUBSET =
|- !l r. l SUBSET r ==> fl l SUBSET fl r
TOSET_COFINAL_WOSET =
|- !l. toset l
==> ?w. w SUBSET l /\
woset w /\
!x. x IN fl l ==> ?y. y IN fl w /\ l(x,y)
Wed 13th Apr 2016 sets.ml
Added one more trivial set theorem:
INTERS_EQ_UNIV = |- !f. INTERS f = (:A) <=> !s. s IN f ==> s = (:A)
Fri 8th Apr 2016 iterate.ml, Library/products.ml
Added some theorems about "reflecting" (= reindexing in reverse order)
various iterated constructs:
ITERATE_REFLECT =
|- !op:A->A->A.
monoidal op
==> !x m n. iterate op (m..n) x =
if n < m then neutral op
else iterate op (0..n-m) (\i. x(n - i))
NSUM_REFLECT =
|- !x m n. nsum(m..n) x = if n < m then 0 else nsum(0..n-m) (\i. x(n - i))
SUM_REFLECT =
|- !x m n. sum(m..n) x = if n < m then &0 else sum(0..n-m) (\i. x(n - i))
NPRODUCT_REFLECT =
|- !x m n. nproduct(m..n) x =
if n < m then 1 else nproduct(0..n-m) (\i. x(n - i))
PRODUCT_REFLECT =
|- !x m n. product(m..n) x =
if n < m then &1 else product(0..n-m) (\i. x(n - i))
Sun 20th Mar 2016 class.ml, sets.ml, Library/card.ml
Added a few handy trivialities:
COND_SWAP = |- !p x y. (if ~p then x else y) = (if p then y else x)
num_INFINITE_EQ = |- !s:num->bool. INFINITE s <=> !N. ?n. N <= n /\ n IN s
CARD_POWERSET_CONG =
|- !s t. s =_c t ==> {u | u SUBSET s} =_c {v | v SUBSET t}
Fri 26th Feb 2016 real.ml, int.ml
Added another simple lemma about the sign function for reals and integers:
REAL_SGN_ABS_ALT = |- !x. real_sgn x * x = abs x
INT_SGN_ABS_ALT = |- !x. int_sgn x * x = abs x
Wed 17th Feb 2016 metis.ml
Hid or removed some local theorems inside the Metis module so that they don't
show up in "search" results:
Metis_reconstruct.EXCLUDED_MIDDLE
Metis_reconstruct.IMPL_NOT_L
Metis_reconstruct.IMPL_NOT_R
Metis_reconstruct.RESOLVE_1
Metis_reconstruct.RESOLVE_2L
Metis_reconstruct.RESOLVE_2R
Metis_reconstruct.RESOLVE_3
Wed 17th Feb 2016 Permutation/morelist.ml, Permutation/permutation.ml
Added a few more lemmas based on the concepts in the Permutation library:
LIST_UNIQ_EQ_PAIRWISE_DISTINCT =
|- LIST_UNIQ = PAIRWISE (\x y. ~(x = y))
ORDERED_PAIRWISE =
|- ORDERED = PAIRWISE
PERMUTED_APPEND_CONG =
|- !l1 l1' l2 l2'.
l1 PERMUTED l1' /\ l2 PERMUTED l2'
==> APPEND l1 l2 PERMUTED APPEND l1' l2'
PERMUTED_APPEND_LCANCEL =
|- !l1 l2 l3. APPEND l1 l2 PERMUTED APPEND l1 l3 <=> l2 PERMUTED l3
PERMUTED_APPEND_RCANCEL =
|- !l1 l2 l3. APPEND l1 l3 PERMUTED APPEND l2 l3 <=> l1 PERMUTED l2
PERMUTED_LENGTH_MEM =
|- !l l'.
LIST_UNIQ l /\ LENGTH l = LENGTH l' /\ (!x. MEM x l <=> MEM x l')
==> l PERMUTED l'
Wed 17th Feb 2016 lists.ml, sets.ml
Added a few elementary list theorems and moved the definition of (list)
PAIRWISE from sets.ml to lists.ml, which seems a more thematic home. New
theorems:
LENGTH_ZIP =
|- !l1 l2. LENGTH l1 = LENGTH l2 ==> LENGTH (ZIP l1 l2) = LENGTH l2
PAIRWISE_APPEND =
|- !R l m.
PAIRWISE R (APPEND l m) <=>
PAIRWISE R l /\ PAIRWISE R m /\ (!x y. MEM x l /\ MEM y m ==> R x y)
PAIRWISE_IMPLIES =
|- !R R' l.
PAIRWISE R l /\ (!x y. MEM x l /\ MEM y l /\ R x y ==> R' x y)
==> PAIRWISE R' l
PAIRWISE_MAP =
|- !R f l. PAIRWISE R (MAP f l) <=> PAIRWISE (\x y. R (f x) (f y)) l
PAIRWISE_TRANSITIVE =
|- !R x y l.
(!x y z. R x y /\ R y z ==> R x z)
==> (PAIRWISE R (CONS x (CONS y l)) <=>
R x y /\ PAIRWISE R (CONS y l))
Fri 12th Feb 2016 Minisat/README, Minisat/zc2mso/zc2mso.C, Formal_ineqs/examples_flyspeck.hl, Formal_ineqs/docs/FormalVerifier.tex
Fixed a few broken URLs (including changing Flyspeck from Google Code to the
new Github repo: https://github.com/flyspeck/flyspeck), and added a line to
Minisat/zc2mso/zc2mso.C to make it compile out of the box with a recent g++.
Thu 11th Feb 2016 fusion.ml, nums.ml, calc_num.ml
Slightly tweaked "MK_COMB" to compare the types of the right-hand sides of the
equations rather than the left (on the expectation that in typical uses the
RHS will be simpler and therefore quicker to type).
Also made a couple of tiny efficiency tweaks to ensure the :num and :num->num
types in "NUMERAL", "BIT0" and "BIT1" are actually pointer ==.
Tue 9th Feb 2016 metis.ml [new file], meson.ml, passim
Installed Michael Färber and Cezary Kaliszyk's OCaml and HOL Light version
of Joe Leslie-Hurd's Metis prover. This provides alternatives to the various
MESON functions with the same naming convention: ASM_METIS_TAC, METIS_TAC and
METIS. Slightly reorganized meson.ml as part of this installation into a module
so that some of the "hidden" functions can be re-used, and changed a few MESON
calls to METIS where it is obviously faster (no doubt there are many more, and
many opportunities to prove things automatically that are currently manual).
Fri 29th Jan 2016 cart.ml
Added a "subtraction" on type indices, with a type constructor "finite_diff"
analogous to "finite_sum", with the following type definition theorem and other
lemmas:
finite_diff_tybij =
|- (!a. mk_finite_diff (dest_finite_diff a) = a) /\
(!r. r IN
1..
(if dimindex (:B) < dimindex (:A)
then dimindex (:A) - dimindex (:B)
else 1) <=>
dest_finite_diff (mk_finite_diff r) = r)
FINITE_DIFF_IMAGE =
|- (:(A,B)finite_diff) =
IMAGE mk_finite_diff
(1..
(if dimindex (:B) < dimindex (:A)
then dimindex (:A) - dimindex (:B)
else 1))
DIMINDEX_HAS_SIZE_FINITE_DIFF =
|- (:(M,N)finite_diff) HAS_SIZE
(if dimindex (:N) < dimindex (:M)
then dimindex (:M) - dimindex (:N)
else 1)
DIMINDEX_FINITE_DIFF =
|- dimindex (:(M,N)finite_diff) =
(if dimindex (:N) < dimindex (:M)
then dimindex (:M) - dimindex (:N)
else 1)
FINITE_DIFF_IMAGE =
|- (:(A,B)finite_diff) =
IMAGE mk_finite_diff
(1..
(if dimindex (:B) < dimindex (:A)
then dimindex (:A) - dimindex (:B)
else 1))
DIMINDEX_HAS_SIZE_FINITE_DIFF =
|- (:(M,N)finite_diff) HAS_SIZE
(if dimindex (:N) < dimindex (:M)
then dimindex (:M) - dimindex (:N)
else 1)
This can occasionally be useful to make "size-lowering" arguments.
Fri 29th Jan 2016 sets.ml
Incompatibly improved (by making the hypotheses sharper) the following
two theorems (formerly, the antecendent did not have the set membership
assertions in their own antecedent):
IMAGE_DIFF_INJ =
|- !f s t.
(!x y. x IN s /\ y IN t /\ f x = f y ==> x = y)
==> IMAGE f (s DIFF t) = IMAGE f s DIFF IMAGE f t
IMAGE_DELETE_INJ =
|- !f s a.
(!x. x IN s /\ f x = f a ==> x = a)
==> IMAGE f (s DELETE a) = IMAGE f s DELETE f a
Also added the following two variants:
IMAGE_DIFF_INJ_ALT =
|- !f s t.
(!x y. x IN s /\ y IN s /\ f x = f y ==> x = y) /\ t SUBSET s
==> IMAGE f (s DIFF t) = IMAGE f s DIFF IMAGE f t
IMAGE_DELETE_INJ_ALT =
|- !f s a.
(!x y. x IN s /\ y IN s /\ f x = f y ==> x = y) /\ a IN s
==> IMAGE f (s DELETE a) = IMAGE f s DELETE f a
Thu 28th Jan 2016 Makefile
Updated the Makefile with yet more cases, to work with OCaml 4.02 and with
camlp5 6.15. HOL Light has been tested with OCaml 4.02.3 and camlp5 6.15 (under
Cygwin64), so the combination of the two seems to work.
Thu 17th Dec 2015 Help/*.doc
Fixed several documentation errors pointed out by Marco Maggesi.
Thu 17th Dec 2015 Library/card.ml
Added a few more fairly basic cardinality lemmas:
COUNTABLE_CARD_ADD =
|- !s t. COUNTABLE s /\ COUNTABLE t ==> COUNTABLE (s +_c t)
COUNTABLE_CARD_ADD_EQ =
|- !s t. COUNTABLE (s +_c t) <=> COUNTABLE s /\ COUNTABLE t
CARD_LE_EXISTS = |- !s t. s <=_c t <=> (?u. t =_c s +_c u)
CARD_LT_IMP_SUC_LE = |- !s t a. s <_c t ==> s +_c {a} <=_c t
Thu 17th Dec 2015 real.ml, int.ml
Added two theorems characterizing sign equality as an inequality for R and Z:
REAL_SGN_EQ_INEQ =
|- !x y. real_sgn x = real_sgn y <=>
x = y \/ abs (x - y) < max (abs x) (abs y)
INT_SGN_EQ_INEQ =
|- !x y. int_sgn x = int_sgn y <=>
x = y \/ abs (x - y) < max (abs x) (abs y)
Thu 17th Dec 2015 sets.ml
Added a new and stronger form of INTERS_SUBSET
INTERS_SUBSET_STRONG =
|- !u s. (?t. t IN u /\ t SUBSET s) ==> INTERS u SUBSET s
and fixed a quantifier fumble in IMAGE_INTERS_SUBSET (now quantifies over all
the free variables and not the spurious "s"). Both these improvements were
pointed out by Joe Hurd.
Thu 3rd Dec 2015 Multivariate/cvectors.ml [new file], holtest, holtest.mk
Added a new contribution from Sanaz Khan Afshar and Vincent Aravantinos (with
contributions also from Harsh Singhal), a full theory of *complex* vectors
analogous to the real theory already in that directory.
Fri 20th Nov 2015 Library/products.ml
Added POLYNOMIAL_FUNCTION_PRODUCT =
|- !s p.
FINITE s /\ (!i. i IN s ==> polynomial_function (\x. p x i))
==> polynomial_function (\x. product s (p x))
Fri 20th Nov 2015 Library/floor.ml
Added the following natural analog of INTEGER_SUM:
RATIONAL_SUM = |- !s x. (!i. i IN s ==> rational(x i)) ==> rational(sum s x)
Fri 20th Nov 2015 sets.ml
Added a few miscellaneous set theorems, especially about images of
saturated intersections.
IMAGE_INTERS_SATURATED =
|- !f g s.
~(g = {}) /\
(!t. t IN g DELETE s ==> {x | f x IN IMAGE f t} SUBSET t)
==> IMAGE f (INTERS g) = INTERS (IMAGE (IMAGE f) g)
IMAGE_INTERS_SATURATED_GEN =
|- !f g s u.
~(g = {}) /\
(!t. t IN g ==> t SUBSET u) /\
(!t. t IN g DELETE s ==> {x | x IN u /\ f x IN IMAGE f t} SUBSET t)
==> IMAGE f (INTERS g) = INTERS (IMAGE (IMAGE f) g)
IMAGE_INTERS_SUBSET =
|- !f s. IMAGE f (INTERS g) SUBSET INTERS (IMAGE (IMAGE f) g)
IMAGE_INTER_SATURATED =
|- !f s t.
{x | f x IN IMAGE f s} SUBSET s \/ {x | f x IN IMAGE f t} SUBSET t
==> IMAGE f (s INTER t) = IMAGE f s INTER IMAGE f t
IMAGE_INTER_SATURATED_GEN =
|- !f s t u.
{x | x IN u /\ f x IN IMAGE f s} SUBSET s /\ t SUBSET u \/
{x | x IN u /\ f x IN IMAGE f t} SUBSET t /\ s SUBSET u
==> IMAGE f (s INTER t) = IMAGE f s INTER IMAGE f t
IMAGE_INTER_SUBSET =
|- !f s t. IMAGE f (s INTER t) SUBSET IMAGE f s INTER IMAGE f t
PSUBSET_UNIONS_PAIRWISE_DISJOINT =
|- !u v.
pairwise DISJOINT v /\ u PSUBSET v DELETE {}
==> UNIONS u PSUBSET UNIONS v
UNIONS_DELETE_EMPTY =
|- !s. UNIONS (s DELETE {}) = UNIONS s
UNIONS_INSERT_EMPTY =
|- !s. UNIONS ({} INSERT s) = UNIONS s
Sun 15th Nov 2015 Library/wo.ml, Library/card.ml
Added a few basic ordinal and cardinal lemmas, such as that every set is the
same size as an ordinal (on the same type) and that strict cardinal
comparability is, on a given type, wellfounded.
CARD_EQ_ORDINAL_EXISTS = |- !s. ?l. ordinal l /\ fl l =_c s
INSEG_FL_SUBSET = |- !l m. l inseg m ==> fl l SUBSET fl m
ORDINAL_FL_SUBSET_EQ =
|- !l m. ordinal l /\ ordinal m ==> (fl l SUBSET fl m <=> l inseg m)
ORDINAL_IMP_WOSET = |- !l. ordinal l ==> woset l
SUBWOSET_ISO_INSEG =
|- !l s.
woset l /\ fl l = (:A)
==> ?f. (!x y. x IN s /\ y IN s ==> (l (f x,f y) <=> l (x,y))) /\
(!x y. y IN IMAGE f s /\ l (x,y) ==> x IN IMAGE f s)
WF_CARD_LT = |- WF (<_c)
Fri 6th Nov 2015 Makefile, pa_j_3.1x_6.11.ml, README
Made two changes suggested by Randy Pollack so that HOL Light makes use
of the non-mutable strings in OCaml 4.02 in the build process for the
camlp5 syntax extension. First, modified the Makefile to explicitly build
with the "-safe-string" option for OCaml >= 4.02, and recoded the
"implode" function in pa_j_3.1x_6.11.ml to avoid the use of imperative
features. Also added a recommendation to the README file to use the
"-safe-string" option in the main HOL Light session itself.
Wed 22nd Jul 2015 Library/wo.ml
Added the basic fact that a finite toset is a woset:
WOSET_FINITE_TOSET = |- !l. toset l /\ FINITE (fl l) ==> woset l
Mon 20th Jul 2015 sets.ml
Added a series of theorems about injectivity and surjectivity of the "preimage"
construct. These are a natural dual to existing "IMAGE" versions, and
essentially show that the preimage map is injective/surjective when the
function itself is surjective/injective.
INJECTIVE_ON_PREIMAGE =
|- !f:A->B s u.
(!t t'. t SUBSET u /\ t' SUBSET u /\
{x | x IN s /\ f x IN t} = {x | x IN s /\ f x IN t'}
==> t = t') <=>
u SUBSET IMAGE f s
SURJECTIVE_ON_PREIMAGE =
|- !f s u.
(!k. k SUBSET s ==> ?t. t SUBSET u /\ {x | x IN s /\ f x IN t} = k) <=>
IMAGE f s SUBSET u /\ (!x y. x IN s /\ y IN s /\ f x = f y ==> x = y)
INJECTIVE_PREIMAGE =
|- !f. (!t t'. {x | f x IN t} = {x | f x IN t'} ==> t = t') <=>
IMAGE f UNIV = UNIV
SURJECTIVE_PREIMAGE =
|- !f. (!k. ?t. {x | f x IN t} = k) <=> (!x y. f x = f y ==> x = y)
Sun 19th Jul 2015 Library/card.ml
Renamed CARD_ADD_ABSORB to CARD_ADD_ABSORB_LEFT and added a few more basic
theorems:
CARD_ADD_ABSORB_RIGHT = |- !s t. INFINITE s /\ t <=_c s ==> s +_c t =_c s
CARD_DIFF_ABSORB = |- !s t. INFINITE s /\ t <_c s ==> s DIFF t =_c s
CARD_UNION_ABSORB_LEFT = |- !s t. INFINITE t /\ s <=_c t ==> s UNION t =_c t
CARD_UNION_ABSORB_RIGHT = |- !s t. INFINITE s /\ t <=_c s ==> s UNION t =_c s
Fri 17th Jul 2015 Library/floor.ml
Added one more theorem about the rationals:
INFINITE_RATIONAL_IN_RANGE =
|- !a b. a < b ==> INFINITE {q | rational q /\ a < q /\ q < b}
Mon 13th Jul 2015 Library/prime.ml
Added one more natural theorem about primality on N, as well as slightly
reorganizing a couple of existing proofs:
PRIME_IRREDUCIBLE =
|- !p. prime p <=>
p > 1 /\ (!a b. p divides a * b ==> p divides a \/ p divides b)
Fri 10th Jul 2015 Library/floor.ml
Added a couple more rational approximation theorems:
RATIONAL_APPROXIMATION_ABOVE =
|- !x e. &0 < e ==> (?q. rational q /\ x < q /\ q < x + e)
RATIONAL_APPROXIMATION_BELOW =
|- !x e. &0 < e ==> (?q. rational q /\ x - e < q /\ q < x)
Fri 10th Jul 2015 Library/wo.ml, Library/card.ml
Added a few new theorems about ordered sets, ordinals and cardinals, including
slightly reshuffling things between these two files. Tukey's lemma is the only
real "named" theorem. Several of these slightly fill out the rather sparse
theory of ordinals (for example showing they are themselves wellordered by
"initial segment of"), which however remains pretty sparse.
INSEG_ANTISYM = |- !l m. l inseg m /\ m inseg l ==> l = m
INSEG_ORDINAL = |- !l m. m inseg l /\ ordinal l ==> ordinal m
INSEG_REFL = |- !l. l inseg l
INSEG_TRANS = |- !l m n. l inseg m /\ m inseg n ==> l inseg n
LE_C_IMAGE_SUBSET = |- !s t. s <=_c t <=> (?f. s SUBSET IMAGE f t)
ORDINAL_FL_SUBSET =
|- !l m. ordinal l /\ ordinal m /\ fl l SUBSET fl m ==> l inseg m
ORDINAL_FL_UNIQUE =
|- !l m. ordinal l /\ ordinal m /\ fl l = fl m ==> l = m
TUKEY =
|- !s. ~(s = {}) /\
(!t. (!c. FINITE c /\ c SUBSET t ==> c IN s) <=> t IN s)
==> (?u. u IN s /\ (!v. v IN s /\ u SUBSET v ==> u = v))
WF_INSEG_WOSET =
|- WF (\x y. woset x /\ woset y /\ x inseg y /\ ~(x = y))
WOSET_INSEG_ORDINAL =
|- woset (\(x,y). ordinal x /\ ordinal y /\ x inseg y)
WOSET_WF =
|- !l. woset l <=>
WF (\x y. l(x,y) /\ ~(x = y)) /\
(!x y. fl l x /\ fl l y ==> l(x,y) \/ l(y,x))
Fri 10th Jul 2015 wf.ml
Added the simple fact that a wellfounded relation is antisymmetric
WF_ANTISYM = |- !(<<) x y. WF (<<) ==> ~(x << y /\ y << x)
Tue 30th Jun 2015 sets.ml
Added a variety of set theorems, mostly basic properties of CROSS that are
near-clones of existing theorems for PCROSS, many with the same proof.