History log of /seL4-l4v-master/HOL4/src/real/selftest.sml
Revision Date Author Comments
# 6c0c2409 25-Oct-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Fix printing of boolean negation after numeric types are loaded

If you have a term ~p /\ q, it should print as ¬p ∧ q (assuming
Unicode is enabled).

This wasn't true previously because of the dance around use of ~ as
numeric negation. The desired behaviour:

Parsing:

~ is preferentially parsed as boolean negation
¬ is only parsed as boolean/word negation
- (unary) is only parsed as numeric negation

Printing (with Unicode):
~ is never printed
¬ is printed for boolean/word negation
- (unary) is printed for numeric negation

Printing (without Unicode)
~ is printed for boolean/word negation
- (unary) is printed for numeric negation

Inspired to fix by reporting of issue #871


# bc2b57c2 21-Sep-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Fix a bug in normalisation of ℝ-multiplication

Use of MATCH_MP caused avoidance of variables occurring in assumptions
and introduction of unwanted priming. Assumptions can get pulled in
to goals through the use of arithmetic decision procedures that suck
in everything they think might be relevant.

Closes #844


# 0a982e3f 18-May-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Ensure ℕ and ℝ dp's have different names when embedded in simplifier

Now they are NUM_ARITH_DP and REAL_ARITH_DP, which are the names to
use when "Excl"-uding them from simplifier invocations. The
NUM_ARITH_DP also does normalisation over additive ℕ-terms.


# d0b4f135 15-May-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Fix a MULRELNORM instance: 2 * x = inv 2 * y should canonicalise


# 2160f504 15-May-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Fix a REALMULCANON bug to do with inv applied to real literals


# e2f002ce 15-Mar-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Further fixes (with tests) to ℝ-multiplication-normalisation


# fb6bec88 11-Mar-2020 Michael Norrish <michael.norrish@data61.csiro.au>

More ℝ-normalisation, removing inverted factors where possible

Previously, the code would collect up

...x... <= ... x...

for various possible exponents of x, but the normalisation would only
trigger if the x was present on both sides. Now, if the exponent is
negative, a lone x will shift to the other side of the relation
regardless.

This applies also to fractions, so that

x <= 3/4 * y

will turn into

4 * x <= 3 * y

Fixes in src/probability and more explicit regression tests.


# 6126ac65 04-Mar-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Make ℝ-relation-normalisation first canonicalise arguments to rel'n


# 3d9b7e1f 03-Mar-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Fix canonicalisation of terms with leading fraction coefficients


# 7815eb6e 03-Mar-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Further extend normalisation of multiplications on ℝ

In particular, fractions are handled better so that something like

4 * x * inv 2

will turn into

2 * x

Also normalise so that something that would otherwise appear as

-1 * (f1 * f2 * ...)

will become

-(f1 * f2 * ...)


# d0a0dfd3 24-Feb-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Further improve ℝ normalisation

More test-cases, more automatic rewrites, better code.


# 32cb5f65 21-Feb-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Normalise ℝ multiplications on either side of relation symbols

This can factor out things like

8 * x <= 12 * y ~~~> 2 * x <= 3 * y

as well as

x pow 10 * z < y * x⁻¹ pow 6 ~~~> x pow 16 * z < y

though the latter relies on being able to discharge the side condition
that x <> 0.

Put into srw_ss() and problems arising fixed


# 8751db67 20-Feb-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Tweaks to multiplicative normalisation over ℝ

Includes some new automatic rewrites


# 5283d5f6 19-Feb-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Add RMULCANON to automatic simplification

Builds up to selftest level 1.


# bbb3ac95 17-Feb-2020 Michael Norrish <michael.norrish@data61.csiro.au>

Extend/improve REALMULCANON normalisation


# f1b09c58 29-Mar-2019 Michael Norrish <Michael.Norrish@nicta.com.au>

Add canonicalisation convs for real addition and multiplication

These should be included in default simplification for the real
numbers.


# 7843d690 24-Oct-2017 Michael Norrish <Michael.Norrish@nicta.com.au>

Fix pretty-printing of real and relation inverses

Now both get to keep their pretty superscript forms (-1 for the reals,
and T for the relations) even when both theories are loaded. The cost
is that neither will be printed as "inv" when unapplied to arguments,
instead appearing as "realinv" and "relinv" respectively.

Closes #481


# 6c8715da 17-Jul-2016 Michael Norrish <Michael.Norrish@nicta.com.au>

Tidy up some selftests, making output prettier


# d2d9f963 03-Nov-2013 Michael Norrish <michael.norrish@nicta.com.au>

Mention bug fixed in 730f9a26a in release notes.

Also add regression test for this bug in src/real.


# 3c3bfcf2 25-May-2011 Anthony Fox <anthony.fox@cl.cam.ac.uk>

Fix calculation bug (see test).


# 2c082279 30-Sep-2009 Michael Norrish <Michael.Norrish@nicta.com.au>

Adjust a whole bunch of selftests to use Unicode at zero. In some
cases this is just for the sake of prettiness (making columns line
up), but in others, where the test is of the pretty-printer, I didn't
want to alter the tests.


# a156bcaa 25-Jun-2006 Michael Norrish <Michael.Norrish@nicta.com.au>

Fix a silly hole in the automatic simplification of real number arithmetic.


# 115d66cf 14-May-2006 Michael Norrish <Michael.Norrish@nicta.com.au>

Fix a number of calculation bugs, mostly calculations involving zero.
The new tests all used to fail.


# e310b999 03-Feb-2005 Michael Norrish <Michael.Norrish@nicta.com.au>

Real number reduction wasn't working on terms of the form
0 = x / y
or
x / y = 0
Fixed, and test added to selftest regression.


# fceeee5e 16-Dec-2004 Michael Norrish <Michael.Norrish@nicta.com.au>

The problem was that we weren't reducing double negations. Now fixed.


# bf96c0ca 16-Dec-2004 Michael Norrish <Michael.Norrish@nicta.com.au>

Remove an unnecessary loading message, and add regression tests for
calculation over the real numbers. Discover a bug in the handling
of abs thereby. Fix to follow.