Closed binghe closed 1 month ago
Could you write some documentation (perhaps in DESCRIPTION’s libraries.stex
) on what this tactic does and does not do?
Could you write some documentation (perhaps in DESCRIPTION’s
libraries.stex
) on what this tactic does and does not do?
will try that
I have added a paragraph in «HOL Description» (and next-release.md
) about INTEGER_TAC
(after \paragraph{intLib}
about OMEGA_CONV
and ARITH_CONV
:
In addition, the \ml{intLib.INTEGER_RULE} (and its tactic version \ml{intLib.INTEGER_TAC})
ported from HOL-Light can solve some simple equations about divisibility of integers,
e.g.~\holtxt{d int_divides m ==> d int_divides (m * n)}.
As part of the procedure, multivariate polynomials of integer are expanded to their
``normal forms'' (with respect to certain ordering), and thus equations between equivalent
such polynomials can be decided,
e.g.~\holtxt{w * y + x * z - (w * z + x * y) = (w - x) * (y - z)}.
The last commit fixed a bug in DISJ_ACI_RULE
(used indirectly by REAL_ARITH
, now the signature is exposed), caused by the semantic difference of UNDISCH
between HOL4 and HOL-Light. In HOL4, the document of UNDISCH
clearly says that {UNDISCH} treats {"~u"} as {"u ==> F"}
while in HOL-Light there's no such behavior. Therefore the code repeat UNDISCH (TAUT ‘~a ==> ~b ==> ~(a \/ b)’)
gives different results between the two systems and has caused the bug (which is exposed by the forthcoming RING_TAC
).
Thanks for this!
Hi,
This PR brings HOL-Light's
INTEGER_TAC
(andINTEGER_RULE
) into HOL4. It is a by-product of another ongoing work of porting HOL-Light'sRING_TAC
to HOL4. The underlying implementation is based on theNormalizer
andGrobner
packages used byREAL_ARITH_TAC
andREAL_FIELD_TAC
. Insrc/integer/selftest.sml
, there are two examples:An intermediate function,
INT_RING :term -> thm
, can be useful as the simplification step of more advanced decision procedures, namelyCOOPER_TAC
andOMEGA_TAC
. I put the related code intointegerRingLib
without depending onCooper
andOmega
packages, so that later this work can be integrated into them.The main implementation of
INTEGER_TAC
is currently inintLib.sml
.It uses some code (
CONJ_ACI_RULE
, etc.) previously innormalForms.sml
without signatures. Now I have move these code toCanon
package (which seems a partial port of HOL-Light'scanon.ml
).In
mesonLib
, I added HOL-Light compatibleMESON
function, which has currently multiple copies in proofs ported from HOL-Light (I will clean them up later).In
intReduce
, I added some integer arithmetic conversions (they are used byINTEGER_TAC
) ported from HOL-Light. In theory the singleREDUCE_CONV
can also do the job, but these new conversions have better performance (by doing much less rewritings on large inputs), e.g.:The «HOL Description» was broken by new code added into
intLib
, because there is some code manipulating the overload ofint_add
. I resolved the manual PDF building by movingload "intLib"
to earlier places.Let's see how the CI tests will go (perhaps there are missing code in the PR branch).
Chun