forked from jrh13/hol-light
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
15600 lines (10929 loc) · 539 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 downloaded) or the list of commits on the Web *
* page: https://github.com/jrh13/hol-light/commits/master *
* *****************************************************************
Sat 24th Mar 2018 lists.ml
Added a trivial but sometimes convenient list theorem:
MEM_REPLICATE =
|- !n x y:A. MEM x (REPLICATE n y) <=> x = y /\ ~(n = 0)
Sat 10th Mar 2018 int.ml
Added a somewhat surprising missing lemma:
INT_MUL_EQ_1 =
|- !x y:int. x * y = &1 <=> x = &1 /\ y = &1 \/ x = --(&1) /\ y = --(&1)
Sat 10th Feb 2018 iterate.ml, Library/grouptheory.ml,
Fixed a couple of name collisions, renaming the GROUP_SUM in the group theory
library to GROUP_SUM_CLAUSES to avoid clashing with the theorem about
rearranging real sums into groups, and renamed FINITE_INTSEG in iterate.ml to
FINITE_INT_SEG to avoid the other theorem of the same name in Library/floor.ml.
Sat 27th Jan 2018 int.ml, sets.ml
Added a few trivial theorems, two about integer division, one about sets:
INT_LT_REM = |- !x n. &0 < n ==> x rem n < n
INT_REM_DIV = |- !m n. m rem n = m - m div n * n
INTERS_ANTIMONO_GEN =
|- !s t. (!y. y IN t ==> ?x. x IN s /\ x SUBSET y)
==> INTERS s SUBSET INTERS t
Mon 22nd Jan 2018 Library/grouptheory.ml
Added a few more theorems to the group theory library, and in the process
created a dependency of this file on Library/card.ml, since all of these
theorems use material from there.
CARD_EQ_FREE_ABELIAN_GROUP_INFINITE =
|- !s. INFINITE s ==> group_carrier (free_abelian_group s) =_c s
CARD_EQ_HOMOMORPHISMS_FROM_FREE_ABELIAN_GROUP =
|- !s G.
abelian_group G
==> {f | EXTENSIONAL (group_carrier (free_abelian_group s)) f /\
group_homomorphism (free_abelian_group s,G) f} =_c
group_carrier G ^_c s
FINITE_PRODUCT_GROUP =
|- !k G.
FINITE (group_carrier (product_group k G)) <=>
FINITE {i | i IN k /\ ~trivial_group (G i)} /\
(!i. i IN k ==> FINITE (group_carrier (G i)))
ISOMORPHIC_FREE_ABELIAN_GROUPS =
|- !s t.
free_abelian_group s isomorphic_group free_abelian_group t <=>
s =_c t
Sun 31st Dec 2017 Examples/padics.ml [new file]
Added a construction of the p-adic numbers. This is mostly meant as an example
of using metric space completion, but some effort is made to create a usable
theory, with the p-adics for each p occupying the whole type ":padic" and with
the embeddings of naturals overlaid in the same way for all p.
Tue 5th Dec 2017 int.ml
Beefed up the previously minimal set of theorems about integer division and
remainder with the following:
INT_ADD_REM =
|- !m n p. (m rem p + n rem p) rem p = (m + n) rem p
INT_DIVISION_DECOMP =
|- !m n. m div n * n + m rem n = m
INT_DIV_0 =
|- !m. m div &0 = &0
INT_DIV_LT =
|- !m n. (~(n = &0) ==> &0 <= m) /\ m < n ==> m div n = &0
INT_DIV_RNEG =
|- !m n. m div --n = --(m div n)
INT_DIV_UNIQ =
|- !m n q r. m = q * n + r /\ &0 <= r /\ r < abs n ==> m div n = q
INT_DIV_ZERO =
|- !n. &0 div n = &0
INT_MUL_REM =
|- !m n p. (m rem p * n rem p) rem p = (m * n) rem p
INT_REM_0 =
|- !m. m rem &0 = m
INT_REM_EQ =
|- !m n p. m rem p = n rem p <=> (m == n) (mod p)
INT_REM_EQ_0 =
|- !m n. m rem n = &0 <=> n divides m
INT_REM_LT =
|- !m n. (~(n = &0) ==> &0 <= m) /\ m < n ==> m rem n = m
INT_REM_MOD_SELF =
|- !m n. (m rem n == m) (mod n)
INT_REM_REM =
|- !m n. m rem n rem n = m rem n
INT_REM_RNEG =
|- !m n. m rem --n = m rem n
INT_REM_UNIQ =
|- !m n q r. m = q * n + r /\ &0 <= r /\ r < abs n ==> m rem n = r
INT_REM_ZERO =
|- !n. &0 rem n = &0
Sat 2nd Dec 2017 real.ml, sets.ml
Added a couple of somewhat random but useful theorems:
CARTESIAN_PRODUCT_AS_RESTRICTIONS =
|- !k s.
cartesian_product k s =
{RESTRICTION k f |f| !i. i IN k ==> f i IN s i}
REAL_POS_EQ_SQUARE =
|- !x. &0 <= x <=> ?y. y pow 2 = x
Sat 2nd Dec 2017 Library/card.ml
Added a few elementary cardinality theorems, some of them surprising gaps:
CARD_EQ_INT_NUM = |- (:int) =_c (:num)
CARD_EXP_FINITE_EQ =
|- !s t. FINITE(s ^_c t) <=>
(?a. s SUBSET {a}) \/ t = {} \/ FINITE s /\ FINITE t
CARD_LE_RESTRICTED_FUNSPACE =
|- !s t k.
{f | IMAGE f s SUBSET t /\
{x | ~(f x = k x)} SUBSET s /\
FINITE {x | ~(f x = k x)}}
<=_c {u | u SUBSET (s CROSS t) /\ FINITE u}
INT_COUNTABLE = |- COUNTABLE (:int)
int_INFINITE = |- INFINITE (:int)
Sat 2nd Dec 2017 README
Updated the build instructions, in particular taking into account the fact
(pointed out by John O'Leary) that OCaml >= 4.06 no longer includes the
"num" library by default.
Sat 18th Nov 2017 Makefile, update_database_3.ml, update_database_4.ml [new file]
Incorporated an improved "update_database.ml" file from Michael Färber which
handles theorems inside modules; this had otherwise started failing in more
recent versions of OCaml. Rather than add yet more version-dependent logic into
the files themselves, renamed the old "update_database.ml" file as
"update_database_3.ml", called the new one "update_database_4.ml" and modified
the Makefile to copy the appropriate one to "update_database.ml".
Mon 29th Oct 2017 iter.ml
Fixed a weird fumble in ITERATE_CLAUSES_GEN where there was a
redundant instance of the "monoidal" hypothesis.
Wed 11th Oct 2017 sets.ml
Added three more simple lemmas about the "cartesian_product" construct:
CARTESIAN_PRODUCT_EMPTY =
|- !s. cartesian_product {} s = {(\i. ARB)}
CARTESIAN_PRODUCT_EQ_MEMBERS_EQ =
|- !k s x y.
x IN cartesian_product k s /\
y IN cartesian_product k s
==> (x = y <=> !i. i IN k ==> x i = y i)
RESTRICTION_IN_CARTESIAN_PRODUCT =
|- !k s (f:K->A).
RESTRICTION k f IN cartesian_product k s <=>
!i. i IN k ==> (f i) IN (s i)
Mon 2nd Oct 2017 parser.ml
Fixed an amazingly stupid and longstanding bug arising from mis-use of an
accumulator variable in preterm parsing. As a consequence "pfrees" could be
wrong in situations where the same variable appears both free and bound, which
can have consequences for determining the relevant variables in a set
abstraction, typified by the mis-parsing of this:
`{{x | x IN (\i. T) /\ x i = 1} | i IN 1..n}`;;
versus the correctly parsed:
`{{x | x IN (\j. T) /\ x i = 1} | i IN 1..n}`;;
Sat 30th Sep 2017 Multivariate/homology.ml [new file]
Added a new file with an initial development of singular homology.
Sun 24th Sep 2017 Ntrie/ntrie.ml
Added a complete revision from Marco Maggesi of the "Ntrie" library for
manipulation of concrete numeral sets using a trie-like representation. Among
other improvements, the conversions have been made cleaner (always failing
predictably on non-minimal ntries) and much more efficient (typically 5x-15x as
fast), and a syntax extension for ntries has been added.
Wed 20th Sep 2017 int.ml, Library/prime.ml
Moved a few existing things (theorems DIVIDES_ANTISYM, DIVIDES_LE_STRONG,
DIVIDES_ONE and the definition of "prime") from "Library/prime.ml" into the
core, to avoid loading all that file for a few more simple facts, and also
added two new (and trivial) theorems:
ONE_OR_PRIME =
|- !p. p = 1 \/ prime p <=> (!n. n divides p ==> n = 1 \/ n = p)
FORALL_INT_CASES =
|- !P:int->bool. (!x. P x) <=> (!n. P(&n)) /\ (!n. P(-- &n))
Sat 16th Sep 2017 Library/frag.ml [new file], Library/grouptheory.ml
Added another file "Library/frag.ml" with a type constructor for defining the
free Abelian group on a given type. Incorporated this into the general group
theory. In that "Library/grouptheory.ml" file, systematically adopted a
multiplicative terminology (changing various names from "op/OP" to "mul/MUL")
as well as adding new material: powers (natural number and integer), trivial
homomorphisms, Abelian groups, cyclic groups and the group of integers.
Sun 10th Sep 2017 Library/grouptheory.ml [new file]
Added a new file with a basic development of group theory, using a type of
":(A)group" for a group on a (subset of a) type ":A". So far this is all pretty
elementary but it's good to have some standard version of groups.
Fri 1st Sep 2017 sets.ml
Added a simple theorem about the image of a Cartesian product:
IMAGE_PAIRED_CROSS =
|- !f g s t.
IMAGE (\(x,y). f x,g y) (s CROSS t) = IMAGE f s CROSS IMAGE g t
Thu 24th Aug 2017 passim
Eliminated a number of duplicated theorems (often exact duplicates,
otherwise differing at most in their outer universal quantifiers or
bound variable names):
BOREL_INDUCT_OPEN_UNIONS_INTERS -> BOREL_INDUCT_UNIONS_INTERS
CLOSED_SIMPLEX -> SIMPLEX_IMP_CLOSED
COMPACT_IN_SUBTOPOLOGY_EQ -> COMPACT_IN_SUBTOPOLOGY
COMPACT_SIMPLEX -> SIMPLEX_IMP_COMPACT
COMPLEX_DIFFERENTIABLE_COMPOSE -> COMPLEX_DIFFERENTIABLE_COMPOSE_AT
CONVEX_SIMPLEX -> SIMPLEX_IMP_CONVEX
DIAGONAL_MATRIX_MUL_EXPLICIT -> MATRIX_MUL_DIAGONAL
DOT_NORM_NEG -> DOT_NORM_SUB
FINITE_EMPTY_INTERIOR -> EMPTY_INTERIOR_FINITE
HAS_VECTOR_DERIVATIVE_UNIQUE_AT -> VECTOR_DERIVATIVE_AT
HAUSDIST_TRANS -> HAUSDIST_TRIANGLE
INT_LE_NEG -> INT_LE_NEG2
INT_LT_NEG -> INT_LT_NEG2
INT_NEGNEG -> INT_NEG_NEG
INT_OF_REAL_OF_INT -> int_abstr
LAMBDA_UNPAIR_THM -> LAMBDA_PAIR
LIM_NULL_COMPLEX_BOUND -> LIM_NULL_COMPARISON_COMPLEX
MATRIX_LEFT_INVERTIBLE_NULLSPACE -> MATRIX_LEFT_INVERTIBLE_KER
MBOUNDED_IFF_FINITE_DIAMETER -> MBOUNDED_ALT
PSUBSET_MEMBER -> PSUBSET_ALT
REALLIM_TRANSFORM_BOUND -> REALLIM_NULL_COMPARISON
REAL_LE_NEG -> REAL_LE_NEG2
REAL_LT_NEG -> REAL_LT_NEG2
REAL_NEGNEG -> REAL_NEG_NEG
REAL_POS_NZ -> REAL_LT_IMP_NZ
RELATIVE_FRONTIER_CONVEX_HULL_CASES -> RELATIVE_FRONTIER_OF_CONVEX_HULL
SETDIST_LIPSCHITZ -> SETDIST_SING_TRIANGLE
num_RECURSION_STD -> num_RECURSION
Also changed the following to be the genuinely distinct theorems that were
presumably intended:
ABS_DROP (was same as NORM_1)
ANGLE_EQ_PI_RIGHT (was same as ANGLE_EQ_PI_LEFT)
CLOSURE_RATIONALS_IN_OPEN_SET (was same as CLOSURE_DYADIC_RATIONALS_IN_OPEN_SET)
CONNECTED_CONVEX_1_GEN (was same as CONVEX_CONNECTED_1_GEN)
Fri 18th Aug 2017 real.ml
Added quite a few new and fairly basic real number theorems (some of the convex
bounds ones were moved out of Multivariate/misc.ml).
REAL_ABS_LE_SQRT =
|- !x y. abs (sqrt x - sqrt y) <= sqrt (&2 * abs (x - y))
REAL_ABS_LE_SQRT_POS =
|- !x y. &0 <= x /\ &0 <= y ==> abs (sqrt x - sqrt y) <= sqrt (abs (x - y))
REAL_ABS_SQRT =
|- !x. abs (sqrt x) = sqrt (abs x)
REAL_CONVEX_BOUND2_LE =
|- !x y a u v.
x <= a /\ y <= b /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> u * x + v * y <= u * a + v * b
REAL_CONVEX_BOUND2_LT =
|- !x y a u v.
x < a /\ y < b /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> u * x + v * y < u * a + v * b
REAL_CONVEX_BOUNDS_LE =
|- !x y a b u v.
a <= x /\
x <= b /\
a <= y /\
y <= b /\
&0 <= u /\
&0 <= v /\
u + v = &1
==> a <= u * x + v * y /\ u * x + v * y <= b
REAL_CONVEX_BOUNDS_LT =
|- !x y a b u v.
a < x /\ x < b /\ a < y /\ y < b /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> a < u * x + v * y /\ u * x + v * y < b
REAL_CONVEX_BOUND_GE =
|- !x y a u v.
a <= x /\ a <= y /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> a <= u * x + v * y
REAL_CONVEX_BOUND_GT =
|- !x y a u v.
a < x /\ a < y /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> a < u * x + v * y
REAL_CONVEX_BOUND_LE =
|- !x y a u v.
x <= a /\ y <= a /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> u * x + v * y <= a
REAL_CONVEX_BOUND_LT =
|- !x y a u v.
x < a /\ y < a /\ &0 <= u /\ &0 <= v /\ u + v = &1
==> u * x + v * y < a
REAL_DIV_EQ_1 =
|- !x y. x / y = &1 <=> x = y /\ ~(x = &0) /\ ~(y = &0)
SQRT_EQ_1 =
|- !x. sqrt x = &1 <=> x = &1
Fri 4th Aug 2017 IsabelleLight/new_tactics.ml
Made a tiny tweak of adding parens where very old versions of OCaml
expect them.
Thu 3rd Aug 2017 Makefile, pa_j_4.xx_7.xx.ml [new file]
Made some changes suggested by Hendrik Tews to support the latest OCaml (4.05)
and camlp5 (7.01).
Sat 29th Jul 2017 passim
Merged in three github pull requests from asr (Makefile), Hendrik Tews
(parallel tests) and Petros Papapanagiotou (Isabelle Light and
Boyer-Moore improvements).
Thu 22nd Jun 2017 sets.ml, Multivariate/misc.ml
Added three new theorems about Cartesian product as well as moving the
definition of and lemmas about RESTRICTION into the main sets.ml file,
so overall we have these new theorems in the core:
CARTESIAN_PRODUCT_SINGS =
|- !k x. EXTENSIONAL k x ==> cartesian_product k (\i. {x i}) = {x}
CARTESIAN_PRODUCT_SINGS_GEN =
|- !k x. cartesian_product k (\i. {x i}) = {RESTRICTION k x}
FORALL_CARTESIAN_PRODUCT_ELEMENTS_EQ =
|- !P k s.
~(cartesian_product k s = {})
==> ((!i x. i IN k /\ x IN s i ==> P i x) <=>
(!z i. z IN cartesian_product k s /\ i IN k ==> P i (z i)))
IMAGE_RESTRICTION =
|- !f s t. s SUBSET t ==> IMAGE (RESTRICTION t f) s = IMAGE f s
RESTRICTION =
|- !s f x. RESTRICTION s f x = (if x IN s then f x else ARB)
RESTRICTION_COMPOSE =
|- !f g s t.
IMAGE f s SUBSET t
==> RESTRICTION s (RESTRICTION t g o RESTRICTION s f) =
RESTRICTION s (g o f)
RESTRICTION_COMPOSE_LEFT =
|- !f g s t.
IMAGE f s SUBSET t
==> RESTRICTION s (RESTRICTION t g o f) = RESTRICTION s (g o f)
RESTRICTION_COMPOSE_RIGHT =
|- !f g s. RESTRICTION s (g o RESTRICTION s f) = RESTRICTION s (g o f)
RESTRICTION_DEFINED =
|- !s f x. x IN s ==> RESTRICTION s f x = f x
RESTRICTION_EQ =
|- !s f x y. x IN s /\ f x = y ==> RESTRICTION s f x = y
RESTRICTION_EXTENSION =
|- !s f g. RESTRICTION s f = RESTRICTION s g <=> (!x. x IN s ==> f x = g x)
RESTRICTION_FIXPOINT =
|- !s f. RESTRICTION s f = f <=> f IN EXTENSIONAL s
RESTRICTION_IDEMP =
|- !s f. RESTRICTION s (RESTRICTION s f) = RESTRICTION s f
RESTRICTION_IN_EXTENSIONAL =
|- !s f. RESTRICTION s f IN EXTENSIONAL s
RESTRICTION_RESTRICTION =
|- !s t f. s SUBSET t ==> RESTRICTION s (RESTRICTION t f) = RESTRICTION s f
RESTRICTION_UNDEFINED =
|- !s f x. ~(x IN s) ==> RESTRICTION s f x = ARB
Tue 13th Jun 2017 drule.ml, grobner.ml
Fixed a couple of cases where "||" was used instead of "or" in error
strings, as a result of overenthusiastic search-and-replace.
Wed 7th Jun 2017 arith.ml, sets.ml, Library/card.ml
Added a few miscellaneous theorems including some basics about
cardinality of Cartesian products:
CARD_DIFF_CONG =
|- !s s' t t'.
s' SUBSET s /\
t' SUBSET t /\
s =_c t /\
s' =_c t' /\
(INFINITE s ==> s' <_c s)
==> s DIFF s' =_c t DIFF t'
CARD_EQ_REAL_SUBSET =
|- !s a b. a < b /\ (!x. a < x /\ x < b ==> x IN s) ==> s =_c (:real)
CARD_LE_1 =
|- !s. FINITE s /\ CARD s <= 1 <=> (?a. s SUBSET {a})
CARD_LE_CARTESIAN_PRODUCT =
|- !s t k.
(!i. i IN k ==> s i <=_c t i)
==> cartesian_product k s <=_c cartesian_product k t
CARD_LE_CARTESIAN_PRODUCT_SUBINDEX =
|- !s k l.
k SUBSET l /\ ~(cartesian_product l s = {})
==> cartesian_product k s <=_c cartesian_product l s
CARD_LE_EQ_SUBSET_UNIV =
|- !s. (?t. t =_c s) <=> s <=_c (:B)
CARD_LE_SING =
|- !c s. s <=_c {c} <=> (?a. s SUBSET {a})
CARTESIAN_PRODUCT_CONST =
|- !s t. cartesian_product t (\i. s) = s ^_c t
CARTESIAN_PRODUCT_EQ_MEMBERS =
|- !k s x y.
x IN cartesian_product k s /\
y IN cartesian_product k s /\
(!i. i IN k ==> x i = y i)
==> x = y
COUNTABLE_CARTESIAN_PRODUCT =
|- !s k.
COUNTABLE (cartesian_product k s) <=>
cartesian_product k s = {} \/
FINITE {i | i IN k /\ ~(?a. s i SUBSET {a})} /\
(!i. i IN k ==> COUNTABLE (s i))
COUNTABLE_RESTRICTED_FUNSPACE =
|- !s t k.
COUNTABLE s /\ COUNTABLE t
==> COUNTABLE
{f | IMAGE f s SUBSET t /\
{x | ~(f x = k x)} SUBSET s /\
FINITE {x | ~(f x = k x)}}
EQ_C_BIJECTIONS_DISJOINT =
|- !s s' t t'.
DISJOINT s s' /\ DISJOINT t t'
==> (s =_c t /\ s' =_c t' <=>
(?f g.
(!x. x IN s ==> f x IN t /\ g (f x) = x) /\
(!y. y IN t ==> g y IN s /\ f (g y) = y) /\
(!x. x IN s' ==> f x IN t' /\ g (f x) = x) /\
(!y. y IN t' ==> g y IN s' /\ f (g y) = y)))
EQ_C_BIJECTIONS_EXTEND =
|- !f g s s' t t'.
s SUBSET s' /\
t SUBSET t' /\
s' DIFF s =_c t' DIFF t /\
(!x. x IN s ==> f x IN t /\ g (f x) = x) /\
(!y. y IN t ==> g y IN s /\ f (g y) = y)
==> (?f' g'.
(!x. x IN s' ==> f' x IN t' /\ g' (f' x) = x) /\
(!y. y IN t' ==> g' y IN s' /\ f' (g' y) = y) /\
(!x. x IN s ==> f' x = f x) /\
(!y. y IN t ==> g' y = g y))
EQ_C_BIJECTIONS_SUBSETS =
|- !s s' t t'.
s' SUBSET s /\ t' SUBSET t
==> (s' =_c t' /\ s DIFF s' =_c t DIFF t' <=>
(?f g.
(!x. x IN s ==> f x IN t /\ g (f x) = x) /\
(!y. y IN t ==> g y IN s /\ f (g y) = y) /\
IMAGE f s' = t' /\
IMAGE g t' = s'))
EQ_C_BIJECTIONS_SUBSETS_LT =
|- !s s' t t'.
s' SUBSET s /\ t' SUBSET t /\ (INFINITE s ==> s' <_c s)
==> (s =_c t /\ s' =_c t' <=>
(?f g.
(!x. x IN s ==> f x IN t /\ g (f x) = x) /\
(!y. y IN t ==> g y IN s /\ f (g y) = y) /\
IMAGE f s' = t' /\
IMAGE g t' = s'))
EQ_C_INVOLUTION =
|- !f s t.
(!x. x IN s ==> f x IN t) /\
(!x. x IN t ==> f x IN s) /\
(!x. x IN s \/ x IN t ==> f (f x) = x)
==> s =_c t
FINITE_CARTESIAN_PRODUCT =
|- !s k.
FINITE (cartesian_product k s) <=>
cartesian_product k s = {} \/
FINITE {i | i IN k /\ ~(?a. s i SUBSET {a})} /\
(!i. i IN k ==> FINITE (s i))
FINITE_POWERSET_EQ =
|- !s. FINITE {t | t SUBSET s} <=> FINITE s
FINITE_RESTRICTED_FUNSPACE =
|- !s t k.
FINITE s /\ FINITE t
==> FINITE {f | IMAGE f s SUBSET t /\ {x | ~(f x = k x)} SUBSET s}
LT_IMP_NE =
|- !m n. m < n ==> ~(m = n)
Tue 6th Jun 2017 calc_rat.ml
Added some basic properties of the "shrinking" mapping x |-> x / (1 + |x|)
and its inverse. These have natural generalizations to R^n (see
CONVEXITY_PRESERVING_SHRINK_0 in "Multivariate/convex.ml") but these simple
forms are nice to have too:
REAL_GROW_SHRINK =
|- !x y. x / (&1 + abs x) / (&1 - abs (x / (&1 + abs x))) = x
REAL_SHRINK_EQ =
|- !x y. x / (&1 + abs x) = y / (&1 + abs y) <=> x = y
REAL_SHRINK_GALOIS =
|- !x y. x / (&1 + abs x) = y <=> abs y < &1 /\ y / (&1 - abs y) = x
REAL_SHRINK_GROW =
|- !x y. abs x < &1
==> x / (&1 - abs x) / (&1 + abs (x / (&1 - abs x))) = x
REAL_SHRINK_GROW_EQ =
|- !x y. x / (&1 - abs x) / (&1 + abs (x / (&1 - abs x))) = x <=>
abs x < &1
REAL_SHRINK_LE =
|- !x y. x / (&1 + abs x) <= y / (&1 + abs y) <=> x <= y
REAL_SHRINK_LT =
|- !x y. x / (&1 + abs x) < y / (&1 + abs y) <=> x < y
REAL_SHRINK_RANGE =
|- !x. abs (x / (&1 + abs x)) < &1
Sat 3rd Jun 2017 Library/floor.ml
Added some more specific versions of rational approximation where we
want to choose "p-adic" rationals:
PADIC_RATIONAL_APPROXIMATION_STRADDLE =
|- !p x e.
&0 < e /\ &1 < p
==> (?n q r.
integer q /\
integer r /\
q / p pow n < x /\
x < r / p pow n /\
abs (q / p pow n - r / p pow n) < e)
PADIC_RATIONAL_APPROXIMATION_STRADDLE_POS =
|- !p x e.
&0 < e /\ &1 < p /\ &0 < x
==> (?n q r.
&q / p pow n < x /\
x < &r / p pow n /\
abs (&q / p pow n - &r / p pow n) < e)
PADIC_RATIONAL_APPROXIMATION_STRADDLE_POS_LE =
|- !p x e.
&0 < e /\ &1 < p /\ &0 <= x
==> (?n q r.
&q / p pow n <= x /\
x < &r / p pow n /\
abs (&q / p pow n - &r / p pow n) < e)
Sat 3rd Jun 2017 real.ml, sets.ml, passim
Moved a few theorems into the core that were formerly tucked away in
"Multivariate/misc.ml", including variants of the Archimedean property:
REAL_ARCH_INV =
|- !e. &0 < e <=> (?n. ~(n = 0) /\ &0 < inv (&n) /\ inv (&n) < e)
REAL_ARCH_POW =
|- !x y. &1 < x ==> (?n. y < x pow n)
REAL_ARCH_POW2 =
|- !x. ?n. x < &2 pow n
REAL_ARCH_POW_INV =
|- !x y. &0 < y /\ x < &1 ==> (?n. x pow n < y)
REAL_MAX_SUP =
|- !x y. max x y = sup {x, y}
REAL_MIN_INF =
|- !x y. min x y = inf {x, y}
REAL_POW_LBOUND =
|- !x n. &0 <= x ==> &1 + &n * x <= (&1 + x) pow n
Sun 21st May 2017 arith.ml
Added ternary versions of the basic "WLOG" lemma for naturals, reals and
integers, as well as adding missing binary versions for integers:
INT_WLOG_LE =
|- (!x y. P x y <=> P y x) /\ (!x y. x <= y ==> P x y) ==> (!x y. P x y)
INT_WLOG_LT =
|- (!x. P x x) /\ (!x y. P x y <=> P y x) /\ (!x y. x < y ==> P x y)
==> (!x y. P x y)
INT_WLOG_LE_3 =
|- !P. (!x y z. P x y z ==> P y x z /\ P x z y) /\
(!x y z. x <= y /\ y <= z ==> P x y z)
==> (!x y z. P x y z)
REAL_WLOG_LE_3 =
|- !P. (!x y z. P x y z ==> P y x z /\ P x z y) /\
(!x y z. x <= y /\ y <= z ==> P x y z)
==> (!x y z. P x y z)
WLOG_LE_3 =
|- !P. (!x y z. P x y z ==> P y x z /\ P x z y) /\
(!x y z. x <= y /\ y <= z ==> P x y z)
==> (!x y z. P x y z)
Sat 13th May 2017 printer.ml
Added a patch to the prettyprinter from Marco Maggesi that ensures better
printing of set enumerations and lists by inserting split hints in a correct
way. A typical example where this helps is the following term, which now prints
as shown, but was formerly broken up irregularly and hence was much less
readable.
`{[a 1 2 3 4 5 6 7 8; b 1 2 3 4 5 6 7 8 9; c 1 2 3 4 5; d 1 2 3 4 5 6 7],
[e 1 2 3 4 5 6; f 1 2 3 4 5 6 7 8; g 1 2 3 4 5],
[h 1 2 3 4 5 6 7 8 9 10 11; i 1 2 3 4 5 6 7 8 9 10; j 1 2 3 4 5 6 7 8 9;
k 1 2 3 4 5],
[l 1 2 3 4 5 6 7 8 9; m 1 2 3 4 5 6 7 8; n 1 2 3 4 5 6 7 8 9;
p 2 3 4 5 6 7 8 9]}`
Thu 11th May 2017 sets.ml
Added one more handy little theorem about arbitrary unions:
ARBITRARY_UNION_OF_ALT =
|- !B s.
(ARBITRARY UNION_OF B) s <=>
(!x. x IN s ==> (?u. u IN B /\ x IN u /\ u SUBSET s))
Sat 6th May 2017 sets.ml, Library/card.ml
Added four theorems that are rather easy special cases of existing
ones (FORALL_COUNTABLE_SUBSET_IMAGE_INJ etc.), but awkward enough
to derive by 1-liners that they are worth having for themselves:
FINITE_IMAGE_EQ =
|- !f s.
FINITE (IMAGE f s) <=>
(?t. FINITE t /\ t SUBSET s /\ IMAGE f s = IMAGE f t)
FINITE_IMAGE_EQ_INJ =
|- !f s.
FINITE (IMAGE f s) <=>
(?t. FINITE t /\
t SUBSET s /\
IMAGE f s = IMAGE f t /\
(!x y. x IN t /\ y IN t ==> (f x = f y <=> x = y)))
COUNTABLE_IMAGE_EQ =
|- !f s.
COUNTABLE (IMAGE f s) <=>
(?t. COUNTABLE t /\ t SUBSET s /\ IMAGE f s = IMAGE f t)
COUNTABLE_IMAGE_EQ_INJ =
|- !f s.
COUNTABLE (IMAGE f s) <=>
(?t. COUNTABLE t /\
t SUBSET s /\
IMAGE f s = IMAGE f t /\
(!x y. x IN t /\ y IN t ==> (f x = f y <=> x = y)))
Sat 30th Apr 2017 pair.ml, sets.ml, Library/card.ml
Added various simple lemmas, the only one that isn't completely trivial
being FORALL_CARTESIAN_PRODUCT_ELEMENTS:
CARD_LE_COUNTABLE_INFINITE =
|- !s t. COUNTABLE s /\ INFINITE t ==> s <=_c t
CARD_LT_COUNTABLE_UNCOUNTABLE =
|- !s t. COUNTABLE s /\ ~COUNTABLE t ==> s <_c t
CARD_LT_NUM_REAL =
|- (:num) <_c (:real)
EXISTS_UNPAIR_FUN_THM =
|- !P. (?f g. P f g) <=> (?h. P (FST o h) (SND o h))
FORALL_CARTESIAN_PRODUCT_ELEMENTS =
|- !P k s.
(!z i. z IN cartesian_product k s /\ i IN k ==> P i (z i)) <=>
cartesian_product k s = {} \/ (!i x. i IN k /\ x IN s i ==> P i x)
FORALL_UNPAIR_FUN_THM =
|- !P. (!f g. P f g) <=> (!h. P (FST o h) (SND o h))
INTERS_ANTIMONO =
|- !f g. g SUBSET f ==> INTERS f SUBSET INTERS g
IN_GSPEC =
|- !s. {x | x IN s} = s
UNIONS_SINGS =
|- !s. UNIONS {{x} | x IN s} = s
UNIONS_SINGS_GEN =
|- !P. UNIONS {{x} | P x} = {x | P x}
Wed 11th Apr 2017 pair.ml, sets.ml, cart.ml
Added a few more trivial but nice-to-have rewrites:
EXISTS_PAIR_FUN_THM =
|- !P. (?f. P f) <=> (?g h. P (\a. g a,h a))
FORALL_PAIR_FUN_THM =
|- !P. (!f. P f) <=> (!g h. P (\a. g a,h a))
CROSS_SING =
|- !x y. {x} CROSS {y} = {(x,y)}
PCROSS_SING =
|- !x y. {x} PCROSS {y} = {pastecart x y}
Sat 8th Apr 2017 cart.ml
Type-generalized PASTECART_INJ which had a pointless restriction to ":real".
Sat 8th Apr 2017 sets.ml
Added a number of new theorems from Andrea Gabrielli and Marco Maggesi, giving
some additional properties of sup and inf and using useful relational versions
"has_sup" and "has_inf" to express some properties more nicely:
has_inf =
|- !s b. s has_inf b <=> (!c. (!x. x IN s ==> c <= x) <=> c <= b)
has_sup =
|- !s b. s has_sup b <=> (!c. (!x. x IN s ==> x <= c) <=> b <= c)
HAS_INF =
|- !s l.
s has_inf l <=>
~(s = {}) /\
(!x. x IN s ==> l <= x) /\
(!c. l < c ==> (?x. x IN s /\ x < c))
HAS_INF_APPROACH =
|- !s l c. s has_inf l /\ l < c ==> (?x. x IN s /\ x < c)
HAS_INF_INF =
|- !s l.
s has_inf l <=>
~(s = {}) /\ (?b. !x. x IN s ==> b <= x) /\ inf s = l
HAS_INF_LBOUND =
|- !s b x. s has_inf b /\ x IN s ==> b <= x
HAS_INF_LE =
|- !s t l m.
s has_inf l /\
t has_inf m /\
(!y. y IN t ==> (?x. x IN s /\ x <= y))
==> l <= m
HAS_SUP =
|- !s l.
s has_sup l <=>
~(s = {}) /\
(!x. x IN s ==> x <= l) /\
(!c. c < l ==> (?x. x IN s /\ c < x))
HAS_SUP_APPROACH =
|- !s l c. s has_sup l /\ c < l ==> (?x. x IN s /\ c < x)
HAS_SUP_LE =
|- !s t l m.
s has_sup l /\
t has_sup m /\
(!y. y IN t ==> (?x. x IN s /\ y <= x))
==> m <= l
HAS_SUP_SUP =
|- !s l.
s has_sup l <=>
~(s = {}) /\ (?b. !x. x IN s ==> x <= b) /\ sup s = l
HAS_SUP_UBOUND =
|- !s b x. s has_sup b /\ x IN s ==> x <= b
INF_APPROACH =
|- !s c.
~(s = {}) /\ (?b. !x. x IN s ==> b <= x) /\ inf s < c
==> (?x. x IN s /\ x < c)
INF_EXISTS =
|- !s. (?l. s has_inf l) <=> ~(s = {}) /\ (?b. !x. x IN s ==> b <= x)
SUP_APPROACH =
|- !s c.
~(s = {}) /\ (?b. !x. x IN s ==> x <= b) /\ c < sup s
==> (?x. x IN s /\ c < x)
SUP_EXISTS =
|- !s. (?l. s has_sup l) <=> ~(s = {}) /\ (?b. !x. x IN s ==> x <= b)
Wed 29th Mar 2017 arith.ml
Added some natural theorems that were missing:
DIV_EXP =
|- m n p. ~(m = 0)
==> (m EXP n) DIV (m EXP p) =
if p <= n then m EXP (n - p)
else if m = 1 then 1 else 0)
MOD_EXP =
|- !m n p. ~(m = 0)
==> (m EXP n) MOD (m EXP p) =
if p <= n \/ m = 1 then 0 else m EXP n)
Tue 28th Mar 2017 Library/card.ml
Added a small but more compact reformulation of cardinal exponentiation:
EXP_C =
|- !s t. s ^_c t = {f | IMAGE f t SUBSET s /\ EXTENSIONAL t f}
Mon 27th Mar 2018 Library/floor.ml, Library/prime.ml
Added a few handy lemmas:
RATIONAL_ABS_EQ = prove
|- !x. rational(abs x) <=> rational x
DIVIDES_EXP_LE_IMP = prove
|- !p m n. m <= n ==> (p EXP m) divides (p EXP n)
EXP_INDEX_DIVIDES = prove
|- !p n. p EXP (index p n) divides n
INDEX_ADD_MIN = prove
|- !p m n. MIN (index p m) (index p n) <= index p (m + n)
INDEX_SUB_MIN = prove
|- !p m n. n < m ==> MIN (index p m) (index p n) <= index p (m - n)
Sat 25th Mar 2017 Minisat/minisat_parse.ml
Replaced the use of int32 literals "0x...l" with "Int32.of_int 0x...".
The former seems to have recently started to be problematic with the
camlp5 preprocessing; really the underlying problem should be investigated and
fixed but as this is the only instance, I just made this change for now.
Fri 24th Mar 2017 holtest, holtest.ml
Added "Multivariate/lpspaces.ml" to the test suite (formerly missing its
own individual entry, though it's called in 100/fourier.ml anyway).
Wed 22nd Mar 2017 Library/card.ml
Added another variant of relational cardinal equality, as well as simplifying
the proof of the Schroeder-Bernstein theorem using a formulation in the
relational style (following a paper by Chad Brown, perhaps actually following
Knaster?)
EQ_C_ALT =
|- s =_c t <=>
?R:A#B->bool. (!x. x IN s ==> ?!y. y IN t /\ R(x,y)) /\
(!y. y IN t ==> ?!x. x IN s /\ R(x,y))
Thu 16th Mar 2017 Makefile
Added yet another disjunct to the camlp5 version cases after a report from
Vu Khac Ky of a failure with camlp5 6.17 (currently the latest version).
Wed 15th Mar 2017 real.ml, Library/transc.ml, 100/sqrt.ml, Jordan/metric_spaces.ml, Jordan/jordan_curve_theorem.ml
Added a definition and basic properties of square roots to the core system,
mainly lifted from the existing Multivariate code. The proof that the
definition works is laborious without any analytical machinery but it seemed
artificial to make such a basic and well-known function dependent on such
machinery. Note that the definition is totalized to be sign-preserving,
which makes various theorems work nicely without side-conditions while not
affecting its value for nonnegative arguments where it is usually considered
to be defined. New definitions and theorems:
sqrt = |- !x. sqrt x = (@y. real_sgn y = real_sgn x /\ y pow 2 = abs x)
POW_2_SQRT =
|- !x. &0 <= x ==> sqrt (x pow 2) = x
POW_2_SQRT_ABS =
|- !x. sqrt (x pow 2) = abs x
REAL_DIV_SQRT =
|- !x. &0 <= x ==> x / sqrt x = sqrt x
REAL_LE_LSQRT =
|- !x y. &0 <= y /\ x <= y pow 2 ==> sqrt x <= y
REAL_LE_RSQRT =
|- !x y. x pow 2 <= y ==> x <= sqrt y
REAL_LSQRT_LE =
|- !x y. &0 <= x /\ sqrt x <= y ==> x <= y pow 2
REAL_LT_LSQRT =
|- !x y. &0 <= y /\ x < y pow 2 ==> sqrt x < y
REAL_LT_RSQRT =