@@ -105,11 +105,24 @@ fun mk_test_fun is_configured expect_fun name smt_tac =
105
105
fun auto_tac (_, t) =
106
106
let
107
107
val simpset = bossLib.++ (bossLib.srw_ss (), wordsLib.WORD_ss)
108
- val t_eq_t' = simpLib.SIMP_CONV simpset [integerTheory.INT_ABS,
109
- integerTheory.INT_MAX, integerTheory.INT_MIN, integerTheory.int_quot,
110
- integerTheory.int_rem, integerTheory.EDIV_DEF, integerTheory.EMOD_DEF,
111
- boolTheory.LET_THM]
112
- t
108
+ val simp_thms =
109
+ let
110
+ open arithmeticTheory integerTheory realTheory
111
+ in
112
+ [
113
+ (* arithmeticTheory *)
114
+ EXP, EXP_1, EXP_2,
115
+ (* integerTheory *)
116
+ EDIV_DEF, EMOD_DEF, INT_ABS, INT_MAX, INT_MIN, int_exp, int_quot,
117
+ int_rem,
118
+ (* realTheory *)
119
+ EXP_2, POW_2, REAL_POW_LT,
120
+ (* others *)
121
+ boolTheory.LET_THM
122
+ ]
123
+ end
124
+ val t_eq_t' =
125
+ simpLib.SIMP_CONV simpset simp_thms t
113
126
handle Conv.UNCHANGED =>
114
127
Thm.REFL t
115
128
val t' = boolSyntax.rhs (Thm.concl t_eq_t')
252
265
[thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
253
266
(``SUC (x + y) = (SUC x + SUC y)``, [sat_CVC, sat_YO, sat_Z3, sat_Z3p]),
254
267
255
- (``(x:num) + 0 = x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
268
+ (``(x:num) + 0 = x``, [thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
256
269
(``0 + (x:num) = x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
257
- (``(x:num) + y = y + x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
270
+ (``(x:num) + y = y + x``, [thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
258
271
(``(x:num) + (y + z) = (x + y) + z``,
259
272
[thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
260
273
(``((x:num) + y = 0 ) <=> (x = 0 ) /\ (y = 0 )``,
261
274
[thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
262
275
263
- (``(x:num) - 0 = x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
276
+ (``(x:num) - 0 = x``, [thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
264
277
(``(x:num) - y = y - x``, [sat_CVC, sat_YO, sat_Z3, sat_Z3p]),
265
278
(``(x:num) - y - z = x - (y + z)``,
266
279
[thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
317
330
(``((x:num) = x DIV 42 * 42 + x MOD 42 ) /\ x MOD 42 < 42 ``,
318
331
[thm_AUTO, (* thm_CVC,*) thm_YO, thm_Z3, thm_Z3p_v4]),
319
332
333
+ (``(x:num) ** 0 = 1 ``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
334
+ (``(x:num) ** 0 = 0 ``, [sat_CVC, sat_Z3, sat_Z3p]),
335
+ (``(x:num) ** 1 = x``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
336
+ (``(0 :num) ** 1 = 1 ``, [sat_CVC, sat_Z3, sat_Z3p]),
337
+ (``(1 :num) ** x = 1 ``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
338
+ (``(1 :num) ** x = 0 ``, [sat_CVC, sat_Z3, sat_Z3p]),
339
+ (``(x:num) ** 2 = x * x``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
340
+ (``(x:num) ** 2 = 2 ``, [sat_CVC, sat_Z3, sat_Z3p]),
341
+ (``(x:num) ** 3 = x * x * x``, [(* thm_AUTO, thm_CVC, thm_Z3, thm_Z3p*) ]),
342
+ (``(x:num) ** 3 = 4 ``, [sat_CVC, sat_Z3, sat_Z3p]),
343
+ (``0 < (x:num) ** y``, [sat_CVC, sat_Z3, sat_Z3p]),
344
+ (``0 <= (x:num) ** y``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
345
+ (``0 < (1 :num) ** y``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
346
+ (``0 < (2 :num) ** y``, [thm_AUTO, (* thm_CVC,*) thm_Z3, thm_Z3p]),
347
+ (``0 < (42 :num) ** y``, [thm_AUTO, (* thm_CVC,*) thm_Z3, thm_Z3p]),
348
+
320
349
(``MIN (x:num) y <= x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
321
350
(``MIN (x:num) y <= y``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
322
351
(``(z:num) < x /\ z < y ==> z < MIN x y``,
581
610
(``(x:int) rem 42 = x - x quot 42 * 42 ``,
582
611
[thm_AUTO, (* thm_CVC,*) thm_Z3, thm_Z3p_v4]),
583
612
613
+ (``(x:int) ** 0 = 1 ``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
614
+ (``(x:int) ** 0 = 0 ``, [sat_CVC, sat_Z3, sat_Z3p]),
615
+ (``(x:int) ** 1 = x``, [(* thm_AUTO, thm_CVC, thm_Z3, thm_Z3p*) ]),
616
+ (``(0 :int) ** 1 = 1 ``, [sat_CVC, sat_Z3, sat_Z3p]),
617
+ (``(1 :int) ** x = 1 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
618
+ (``(1 :int) ** x = 0 ``, [sat_CVC, sat_Z3, sat_Z3p]),
619
+ (``(-1 :int) ** 1 = -1 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
620
+ (``(-1 :int) ** 2 = 1 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
621
+ (``(-3 :int) ** 1 = -3 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
622
+ (``(-3 :int) ** 2 = 9 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
623
+ (``(x:int) ** 2 = x * x``, [(* thm_AUTO, thm_CVC, thm_Z3, thm_Z3p*) ]),
624
+ (``(x:int) ** 2 = 2 ``, [sat_CVC, sat_Z3, sat_Z3p]),
625
+ (``(x:int) ** 3 = x * x * x``, [(* thm_AUTO, thm_CVC, thm_Z3, thm_Z3p*) ]),
626
+ (``(x:int) ** 3 = 4 ``, [sat_CVC, sat_Z3, sat_Z3p]),
627
+ (``0 < (x:int) ** y``, [sat_CVC, sat_Z3, sat_Z3p]),
628
+ (``0 <= (x:int) ** y``, [sat_CVC, sat_Z3, sat_Z3p]),
629
+ (``0 < (1 :int) ** y``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
630
+ (``0 < (2 :int) ** y``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
631
+ (``0 < (-2 :int) ** y``, [sat_CVC, sat_Z3, sat_Z3p]),
632
+ (``0 < (42 :int) ** y``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
633
+ (``0 < (-42 :int) ** y``, [sat_CVC, sat_Z3, sat_Z3p]),
634
+
584
635
(``ABS (x:int) >= 0 ``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3_v4, thm_Z3p_v4]),
585
636
(``(ABS (x:int) = 0 ) = (x = 0 )``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3_v4, thm_Z3p_v4]),
586
637
(``(x:int) >= 0 ==> (ABS x = x)``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3_v4, thm_Z3p_v4]),
631
682
(``x < 0 ==> (x:real) / 42 > x``,
632
683
[thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
633
684
685
+ (``(x:real) pow 0 = 1 ``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
686
+ (``(x:real) pow 0 = 0 ``, [sat_CVC, sat_Z3, sat_Z3p]),
687
+ (``(x:real) pow 1 = x``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
688
+ (``(0 :real) pow 1 = 1 ``, [sat_CVC, sat_Z3, sat_Z3p]),
689
+ (``(1 :real) pow x = 1 ``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
690
+ (``(1 :real) pow x = 0 ``, [sat_CVC, sat_Z3, sat_Z3p]),
691
+ (``(-1 :real) pow 1 = -1 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
692
+ (``(-1 :real) pow 2 = 1 ``, [thm_AUTO, (* thm_CVC,*) thm_Z3, thm_Z3p]),
693
+ (``(-3 :real) pow 1 = -3 ``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
694
+ (``(-3 :real) pow 2 = 9 ``, [thm_AUTO, (* thm_CVC,*) thm_Z3, thm_Z3p]),
695
+ (``(x:real) pow 2 = x * x``, [thm_AUTO, (* thm_CVC,*) thm_Z3, thm_Z3p]),
696
+ (``(x:real) pow 3 = x * x * x``, [thm_AUTO(* , thm_CVC, thm_Z3, thm_Z3p*) ]),
697
+ (``0 < (x:real) pow y``, [sat_CVC, sat_Z3, sat_Z3p]),
698
+ (``0 <= (x:real) pow y``, [sat_CVC, sat_Z3, sat_Z3p]),
699
+ (``0 < (1 :real) pow y``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
700
+ (``0 < (2 :real) pow y``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
701
+ (``0 < (-2 :real) pow y``, [sat_CVC, sat_Z3, sat_Z3p]),
702
+ (``0 < (42 :real) pow y``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p]),
703
+ (``0 < (-42 :real) pow y``, [sat_CVC, sat_Z3, sat_Z3p]),
704
+
634
705
(``abs (x:real) >= 0 ``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
635
706
(``(abs (x:real) = 0 ) = (x = 0 )``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
636
707
(``(x:real) >= 0 ==> (abs x = x)``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
0 commit comments