Skip to content

Commit bd9a21f

Browse files
committed
HolSmt: add tests for real division
Real division has been supported by HolSmt for many years, but it's always nice to have some tests for it, corresponding to similar tests that we have for the ints and nums.
1 parent fcf746e commit bd9a21f

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

src/HolSmt/selftest.sml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,39 @@ in
676676
(``1 * (x:real) = x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p]),
677677
(``(x:real) * 42 = 42 * x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p]),
678678

679-
(``(x:real) / 1 = x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p]),
679+
(``(~42:real) / ~42 = 1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
680+
(``(~1:real) / ~42 = 0``, [sat_CVC, sat_Z3, sat_Z3p]),
681+
(``(0:real) / ~42 = 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
682+
(``(1:real) / ~42 = ~1``, [sat_CVC, sat_Z3, sat_Z3p]),
683+
(``(42:real) / ~42 = ~1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
684+
(``(~42:real) / ~1 = 42``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
685+
(``(~1:real) / ~1 = 1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
686+
(``(0:real) / ~1 = 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
687+
(``(1:real) / ~1 = ~1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
688+
(``(42:real) / ~1 = ~42``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
689+
(``(~42:real) / 1 = ~42``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
690+
(``(~1:real) / 1 = ~1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
691+
(``(0:real) / 1 = 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
692+
(``(1:real) / 1 = 1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
693+
(``(42:real) / 1 = 42``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
694+
(``(~42:real) / 42 = ~1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
695+
(``(~1:real) / 42 = ~1``, [sat_CVC, sat_Z3, sat_Z3p]),
696+
(``(0:real) / 42 = 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
697+
(``(1:real) / 42 = 0``, [sat_CVC, sat_Z3, sat_Z3p]),
698+
(``(42:real) / 42 = 1``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
699+
(``(x:real) / 1 = x``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
700+
(``(x:real) / ~1 = ~x``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
701+
(``(x:real) / 42 <= x``, [sat_CVC, sat_YO, sat_Z3, sat_Z3p]),
702+
(``(x:real) / 42 <= abs x``, [thm_AUTO, thm_CVC, thm_Z3_v4, thm_Z3p_v4]),
703+
704+
(``((x:real) / 42 = x) = (x = 0)``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
705+
(``(x:real) / 0 = x``, [sat_CVC, sat_YO, sat_Z3, sat_Z3p]),
706+
(``(x:real) / 0 = 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
707+
(``(0:real) / 0 = 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
708+
(``(0:real) / 0 = 1``, [sat_CVC, sat_YO, sat_Z3, sat_Z3p]),
709+
(``(0:real) / 0 = 1 / 0``, [thm_AUTO, thm_CVC, thm_Z3, thm_Z3p_v4]),
710+
(``(x:real) / 0 = x / 0``, [thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p]),
711+
680712
(``x > 0 ==> (x:real) / 42 < x``,
681713
[thm_AUTO, thm_CVC, thm_YO, thm_Z3, thm_Z3p_v4]),
682714
(``x < 0 ==> (x:real) / 42 > x``,

0 commit comments

Comments
 (0)