From 0219dc26914219765300bf2eae792bed49b73562 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 9 Jul 2018 12:57:39 -0400 Subject: Add Z.div_mod_to_quot_rem tactic, put it in zify The various (micr)omega tactics now support `Z.div` and `Z.modulo`. I briefly looked into supporting `Nat.div` and `Nat.modulo`, but the conversions between `Z.div` and `Nat.div` are defined in `ZArith.Zdiv`, which depends on `Omega`, which depends on `PreOmega`, which is where `zify` is defined. --- doc/sphinx/addendum/micromega.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst index e799677c59..1aa4a23b5c 100644 --- a/doc/sphinx/addendum/micromega.rst +++ b/doc/sphinx/addendum/micromega.rst @@ -145,7 +145,7 @@ weakness, the :tacn:`lia` tactic is using recursively a combination of: + linear *positivstellensatz* refutations; + cutting plane proofs; + case split. - + Cutting plane proofs ~~~~~~~~~~~~~~~~~~~~~~ @@ -250,6 +250,8 @@ obtain :math:`-1`. By Theorem :ref:`Psatz `, the goal is valid. .. [#] Support for :g:`nat` and :g:`N` is obtained by pre-processing the goal with the ``zify`` tactic. +.. [#] Support for :g:`Z.div` and :g:`Z.modulo` is obtained by pre-processing the goal with + the `Z.div_mod_to_quot_rem` tactic, which is called by `zify`. .. [#] Sources and binaries can be found at https://projects.coin-or.org/Csdp .. [#] Variants deal with equalities and strict inequalities. .. [#] In practice, the oracle might fail to produce such a refutation. -- cgit v1.2.3 From 0c99020482e96ceb05799c47ffbcaef0e89b4b1f Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 3 Dec 2018 16:45:49 -0500 Subject: Don't bundle Z.div_mod_quot_rem into zify Alas, I have not had time to work on imrpoving the performance of nia, and there has been a request to include this tactic (which is useful on its own) without bundling it into `zify`. So that is what we do here. I leave the definition of it in `PreOmega` in case we want to eventually include it in `zify`/`nia`. --- doc/sphinx/addendum/micromega.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst index 1aa4a23b5c..2ace8a59e1 100644 --- a/doc/sphinx/addendum/micromega.rst +++ b/doc/sphinx/addendum/micromega.rst @@ -250,8 +250,8 @@ obtain :math:`-1`. By Theorem :ref:`Psatz `, the goal is valid. .. [#] Support for :g:`nat` and :g:`N` is obtained by pre-processing the goal with the ``zify`` tactic. -.. [#] Support for :g:`Z.div` and :g:`Z.modulo` is obtained by pre-processing the goal with - the `Z.div_mod_to_quot_rem` tactic, which is called by `zify`. +.. [#] Support for :g:`Z.div` and :g:`Z.modulo` may be obtained by pre-processing the goal with + the ``Z.div_mod_to_quot_rem`` tactic after manually running ``zify``. .. [#] Sources and binaries can be found at https://projects.coin-or.org/Csdp .. [#] Variants deal with equalities and strict inequalities. .. [#] In practice, the oracle might fail to produce such a refutation. -- cgit v1.2.3 From 20fc76a75c13f61d467834414e97776477ec203c Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 3 Dec 2018 18:19:57 -0500 Subject: Add subst to the end of nia in the test-suite This speeds up the file from 2m32s to ``` real 0m41.851s user 0m41.512s sys 0m0.376s ``` Also note the `subst` trick in the doc. --- doc/sphinx/addendum/micromega.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst index 2ace8a59e1..5f199d28f5 100644 --- a/doc/sphinx/addendum/micromega.rst +++ b/doc/sphinx/addendum/micromega.rst @@ -251,7 +251,8 @@ obtain :math:`-1`. By Theorem :ref:`Psatz `, the goal is valid. .. [#] Support for :g:`nat` and :g:`N` is obtained by pre-processing the goal with the ``zify`` tactic. .. [#] Support for :g:`Z.div` and :g:`Z.modulo` may be obtained by pre-processing the goal with - the ``Z.div_mod_to_quot_rem`` tactic after manually running ``zify``. + the ``Z.div_mod_to_quot_rem`` tactic after manually running ``zify``. Note that additionally + running ``subst`` can speed up things up, sometimees by almost 4x in practice. .. [#] Sources and binaries can be found at https://projects.coin-or.org/Csdp .. [#] Variants deal with equalities and strict inequalities. .. [#] In practice, the oracle might fail to produce such a refutation. -- cgit v1.2.3 From 4d3ecf1acd584200fe4299b8d12104c7acc33579 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 4 Dec 2018 11:31:39 -0500 Subject: Revert "Add subst to the end of nia in the test-suite" This reverts commit b49f4e966443a76ac70d37c4cde68f94de164c01. It turns out the 4x was due to .nia.cache (because I didn't clean sufficiently in testing), not due to `subst`. --- doc/sphinx/addendum/micromega.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst index 5f199d28f5..2ace8a59e1 100644 --- a/doc/sphinx/addendum/micromega.rst +++ b/doc/sphinx/addendum/micromega.rst @@ -251,8 +251,7 @@ obtain :math:`-1`. By Theorem :ref:`Psatz `, the goal is valid. .. [#] Support for :g:`nat` and :g:`N` is obtained by pre-processing the goal with the ``zify`` tactic. .. [#] Support for :g:`Z.div` and :g:`Z.modulo` may be obtained by pre-processing the goal with - the ``Z.div_mod_to_quot_rem`` tactic after manually running ``zify``. Note that additionally - running ``subst`` can speed up things up, sometimees by almost 4x in practice. + the ``Z.div_mod_to_quot_rem`` tactic after manually running ``zify``. .. [#] Sources and binaries can be found at https://projects.coin-or.org/Csdp .. [#] Variants deal with equalities and strict inequalities. .. [#] In practice, the oracle might fail to produce such a refutation. -- cgit v1.2.3 From d69ec6e2e0931a87d2ec3b3f47d1969b365d91f7 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Wed, 5 Dec 2018 16:05:13 -0500 Subject: Rename Z.div_mod_to_quot_rem, add Z.quot_rem_to_equations, Z.to_euclidean_division_equations --- doc/sphinx/addendum/micromega.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst index 2ace8a59e1..b076aac1ed 100644 --- a/doc/sphinx/addendum/micromega.rst +++ b/doc/sphinx/addendum/micromega.rst @@ -250,8 +250,16 @@ obtain :math:`-1`. By Theorem :ref:`Psatz `, the goal is valid. .. [#] Support for :g:`nat` and :g:`N` is obtained by pre-processing the goal with the ``zify`` tactic. -.. [#] Support for :g:`Z.div` and :g:`Z.modulo` may be obtained by pre-processing the goal with - the ``Z.div_mod_to_quot_rem`` tactic after manually running ``zify``. +.. [#] Support for :g:`Z.div` and :g:`Z.modulo` may be obtained by + pre-processing the goal with the ``Z.div_mod_to_equations`` tactic (you may + need to manually run ``zify`` first). +.. [#] Support for :g:`Z.quot` and :g:`Z.rem` may be obtained by pre-processing + the goal with the ``Z.quot_rem_to_equations`` tactic (you may need to manually + run ``zify`` first). +.. [#] Note that support for :g:`Z.div`, :g:`Z.modulo`, :g:`Z.quot`, and + :g:`Z.rem` may be simultaneously obtained by pre-processing the goal with the + ``Z.to_euclidean_division_equations`` tactic (you may need to manually run + ``zify`` first). .. [#] Sources and binaries can be found at https://projects.coin-or.org/Csdp .. [#] Variants deal with equalities and strict inequalities. .. [#] In practice, the oracle might fail to produce such a refutation. -- cgit v1.2.3