1.1 --- a/etc/components Wed May 12 23:54:01 2010 +0200
1.2 +++ b/etc/components Wed May 12 23:54:02 2010 +0200
1.3 @@ -16,4 +16,4 @@
1.4 src/HOL/Tools/ATP_Manager
1.5 src/HOL/Mirabelle
1.6 src/HOL/Library/Sum_Of_Squares
1.7 -src/HOL/SMT
1.8 +src/HOL/Tools/SMT
2.1 --- a/src/HOL/IsaMakefile Wed May 12 23:54:01 2010 +0200
2.2 +++ b/src/HOL/IsaMakefile Wed May 12 23:54:02 2010 +0200
2.3 @@ -20,7 +20,6 @@
2.4 HOL-Plain \
2.5 HOL-Probability \
2.6 HOL-Proofs \
2.7 - HOL-SMT \
2.8 HOL-Word \
2.9 HOL4 \
2.10 TLA
2.11 @@ -61,7 +60,7 @@
2.12 HOL-Proofs-Extraction \
2.13 HOL-Proofs-Lambda \
2.14 HOL-SET_Protocol \
2.15 - HOL-SMT-Examples \
2.16 + HOL-SMT_Examples \
2.17 HOL-Statespace \
2.18 HOL-Subst \
2.19 TLA-Buffer \
2.20 @@ -274,6 +273,7 @@
2.21 Semiring_Normalization.thy \
2.22 SetInterval.thy \
2.23 Sledgehammer.thy \
2.24 + SMT.thy \
2.25 String.thy \
2.26 Typerep.thy \
2.27 $(SRC)/Provers/Arith/assoc_fold.ML \
2.28 @@ -281,6 +281,7 @@
2.29 $(SRC)/Provers/Arith/cancel_numerals.ML \
2.30 $(SRC)/Provers/Arith/combine_numerals.ML \
2.31 $(SRC)/Provers/Arith/extract_common_term.ML \
2.32 + $(SRC)/Tools/cache_io.ML \
2.33 $(SRC)/Tools/Metis/metis.ML \
2.34 Tools/ATP_Manager/atp_manager.ML \
2.35 Tools/ATP_Manager/atp_systems.ML \
2.36 @@ -322,6 +323,20 @@
2.37 Tools/Sledgehammer/sledgehammer_isar.ML \
2.38 Tools/Sledgehammer/sledgehammer_proof_reconstruct.ML \
2.39 Tools/Sledgehammer/sledgehammer_util.ML \
2.40 + Tools/SMT/cvc3_solver.ML \
2.41 + Tools/SMT/smtlib_interface.ML \
2.42 + Tools/SMT/smt_monomorph.ML \
2.43 + Tools/SMT/smt_normalize.ML \
2.44 + Tools/SMT/smt_solver.ML \
2.45 + Tools/SMT/smt_translate.ML \
2.46 + Tools/SMT/yices_solver.ML \
2.47 + Tools/SMT/z3_interface.ML \
2.48 + Tools/SMT/z3_model.ML \
2.49 + Tools/SMT/z3_proof_literals.ML \
2.50 + Tools/SMT/z3_proof_parser.ML \
2.51 + Tools/SMT/z3_proof_reconstruction.ML \
2.52 + Tools/SMT/z3_proof_tools.ML \
2.53 + Tools/SMT/z3_solver.ML \
2.54 Tools/string_code.ML \
2.55 Tools/string_syntax.ML \
2.56 Tools/transfer.ML \
2.57 @@ -1070,9 +1085,9 @@
2.58
2.59 ## HOL-Multivariate_Analysis
2.60
2.61 -HOL-Multivariate_Analysis: HOL-SMT $(OUT)/HOL-Multivariate_Analysis
2.62 +HOL-Multivariate_Analysis: HOL $(OUT)/HOL-Multivariate_Analysis
2.63
2.64 -$(OUT)/HOL-Multivariate_Analysis: $(OUT)/HOL-SMT \
2.65 +$(OUT)/HOL-Multivariate_Analysis: $(OUT)/HOL \
2.66 Multivariate_Analysis/ROOT.ML \
2.67 Multivariate_Analysis/document/root.tex \
2.68 Multivariate_Analysis/Brouwer_Fixpoint.thy \
2.69 @@ -1094,7 +1109,7 @@
2.70 Library/Inner_Product.thy Library/Numeral_Type.thy \
2.71 Library/Convex.thy Library/FrechetDeriv.thy \
2.72 Library/Product_Vector.thy Library/Product_plus.thy
2.73 - @cd Multivariate_Analysis; $(ISABELLE_TOOL) usedir -b -g true $(OUT)/HOL-SMT HOL-Multivariate_Analysis
2.74 + @cd Multivariate_Analysis; $(ISABELLE_TOOL) usedir -b -g true $(OUT)/HOL HOL-Multivariate_Analysis
2.75
2.76
2.77 ## HOL-Probability
2.78 @@ -1238,39 +1253,23 @@
2.79 @$(ISABELLE_TOOL) usedir $(OUT)/HOL Mirabelle
2.80
2.81
2.82 -## HOL-SMT
2.83 +## HOL-SMT_Examples
2.84
2.85 -HOL-SMT: HOL-Word $(OUT)/HOL-SMT
2.86 +HOL-SMT_Examples: HOL $(LOG)/HOL-SMT_Examples.gz
2.87
2.88 -$(OUT)/HOL-SMT: $(OUT)/HOL-Word SMT/ROOT.ML SMT/SMT_Base.thy SMT/Z3.thy \
2.89 - SMT/SMT.thy SMT/Tools/smt_normalize.ML SMT/Tools/smt_monomorph.ML \
2.90 - SMT/Tools/smt_translate.ML SMT/Tools/smtlib_interface.ML \
2.91 - SMT/Tools/z3_interface.ML SMT/Tools/smt_additional_facts.ML \
2.92 - SMT/Tools/smt_solver.ML SMT/Tools/cvc3_solver.ML \
2.93 - SMT/Tools/yices_solver.ML SMT/Tools/z3_proof_parser.ML \
2.94 - SMT/Tools/z3_proof_tools.ML SMT/Tools/z3_proof_literals.ML \
2.95 - SMT/Tools/z3_proof_reconstruction.ML SMT/Tools/z3_model.ML \
2.96 - SMT/Tools/z3_solver.ML $(SRC)/Tools/cache_io.ML
2.97 - @cd SMT; $(ISABELLE_TOOL) usedir -b -g true $(OUT)/HOL-Word HOL-SMT
2.98 -
2.99 -
2.100 -## HOL-SMT-Examples
2.101 -
2.102 -HOL-SMT-Examples: HOL-SMT $(LOG)/HOL-SMT-Examples.gz
2.103 -
2.104 -$(LOG)/HOL-SMT-Examples.gz: $(OUT)/HOL-SMT SMT/Examples/ROOT.ML \
2.105 - SMT/Examples/SMT_Examples.thy SMT/Examples/SMT_Examples.certs
2.106 - @cd SMT; $(ISABELLE_TOOL) usedir $(OUT)/HOL-SMT Examples
2.107 +$(LOG)/HOL-SMT_Examples.gz: $(OUT)/HOL-SMT SMT_Examples/ROOT.ML \
2.108 + SMT_Examples/SMT_Examples.thy SMT_Examples/SMT_Examples.certs
2.109 + @cd SMT; $(ISABELLE_TOOL) usedir $(OUT)/HOL Examples
2.110
2.111
2.112 ## HOL-Boogie
2.113
2.114 -HOL-Boogie: HOL-SMT $(OUT)/HOL-Boogie
2.115 +HOL-Boogie: HOL $(OUT)/HOL-Boogie
2.116
2.117 -$(OUT)/HOL-Boogie: $(OUT)/HOL-SMT Boogie/ROOT.ML Boogie/Boogie.thy \
2.118 +$(OUT)/HOL-Boogie: $(OUT)/HOL Boogie/ROOT.ML Boogie/Boogie.thy \
2.119 Boogie/Tools/boogie_vcs.ML Boogie/Tools/boogie_loader.ML \
2.120 Boogie/Tools/boogie_commands.ML Boogie/Tools/boogie_tactics.ML
2.121 - @cd Boogie; $(ISABELLE_TOOL) usedir -b -g true $(OUT)/HOL-SMT HOL-Boogie
2.122 + @cd Boogie; $(ISABELLE_TOOL) usedir -b -g true $(OUT)/HOL HOL-Boogie
2.123
2.124
2.125 ## HOL-Boogie_Examples
2.126 @@ -1344,15 +1343,15 @@
2.127 $(LOG)/HOL-Probability.gz $(LOG)/HOL-Prolog.gz \
2.128 $(LOG)/HOL-Proofs.gz $(LOG)/HOL-Proofs-Extraction.gz \
2.129 $(LOG)/HOL-Proofs-Lambda.gz $(LOG)/HOL-SET_Protocol.gz \
2.130 - $(LOG)/HOL-SMT-Examples.gz $(LOG)/HOL-SMT.gz \
2.131 - $(LOG)/HOL-Statespace.gz $(LOG)/HOL-Subst.gz \
2.132 - $(LOG)/HOL-UNITY.gz $(LOG)/HOL-Unix.gz \
2.133 - $(LOG)/HOL-Word-Examples.gz $(LOG)/HOL-Word.gz \
2.134 - $(LOG)/HOL-ZF.gz $(LOG)/HOL-ex.gz $(LOG)/HOL.gz \
2.135 - $(LOG)/HOL4.gz $(LOG)/TLA-Buffer.gz $(LOG)/TLA-Inc.gz \
2.136 - $(LOG)/TLA-Memory.gz $(LOG)/TLA.gz $(OUT)/HOL \
2.137 - $(OUT)/HOL-Algebra $(OUT)/HOL-Base $(OUT)/HOL-Boogie \
2.138 - $(OUT)/HOL-Main $(OUT)/HOL-Multivariate_Analysis \
2.139 - $(OUT)/HOL-NSA $(OUT)/HOL-Nominal $(OUT)/HOL-Plain \
2.140 + $(LOG)/HOL-SMT_Examples.gz $(LOG)/HOL-Statespace.gz \
2.141 + $(LOG)/HOL-Subst.gz $(LOG)/HOL-UNITY.gz \
2.142 + $(LOG)/HOL-Unix.gz $(LOG)/HOL-Word-Examples.gz \
2.143 + $(LOG)/HOL-Word.gz $(LOG)/HOL-ZF.gz $(LOG)/HOL-ex.gz \
2.144 + $(LOG)/HOL.gz $(LOG)/HOL4.gz $(LOG)/TLA-Buffer.gz \
2.145 + $(LOG)/TLA-Inc.gz $(LOG)/TLA-Memory.gz $(LOG)/TLA.gz \
2.146 + $(OUT)/HOL $(OUT)/HOL-Algebra $(OUT)/HOL-Base \
2.147 + $(OUT)/HOL-Boogie $(OUT)/HOL-Main \
2.148 + $(OUT)/HOL-Multivariate_Analysis $(OUT)/HOL-NSA \
2.149 + $(OUT)/HOL-Nominal $(OUT)/HOL-Plain \
2.150 $(OUT)/HOL-Probability $(OUT)/HOL-Proofs \
2.151 - $(OUT)/HOL-SMT $(OUT)/HOL-Word $(OUT)/HOL4 $(OUT)/TLA
2.152 + $(OUT)/HOL-Word $(OUT)/HOL4 $(OUT)/TLA
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/src/HOL/SMT.thy Wed May 12 23:54:02 2010 +0200
3.3 @@ -0,0 +1,306 @@
3.4 +(* Title: HOL/SMT.thy
3.5 + Author: Sascha Boehme, TU Muenchen
3.6 +*)
3.7 +
3.8 +header {* Bindings to Satisfiability Modulo Theories (SMT) solvers *}
3.9 +
3.10 +theory SMT
3.11 +imports List
3.12 +uses
3.13 + "~~/src/Tools/cache_io.ML"
3.14 + ("Tools/SMT/smt_additional_facts.ML")
3.15 + ("Tools/SMT/smt_monomorph.ML")
3.16 + ("Tools/SMT/smt_normalize.ML")
3.17 + ("Tools/SMT/smt_translate.ML")
3.18 + ("Tools/SMT/smt_solver.ML")
3.19 + ("Tools/SMT/smtlib_interface.ML")
3.20 + ("Tools/SMT/z3_proof_parser.ML")
3.21 + ("Tools/SMT/z3_proof_tools.ML")
3.22 + ("Tools/SMT/z3_proof_literals.ML")
3.23 + ("Tools/SMT/z3_proof_reconstruction.ML")
3.24 + ("Tools/SMT/z3_model.ML")
3.25 + ("Tools/SMT/z3_interface.ML")
3.26 + ("Tools/SMT/z3_solver.ML")
3.27 + ("Tools/SMT/cvc3_solver.ML")
3.28 + ("Tools/SMT/yices_solver.ML")
3.29 +begin
3.30 +
3.31 +
3.32 +
3.33 +section {* Triggers for quantifier instantiation *}
3.34 +
3.35 +text {*
3.36 +Some SMT solvers support triggers for quantifier instantiation.
3.37 +Each trigger consists of one ore more patterns. A pattern may either
3.38 +be a list of positive subterms (the first being tagged by "pat" and
3.39 +the consecutive subterms tagged by "andpat"), or a list of negative
3.40 +subterms (the first being tagged by "nopat" and the consecutive
3.41 +subterms tagged by "andpat").
3.42 +*}
3.43 +
3.44 +datatype pattern = Pattern
3.45 +
3.46 +definition pat :: "'a \<Rightarrow> pattern"
3.47 +where "pat _ = Pattern"
3.48 +
3.49 +definition nopat :: "'a \<Rightarrow> pattern"
3.50 +where "nopat _ = Pattern"
3.51 +
3.52 +definition andpat :: "pattern \<Rightarrow> 'a \<Rightarrow> pattern" (infixl "andpat" 60)
3.53 +where "_ andpat _ = Pattern"
3.54 +
3.55 +definition trigger :: "pattern list \<Rightarrow> bool \<Rightarrow> bool"
3.56 +where "trigger _ P = P"
3.57 +
3.58 +
3.59 +
3.60 +section {* Higher-order encoding *}
3.61 +
3.62 +text {*
3.63 +Application is made explicit for constants occurring with varying
3.64 +numbers of arguments. This is achieved by the introduction of the
3.65 +following constant.
3.66 +*}
3.67 +
3.68 +definition "apply" where "apply f x = f x"
3.69 +
3.70 +text {*
3.71 +Some solvers support a theory of arrays which can be used to encode
3.72 +higher-order functions. The following set of lemmas specifies the
3.73 +properties of such (extensional) arrays.
3.74 +*}
3.75 +
3.76 +lemmas array_rules = ext fun_upd_apply fun_upd_same fun_upd_other
3.77 + fun_upd_upd
3.78 +
3.79 +
3.80 +
3.81 +section {* First-order logic *}
3.82 +
3.83 +text {*
3.84 +Some SMT solvers require a strict separation between formulas and
3.85 +terms. When translating higher-order into first-order problems,
3.86 +all uninterpreted constants (those not builtin in the target solver)
3.87 +are treated as function symbols in the first-order sense. Their
3.88 +occurrences as head symbols in atoms (i.e., as predicate symbols) is
3.89 +turned into terms by equating such atoms with @{term True} using the
3.90 +following term-level equation symbol.
3.91 +*}
3.92 +
3.93 +definition term_eq :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infix "term'_eq" 50)
3.94 + where "(x term_eq y) = (x = y)"
3.95 +
3.96 +
3.97 +
3.98 +section {* Setup *}
3.99 +
3.100 +use "Tools/SMT/smt_monomorph.ML"
3.101 +use "Tools/SMT/smt_normalize.ML"
3.102 +use "Tools/SMT/smt_translate.ML"
3.103 +use "Tools/SMT/smt_solver.ML"
3.104 +use "Tools/SMT/smtlib_interface.ML"
3.105 +use "Tools/SMT/z3_interface.ML"
3.106 +use "Tools/SMT/z3_proof_parser.ML"
3.107 +use "Tools/SMT/z3_proof_tools.ML"
3.108 +use "Tools/SMT/z3_proof_literals.ML"
3.109 +use "Tools/SMT/z3_proof_reconstruction.ML"
3.110 +use "Tools/SMT/z3_model.ML"
3.111 +use "Tools/SMT/z3_solver.ML"
3.112 +use "Tools/SMT/cvc3_solver.ML"
3.113 +use "Tools/SMT/yices_solver.ML"
3.114 +
3.115 +setup {*
3.116 + SMT_Solver.setup #>
3.117 + Z3_Proof_Reconstruction.setup #>
3.118 + Z3_Solver.setup #>
3.119 + CVC3_Solver.setup #>
3.120 + Yices_Solver.setup
3.121 +*}
3.122 +
3.123 +
3.124 +
3.125 +section {* Configuration *}
3.126 +
3.127 +text {*
3.128 +The current configuration can be printed by the following command
3.129 +(which shows the values of most options):
3.130 +*}
3.131 +
3.132 +smt_status
3.133 +
3.134 +
3.135 +
3.136 +subsection {* General configuration options *}
3.137 +
3.138 +text {*
3.139 +The option @{text smt_solver} can be used to change the target SMT
3.140 +solver. The possible values are @{text cvc3}, @{text yices}, and
3.141 +@{text z3}. It is advisable to locally install the selected solver,
3.142 +although this is not necessary for @{text cvc3} and @{text z3}, which
3.143 +can also be used over an Internet-based service.
3.144 +
3.145 +When using local SMT solvers, the path to their binaries should be
3.146 +declared by setting the following environment variables:
3.147 +@{text CVC3_SOLVER}, @{text YICES_SOLVER}, and @{text Z3_SOLVER}.
3.148 +*}
3.149 +
3.150 +declare [[ smt_solver = z3 ]]
3.151 +
3.152 +text {*
3.153 +Since SMT solvers are potentially non-terminating, there is a timeout
3.154 +(given in seconds) to restrict their runtime. A value greater than
3.155 +120 (seconds) is in most cases not advisable.
3.156 +*}
3.157 +
3.158 +declare [[ smt_timeout = 20 ]]
3.159 +
3.160 +
3.161 +
3.162 +subsection {* Certificates *}
3.163 +
3.164 +text {*
3.165 +By setting the option @{text smt_certificates} to the name of a file,
3.166 +all following applications of an SMT solver a cached in that file.
3.167 +Any further application of the same SMT solver (using the very same
3.168 +configuration) re-uses the cached certificate instead of invoking the
3.169 +solver. An empty string disables caching certificates.
3.170 +
3.171 +The filename should be given as an explicit path. It is good
3.172 +practice to use the name of the current theory (with ending
3.173 +@{text ".certs"} instead of @{text ".thy"}) as the certificates file.
3.174 +*}
3.175 +
3.176 +declare [[ smt_certificates = "" ]]
3.177 +
3.178 +text {*
3.179 +The option @{text smt_fixed} controls whether only stored
3.180 +certificates are should be used or invocation of an SMT solver is
3.181 +allowed. When set to @{text true}, no SMT solver will ever be
3.182 +invoked and only the existing certificates found in the configured
3.183 +cache are used; when set to @{text false} and there is no cached
3.184 +certificate for some proposition, then the configured SMT solver is
3.185 +invoked.
3.186 +*}
3.187 +
3.188 +declare [[ smt_fixed = false ]]
3.189 +
3.190 +
3.191 +
3.192 +subsection {* Tracing *}
3.193 +
3.194 +text {*
3.195 +For tracing the generated problem file given to the SMT solver as
3.196 +well as the returned result of the solver, the option
3.197 +@{text smt_trace} should be set to @{text true}.
3.198 +*}
3.199 +
3.200 +declare [[ smt_trace = false ]]
3.201 +
3.202 +
3.203 +
3.204 +subsection {* Z3-specific options *}
3.205 +
3.206 +text {*
3.207 +Z3 is the only SMT solver whose proofs are checked (or reconstructed)
3.208 +in Isabelle (all other solvers are implemented as oracles). Enabling
3.209 +or disabling proof reconstruction for Z3 is controlled by the option
3.210 +@{text z3_proofs}.
3.211 +*}
3.212 +
3.213 +declare [[ z3_proofs = true ]]
3.214 +
3.215 +text {*
3.216 +From the set of assumptions given to Z3, those assumptions used in
3.217 +the proof are traced when the option @{text z3_trace_assms} is set to
3.218 +@{term true}.
3.219 +*}
3.220 +
3.221 +declare [[ z3_trace_assms = false ]]
3.222 +
3.223 +text {*
3.224 +Z3 provides several commandline options to tweak its behaviour. They
3.225 +can be configured by writing them literally as value for the option
3.226 +@{text z3_options}.
3.227 +*}
3.228 +
3.229 +declare [[ z3_options = "" ]]
3.230 +
3.231 +
3.232 +
3.233 +section {* Schematic rules for Z3 proof reconstruction *}
3.234 +
3.235 +text {*
3.236 +Several prof rules of Z3 are not very well documented. There are two
3.237 +lemma groups which can turn failing Z3 proof reconstruction attempts
3.238 +into succeeding ones: the facts in @{text z3_rule} are tried prior to
3.239 +any implemented reconstruction procedure for all uncertain Z3 proof
3.240 +rules; the facts in @{text z3_simp} are only fed to invocations of
3.241 +the simplifier when reconstructing theory-specific proof steps.
3.242 +*}
3.243 +
3.244 +lemmas [z3_rule] =
3.245 + refl eq_commute conj_commute disj_commute simp_thms nnf_simps
3.246 + ring_distribs field_simps times_divide_eq_right times_divide_eq_left
3.247 + if_True if_False not_not
3.248 +
3.249 +lemma [z3_rule]:
3.250 + "(P \<longrightarrow> Q) = (Q \<or> \<not>P)"
3.251 + "(\<not>P \<longrightarrow> Q) = (P \<or> Q)"
3.252 + "(\<not>P \<longrightarrow> Q) = (Q \<or> P)"
3.253 + by auto
3.254 +
3.255 +lemma [z3_rule]:
3.256 + "((P = Q) \<longrightarrow> R) = (R | (Q = (\<not>P)))"
3.257 + by auto
3.258 +
3.259 +lemma [z3_rule]:
3.260 + "((\<not>P) = P) = False"
3.261 + "(P = (\<not>P)) = False"
3.262 + "(P \<noteq> Q) = (Q = (\<not>P))"
3.263 + "(P = Q) = ((\<not>P \<or> Q) \<and> (P \<or> \<not>Q))"
3.264 + "(P \<noteq> Q) = ((\<not>P \<or> \<not>Q) \<and> (P \<or> Q))"
3.265 + by auto
3.266 +
3.267 +lemma [z3_rule]:
3.268 + "(if P then P else \<not>P) = True"
3.269 + "(if \<not>P then \<not>P else P) = True"
3.270 + "(if P then True else False) = P"
3.271 + "(if P then False else True) = (\<not>P)"
3.272 + "(if \<not>P then x else y) = (if P then y else x)"
3.273 + by auto
3.274 +
3.275 +lemma [z3_rule]:
3.276 + "P = Q \<or> P \<or> Q"
3.277 + "P = Q \<or> \<not>P \<or> \<not>Q"
3.278 + "(\<not>P) = Q \<or> \<not>P \<or> Q"
3.279 + "(\<not>P) = Q \<or> P \<or> \<not>Q"
3.280 + "P = (\<not>Q) \<or> \<not>P \<or> Q"
3.281 + "P = (\<not>Q) \<or> P \<or> \<not>Q"
3.282 + "P \<noteq> Q \<or> P \<or> \<not>Q"
3.283 + "P \<noteq> Q \<or> \<not>P \<or> Q"
3.284 + "P \<noteq> (\<not>Q) \<or> P \<or> Q"
3.285 + "(\<not>P) \<noteq> Q \<or> P \<or> Q"
3.286 + "P \<or> Q \<or> P \<noteq> (\<not>Q)"
3.287 + "P \<or> Q \<or> (\<not>P) \<noteq> Q"
3.288 + "P \<or> \<not>Q \<or> P \<noteq> Q"
3.289 + "\<not>P \<or> Q \<or> P \<noteq> Q"
3.290 + by auto
3.291 +
3.292 +lemma [z3_rule]:
3.293 + "0 + (x::int) = x"
3.294 + "x + 0 = x"
3.295 + "0 * x = 0"
3.296 + "1 * x = x"
3.297 + "x + y = y + x"
3.298 + by auto
3.299 +
3.300 +lemma [z3_rule]:
3.301 + "0 + (x::real) = x"
3.302 + "x + 0 = x"
3.303 + "0 * x = 0"
3.304 + "1 * x = x"
3.305 + "x + y = y + x"
3.306 + by auto
3.307 +
3.308 +
3.309 +end
4.1 --- a/src/HOL/SMT/Examples/ROOT.ML Wed May 12 23:54:01 2010 +0200
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,1 +0,0 @@
4.4 -use_thys ["SMT_Examples"];
5.1 --- a/src/HOL/SMT/Examples/SMT_Examples.certs Wed May 12 23:54:01 2010 +0200
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,13471 +0,0 @@
5.4 -bb06851c317eb8b672e27364b0ae34a4e39eb880 8 0
5.5 -#2 := false
5.6 -#1 := true
5.7 -#4 := (not true)
5.8 -#21 := (iff #4 false)
5.9 -#22 := [rewrite]: #21
5.10 -#20 := [asserted]: #4
5.11 -[mp #20 #22]: false
5.12 -unsat
5.13 -70d1f77bec207467bc0306af0d98a71fa8328274 19 0
5.14 -#2 := false
5.15 -decl up_1 :: bool
5.16 -#4 := up_1
5.17 -#5 := (not up_1)
5.18 -#6 := (or up_1 #5)
5.19 -#7 := (not #6)
5.20 -#31 := (iff #7 false)
5.21 -#1 := true
5.22 -#26 := (not true)
5.23 -#29 := (iff #26 false)
5.24 -#30 := [rewrite]: #29
5.25 -#27 := (iff #7 #26)
5.26 -#24 := (iff #6 true)
5.27 -#25 := [rewrite]: #24
5.28 -#28 := [monotonicity #25]: #27
5.29 -#32 := [trans #28 #30]: #31
5.30 -#23 := [asserted]: #7
5.31 -[mp #23 #32]: false
5.32 -unsat
5.33 -148012a9e9d44fe30a0c79e3344bdb805124f661 25 0
5.34 -#2 := false
5.35 -decl up_1 :: bool
5.36 -#4 := up_1
5.37 -#1 := true
5.38 -#5 := (and up_1 true)
5.39 -#6 := (iff #5 up_1)
5.40 -#7 := (not #6)
5.41 -#37 := (iff #7 false)
5.42 -#32 := (not true)
5.43 -#35 := (iff #32 false)
5.44 -#36 := [rewrite]: #35
5.45 -#33 := (iff #7 #32)
5.46 -#30 := (iff #6 true)
5.47 -#25 := (iff up_1 up_1)
5.48 -#28 := (iff #25 true)
5.49 -#29 := [rewrite]: #28
5.50 -#26 := (iff #6 #25)
5.51 -#24 := [rewrite]: #6
5.52 -#27 := [monotonicity #24]: #26
5.53 -#31 := [trans #27 #29]: #30
5.54 -#34 := [monotonicity #31]: #33
5.55 -#38 := [trans #34 #36]: #37
5.56 -#23 := [asserted]: #7
5.57 -[mp #23 #38]: false
5.58 -unsat
5.59 -bc9a25b7f6dc3ac2431ee71b6e71c5a7b25e89d1 38 0
5.60 -#2 := false
5.61 -decl up_2 :: bool
5.62 -#5 := up_2
5.63 -decl up_1 :: bool
5.64 -#4 := up_1
5.65 -#6 := (or up_1 up_2)
5.66 -#51 := (iff #6 false)
5.67 -#46 := (or false false)
5.68 -#49 := (iff #46 false)
5.69 -#50 := [rewrite]: #49
5.70 -#47 := (iff #6 #46)
5.71 -#40 := (iff up_2 false)
5.72 -#9 := (not up_2)
5.73 -#43 := (iff #9 #40)
5.74 -#41 := (iff #40 #9)
5.75 -#42 := [rewrite]: #41
5.76 -#44 := [symm #42]: #43
5.77 -#32 := [asserted]: #9
5.78 -#45 := [mp #32 #44]: #40
5.79 -#35 := (iff up_1 false)
5.80 -#7 := (not up_1)
5.81 -#37 := (iff #7 #35)
5.82 -#33 := (iff #35 #7)
5.83 -#36 := [rewrite]: #33
5.84 -#38 := [symm #36]: #37
5.85 -#26 := (and #7 #6)
5.86 -#8 := (and #6 #7)
5.87 -#27 := (iff #8 #26)
5.88 -#28 := [rewrite]: #27
5.89 -#25 := [asserted]: #8
5.90 -#31 := [mp #25 #28]: #26
5.91 -#29 := [and-elim #31]: #7
5.92 -#39 := [mp #29 #38]: #35
5.93 -#48 := [monotonicity #39 #45]: #47
5.94 -#52 := [trans #48 #50]: #51
5.95 -#30 := [and-elim #31]: #6
5.96 -[mp #30 #52]: false
5.97 -unsat
5.98 -9b3db6ce34c8a1806160f1349b898b6c5ca40ba0 1 0
5.99 -unsat
5.100 -912e9b7fb52f4a71d232354b3bb53c11e5a41ccd 71 0
5.101 -#2 := false
5.102 -decl up_1 :: bool
5.103 -#4 := up_1
5.104 -decl up_3 :: bool
5.105 -#7 := up_3
5.106 -#10 := (and up_1 up_3)
5.107 -decl up_2 :: bool
5.108 -#5 := up_2
5.109 -#9 := (and up_3 up_2)
5.110 -#11 := (or #9 #10)
5.111 -#12 := (implies up_1 #11)
5.112 -#13 := (or #12 up_1)
5.113 -#6 := (and up_1 up_2)
5.114 -#8 := (or #6 up_3)
5.115 -#14 := (implies #8 #13)
5.116 -#15 := (not #14)
5.117 -#81 := (iff #15 false)
5.118 -#32 := (and up_2 up_3)
5.119 -#38 := (or #10 #32)
5.120 -#46 := (not up_1)
5.121 -#47 := (or #46 #38)
5.122 -#55 := (or up_1 #47)
5.123 -#63 := (not #8)
5.124 -#64 := (or #63 #55)
5.125 -#69 := (not #64)
5.126 -#79 := (iff #69 false)
5.127 -#1 := true
5.128 -#74 := (not true)
5.129 -#77 := (iff #74 false)
5.130 -#78 := [rewrite]: #77
5.131 -#75 := (iff #69 #74)
5.132 -#72 := (iff #64 true)
5.133 -#73 := [rewrite]: #72
5.134 -#76 := [monotonicity #73]: #75
5.135 -#80 := [trans #76 #78]: #79
5.136 -#70 := (iff #15 #69)
5.137 -#67 := (iff #14 #64)
5.138 -#60 := (implies #8 #55)
5.139 -#65 := (iff #60 #64)
5.140 -#66 := [rewrite]: #65
5.141 -#61 := (iff #14 #60)
5.142 -#58 := (iff #13 #55)
5.143 -#52 := (or #47 up_1)
5.144 -#56 := (iff #52 #55)
5.145 -#57 := [rewrite]: #56
5.146 -#53 := (iff #13 #52)
5.147 -#50 := (iff #12 #47)
5.148 -#43 := (implies up_1 #38)
5.149 -#48 := (iff #43 #47)
5.150 -#49 := [rewrite]: #48
5.151 -#44 := (iff #12 #43)
5.152 -#41 := (iff #11 #38)
5.153 -#35 := (or #32 #10)
5.154 -#39 := (iff #35 #38)
5.155 -#40 := [rewrite]: #39
5.156 -#36 := (iff #11 #35)
5.157 -#33 := (iff #9 #32)
5.158 -#34 := [rewrite]: #33
5.159 -#37 := [monotonicity #34]: #36
5.160 -#42 := [trans #37 #40]: #41
5.161 -#45 := [monotonicity #42]: #44
5.162 -#51 := [trans #45 #49]: #50
5.163 -#54 := [monotonicity #51]: #53
5.164 -#59 := [trans #54 #57]: #58
5.165 -#62 := [monotonicity #59]: #61
5.166 -#68 := [trans #62 #66]: #67
5.167 -#71 := [monotonicity #68]: #70
5.168 -#82 := [trans #71 #80]: #81
5.169 -#31 := [asserted]: #15
5.170 -[mp #31 #82]: false
5.171 -unsat
5.172 -4d063d3cdf6657ddb4258379f900ef18e9042978 57 0
5.173 -#2 := false
5.174 -decl up_1 :: bool
5.175 -#4 := up_1
5.176 -#5 := (iff up_1 up_1)
5.177 -#6 := (iff #5 up_1)
5.178 -#7 := (iff #6 up_1)
5.179 -#8 := (iff #7 up_1)
5.180 -#9 := (iff #8 up_1)
5.181 -#10 := (iff #9 up_1)
5.182 -#11 := (iff #10 up_1)
5.183 -#12 := (iff #11 up_1)
5.184 -#13 := (iff #12 up_1)
5.185 -#14 := (not #13)
5.186 -#69 := (iff #14 false)
5.187 -#1 := true
5.188 -#64 := (not true)
5.189 -#67 := (iff #64 false)
5.190 -#68 := [rewrite]: #67
5.191 -#65 := (iff #14 #64)
5.192 -#62 := (iff #13 true)
5.193 -#31 := (iff #5 true)
5.194 -#32 := [rewrite]: #31
5.195 -#60 := (iff #13 #5)
5.196 -#33 := (iff true up_1)
5.197 -#36 := (iff #33 up_1)
5.198 -#37 := [rewrite]: #36
5.199 -#57 := (iff #12 #33)
5.200 -#55 := (iff #11 true)
5.201 -#53 := (iff #11 #5)
5.202 -#50 := (iff #10 #33)
5.203 -#48 := (iff #9 true)
5.204 -#46 := (iff #9 #5)
5.205 -#43 := (iff #8 #33)
5.206 -#41 := (iff #7 true)
5.207 -#39 := (iff #7 #5)
5.208 -#34 := (iff #6 #33)
5.209 -#35 := [monotonicity #32]: #34
5.210 -#38 := [trans #35 #37]: #7
5.211 -#40 := [monotonicity #38]: #39
5.212 -#42 := [trans #40 #32]: #41
5.213 -#44 := [monotonicity #42]: #43
5.214 -#45 := [trans #44 #37]: #9
5.215 -#47 := [monotonicity #45]: #46
5.216 -#49 := [trans #47 #32]: #48
5.217 -#51 := [monotonicity #49]: #50
5.218 -#52 := [trans #51 #37]: #11
5.219 -#54 := [monotonicity #52]: #53
5.220 -#56 := [trans #54 #32]: #55
5.221 -#58 := [monotonicity #56]: #57
5.222 -#59 := [trans #58 #37]: #13
5.223 -#61 := [monotonicity #59]: #60
5.224 -#63 := [trans #61 #32]: #62
5.225 -#66 := [monotonicity #63]: #65
5.226 -#70 := [trans #66 #68]: #69
5.227 -#30 := [asserted]: #14
5.228 -[mp #30 #70]: false
5.229 -unsat
5.230 -212c7825456dae820eef6b1fa0cb8c5ceeff8780 194 0
5.231 -#2 := false
5.232 -decl up_1 :: bool
5.233 -#4 := up_1
5.234 -#75 := (not up_1)
5.235 -#246 := (iff #75 false)
5.236 -#1 := true
5.237 -#214 := (not true)
5.238 -#217 := (iff #214 false)
5.239 -#218 := [rewrite]: #217
5.240 -#244 := (iff #75 #214)
5.241 -#238 := (iff up_1 true)
5.242 -#241 := (iff up_1 #238)
5.243 -#239 := (iff #238 up_1)
5.244 -#240 := [rewrite]: #239
5.245 -#242 := [symm #240]: #241
5.246 -decl up_4 :: bool
5.247 -#7 := up_4
5.248 -decl up_2 :: bool
5.249 -#5 := up_2
5.250 -#161 := (or up_1 up_2 up_4)
5.251 -#200 := (iff #161 up_1)
5.252 -#195 := (or up_1 false false)
5.253 -#198 := (iff #195 up_1)
5.254 -#199 := [rewrite]: #198
5.255 -#196 := (iff #161 #195)
5.256 -#189 := (iff up_4 false)
5.257 -#102 := (not up_4)
5.258 -#192 := (iff #102 #189)
5.259 -#190 := (iff #189 #102)
5.260 -#191 := [rewrite]: #190
5.261 -#193 := [symm #191]: #192
5.262 -decl up_3 :: bool
5.263 -#6 := up_3
5.264 -#108 := (or up_3 #102)
5.265 -#180 := (iff #108 #102)
5.266 -#175 := (or false #102)
5.267 -#178 := (iff #175 #102)
5.268 -#179 := [rewrite]: #178
5.269 -#176 := (iff #108 #175)
5.270 -#152 := (iff up_3 false)
5.271 -#16 := (not up_3)
5.272 -#155 := (iff #16 #152)
5.273 -#153 := (iff #152 #16)
5.274 -#154 := [rewrite]: #153
5.275 -#156 := [symm #154]: #155
5.276 -decl up_9 :: bool
5.277 -#32 := up_9
5.278 -#33 := (not up_9)
5.279 -#34 := (and up_9 #33)
5.280 -decl up_8 :: bool
5.281 -#30 := up_8
5.282 -#35 := (or up_8 #34)
5.283 -#31 := (not up_8)
5.284 -#36 := (and #31 #35)
5.285 -#37 := (or up_3 #36)
5.286 -#38 := (not #37)
5.287 -#138 := (iff #38 #16)
5.288 -#136 := (iff #37 up_3)
5.289 -#131 := (or up_3 false)
5.290 -#134 := (iff #131 up_3)
5.291 -#135 := [rewrite]: #134
5.292 -#132 := (iff #37 #131)
5.293 -#129 := (iff #36 false)
5.294 -#124 := (and #31 up_8)
5.295 -#127 := (iff #124 false)
5.296 -#128 := [rewrite]: #127
5.297 -#125 := (iff #36 #124)
5.298 -#122 := (iff #35 up_8)
5.299 -#117 := (or up_8 false)
5.300 -#120 := (iff #117 up_8)
5.301 -#121 := [rewrite]: #120
5.302 -#118 := (iff #35 #117)
5.303 -#114 := (iff #34 false)
5.304 -#116 := [rewrite]: #114
5.305 -#119 := [monotonicity #116]: #118
5.306 -#123 := [trans #119 #121]: #122
5.307 -#126 := [monotonicity #123]: #125
5.308 -#130 := [trans #126 #128]: #129
5.309 -#133 := [monotonicity #130]: #132
5.310 -#137 := [trans #133 #135]: #136
5.311 -#139 := [monotonicity #137]: #138
5.312 -#113 := [asserted]: #38
5.313 -#142 := [mp #113 #139]: #16
5.314 -#157 := [mp #142 #156]: #152
5.315 -#177 := [monotonicity #157]: #176
5.316 -#181 := [trans #177 #179]: #180
5.317 -#27 := (or up_4 false)
5.318 -#28 := (not #27)
5.319 -#29 := (or #28 up_3)
5.320 -#111 := (iff #29 #108)
5.321 -#105 := (or #102 up_3)
5.322 -#109 := (iff #105 #108)
5.323 -#110 := [rewrite]: #109
5.324 -#106 := (iff #29 #105)
5.325 -#103 := (iff #28 #102)
5.326 -#99 := (iff #27 up_4)
5.327 -#101 := [rewrite]: #99
5.328 -#104 := [monotonicity #101]: #103
5.329 -#107 := [monotonicity #104]: #106
5.330 -#112 := [trans #107 #110]: #111
5.331 -#98 := [asserted]: #29
5.332 -#115 := [mp #98 #112]: #108
5.333 -#182 := [mp #115 #181]: #102
5.334 -#194 := [mp #182 #193]: #189
5.335 -#183 := (iff up_2 false)
5.336 -#92 := (not up_2)
5.337 -#186 := (iff #92 #183)
5.338 -#184 := (iff #183 #92)
5.339 -#185 := [rewrite]: #184
5.340 -#187 := [symm #185]: #186
5.341 -#95 := (or #92 up_3)
5.342 -#172 := (iff #95 #92)
5.343 -#167 := (or #92 false)
5.344 -#170 := (iff #167 #92)
5.345 -#171 := [rewrite]: #170
5.346 -#168 := (iff #95 #167)
5.347 -#169 := [monotonicity #157]: #168
5.348 -#173 := [trans #169 #171]: #172
5.349 -decl up_7 :: bool
5.350 -#21 := up_7
5.351 -#22 := (not up_7)
5.352 -#23 := (or up_7 #22)
5.353 -#24 := (and up_2 #23)
5.354 -#25 := (not #24)
5.355 -#26 := (or #25 up_3)
5.356 -#96 := (iff #26 #95)
5.357 -#93 := (iff #25 #92)
5.358 -#90 := (iff #24 up_2)
5.359 -#85 := (and up_2 true)
5.360 -#88 := (iff #85 up_2)
5.361 -#89 := [rewrite]: #88
5.362 -#86 := (iff #24 #85)
5.363 -#82 := (iff #23 true)
5.364 -#84 := [rewrite]: #82
5.365 -#87 := [monotonicity #84]: #86
5.366 -#91 := [trans #87 #89]: #90
5.367 -#94 := [monotonicity #91]: #93
5.368 -#97 := [monotonicity #94]: #96
5.369 -#81 := [asserted]: #26
5.370 -#100 := [mp #81 #97]: #95
5.371 -#174 := [mp #100 #173]: #92
5.372 -#188 := [mp #174 #187]: #183
5.373 -#197 := [monotonicity #188 #194]: #196
5.374 -#201 := [trans #197 #199]: #200
5.375 -#58 := (or up_1 up_2 up_3 up_4)
5.376 -#164 := (iff #58 #161)
5.377 -#158 := (or up_1 up_2 false up_4)
5.378 -#162 := (iff #158 #161)
5.379 -#163 := [rewrite]: #162
5.380 -#159 := (iff #58 #158)
5.381 -#160 := [monotonicity #157]: #159
5.382 -#165 := [trans #160 #163]: #164
5.383 -#8 := (or up_3 up_4)
5.384 -#9 := (or up_2 #8)
5.385 -#10 := (or up_1 #9)
5.386 -#59 := (iff #10 #58)
5.387 -#60 := [rewrite]: #59
5.388 -#55 := [asserted]: #10
5.389 -#61 := [mp #55 #60]: #58
5.390 -#166 := [mp #61 #165]: #161
5.391 -#202 := [mp #166 #201]: up_1
5.392 -#243 := [mp #202 #242]: #238
5.393 -#245 := [monotonicity #243]: #244
5.394 -#247 := [trans #245 #218]: #246
5.395 -#78 := (or #75 up_2)
5.396 -#235 := (iff #78 #75)
5.397 -#230 := (or #75 false)
5.398 -#233 := (iff #230 #75)
5.399 -#234 := [rewrite]: #233
5.400 -#231 := (iff #78 #230)
5.401 -#232 := [monotonicity #188]: #231
5.402 -#236 := [trans #232 #234]: #235
5.403 -#17 := (and up_3 #16)
5.404 -#18 := (or up_1 #17)
5.405 -#19 := (not #18)
5.406 -#20 := (or #19 up_2)
5.407 -#79 := (iff #20 #78)
5.408 -#76 := (iff #19 #75)
5.409 -#73 := (iff #18 up_1)
5.410 -#68 := (or up_1 false)
5.411 -#71 := (iff #68 up_1)
5.412 -#72 := [rewrite]: #71
5.413 -#69 := (iff #18 #68)
5.414 -#62 := (iff #17 false)
5.415 -#67 := [rewrite]: #62
5.416 -#70 := [monotonicity #67]: #69
5.417 -#74 := [trans #70 #72]: #73
5.418 -#77 := [monotonicity #74]: #76
5.419 -#80 := [monotonicity #77]: #79
5.420 -#57 := [asserted]: #20
5.421 -#83 := [mp #57 #80]: #78
5.422 -#237 := [mp #83 #236]: #75
5.423 -[mp #237 #247]: false
5.424 -unsat
5.425 -42890f9fa7c18237798ca55d0cf9dfff6f2f868a 52 0
5.426 -#2 := false
5.427 -decl uf_1 :: (-> T1 T1 T1)
5.428 -decl uf_2 :: T1
5.429 -#10 := uf_2
5.430 -decl uf_3 :: T1
5.431 -#12 := uf_3
5.432 -#14 := (uf_1 uf_3 uf_2)
5.433 -#13 := (uf_1 uf_2 uf_3)
5.434 -#15 := (= #13 #14)
5.435 -#44 := (not #15)
5.436 -#11 := (= uf_2 uf_2)
5.437 -#16 := (and #11 #15)
5.438 -#17 := (not #16)
5.439 -#45 := (iff #17 #44)
5.440 -#42 := (iff #16 #15)
5.441 -#1 := true
5.442 -#37 := (and true #15)
5.443 -#40 := (iff #37 #15)
5.444 -#41 := [rewrite]: #40
5.445 -#38 := (iff #16 #37)
5.446 -#35 := (iff #11 true)
5.447 -#36 := [rewrite]: #35
5.448 -#39 := [monotonicity #36]: #38
5.449 -#43 := [trans #39 #41]: #42
5.450 -#46 := [monotonicity #43]: #45
5.451 -#34 := [asserted]: #17
5.452 -#49 := [mp #34 #46]: #44
5.453 -#4 := (:var 1 T1)
5.454 -#5 := (:var 0 T1)
5.455 -#7 := (uf_1 #5 #4)
5.456 -#530 := (pattern #7)
5.457 -#6 := (uf_1 #4 #5)
5.458 -#529 := (pattern #6)
5.459 -#8 := (= #6 #7)
5.460 -#531 := (forall (vars (?x1 T1) (?x2 T1)) (:pat #529 #530) #8)
5.461 -#9 := (forall (vars (?x1 T1) (?x2 T1)) #8)
5.462 -#534 := (iff #9 #531)
5.463 -#532 := (iff #8 #8)
5.464 -#533 := [refl]: #532
5.465 -#535 := [quant-intro #533]: #534
5.466 -#55 := (~ #9 #9)
5.467 -#53 := (~ #8 #8)
5.468 -#54 := [refl]: #53
5.469 -#56 := [nnf-pos #54]: #55
5.470 -#33 := [asserted]: #9
5.471 -#57 := [mp~ #33 #56]: #9
5.472 -#536 := [mp #57 #535]: #531
5.473 -#112 := (not #531)
5.474 -#199 := (or #112 #15)
5.475 -#113 := [quant-inst]: #199
5.476 -[unit-resolution #113 #536 #49]: false
5.477 -unsat
5.478 -62bff2883948b13c19c4cd52ed250bf0afc3ec90 1667 0
5.479 -#2 := false
5.480 -decl up_54 :: bool
5.481 -#126 := up_54
5.482 -#317 := (not up_54)
5.483 -decl up_60 :: bool
5.484 -#145 := up_60
5.485 -decl up_56 :: bool
5.486 -#131 := up_56
5.487 -#325 := (not up_56)
5.488 -decl up_55 :: bool
5.489 -#130 := up_55
5.490 -decl up_46 :: bool
5.491 -#108 := up_46
5.492 -#291 := (not up_46)
5.493 -decl up_35 :: bool
5.494 -#81 := up_35
5.495 -decl up_29 :: bool
5.496 -#66 := up_29
5.497 -decl up_32 :: bool
5.498 -#72 := up_32
5.499 -#235 := (not up_32)
5.500 -decl up_34 :: bool
5.501 -#77 := up_34
5.502 -#243 := (not up_34)
5.503 -decl up_33 :: bool
5.504 -#76 := up_33
5.505 -#250 := (not up_35)
5.506 -#1611 := [hypothesis]: #250
5.507 -decl up_24 :: bool
5.508 -#54 := up_24
5.509 -#209 := (not up_24)
5.510 -decl up_13 :: bool
5.511 -#28 := up_13
5.512 -decl up_11 :: bool
5.513 -#24 := up_11
5.514 -#165 := (not up_11)
5.515 -decl up_12 :: bool
5.516 -#25 := up_12
5.517 -#2327 := (or up_12 up_35)
5.518 -#345 := (not up_60)
5.519 -decl up_59 :: bool
5.520 -#142 := up_59
5.521 -decl up_19 :: bool
5.522 -#40 := up_19
5.523 -decl up_8 :: bool
5.524 -#17 := up_8
5.525 -#156 := (not up_8)
5.526 -decl up_7 :: bool
5.527 -#16 := up_7
5.528 -#166 := (not up_12)
5.529 -#1457 := [hypothesis]: #166
5.530 -#2183 := (or up_7 up_12 up_35)
5.531 -#155 := (not up_7)
5.532 -#1612 := [hypothesis]: #155
5.533 -decl up_10 :: bool
5.534 -#21 := up_10
5.535 -#161 := (not up_10)
5.536 -decl up_20 :: bool
5.537 -#44 := up_20
5.538 -decl up_23 :: bool
5.539 -#50 := up_23
5.540 -#202 := (not up_23)
5.541 -#2170 := (or up_34 up_7 up_35 up_12)
5.542 -#1605 := [hypothesis]: #243
5.543 -#2164 := (or up_29 up_34 up_7 up_35 up_12)
5.544 -decl up_42 :: bool
5.545 -#98 := up_42
5.546 -#275 := (not up_42)
5.547 -#226 := (not up_29)
5.548 -#907 := [hypothesis]: #226
5.549 -#2136 := (or up_29 up_12 up_7 up_35 up_32)
5.550 -decl up_22 :: bool
5.551 -#49 := up_22
5.552 -#895 := [hypothesis]: #235
5.553 -#1624 := (or up_29 up_22 up_12 up_32 up_35 up_7)
5.554 -decl up_21 :: bool
5.555 -#45 := up_21
5.556 -decl up_31 :: bool
5.557 -#71 := up_31
5.558 -#234 := (not up_31)
5.559 -decl up_9 :: bool
5.560 -#20 := up_9
5.561 -#201 := (not up_22)
5.562 -#1456 := [hypothesis]: #201
5.563 -#847 := (or #161 up_32 up_29 up_22 up_12)
5.564 -#193 := (not up_20)
5.565 -#1400 := [hypothesis]: up_10
5.566 -#964 := (or #161 #193)
5.567 -#197 := (or #193 #161)
5.568 -#966 := (iff #197 #964)
5.569 -#967 := [rewrite]: #966
5.570 -#963 := [asserted]: #197
5.571 -#970 := [mp #963 #967]: #964
5.572 -#1399 := [unit-resolution #970 #1400]: #193
5.573 -#500 := (or up_12 up_20 up_22 up_23)
5.574 -#51 := (or up_20 up_12)
5.575 -#52 := (or up_23 #51)
5.576 -#53 := (or up_22 #52)
5.577 -#503 := (iff #53 #500)
5.578 -#491 := (or up_12 up_20)
5.579 -#494 := (or up_23 #491)
5.580 -#497 := (or up_22 #494)
5.581 -#501 := (iff #497 #500)
5.582 -#502 := [rewrite]: #501
5.583 -#498 := (iff #53 #497)
5.584 -#495 := (iff #52 #494)
5.585 -#492 := (iff #51 #491)
5.586 -#493 := [rewrite]: #492
5.587 -#496 := [monotonicity #493]: #495
5.588 -#499 := [monotonicity #496]: #498
5.589 -#504 := [trans #499 #502]: #503
5.590 -#490 := [asserted]: #53
5.591 -#505 := [mp #490 #504]: #500
5.592 -#900 := [unit-resolution #505 #1399 #1456 #1457]: up_23
5.593 -#194 := (not up_21)
5.594 -#974 := (or #161 #194)
5.595 -#199 := (or #194 #161)
5.596 -#976 := (iff #199 #974)
5.597 -#977 := [rewrite]: #976
5.598 -#973 := [asserted]: #199
5.599 -#980 := [mp #973 #977]: #974
5.600 -#902 := [unit-resolution #980 #1400]: #194
5.601 -#574 := (or up_21 up_29 up_31 up_32)
5.602 -#73 := (or up_29 up_21)
5.603 -#74 := (or up_32 #73)
5.604 -#75 := (or up_31 #74)
5.605 -#577 := (iff #75 #574)
5.606 -#565 := (or up_21 up_29)
5.607 -#568 := (or up_32 #565)
5.608 -#571 := (or up_31 #568)
5.609 -#575 := (iff #571 #574)
5.610 -#576 := [rewrite]: #575
5.611 -#572 := (iff #75 #571)
5.612 -#569 := (iff #74 #568)
5.613 -#566 := (iff #73 #565)
5.614 -#567 := [rewrite]: #566
5.615 -#570 := [monotonicity #567]: #569
5.616 -#573 := [monotonicity #570]: #572
5.617 -#578 := [trans #573 #576]: #577
5.618 -#564 := [asserted]: #75
5.619 -#579 := [mp #564 #578]: #574
5.620 -#851 := [unit-resolution #579 #902 #895 #907]: up_31
5.621 -#1135 := (or #202 #234)
5.622 -#249 := (or #234 #202)
5.623 -#1137 := (iff #249 #1135)
5.624 -#1138 := [rewrite]: #1137
5.625 -#1134 := [asserted]: #249
5.626 -#1141 := [mp #1134 #1138]: #1135
5.627 -#858 := [unit-resolution #1141 #851 #900]: false
5.628 -#853 := [lemma #858]: #847
5.629 -#1613 := [unit-resolution #853 #907 #1456 #895 #1457]: #161
5.630 -#405 := (or up_7 up_9 up_10)
5.631 -#22 := (or up_10 up_7)
5.632 -#23 := (or up_9 #22)
5.633 -#408 := (iff #23 #405)
5.634 -#399 := (or up_7 up_10)
5.635 -#402 := (or up_9 #399)
5.636 -#406 := (iff #402 #405)
5.637 -#407 := [rewrite]: #406
5.638 -#403 := (iff #23 #402)
5.639 -#400 := (iff #22 #399)
5.640 -#401 := [rewrite]: #400
5.641 -#404 := [monotonicity #401]: #403
5.642 -#409 := [trans #404 #407]: #408
5.643 -#398 := [asserted]: #23
5.644 -#410 := [mp #398 #409]: #405
5.645 -#1614 := [unit-resolution #410 #1613 #1612]: up_9
5.646 -#160 := (not up_9)
5.647 -#881 := (or #160 #165)
5.648 -#168 := (or #165 #160)
5.649 -#882 := (iff #168 #881)
5.650 -#883 := [rewrite]: #882
5.651 -#879 := [asserted]: #168
5.652 -#886 := [mp #879 #883]: #881
5.653 -#1615 := [unit-resolution #886 #1614]: #165
5.654 -#425 := (or up_11 up_13)
5.655 -#29 := (or up_13 up_11)
5.656 -#426 := (iff #29 #425)
5.657 -#427 := [rewrite]: #426
5.658 -#424 := [asserted]: #29
5.659 -#430 := [mp #424 #427]: #425
5.660 -#1616 := [unit-resolution #430 #1615]: up_13
5.661 -#170 := (not up_13)
5.662 -#1015 := (or #170 #209)
5.663 -#211 := (or #209 #170)
5.664 -#1017 := (iff #211 #1015)
5.665 -#1018 := [rewrite]: #1017
5.666 -#1014 := [asserted]: #211
5.667 -#1021 := [mp #1014 #1018]: #1015
5.668 -#1617 := [unit-resolution #1021 #1616]: #209
5.669 -#603 := (or up_24 up_33 up_35)
5.670 -#82 := (or up_33 up_24)
5.671 -#83 := (or up_35 #82)
5.672 -#606 := (iff #83 #603)
5.673 -#597 := (or up_24 up_33)
5.674 -#600 := (or up_35 #597)
5.675 -#604 := (iff #600 #603)
5.676 -#605 := [rewrite]: #604
5.677 -#601 := (iff #83 #600)
5.678 -#598 := (iff #82 #597)
5.679 -#599 := [rewrite]: #598
5.680 -#602 := [monotonicity #599]: #601
5.681 -#607 := [trans #602 #605]: #606
5.682 -#596 := [asserted]: #83
5.683 -#608 := [mp #596 #607]: #603
5.684 -#1618 := [unit-resolution #608 #1617 #1611]: up_33
5.685 -#242 := (not up_33)
5.686 -#1116 := (or #234 #242)
5.687 -#245 := (or #242 #234)
5.688 -#1117 := (iff #245 #1116)
5.689 -#1118 := [rewrite]: #1117
5.690 -#1114 := [asserted]: #245
5.691 -#1121 := [mp #1114 #1118]: #1116
5.692 -#1619 := [unit-resolution #1121 #1618]: #234
5.693 -#1620 := [unit-resolution #579 #1619 #895 #907]: up_21
5.694 -#1120 := (or #202 #242)
5.695 -#246 := (or #242 #202)
5.696 -#1122 := (iff #246 #1120)
5.697 -#1123 := [rewrite]: #1122
5.698 -#1119 := [asserted]: #246
5.699 -#1126 := [mp #1119 #1123]: #1120
5.700 -#1621 := [unit-resolution #1126 #1618]: #202
5.701 -#1622 := [unit-resolution #505 #1621 #1456 #1457]: up_20
5.702 -#195 := (or #193 #194)
5.703 -#957 := [asserted]: #195
5.704 -#1623 := [unit-resolution #957 #1622 #1620]: false
5.705 -#1625 := [lemma #1623]: #1624
5.706 -#2132 := [unit-resolution #1625 #907 #1611 #1457 #895 #1612]: up_22
5.707 -#1978 := (or up_32 up_35 up_29 up_21 up_12 up_7)
5.708 -#1972 := [unit-resolution #1625 #895 #907 #1457 #1611 #1612]: up_22
5.709 -#1010 := (or #201 #209)
5.710 -#210 := (or #209 #201)
5.711 -#1012 := (iff #210 #1010)
5.712 -#1013 := [rewrite]: #1012
5.713 -#1009 := [asserted]: #210
5.714 -#1016 := [mp #1009 #1013]: #1010
5.715 -#1973 := [unit-resolution #1016 #1972]: #209
5.716 -#1974 := [hypothesis]: #194
5.717 -#1975 := [unit-resolution #579 #895 #907 #1974]: up_31
5.718 -#1976 := [unit-resolution #1121 #1975]: #242
5.719 -#1977 := [unit-resolution #608 #1976 #1973 #1611]: false
5.720 -#1979 := [lemma #1977]: #1978
5.721 -#2133 := [unit-resolution #1979 #907 #1611 #1457 #895 #1612]: up_21
5.722 -#1682 := (or #194 up_7 up_12 up_23)
5.723 -#1673 := [hypothesis]: #202
5.724 -#1674 := [hypothesis]: up_21
5.725 -#1675 := [unit-resolution #957 #1674]: #193
5.726 -#1676 := [unit-resolution #505 #1675 #1457 #1673]: up_22
5.727 -#1020 := (or #170 #201)
5.728 -#212 := (or #201 #170)
5.729 -#1022 := (iff #212 #1020)
5.730 -#1023 := [rewrite]: #1022
5.731 -#1019 := [asserted]: #212
5.732 -#1026 := [mp #1019 #1023]: #1020
5.733 -#1677 := [unit-resolution #1026 #1676]: #170
5.734 -#1678 := [unit-resolution #980 #1674]: #161
5.735 -#1679 := [unit-resolution #410 #1678 #1612]: up_9
5.736 -#1680 := [unit-resolution #886 #1679]: #165
5.737 -#1681 := [unit-resolution #430 #1680 #1677]: false
5.738 -#1683 := [lemma #1681]: #1682
5.739 -#2134 := [unit-resolution #1683 #2133 #1457 #1612]: up_23
5.740 -#203 := (or #201 #202)
5.741 -#983 := [asserted]: #203
5.742 -#2135 := [unit-resolution #983 #2134 #2132]: false
5.743 -#2137 := [lemma #2135]: #2136
5.744 -#2156 := [unit-resolution #2137 #907 #1612 #1611 #1457]: up_32
5.745 -#1224 := (or #235 #275)
5.746 -#279 := (or #275 #235)
5.747 -#1226 := (iff #279 #1224)
5.748 -#1227 := [rewrite]: #1226
5.749 -#1223 := [asserted]: #279
5.750 -#1230 := [mp #1223 #1227]: #1224
5.751 -#2157 := [unit-resolution #1230 #2156]: #275
5.752 -#2158 := (or up_12 up_29 up_7 up_54)
5.753 -decl up_26 :: bool
5.754 -#58 := up_26
5.755 -#214 := (not up_26)
5.756 -decl up_15 :: bool
5.757 -#31 := up_15
5.758 -decl up_14 :: bool
5.759 -#30 := up_14
5.760 -#172 := (not up_14)
5.761 -decl up_6 :: bool
5.762 -#13 := up_6
5.763 -decl up_5 :: bool
5.764 -#12 := up_5
5.765 -#150 := (not up_5)
5.766 -decl up_25 :: bool
5.767 -#57 := up_25
5.768 -#2099 := [hypothesis]: up_5
5.769 -#859 := (or #150 #155)
5.770 -#158 := (or #155 #150)
5.771 -#860 := (iff #158 #859)
5.772 -#861 := [rewrite]: #860
5.773 -#857 := [asserted]: #158
5.774 -#864 := [mp #857 #861]: #859
5.775 -#2100 := [unit-resolution #864 #2099]: #155
5.776 -#863 := (or #150 #156)
5.777 -#159 := (or #156 #150)
5.778 -#865 := (iff #159 #863)
5.779 -#866 := [rewrite]: #865
5.780 -#862 := [asserted]: #159
5.781 -#869 := [mp #862 #866]: #863
5.782 -#2101 := [unit-resolution #869 #2099]: #156
5.783 -#2097 := (or up_12 up_7 up_8)
5.784 -#1626 := [hypothesis]: #156
5.785 -#2054 := (or up_54 up_7 up_8)
5.786 -decl up_16 :: bool
5.787 -#34 := up_16
5.788 -#1597 := [hypothesis]: #317
5.789 -#1888 := (or up_16 up_8 up_7 up_54)
5.790 -decl up_45 :: bool
5.791 -#104 := up_45
5.792 -#284 := (not up_45)
5.793 -decl up_52 :: bool
5.794 -#121 := up_52
5.795 -#309 := (not up_52)
5.796 -decl up_51 :: bool
5.797 -#120 := up_51
5.798 -#177 := (not up_16)
5.799 -#1627 := [hypothesis]: #177
5.800 -#1733 := (or up_51 up_7 up_54 up_8 up_16)
5.801 -decl up_53 :: bool
5.802 -#125 := up_53
5.803 -#308 := (not up_51)
5.804 -#1598 := [hypothesis]: #308
5.805 -decl up_43 :: bool
5.806 -#99 := up_43
5.807 -#276 := (not up_43)
5.808 -#1710 := (or up_32 up_16 up_8 up_7 up_51 up_54)
5.809 -#1671 := (or up_35 up_16 up_8 up_32 up_7)
5.810 -#1655 := (or #166 up_32 up_16 up_8 up_35 up_7)
5.811 -#1642 := [hypothesis]: up_12
5.812 -#885 := (or #160 #166)
5.813 -#169 := (or #166 #160)
5.814 -#887 := (iff #169 #885)
5.815 -#888 := [rewrite]: #887
5.816 -#884 := [asserted]: #169
5.817 -#891 := [mp #884 #888]: #885
5.818 -#1643 := [unit-resolution #891 #1642]: #160
5.819 -#1644 := [unit-resolution #410 #1643 #1612]: up_10
5.820 -#1645 := [unit-resolution #980 #1644]: #194
5.821 -#167 := (or #165 #166)
5.822 -#878 := [asserted]: #167
5.823 -#1646 := [unit-resolution #878 #1642]: #165
5.824 -#1647 := [unit-resolution #430 #1646]: up_13
5.825 -#1648 := [unit-resolution #1021 #1647]: #209
5.826 -#1649 := [unit-resolution #608 #1648 #1611]: up_33
5.827 -#1650 := [unit-resolution #1121 #1649]: #234
5.828 -decl up_18 :: bool
5.829 -#39 := up_18
5.830 -#185 := (not up_18)
5.831 -#979 := (or #161 #185)
5.832 -#200 := (or #185 #161)
5.833 -#981 := (iff #200 #979)
5.834 -#982 := [rewrite]: #981
5.835 -#978 := [asserted]: #200
5.836 -#985 := [mp #978 #982]: #979
5.837 -#1651 := [unit-resolution #985 #1644]: #185
5.838 -#468 := (or up_8 up_16 up_18 up_19)
5.839 -#41 := (or up_16 up_8)
5.840 -#42 := (or up_19 #41)
5.841 -#43 := (or up_18 #42)
5.842 -#471 := (iff #43 #468)
5.843 -#459 := (or up_8 up_16)
5.844 -#462 := (or up_19 #459)
5.845 -#465 := (or up_18 #462)
5.846 -#469 := (iff #465 #468)
5.847 -#470 := [rewrite]: #469
5.848 -#466 := (iff #43 #465)
5.849 -#463 := (iff #42 #462)
5.850 -#460 := (iff #41 #459)
5.851 -#461 := [rewrite]: #460
5.852 -#464 := [monotonicity #461]: #463
5.853 -#467 := [monotonicity #464]: #466
5.854 -#472 := [trans #467 #470]: #471
5.855 -#458 := [asserted]: #43
5.856 -#473 := [mp #458 #472]: #468
5.857 -#1652 := [unit-resolution #473 #1651 #1627 #1626]: up_19
5.858 -#186 := (not up_19)
5.859 -#1068 := (or #186 #226)
5.860 -#230 := (or #226 #186)
5.861 -#1070 := (iff #230 #1068)
5.862 -#1071 := [rewrite]: #1070
5.863 -#1067 := [asserted]: #230
5.864 -#1074 := [mp #1067 #1071]: #1068
5.865 -#1653 := [unit-resolution #1074 #1652]: #226
5.866 -#1654 := [unit-resolution #579 #1653 #1650 #895 #1645]: false
5.867 -#1656 := [lemma #1654]: #1655
5.868 -#1657 := [unit-resolution #1656 #1611 #1627 #1626 #895 #1612]: #166
5.869 -#1640 := (or up_12 up_35 up_7 up_22 up_16 up_8 up_32)
5.870 -#1628 := [unit-resolution #1625 #1457 #1456 #895 #1611 #1612]: up_29
5.871 -#1629 := [unit-resolution #1074 #1628]: #186
5.872 -#1630 := [unit-resolution #473 #1629 #1627 #1626]: up_18
5.873 -#960 := (or #185 #193)
5.874 -#196 := (or #193 #185)
5.875 -#961 := (iff #196 #960)
5.876 -#962 := [rewrite]: #961
5.877 -#958 := [asserted]: #196
5.878 -#965 := [mp #958 #962]: #960
5.879 -#1631 := [unit-resolution #965 #1630]: #193
5.880 -#1632 := [unit-resolution #505 #1631 #1456 #1457]: up_23
5.881 -#1633 := [unit-resolution #1126 #1632]: #242
5.882 -#1634 := [unit-resolution #608 #1633 #1611]: up_24
5.883 -#1635 := [unit-resolution #985 #1630]: #161
5.884 -#1636 := [unit-resolution #410 #1635 #1612]: up_9
5.885 -#1637 := [unit-resolution #886 #1636]: #165
5.886 -#1638 := [unit-resolution #430 #1637]: up_13
5.887 -#1639 := [unit-resolution #1021 #1638 #1634]: false
5.888 -#1641 := [lemma #1639]: #1640
5.889 -#1658 := [unit-resolution #1641 #1657 #1612 #1611 #1627 #1626 #895]: up_22
5.890 -#1659 := [unit-resolution #1016 #1658]: #209
5.891 -#1660 := [unit-resolution #608 #1659 #1611]: up_33
5.892 -#1661 := [unit-resolution #1121 #1660]: #234
5.893 -#1662 := [unit-resolution #1026 #1658]: #170
5.894 -#1663 := [unit-resolution #430 #1662]: up_11
5.895 -#1664 := [unit-resolution #886 #1663]: #160
5.896 -#1665 := [unit-resolution #410 #1664 #1612]: up_10
5.897 -#1666 := [unit-resolution #980 #1665]: #194
5.898 -#1667 := [unit-resolution #579 #1666 #895 #1661]: up_29
5.899 -#1668 := [unit-resolution #985 #1665]: #185
5.900 -#1669 := [unit-resolution #473 #1668 #1627 #1626]: up_19
5.901 -#1670 := [unit-resolution #1074 #1669 #1667]: false
5.902 -#1672 := [lemma #1670]: #1671
5.903 -#1698 := [unit-resolution #1672 #895 #1626 #1627 #1612]: up_35
5.904 -#1609 := (or #250 up_34 up_51 up_54)
5.905 -#316 := (not up_53)
5.906 -#1599 := [hypothesis]: up_35
5.907 -#1275 := (or #250 #291)
5.908 -#293 := (or #291 #250)
5.909 -#1277 := (iff #293 #1275)
5.910 -#1278 := [rewrite]: #1277
5.911 -#1274 := [asserted]: #293
5.912 -#1281 := [mp #1274 #1278]: #1275
5.913 -#1600 := [unit-resolution #1281 #1599]: #291
5.914 -#777 := (or up_46 up_55)
5.915 -decl up_4 :: bool
5.916 -#10 := up_4
5.917 -#783 := (or up_4 up_46 up_55)
5.918 -#1514 := (iff #783 #777)
5.919 -#1509 := (or false up_46 up_55)
5.920 -#1512 := (iff #1509 #777)
5.921 -#1513 := [rewrite]: #1512
5.922 -#1510 := (iff #783 #1509)
5.923 -#1485 := (iff up_4 false)
5.924 -#11 := (not up_4)
5.925 -#1488 := (iff #11 #1485)
5.926 -#1486 := (iff #1485 #11)
5.927 -#1487 := [rewrite]: #1486
5.928 -#1489 := [symm #1487]: #1488
5.929 -#371 := [asserted]: #11
5.930 -#1490 := [mp #371 #1489]: #1485
5.931 -#1511 := [monotonicity #1490]: #1510
5.932 -#1515 := [trans #1511 #1513]: #1514
5.933 -#135 := (or up_55 up_46)
5.934 -#136 := (or up_4 #135)
5.935 -#786 := (iff #136 #783)
5.936 -#780 := (or up_4 #777)
5.937 -#784 := (iff #780 #783)
5.938 -#785 := [rewrite]: #784
5.939 -#781 := (iff #136 #780)
5.940 -#778 := (iff #135 #777)
5.941 -#779 := [rewrite]: #778
5.942 -#782 := [monotonicity #779]: #781
5.943 -#787 := [trans #782 #785]: #786
5.944 -#776 := [asserted]: #136
5.945 -#788 := [mp #776 #787]: #783
5.946 -#1516 := [mp #788 #1515]: #777
5.947 -#1601 := [unit-resolution #1516 #1600]: up_55
5.948 -#324 := (not up_55)
5.949 -#1376 := (or #316 #324)
5.950 -#327 := (or #324 #316)
5.951 -#1377 := (iff #327 #1376)
5.952 -#1378 := [rewrite]: #1377
5.953 -#1374 := [asserted]: #327
5.954 -#1381 := [mp #1374 #1378]: #1376
5.955 -#1602 := [unit-resolution #1381 #1601]: #316
5.956 -#754 := (or up_43 up_51 up_53 up_54)
5.957 -#127 := (or up_51 up_43)
5.958 -#128 := (or up_54 #127)
5.959 -#129 := (or up_53 #128)
5.960 -#757 := (iff #129 #754)
5.961 -#745 := (or up_43 up_51)
5.962 -#748 := (or up_54 #745)
5.963 -#751 := (or up_53 #748)
5.964 -#755 := (iff #751 #754)
5.965 -#756 := [rewrite]: #755
5.966 -#752 := (iff #129 #751)
5.967 -#749 := (iff #128 #748)
5.968 -#746 := (iff #127 #745)
5.969 -#747 := [rewrite]: #746
5.970 -#750 := [monotonicity #747]: #749
5.971 -#753 := [monotonicity #750]: #752
5.972 -#758 := [trans #753 #756]: #757
5.973 -#744 := [asserted]: #129
5.974 -#759 := [mp #744 #758]: #754
5.975 -#1603 := [unit-resolution #759 #1602 #1598 #1597]: up_43
5.976 -decl up_44 :: bool
5.977 -#103 := up_44
5.978 -#283 := (not up_44)
5.979 -#1280 := (or #250 #283)
5.980 -#294 := (or #283 #250)
5.981 -#1282 := (iff #294 #1280)
5.982 -#1283 := [rewrite]: #1282
5.983 -#1279 := [asserted]: #294
5.984 -#1286 := [mp #1279 #1283]: #1280
5.985 -#1604 := [unit-resolution #1286 #1599]: #283
5.986 -#1380 := (or #284 #324)
5.987 -#328 := (or #324 #284)
5.988 -#1382 := (iff #328 #1380)
5.989 -#1383 := [rewrite]: #1382
5.990 -#1379 := [asserted]: #328
5.991 -#1386 := [mp #1379 #1383]: #1380
5.992 -#1606 := [unit-resolution #1386 #1601]: #284
5.993 -#680 := (or up_34 up_42 up_44 up_45)
5.994 -#105 := (or up_42 up_34)
5.995 -#106 := (or up_45 #105)
5.996 -#107 := (or up_44 #106)
5.997 -#683 := (iff #107 #680)
5.998 -#671 := (or up_34 up_42)
5.999 -#674 := (or up_45 #671)
5.1000 -#677 := (or up_44 #674)
5.1001 -#681 := (iff #677 #680)
5.1002 -#682 := [rewrite]: #681
5.1003 -#678 := (iff #107 #677)
5.1004 -#675 := (iff #106 #674)
5.1005 -#672 := (iff #105 #671)
5.1006 -#673 := [rewrite]: #672
5.1007 -#676 := [monotonicity #673]: #675
5.1008 -#679 := [monotonicity #676]: #678
5.1009 -#684 := [trans #679 #682]: #683
5.1010 -#670 := [asserted]: #107
5.1011 -#685 := [mp #670 #684]: #680
5.1012 -#1607 := [unit-resolution #685 #1606 #1605 #1604]: up_42
5.1013 -#277 := (or #275 #276)
5.1014 -#1217 := [asserted]: #277
5.1015 -#1608 := [unit-resolution #1217 #1607 #1603]: false
5.1016 -#1610 := [lemma #1608]: #1609
5.1017 -#1699 := [unit-resolution #1610 #1698 #1598 #1597]: up_34
5.1018 -#1125 := (or #234 #243)
5.1019 -#247 := (or #243 #234)
5.1020 -#1127 := (iff #247 #1125)
5.1021 -#1128 := [rewrite]: #1127
5.1022 -#1124 := [asserted]: #247
5.1023 -#1131 := [mp #1124 #1128]: #1125
5.1024 -#1700 := [unit-resolution #1131 #1699]: #234
5.1025 -#1130 := (or #202 #243)
5.1026 -#248 := (or #243 #202)
5.1027 -#1132 := (iff #248 #1130)
5.1028 -#1133 := [rewrite]: #1132
5.1029 -#1129 := [asserted]: #248
5.1030 -#1136 := [mp #1129 #1133]: #1130
5.1031 -#1701 := [unit-resolution #1136 #1699]: #202
5.1032 -#1696 := (or up_12 up_7 up_23 up_16 up_8 up_32 up_31)
5.1033 -#1684 := [hypothesis]: #234
5.1034 -#1685 := [unit-resolution #1683 #1457 #1612 #1673]: #194
5.1035 -#1686 := [unit-resolution #579 #1685 #895 #1684]: up_29
5.1036 -#1687 := [unit-resolution #1074 #1686]: #186
5.1037 -#1688 := [unit-resolution #473 #1687 #1627 #1626]: up_18
5.1038 -#1689 := [unit-resolution #965 #1688]: #193
5.1039 -#1690 := [unit-resolution #505 #1689 #1457 #1673]: up_22
5.1040 -#1691 := [unit-resolution #1026 #1690]: #170
5.1041 -#1692 := [unit-resolution #985 #1688]: #161
5.1042 -#1693 := [unit-resolution #410 #1692 #1612]: up_9
5.1043 -#1694 := [unit-resolution #886 #1693]: #165
5.1044 -#1695 := [unit-resolution #430 #1694 #1691]: false
5.1045 -#1697 := [lemma #1695]: #1696
5.1046 -#1702 := [unit-resolution #1697 #1701 #1612 #1627 #1626 #895 #1700]: up_12
5.1047 -#1703 := [unit-resolution #891 #1702]: #160
5.1048 -#1704 := [unit-resolution #410 #1703 #1612]: up_10
5.1049 -#1705 := [unit-resolution #980 #1704]: #194
5.1050 -#1706 := [unit-resolution #579 #1705 #895 #1700]: up_29
5.1051 -#1707 := [unit-resolution #985 #1704]: #185
5.1052 -#1708 := [unit-resolution #473 #1707 #1627 #1626]: up_19
5.1053 -#1709 := [unit-resolution #1074 #1708 #1706]: false
5.1054 -#1711 := [lemma #1709]: #1710
5.1055 -#1712 := [unit-resolution #1711 #1598 #1626 #1612 #1627 #1597]: up_32
5.1056 -#1234 := (or #235 #276)
5.1057 -#281 := (or #276 #235)
5.1058 -#1236 := (iff #281 #1234)
5.1059 -#1237 := [rewrite]: #1236
5.1060 -#1233 := [asserted]: #281
5.1061 -#1240 := [mp #1233 #1237]: #1234
5.1062 -#1713 := [unit-resolution #1240 #1712]: #276
5.1063 -#1714 := [unit-resolution #759 #1713 #1598 #1597]: up_53
5.1064 -#1395 := (or #284 #316)
5.1065 -#331 := (or #316 #284)
5.1066 -#1397 := (iff #331 #1395)
5.1067 -#1398 := [rewrite]: #1397
5.1068 -#1394 := [asserted]: #331
5.1069 -#1401 := [mp #1394 #1398]: #1395
5.1070 -#1715 := [unit-resolution #1401 #1714]: #284
5.1071 -#1716 := [unit-resolution #1230 #1712]: #275
5.1072 -#1717 := [unit-resolution #1381 #1714]: #324
5.1073 -#1718 := [unit-resolution #1516 #1717]: up_46
5.1074 -#1270 := (or #283 #291)
5.1075 -#292 := (or #291 #283)
5.1076 -#1272 := (iff #292 #1270)
5.1077 -#1273 := [rewrite]: #1272
5.1078 -#1269 := [asserted]: #292
5.1079 -#1276 := [mp #1269 #1273]: #1270
5.1080 -#1719 := [unit-resolution #1276 #1718]: #283
5.1081 -#1720 := [unit-resolution #685 #1719 #1716 #1715]: up_34
5.1082 -#1721 := [unit-resolution #1136 #1720]: #202
5.1083 -#1722 := [unit-resolution #1281 #1718]: #250
5.1084 -#244 := (or #242 #243)
5.1085 -#1113 := [asserted]: #244
5.1086 -#1723 := [unit-resolution #1113 #1720]: #242
5.1087 -#1724 := [unit-resolution #608 #1723 #1722]: up_24
5.1088 -#1725 := [unit-resolution #1016 #1724]: #201
5.1089 -#1726 := [unit-resolution #1021 #1724]: #170
5.1090 -#1727 := [unit-resolution #430 #1726]: up_11
5.1091 -#1728 := [unit-resolution #878 #1727]: #166
5.1092 -#1729 := [unit-resolution #505 #1728 #1725 #1721]: up_20
5.1093 -#1730 := [unit-resolution #886 #1727]: #160
5.1094 -#1731 := [unit-resolution #410 #1730 #1612]: up_10
5.1095 -#1732 := [unit-resolution #970 #1731 #1729]: false
5.1096 -#1734 := [lemma #1732]: #1733
5.1097 -#1858 := [unit-resolution #1734 #1627 #1597 #1626 #1612]: up_51
5.1098 -#310 := (or #308 #309)
5.1099 -#1321 := [asserted]: #310
5.1100 -#1859 := [unit-resolution #1321 #1858]: #309
5.1101 -decl up_58 :: bool
5.1102 -#139 := up_58
5.1103 -#337 := (not up_58)
5.1104 -decl up_49 :: bool
5.1105 -#115 := up_49
5.1106 -#300 := (not up_49)
5.1107 -#1324 := (or #300 #308)
5.1108 -#311 := (or #308 #300)
5.1109 -#1325 := (iff #311 #1324)
5.1110 -#1326 := [rewrite]: #1325
5.1111 -#1322 := [asserted]: #311
5.1112 -#1329 := [mp #1322 #1326]: #1324
5.1113 -#1860 := [unit-resolution #1329 #1858]: #300
5.1114 -decl up_39 :: bool
5.1115 -#89 := up_39
5.1116 -#260 := (not up_39)
5.1117 -decl up_38 :: bool
5.1118 -#88 := up_38
5.1119 -decl up_40 :: bool
5.1120 -#93 := up_40
5.1121 -#267 := (not up_40)
5.1122 -decl up_41 :: bool
5.1123 -#94 := up_41
5.1124 -#268 := (not up_41)
5.1125 -#1328 := (or #268 #308)
5.1126 -#312 := (or #308 #268)
5.1127 -#1330 := (iff #312 #1328)
5.1128 -#1331 := [rewrite]: #1330
5.1129 -#1327 := [asserted]: #312
5.1130 -#1334 := [mp #1327 #1331]: #1328
5.1131 -#1861 := [unit-resolution #1334 #1858]: #268
5.1132 -#1771 := (or up_32 up_16 up_8 up_41 up_49 up_52 up_7)
5.1133 -#1735 := [unit-resolution #1281 #1698]: #291
5.1134 -#1736 := [unit-resolution #1516 #1735]: up_55
5.1135 -#1737 := [unit-resolution #1386 #1736]: #284
5.1136 -#1738 := [unit-resolution #1286 #1698]: #283
5.1137 -#259 := (not up_38)
5.1138 -decl up_50 :: bool
5.1139 -#116 := up_50
5.1140 -#301 := (not up_50)
5.1141 -#1739 := [hypothesis]: #309
5.1142 -#341 := (not up_59)
5.1143 -#326 := (or #324 #325)
5.1144 -#1373 := [asserted]: #326
5.1145 -#1740 := [unit-resolution #1373 #1736]: #325
5.1146 -#834 := (or up_56 up_60)
5.1147 -decl up_3 :: bool
5.1148 -#8 := up_3
5.1149 -#840 := (or up_3 up_56 up_60)
5.1150 -#1522 := (iff #840 #834)
5.1151 -#1517 := (or false up_56 up_60)
5.1152 -#1520 := (iff #1517 #834)
5.1153 -#1521 := [rewrite]: #1520
5.1154 -#1518 := (iff #840 #1517)
5.1155 -#1479 := (iff up_3 false)
5.1156 -#9 := (not up_3)
5.1157 -#1482 := (iff #9 #1479)
5.1158 -#1480 := (iff #1479 #9)
5.1159 -#1481 := [rewrite]: #1480
5.1160 -#1483 := [symm #1481]: #1482
5.1161 -#370 := [asserted]: #9
5.1162 -#1484 := [mp #370 #1483]: #1479
5.1163 -#1519 := [monotonicity #1484]: #1518
5.1164 -#1523 := [trans #1519 #1521]: #1522
5.1165 -#148 := (or up_60 up_56)
5.1166 -#149 := (or up_3 #148)
5.1167 -#843 := (iff #149 #840)
5.1168 -#837 := (or up_3 #834)
5.1169 -#841 := (iff #837 #840)
5.1170 -#842 := [rewrite]: #841
5.1171 -#838 := (iff #149 #837)
5.1172 -#835 := (iff #148 #834)
5.1173 -#836 := [rewrite]: #835
5.1174 -#839 := [monotonicity #836]: #838
5.1175 -#844 := [trans #839 #842]: #843
5.1176 -#833 := [asserted]: #149
5.1177 -#845 := [mp #833 #844]: #840
5.1178 -#1524 := [mp #845 #1523]: #834
5.1179 -#1741 := [unit-resolution #1524 #1740]: up_60
5.1180 -#1442 := (or #341 #345)
5.1181 -#346 := (or #345 #341)
5.1182 -#1444 := (iff #346 #1442)
5.1183 -#1445 := [rewrite]: #1444
5.1184 -#1441 := [asserted]: #346
5.1185 -#1448 := [mp #1441 #1445]: #1442
5.1186 -#1742 := [unit-resolution #1448 #1741]: #341
5.1187 -#814 := (or up_52 up_58 up_59)
5.1188 -#143 := (or up_58 up_52)
5.1189 -#144 := (or up_59 #143)
5.1190 -#817 := (iff #144 #814)
5.1191 -#808 := (or up_52 up_58)
5.1192 -#811 := (or up_59 #808)
5.1193 -#815 := (iff #811 #814)
5.1194 -#816 := [rewrite]: #815
5.1195 -#812 := (iff #144 #811)
5.1196 -#809 := (iff #143 #808)
5.1197 -#810 := [rewrite]: #809
5.1198 -#813 := [monotonicity #810]: #812
5.1199 -#818 := [trans #813 #816]: #817
5.1200 -#807 := [asserted]: #144
5.1201 -#819 := [mp #807 #818]: #814
5.1202 -#1743 := [unit-resolution #819 #1742 #1739]: up_58
5.1203 -#1417 := (or #301 #337)
5.1204 -#339 := (or #337 #301)
5.1205 -#1419 := (iff #339 #1417)
5.1206 -#1420 := [rewrite]: #1419
5.1207 -#1416 := [asserted]: #339
5.1208 -#1423 := [mp #1416 #1420]: #1417
5.1209 -#1744 := [unit-resolution #1423 #1743]: #301
5.1210 -#1745 := [hypothesis]: #300
5.1211 -decl up_47 :: bool
5.1212 -#111 := up_47
5.1213 -#295 := (not up_47)
5.1214 -decl up_48 :: bool
5.1215 -#112 := up_48
5.1216 -decl up_57 :: bool
5.1217 -#137 := up_57
5.1218 -#335 := (not up_57)
5.1219 -#1412 := (or #335 #337)
5.1220 -#338 := (or #337 #335)
5.1221 -#1414 := (iff #338 #1412)
5.1222 -#1415 := [rewrite]: #1414
5.1223 -#1411 := [asserted]: #338
5.1224 -#1418 := [mp #1411 #1415]: #1412
5.1225 -#1746 := [unit-resolution #1418 #1743]: #335
5.1226 -#790 := (or up_48 up_57)
5.1227 -#138 := (or up_57 up_48)
5.1228 -#791 := (iff #138 #790)
5.1229 -#792 := [rewrite]: #791
5.1230 -#789 := [asserted]: #138
5.1231 -#795 := [mp #789 #792]: #790
5.1232 -#1747 := [unit-resolution #795 #1746]: up_48
5.1233 -#296 := (not up_48)
5.1234 -#297 := (or #295 #296)
5.1235 -#1284 := [asserted]: #297
5.1236 -#1748 := [unit-resolution #1284 #1747]: #295
5.1237 -#722 := (or up_39 up_47 up_49 up_50)
5.1238 -#117 := (or up_47 up_39)
5.1239 -#118 := (or up_50 #117)
5.1240 -#119 := (or up_49 #118)
5.1241 -#725 := (iff #119 #722)
5.1242 -#713 := (or up_39 up_47)
5.1243 -#716 := (or up_50 #713)
5.1244 -#719 := (or up_49 #716)
5.1245 -#723 := (iff #719 #722)
5.1246 -#724 := [rewrite]: #723
5.1247 -#720 := (iff #119 #719)
5.1248 -#717 := (iff #118 #716)
5.1249 -#714 := (iff #117 #713)
5.1250 -#715 := [rewrite]: #714
5.1251 -#718 := [monotonicity #715]: #717
5.1252 -#721 := [monotonicity #718]: #720
5.1253 -#726 := [trans #721 #724]: #725
5.1254 -#712 := [asserted]: #119
5.1255 -#727 := [mp #712 #726]: #722
5.1256 -#1749 := [unit-resolution #727 #1748 #1745 #1744]: up_39
5.1257 -#261 := (or #259 #260)
5.1258 -#1165 := [asserted]: #261
5.1259 -#1750 := [unit-resolution #1165 #1749]: #259
5.1260 -#1751 := [hypothesis]: #268
5.1261 -decl up_30 :: bool
5.1262 -#67 := up_30
5.1263 -#227 := (not up_30)
5.1264 -decl up_27 :: bool
5.1265 -#61 := up_27
5.1266 -#213 := (not up_25)
5.1267 -decl up_37 :: bool
5.1268 -#85 := up_37
5.1269 -#255 := (not up_37)
5.1270 -#1291 := (or #255 #296)
5.1271 -#299 := (or #296 #255)
5.1272 -#1293 := (iff #299 #1291)
5.1273 -#1294 := [rewrite]: #1293
5.1274 -#1290 := [asserted]: #299
5.1275 -#1297 := [mp #1290 #1294]: #1291
5.1276 -#1752 := [unit-resolution #1297 #1747]: #255
5.1277 -decl up_36 :: bool
5.1278 -#84 := up_36
5.1279 -#254 := (not up_36)
5.1280 -#1177 := (or #254 #260)
5.1281 -#264 := (or #260 #254)
5.1282 -#1179 := (iff #264 #1177)
5.1283 -#1180 := [rewrite]: #1179
5.1284 -#1176 := [asserted]: #264
5.1285 -#1183 := [mp #1176 #1180]: #1177
5.1286 -#1753 := [unit-resolution #1183 #1749]: #254
5.1287 -#616 := (or up_26 up_36 up_37)
5.1288 -#86 := (or up_37 up_26)
5.1289 -#87 := (or up_36 #86)
5.1290 -#619 := (iff #87 #616)
5.1291 -#610 := (or up_26 up_37)
5.1292 -#613 := (or up_36 #610)
5.1293 -#617 := (iff #613 #616)
5.1294 -#618 := [rewrite]: #617
5.1295 -#614 := (iff #87 #613)
5.1296 -#611 := (iff #86 #610)
5.1297 -#612 := [rewrite]: #611
5.1298 -#615 := [monotonicity #612]: #614
5.1299 -#620 := [trans #615 #618]: #619
5.1300 -#609 := [asserted]: #87
5.1301 -#621 := [mp #609 #620]: #616
5.1302 -#1754 := [unit-resolution #621 #1753 #1752]: up_26
5.1303 -#215 := (or #213 #214)
5.1304 -#1024 := [asserted]: #215
5.1305 -#1755 := [unit-resolution #1024 #1754]: #213
5.1306 -decl up_28 :: bool
5.1307 -#62 := up_28
5.1308 -#219 := (not up_28)
5.1309 -#1182 := (or #219 #260)
5.1310 -#265 := (or #260 #219)
5.1311 -#1184 := (iff #265 #1182)
5.1312 -#1185 := [rewrite]: #1184
5.1313 -#1181 := [asserted]: #265
5.1314 -#1188 := [mp #1181 #1185]: #1182
5.1315 -#1756 := [unit-resolution #1188 #1749]: #219
5.1316 -decl up_17 :: bool
5.1317 -#35 := up_17
5.1318 -#178 := (not up_17)
5.1319 -#173 := (not up_15)
5.1320 -#1031 := (or #173 #214)
5.1321 -#217 := (or #214 #173)
5.1322 -#1033 := (iff #217 #1031)
5.1323 -#1034 := [rewrite]: #1033
5.1324 -#1030 := [asserted]: #217
5.1325 -#1037 := [mp #1030 #1034]: #1031
5.1326 -#1757 := [unit-resolution #1037 #1754]: #173
5.1327 -#1503 := (or up_14 up_15)
5.1328 -decl up_2 :: bool
5.1329 -#6 := up_2
5.1330 -#436 := (or up_2 up_14 up_15)
5.1331 -#1506 := (iff #436 #1503)
5.1332 -#1500 := (or false up_14 up_15)
5.1333 -#1504 := (iff #1500 #1503)
5.1334 -#1505 := [rewrite]: #1504
5.1335 -#1501 := (iff #436 #1500)
5.1336 -#1473 := (iff up_2 false)
5.1337 -#7 := (not up_2)
5.1338 -#1476 := (iff #7 #1473)
5.1339 -#1474 := (iff #1473 #7)
5.1340 -#1475 := [rewrite]: #1474
5.1341 -#1477 := [symm #1475]: #1476
5.1342 -#369 := [asserted]: #7
5.1343 -#1478 := [mp #369 #1477]: #1473
5.1344 -#1502 := [monotonicity #1478]: #1501
5.1345 -#1507 := [trans #1502 #1505]: #1506
5.1346 -#32 := (or up_15 up_2)
5.1347 -#33 := (or up_14 #32)
5.1348 -#439 := (iff #33 #436)
5.1349 -#429 := (or up_2 up_15)
5.1350 -#433 := (or up_14 #429)
5.1351 -#437 := (iff #433 #436)
5.1352 -#438 := [rewrite]: #437
5.1353 -#434 := (iff #33 #433)
5.1354 -#431 := (iff #32 #429)
5.1355 -#432 := [rewrite]: #431
5.1356 -#435 := [monotonicity #432]: #434
5.1357 -#440 := [trans #435 #438]: #439
5.1358 -#428 := [asserted]: #33
5.1359 -#441 := [mp #428 #440]: #436
5.1360 -#1508 := [mp #441 #1507]: #1503
5.1361 -#1758 := [unit-resolution #1508 #1757]: up_14
5.1362 -#917 := (or #172 #178)
5.1363 -#182 := (or #178 #172)
5.1364 -#919 := (iff #182 #917)
5.1365 -#920 := [rewrite]: #919
5.1366 -#916 := [asserted]: #182
5.1367 -#923 := [mp #916 #920]: #917
5.1368 -#1759 := [unit-resolution #923 #1758]: #178
5.1369 -#542 := (or up_17 up_25 up_27 up_28)
5.1370 -#63 := (or up_25 up_17)
5.1371 -#64 := (or up_28 #63)
5.1372 -#65 := (or up_27 #64)
5.1373 -#545 := (iff #65 #542)
5.1374 -#533 := (or up_17 up_25)
5.1375 -#536 := (or up_28 #533)
5.1376 -#539 := (or up_27 #536)
5.1377 -#543 := (iff #539 #542)
5.1378 -#544 := [rewrite]: #543
5.1379 -#540 := (iff #65 #539)
5.1380 -#537 := (iff #64 #536)
5.1381 -#534 := (iff #63 #533)
5.1382 -#535 := [rewrite]: #534
5.1383 -#538 := [monotonicity #535]: #537
5.1384 -#541 := [monotonicity #538]: #540
5.1385 -#546 := [trans #541 #544]: #545
5.1386 -#532 := [asserted]: #65
5.1387 -#547 := [mp #532 #546]: #542
5.1388 -#1760 := [unit-resolution #547 #1759 #1756 #1755]: up_27
5.1389 -#218 := (not up_27)
5.1390 -#1073 := (or #218 #227)
5.1391 -#231 := (or #227 #218)
5.1392 -#1075 := (iff #231 #1073)
5.1393 -#1076 := [rewrite]: #1075
5.1394 -#1072 := [asserted]: #231
5.1395 -#1079 := [mp #1072 #1076]: #1073
5.1396 -#1761 := [unit-resolution #1079 #1760]: #227
5.1397 -#648 := (or up_30 up_38 up_40 up_41)
5.1398 -#95 := (or up_38 up_30)
5.1399 -#96 := (or up_41 #95)
5.1400 -#97 := (or up_40 #96)
5.1401 -#651 := (iff #97 #648)
5.1402 -#639 := (or up_30 up_38)
5.1403 -#642 := (or up_41 #639)
5.1404 -#645 := (or up_40 #642)
5.1405 -#649 := (iff #645 #648)
5.1406 -#650 := [rewrite]: #649
5.1407 -#646 := (iff #97 #645)
5.1408 -#643 := (iff #96 #642)
5.1409 -#640 := (iff #95 #639)
5.1410 -#641 := [rewrite]: #640
5.1411 -#644 := [monotonicity #641]: #643
5.1412 -#647 := [monotonicity #644]: #646
5.1413 -#652 := [trans #647 #650]: #651
5.1414 -#638 := [asserted]: #97
5.1415 -#653 := [mp #638 #652]: #648
5.1416 -#1762 := [unit-resolution #653 #1761 #1751 #1750]: up_40
5.1417 -#1220 := (or #267 #275)
5.1418 -#278 := (or #275 #267)
5.1419 -#1221 := (iff #278 #1220)
5.1420 -#1222 := [rewrite]: #1221
5.1421 -#1218 := [asserted]: #278
5.1422 -#1225 := [mp #1218 #1222]: #1220
5.1423 -#1763 := [unit-resolution #1225 #1762]: #275
5.1424 -#1764 := [unit-resolution #685 #1763 #1738 #1737]: up_34
5.1425 -#1064 := (or #218 #226)
5.1426 -#229 := (or #226 #218)
5.1427 -#1065 := (iff #229 #1064)
5.1428 -#1066 := [rewrite]: #1065
5.1429 -#1062 := [asserted]: #229
5.1430 -#1069 := [mp #1062 #1066]: #1064
5.1431 -#1765 := [unit-resolution #1069 #1760]: #226
5.1432 -#1083 := (or #186 #218)
5.1433 -#233 := (or #218 #186)
5.1434 -#1085 := (iff #233 #1083)
5.1435 -#1086 := [rewrite]: #1085
5.1436 -#1082 := [asserted]: #233
5.1437 -#1089 := [mp #1082 #1086]: #1083
5.1438 -#1766 := [unit-resolution #1089 #1760]: #186
5.1439 -#1767 := [unit-resolution #473 #1766 #1627 #1626]: up_18
5.1440 -#969 := (or #185 #194)
5.1441 -#198 := (or #194 #185)
5.1442 -#971 := (iff #198 #969)
5.1443 -#972 := [rewrite]: #971
5.1444 -#968 := [asserted]: #198
5.1445 -#975 := [mp #968 #972]: #969
5.1446 -#1768 := [unit-resolution #975 #1767]: #194
5.1447 -#1769 := [unit-resolution #579 #1768 #895 #1765]: up_31
5.1448 -#1770 := [unit-resolution #1131 #1769 #1764]: false
5.1449 -#1772 := [lemma #1770]: #1771
5.1450 -#1862 := [unit-resolution #1772 #1627 #1626 #1861 #1860 #1859 #1612]: up_32
5.1451 -#1239 := (or #235 #267)
5.1452 -#282 := (or #267 #235)
5.1453 -#1241 := (iff #282 #1239)
5.1454 -#1242 := [rewrite]: #1241
5.1455 -#1238 := [asserted]: #282
5.1456 -#1245 := [mp #1238 #1242]: #1239
5.1457 -#1863 := [unit-resolution #1245 #1862]: #267
5.1458 -#1856 := (or up_12 up_52 up_49 up_41 up_16 up_8 up_7)
5.1459 -#1828 := [unit-resolution #1772 #1627 #1626 #1751 #1745 #1739 #1612]: up_32
5.1460 -#1829 := [unit-resolution #1245 #1828]: #267
5.1461 -#1830 := [unit-resolution #1230 #1828]: #275
5.1462 -#1826 := (or #170 up_41 up_40 up_16 up_8 up_49 up_12 up_52 up_42)
5.1463 -#1804 := [hypothesis]: up_13
5.1464 -#1805 := [unit-resolution #1026 #1804]: #201
5.1465 -#1806 := [unit-resolution #1021 #1804]: #209
5.1466 -#1798 := [hypothesis]: #275
5.1467 -#1782 := [hypothesis]: #267
5.1468 -#1802 := (or #242 up_42 up_52 up_49 up_41 up_40 up_16 up_8 up_12 up_22)
5.1469 -#1783 := [hypothesis]: up_33
5.1470 -#1784 := [unit-resolution #1126 #1783]: #202
5.1471 -#1785 := [unit-resolution #505 #1784 #1457 #1456]: up_20
5.1472 -#1786 := [unit-resolution #965 #1785]: #185
5.1473 -#1787 := [unit-resolution #473 #1786 #1627 #1626]: up_19
5.1474 -#1078 := (or #186 #227)
5.1475 -#232 := (or #227 #186)
5.1476 -#1080 := (iff #232 #1078)
5.1477 -#1081 := [rewrite]: #1080
5.1478 -#1077 := [asserted]: #232
5.1479 -#1084 := [mp #1077 #1081]: #1078
5.1480 -#1788 := [unit-resolution #1084 #1787]: #227
5.1481 -#1789 := [unit-resolution #653 #1788 #1751 #1782]: up_38
5.1482 -#1790 := [unit-resolution #1165 #1789]: #260
5.1483 -#1780 := (or #337 up_49 up_39)
5.1484 -#1773 := [hypothesis]: up_58
5.1485 -#1774 := [unit-resolution #1418 #1773]: #335
5.1486 -#1775 := [unit-resolution #795 #1774]: up_48
5.1487 -#1776 := [hypothesis]: #260
5.1488 -#1777 := [unit-resolution #1423 #1773]: #301
5.1489 -#1778 := [unit-resolution #727 #1777 #1745 #1776]: up_47
5.1490 -#1779 := [unit-resolution #1284 #1778 #1775]: false
5.1491 -#1781 := [lemma #1779]: #1780
5.1492 -#1791 := [unit-resolution #1781 #1790 #1745]: #337
5.1493 -#1792 := [unit-resolution #819 #1791 #1739]: up_59
5.1494 -#1793 := [unit-resolution #1448 #1792]: #345
5.1495 -#1794 := [unit-resolution #1524 #1793]: up_56
5.1496 -#1795 := [unit-resolution #1373 #1794]: #324
5.1497 -#1796 := [unit-resolution #1516 #1795]: up_46
5.1498 -#1797 := [unit-resolution #1113 #1783]: #243
5.1499 -#1390 := (or #284 #325)
5.1500 -#330 := (or #325 #284)
5.1501 -#1392 := (iff #330 #1390)
5.1502 -#1393 := [rewrite]: #1392
5.1503 -#1389 := [asserted]: #330
5.1504 -#1396 := [mp #1389 #1393]: #1390
5.1505 -#1799 := [unit-resolution #1396 #1794]: #284
5.1506 -#1800 := [unit-resolution #685 #1799 #1798 #1797]: up_44
5.1507 -#1801 := [unit-resolution #1276 #1800 #1796]: false
5.1508 -#1803 := [lemma #1801]: #1802
5.1509 -#1807 := [unit-resolution #1803 #1805 #1739 #1745 #1751 #1782 #1627 #1626 #1457 #1798]: #242
5.1510 -#1808 := [unit-resolution #608 #1807 #1806]: up_35
5.1511 -#1809 := [unit-resolution #1286 #1808]: #283
5.1512 -#1810 := [unit-resolution #1281 #1808]: #291
5.1513 -#1811 := [unit-resolution #1516 #1810]: up_55
5.1514 -#1812 := [unit-resolution #1386 #1811]: #284
5.1515 -#1813 := [unit-resolution #685 #1812 #1798 #1809]: up_34
5.1516 -#1814 := [unit-resolution #1136 #1813]: #202
5.1517 -#1815 := [unit-resolution #505 #1814 #1457 #1805]: up_20
5.1518 -#1816 := [unit-resolution #965 #1815]: #185
5.1519 -#1817 := [unit-resolution #473 #1816 #1627 #1626]: up_19
5.1520 -#1818 := [unit-resolution #1373 #1811]: #325
5.1521 -#1819 := [unit-resolution #1524 #1818]: up_60
5.1522 -#1820 := [unit-resolution #1448 #1819]: #341
5.1523 -#1821 := [unit-resolution #819 #1820 #1739]: up_58
5.1524 -#1822 := [unit-resolution #1781 #1821 #1745]: up_39
5.1525 -#1823 := [unit-resolution #1165 #1822]: #259
5.1526 -#1824 := [unit-resolution #653 #1823 #1751 #1782]: up_30
5.1527 -#1825 := [unit-resolution #1084 #1824 #1817]: false
5.1528 -#1827 := [lemma #1825]: #1826
5.1529 -#1831 := [unit-resolution #1827 #1457 #1829 #1627 #1626 #1745 #1751 #1739 #1830]: #170
5.1530 -#1832 := [unit-resolution #430 #1831]: up_11
5.1531 -#1833 := [unit-resolution #886 #1832]: #160
5.1532 -#1834 := [unit-resolution #410 #1833 #1612]: up_10
5.1533 -#1835 := [unit-resolution #985 #1834]: #185
5.1534 -#1836 := [unit-resolution #473 #1835 #1627 #1626]: up_19
5.1535 -#1837 := [unit-resolution #1084 #1836]: #227
5.1536 -#1838 := [unit-resolution #653 #1837 #1751 #1829]: up_38
5.1537 -#1839 := [unit-resolution #1165 #1838]: #260
5.1538 -#1840 := [unit-resolution #1781 #1839 #1745]: #337
5.1539 -#1841 := [unit-resolution #819 #1840 #1739]: up_59
5.1540 -#1842 := [unit-resolution #1448 #1841]: #345
5.1541 -#1843 := [unit-resolution #1524 #1842]: up_56
5.1542 -#1844 := [unit-resolution #1373 #1843]: #324
5.1543 -#1845 := [unit-resolution #1516 #1844]: up_46
5.1544 -#1846 := [unit-resolution #1281 #1845]: #250
5.1545 -#1847 := [unit-resolution #1396 #1843]: #284
5.1546 -#1848 := [unit-resolution #1276 #1845]: #283
5.1547 -#1849 := [unit-resolution #685 #1848 #1830 #1847]: up_34
5.1548 -#1850 := [unit-resolution #1113 #1849]: #242
5.1549 -#1851 := [unit-resolution #608 #1850 #1846]: up_24
5.1550 -#1852 := [unit-resolution #970 #1834]: #193
5.1551 -#1853 := [unit-resolution #1136 #1849]: #202
5.1552 -#1854 := [unit-resolution #505 #1853 #1457 #1852]: up_22
5.1553 -#1855 := [unit-resolution #1016 #1854 #1851]: false
5.1554 -#1857 := [lemma #1855]: #1856
5.1555 -#1864 := [unit-resolution #1857 #1859 #1860 #1861 #1627 #1626 #1612]: up_12
5.1556 -#1865 := [unit-resolution #891 #1864]: #160
5.1557 -#1866 := [unit-resolution #410 #1865 #1612]: up_10
5.1558 -#1867 := [unit-resolution #985 #1866]: #185
5.1559 -#1868 := [unit-resolution #473 #1867 #1627 #1626]: up_19
5.1560 -#1869 := [unit-resolution #1084 #1868]: #227
5.1561 -#1870 := [unit-resolution #653 #1869 #1861 #1863]: up_38
5.1562 -#1871 := [unit-resolution #1165 #1870]: #260
5.1563 -#1872 := [unit-resolution #1781 #1871 #1860]: #337
5.1564 -#1873 := [unit-resolution #819 #1872 #1859]: up_59
5.1565 -#1874 := [unit-resolution #1448 #1873]: #345
5.1566 -#1875 := [unit-resolution #1524 #1874]: up_56
5.1567 -#1876 := [unit-resolution #1396 #1875]: #284
5.1568 -#1877 := [unit-resolution #1230 #1862]: #275
5.1569 -#1878 := [unit-resolution #1373 #1875]: #324
5.1570 -#1879 := [unit-resolution #1516 #1878]: up_46
5.1571 -#1880 := [unit-resolution #1276 #1879]: #283
5.1572 -#1881 := [unit-resolution #685 #1880 #1877 #1876]: up_34
5.1573 -#1882 := [unit-resolution #878 #1864]: #165
5.1574 -#1883 := [unit-resolution #430 #1882]: up_13
5.1575 -#1884 := [unit-resolution #1021 #1883]: #209
5.1576 -#1885 := [unit-resolution #1281 #1879]: #250
5.1577 -#1886 := [unit-resolution #608 #1885 #1884]: up_33
5.1578 -#1887 := [unit-resolution #1113 #1886 #1881]: false
5.1579 -#1889 := [lemma #1887]: #1888
5.1580 -#2026 := [unit-resolution #1889 #1597 #1612 #1626]: up_16
5.1581 -#908 := (or #172 #177)
5.1582 -#180 := (or #177 #172)
5.1583 -#909 := (iff #180 #908)
5.1584 -#910 := [rewrite]: #909
5.1585 -#906 := [asserted]: #180
5.1586 -#913 := [mp #906 #910]: #908
5.1587 -#2027 := [unit-resolution #913 #2026]: #172
5.1588 -#2028 := [unit-resolution #1508 #2027]: up_15
5.1589 -#2029 := [unit-resolution #1037 #2028]: #214
5.1590 -#1027 := (or #173 #213)
5.1591 -#216 := (or #213 #173)
5.1592 -#1028 := (iff #216 #1027)
5.1593 -#1029 := [rewrite]: #1028
5.1594 -#1025 := [asserted]: #216
5.1595 -#1032 := [mp #1025 #1029]: #1027
5.1596 -#2030 := [unit-resolution #1032 #2028]: #213
5.1597 -#179 := (or #177 #178)
5.1598 -#905 := [asserted]: #179
5.1599 -#2031 := [unit-resolution #905 #2026]: #178
5.1600 -#1917 := (or #226 up_54 up_26 up_17 up_25)
5.1601 -#1890 := [hypothesis]: #214
5.1602 -#1891 := [hypothesis]: #213
5.1603 -#1892 := [hypothesis]: #178
5.1604 -#1893 := [hypothesis]: up_29
5.1605 -#1894 := [unit-resolution #1069 #1893]: #218
5.1606 -#1895 := [unit-resolution #547 #1894 #1892 #1891]: up_28
5.1607 -#1187 := (or #219 #254)
5.1608 -#266 := (or #254 #219)
5.1609 -#1189 := (iff #266 #1187)
5.1610 -#1190 := [rewrite]: #1189
5.1611 -#1186 := [asserted]: #266
5.1612 -#1193 := [mp #1186 #1190]: #1187
5.1613 -#1896 := [unit-resolution #1193 #1895]: #254
5.1614 -#1897 := [unit-resolution #621 #1896 #1890]: up_37
5.1615 -#1898 := [unit-resolution #1297 #1897]: #296
5.1616 -#1899 := [unit-resolution #795 #1898]: up_57
5.1617 -#1900 := [unit-resolution #1418 #1899]: #337
5.1618 -#1901 := [unit-resolution #1188 #1895]: #260
5.1619 -#1287 := (or #255 #295)
5.1620 -#298 := (or #295 #255)
5.1621 -#1288 := (iff #298 #1287)
5.1622 -#1289 := [rewrite]: #1288
5.1623 -#1285 := [asserted]: #298
5.1624 -#1292 := [mp #1285 #1289]: #1287
5.1625 -#1902 := [unit-resolution #1292 #1897]: #295
5.1626 -#1422 := (or #301 #335)
5.1627 -#340 := (or #335 #301)
5.1628 -#1424 := (iff #340 #1422)
5.1629 -#1425 := [rewrite]: #1424
5.1630 -#1421 := [asserted]: #340
5.1631 -#1428 := [mp #1421 #1425]: #1422
5.1632 -#1903 := [unit-resolution #1428 #1899]: #301
5.1633 -#1904 := [unit-resolution #727 #1903 #1902 #1901]: up_49
5.1634 -#1333 := (or #300 #309)
5.1635 -#313 := (or #309 #300)
5.1636 -#1335 := (iff #313 #1333)
5.1637 -#1336 := [rewrite]: #1335
5.1638 -#1332 := [asserted]: #313
5.1639 -#1339 := [mp #1332 #1336]: #1333
5.1640 -#1905 := [unit-resolution #1339 #1904]: #309
5.1641 -#1906 := [unit-resolution #819 #1905 #1900]: up_59
5.1642 -#1907 := [unit-resolution #1448 #1906]: #345
5.1643 -#1908 := [unit-resolution #1524 #1907]: up_56
5.1644 -#1909 := [unit-resolution #1329 #1904]: #308
5.1645 -#1172 := (or #219 #259)
5.1646 -#263 := (or #259 #219)
5.1647 -#1174 := (iff #263 #1172)
5.1648 -#1175 := [rewrite]: #1174
5.1649 -#1171 := [asserted]: #263
5.1650 -#1178 := [mp #1171 #1175]: #1172
5.1651 -#1910 := [unit-resolution #1178 #1895]: #259
5.1652 -#228 := (or #226 #227)
5.1653 -#1061 := [asserted]: #228
5.1654 -#1911 := [unit-resolution #1061 #1893]: #227
5.1655 -#1343 := (or #268 #300)
5.1656 -#315 := (or #300 #268)
5.1657 -#1345 := (iff #315 #1343)
5.1658 -#1346 := [rewrite]: #1345
5.1659 -#1342 := [asserted]: #315
5.1660 -#1349 := [mp #1342 #1346]: #1343
5.1661 -#1912 := [unit-resolution #1349 #1904]: #268
5.1662 -#1913 := [unit-resolution #653 #1912 #1911 #1910]: up_40
5.1663 -#1229 := (or #267 #276)
5.1664 -#280 := (or #276 #267)
5.1665 -#1231 := (iff #280 #1229)
5.1666 -#1232 := [rewrite]: #1231
5.1667 -#1228 := [asserted]: #280
5.1668 -#1235 := [mp #1228 #1232]: #1229
5.1669 -#1914 := [unit-resolution #1235 #1913]: #276
5.1670 -#1915 := [unit-resolution #759 #1914 #1909 #1597]: up_53
5.1671 -#1385 := (or #316 #325)
5.1672 -#329 := (or #325 #316)
5.1673 -#1387 := (iff #329 #1385)
5.1674 -#1388 := [rewrite]: #1387
5.1675 -#1384 := [asserted]: #329
5.1676 -#1391 := [mp #1384 #1388]: #1385
5.1677 -#1916 := [unit-resolution #1391 #1915 #1908]: false
5.1678 -#1918 := [lemma #1916]: #1917
5.1679 -#2032 := [unit-resolution #1918 #1597 #2029 #2031 #2030]: #226
5.1680 -#2010 := (or up_12 up_29 up_7 up_54 up_26)
5.1681 -#1993 := (or up_35 up_12 up_54 up_26 up_29 up_7)
5.1682 -#1955 := (or #170 up_54 up_26 up_29 up_12 up_35 up_7)
5.1683 -#1940 := [unit-resolution #1625 #1805 #907 #1457 #1611 #1612]: up_32
5.1684 -#1941 := [unit-resolution #1240 #1940]: #276
5.1685 -#1942 := [unit-resolution #1230 #1940]: #275
5.1686 -#1943 := [unit-resolution #608 #1806 #1611]: up_33
5.1687 -#1944 := [unit-resolution #1113 #1943]: #243
5.1688 -#1925 := (or #325 up_34 up_42)
5.1689 -#1919 := [hypothesis]: up_56
5.1690 -#1920 := [unit-resolution #1373 #1919]: #324
5.1691 -#1921 := [unit-resolution #1516 #1920]: up_46
5.1692 -#1922 := [unit-resolution #1396 #1919]: #284
5.1693 -#1923 := [unit-resolution #685 #1922 #1605 #1798]: up_44
5.1694 -#1924 := [unit-resolution #1276 #1923 #1921]: false
5.1695 -#1926 := [lemma #1924]: #1925
5.1696 -#1945 := [unit-resolution #1926 #1944 #1942]: #325
5.1697 -#1946 := [unit-resolution #1524 #1945]: up_60
5.1698 -#1947 := [unit-resolution #1448 #1946]: #341
5.1699 -#1938 := (or #308 up_26 up_59)
5.1700 -#1927 := [hypothesis]: up_51
5.1701 -#1928 := [unit-resolution #1329 #1927]: #300
5.1702 -#1929 := [hypothesis]: #341
5.1703 -#1930 := [unit-resolution #1321 #1927]: #309
5.1704 -#1931 := [unit-resolution #819 #1930 #1929]: up_58
5.1705 -#1932 := [unit-resolution #1781 #1931 #1928]: up_39
5.1706 -#1933 := [unit-resolution #1183 #1932]: #254
5.1707 -#1934 := [unit-resolution #1418 #1931]: #335
5.1708 -#1935 := [unit-resolution #795 #1934]: up_48
5.1709 -#1936 := [unit-resolution #1297 #1935]: #255
5.1710 -#1937 := [unit-resolution #621 #1936 #1933 #1890]: false
5.1711 -#1939 := [lemma #1937]: #1938
5.1712 -#1948 := [unit-resolution #1939 #1947 #1890]: #308
5.1713 -#1949 := [unit-resolution #759 #1948 #1941 #1597]: up_53
5.1714 -#1950 := [unit-resolution #1381 #1949]: #324
5.1715 -#1951 := [unit-resolution #1516 #1950]: up_46
5.1716 -#1952 := [unit-resolution #1401 #1949]: #284
5.1717 -#1953 := [unit-resolution #685 #1952 #1944 #1942]: up_44
5.1718 -#1954 := [unit-resolution #1276 #1953 #1951]: false
5.1719 -#1956 := [lemma #1954]: #1955
5.1720 -#1980 := [unit-resolution #1956 #1611 #1890 #907 #1457 #1597 #1612]: #170
5.1721 -#1981 := [unit-resolution #430 #1980]: up_11
5.1722 -#1982 := [unit-resolution #886 #1981]: #160
5.1723 -#1983 := [unit-resolution #410 #1982 #1612]: up_10
5.1724 -#1984 := [unit-resolution #980 #1983]: #194
5.1725 -#1985 := [unit-resolution #1979 #1611 #907 #1984 #1457 #1612]: up_32
5.1726 -#1970 := (or #235 up_34 up_54 up_26)
5.1727 -#1957 := [hypothesis]: up_32
5.1728 -#1958 := [unit-resolution #1240 #1957]: #276
5.1729 -#1959 := [unit-resolution #1230 #1957]: #275
5.1730 -#1960 := [unit-resolution #1926 #1959 #1605]: #325
5.1731 -#1961 := [unit-resolution #1524 #1960]: up_60
5.1732 -#1962 := [unit-resolution #1448 #1961]: #341
5.1733 -#1963 := [unit-resolution #1939 #1962 #1890]: #308
5.1734 -#1964 := [unit-resolution #759 #1963 #1958 #1597]: up_53
5.1735 -#1965 := [unit-resolution #1381 #1964]: #324
5.1736 -#1966 := [unit-resolution #1516 #1965]: up_46
5.1737 -#1967 := [unit-resolution #1401 #1964]: #284
5.1738 -#1968 := [unit-resolution #685 #1967 #1605 #1959]: up_44
5.1739 -#1969 := [unit-resolution #1276 #1968 #1966]: false
5.1740 -#1971 := [lemma #1969]: #1970
5.1741 -#1986 := [unit-resolution #1971 #1985 #1597 #1890]: up_34
5.1742 -#1987 := [unit-resolution #1113 #1986]: #242
5.1743 -#1988 := [unit-resolution #608 #1987 #1611]: up_24
5.1744 -#1989 := [unit-resolution #970 #1983]: #193
5.1745 -#1990 := [unit-resolution #1136 #1986]: #202
5.1746 -#1991 := [unit-resolution #505 #1990 #1457 #1989]: up_22
5.1747 -#1992 := [unit-resolution #1016 #1991 #1988]: false
5.1748 -#1994 := [lemma #1992]: #1993
5.1749 -#1995 := [unit-resolution #1994 #1457 #1597 #1890 #907 #1612]: up_35
5.1750 -#1996 := [unit-resolution #1281 #1995]: #291
5.1751 -#1997 := [unit-resolution #1516 #1996]: up_55
5.1752 -#1998 := [unit-resolution #1373 #1997]: #325
5.1753 -#1999 := [unit-resolution #1524 #1998]: up_60
5.1754 -#2000 := [unit-resolution #1448 #1999]: #341
5.1755 -#2001 := [unit-resolution #1939 #2000 #1890]: #308
5.1756 -#2002 := [unit-resolution #1610 #2001 #1995 #1597]: up_34
5.1757 -#2003 := [unit-resolution #1131 #2002]: #234
5.1758 -#2004 := [unit-resolution #1381 #1997]: #316
5.1759 -#2005 := [unit-resolution #759 #2001 #2004 #1597]: up_43
5.1760 -#2006 := [unit-resolution #1240 #2005]: #235
5.1761 -#2007 := [unit-resolution #1136 #2002]: #202
5.1762 -#2008 := [unit-resolution #1683 #2007 #1612 #1457]: #194
5.1763 -#2009 := [unit-resolution #579 #2008 #2006 #907 #2003]: false
5.1764 -#2011 := [lemma #2009]: #2010
5.1765 -#2033 := [unit-resolution #2011 #2032 #1612 #1597 #2029]: up_12
5.1766 -#2034 := [unit-resolution #891 #2033]: #160
5.1767 -#2035 := [unit-resolution #410 #2034 #1612]: up_10
5.1768 -#2036 := [unit-resolution #980 #2035]: #194
5.1769 -#2037 := [unit-resolution #878 #2033]: #165
5.1770 -#2038 := [unit-resolution #430 #2037]: up_13
5.1771 -#2039 := [unit-resolution #1021 #2038]: #209
5.1772 -#2024 := (or #234 up_26 up_54 up_24)
5.1773 -#2012 := [hypothesis]: #209
5.1774 -#2013 := [hypothesis]: up_31
5.1775 -#2014 := [unit-resolution #1121 #2013]: #242
5.1776 -#2015 := [unit-resolution #608 #2014 #2012]: up_35
5.1777 -#2016 := [unit-resolution #1131 #2013]: #243
5.1778 -#2017 := [unit-resolution #1610 #2016 #2015 #1597]: up_51
5.1779 -#2018 := [unit-resolution #1939 #2017 #1890]: up_59
5.1780 -#2019 := [unit-resolution #1448 #2018]: #345
5.1781 -#2020 := [unit-resolution #1281 #2015]: #291
5.1782 -#2021 := [unit-resolution #1516 #2020]: up_55
5.1783 -#2022 := [unit-resolution #1373 #2021]: #325
5.1784 -#2023 := [unit-resolution #1524 #2022 #2019]: false
5.1785 -#2025 := [lemma #2023]: #2024
5.1786 -#2040 := [unit-resolution #2025 #2029 #1597 #2039]: #234
5.1787 -#2041 := [unit-resolution #579 #2040 #2032 #2036]: up_32
5.1788 -#2042 := [unit-resolution #1240 #2041]: #276
5.1789 -#2043 := [unit-resolution #1971 #2041 #1597 #2029]: up_34
5.1790 -#2044 := [unit-resolution #1113 #2043]: #242
5.1791 -#2045 := [unit-resolution #608 #2044 #2039]: up_35
5.1792 -#2046 := [unit-resolution #1281 #2045]: #291
5.1793 -#2047 := [unit-resolution #1516 #2046]: up_55
5.1794 -#2048 := [unit-resolution #1381 #2047]: #316
5.1795 -#2049 := [unit-resolution #759 #2048 #2042 #1597]: up_51
5.1796 -#2050 := [unit-resolution #1373 #2047]: #325
5.1797 -#2051 := [unit-resolution #1524 #2050]: up_60
5.1798 -#2052 := [unit-resolution #1448 #2051]: #341
5.1799 -#2053 := [unit-resolution #1939 #2052 #2049 #2029]: false
5.1800 -#2055 := [lemma #2053]: #2054
5.1801 -#2065 := [unit-resolution #2055 #1612 #1626]: up_54
5.1802 -#1447 := (or #317 #345)
5.1803 -#347 := (or #345 #317)
5.1804 -#1449 := (iff #347 #1447)
5.1805 -#1450 := [rewrite]: #1449
5.1806 -#1446 := [asserted]: #347
5.1807 -#1453 := [mp #1446 #1450]: #1447
5.1808 -#2066 := [unit-resolution #1453 #2065]: #345
5.1809 -#2067 := [unit-resolution #1524 #2066]: up_56
5.1810 -#2083 := (or #275 up_7 up_12 up_8)
5.1811 -#2063 := [hypothesis]: up_42
5.1812 -#2064 := [unit-resolution #1230 #2063]: #235
5.1813 -#2068 := [unit-resolution #1373 #2067]: #324
5.1814 -#2069 := [unit-resolution #1516 #2068]: up_46
5.1815 -#2070 := [unit-resolution #1281 #2069]: #250
5.1816 -#2071 := [unit-resolution #1672 #2064 #1626 #2070 #1612]: up_16
5.1817 -#2072 := [unit-resolution #913 #2071]: #172
5.1818 -#2073 := [unit-resolution #1508 #2072]: up_15
5.1819 -#2074 := [unit-resolution #1032 #2073]: #213
5.1820 -#2075 := [unit-resolution #905 #2071]: #178
5.1821 -#1452 := (or #317 #341)
5.1822 -#348 := (or #341 #317)
5.1823 -#1454 := (iff #348 #1452)
5.1824 -#1455 := [rewrite]: #1454
5.1825 -#1451 := [asserted]: #348
5.1826 -#1458 := [mp #1451 #1455]: #1452
5.1827 -#2076 := [unit-resolution #1458 #2065]: #341
5.1828 -#2077 := [unit-resolution #1225 #2063]: #267
5.1829 -#2061 := (or #226 up_59 up_40 up_17 up_25)
5.1830 -#2056 := [unit-resolution #653 #1910 #1782 #1911]: up_41
5.1831 -#2057 := [unit-resolution #1349 #2056]: #300
5.1832 -#1338 := (or #268 #309)
5.1833 -#314 := (or #309 #268)
5.1834 -#1340 := (iff #314 #1338)
5.1835 -#1341 := [rewrite]: #1340
5.1836 -#1337 := [asserted]: #314
5.1837 -#1344 := [mp #1337 #1341]: #1338
5.1838 -#2058 := [unit-resolution #1344 #2056]: #309
5.1839 -#2059 := [unit-resolution #819 #2058 #1929]: up_58
5.1840 -#2060 := [unit-resolution #1781 #2059 #2057 #1901]: false
5.1841 -#2062 := [lemma #2060]: #2061
5.1842 -#2078 := [unit-resolution #2062 #2077 #2076 #2075 #2074]: #226
5.1843 -#2079 := [unit-resolution #1625 #2078 #2070 #1457 #2064 #1612]: up_22
5.1844 -#2080 := [unit-resolution #1979 #2078 #2070 #1457 #2064 #1612]: up_21
5.1845 -#2081 := [unit-resolution #1683 #2080 #1612 #1457]: up_23
5.1846 -#2082 := [unit-resolution #983 #2081 #2079]: false
5.1847 -#2084 := [lemma #2082]: #2083
5.1848 -#2085 := [unit-resolution #2084 #1457 #1612 #1626]: #275
5.1849 -#2086 := [unit-resolution #1926 #2085 #2067]: up_34
5.1850 -#2087 := [unit-resolution #1136 #2086]: #202
5.1851 -#2088 := [unit-resolution #1113 #2086]: #242
5.1852 -#2089 := [unit-resolution #608 #2088 #2070]: up_24
5.1853 -#2090 := [unit-resolution #1016 #2089]: #201
5.1854 -#2091 := [unit-resolution #505 #2090 #1457 #2087]: up_20
5.1855 -#2092 := [unit-resolution #970 #2091]: #161
5.1856 -#2093 := [unit-resolution #1021 #2089]: #170
5.1857 -#2094 := [unit-resolution #430 #2093]: up_11
5.1858 -#2095 := [unit-resolution #886 #2094]: #160
5.1859 -#2096 := [unit-resolution #410 #2095 #2092 #1612]: false
5.1860 -#2098 := [lemma #2096]: #2097
5.1861 -#2102 := [unit-resolution #2098 #2100 #2101]: up_12
5.1862 -#2103 := [unit-resolution #891 #2102]: #160
5.1863 -#2104 := [unit-resolution #410 #2103 #2100]: up_10
5.1864 -#2105 := [unit-resolution #980 #2104]: #194
5.1865 -#2106 := [unit-resolution #2055 #2100 #2101]: up_54
5.1866 -#2107 := [unit-resolution #1453 #2106]: #345
5.1867 -#2108 := [unit-resolution #1524 #2107]: up_56
5.1868 -#2109 := [unit-resolution #1373 #2108]: #324
5.1869 -#2110 := [unit-resolution #1516 #2109]: up_46
5.1870 -#2111 := [unit-resolution #1281 #2110]: #250
5.1871 -#2112 := [unit-resolution #878 #2102]: #165
5.1872 -#2113 := [unit-resolution #430 #2112]: up_13
5.1873 -#2114 := [unit-resolution #1021 #2113]: #209
5.1874 -#2115 := [unit-resolution #608 #2114 #2111]: up_33
5.1875 -#2116 := [unit-resolution #1121 #2115]: #234
5.1876 -#2117 := [unit-resolution #1276 #2110]: #283
5.1877 -#2118 := [unit-resolution #1396 #2108]: #284
5.1878 -#2119 := [unit-resolution #1113 #2115]: #243
5.1879 -#2120 := [unit-resolution #685 #2119 #2118 #2117]: up_42
5.1880 -#2121 := [unit-resolution #1230 #2120]: #235
5.1881 -#2122 := [unit-resolution #579 #2121 #2116 #2105]: up_29
5.1882 -#2123 := [unit-resolution #1225 #2120]: #267
5.1883 -#2124 := [unit-resolution #1458 #2106]: #341
5.1884 -#2125 := [unit-resolution #1672 #2121 #2101 #2111 #2100]: up_16
5.1885 -#2126 := [unit-resolution #905 #2125]: #178
5.1886 -#2127 := [unit-resolution #2062 #2126 #2124 #2123 #2122]: up_25
5.1887 -#2128 := [unit-resolution #913 #2125]: #172
5.1888 -#2129 := [unit-resolution #1508 #2128]: up_15
5.1889 -#2130 := [unit-resolution #1032 #2129 #2127]: false
5.1890 -#2131 := [lemma #2130]: #150
5.1891 -#1494 := (or up_5 up_6)
5.1892 -decl up_1 :: bool
5.1893 -#4 := up_1
5.1894 -#379 := (or up_1 up_5 up_6)
5.1895 -#1497 := (iff #379 #1494)
5.1896 -#1491 := (or false up_5 up_6)
5.1897 -#1495 := (iff #1491 #1494)
5.1898 -#1496 := [rewrite]: #1495
5.1899 -#1492 := (iff #379 #1491)
5.1900 -#1467 := (iff up_1 false)
5.1901 -#5 := (not up_1)
5.1902 -#1470 := (iff #5 #1467)
5.1903 -#1463 := (iff #1467 #5)
5.1904 -#1468 := [rewrite]: #1463
5.1905 -#1471 := [symm #1468]: #1470
5.1906 -#368 := [asserted]: #5
5.1907 -#1472 := [mp #368 #1471]: #1467
5.1908 -#1493 := [monotonicity #1472]: #1492
5.1909 -#1498 := [trans #1493 #1496]: #1497
5.1910 -#14 := (or up_6 up_1)
5.1911 -#15 := (or up_5 #14)
5.1912 -#382 := (iff #15 #379)
5.1913 -#373 := (or up_1 up_6)
5.1914 -#376 := (or up_5 #373)
5.1915 -#380 := (iff #376 #379)
5.1916 -#381 := [rewrite]: #380
5.1917 -#377 := (iff #15 #376)
5.1918 -#374 := (iff #14 #373)
5.1919 -#375 := [rewrite]: #374
5.1920 -#378 := [monotonicity #375]: #377
5.1921 -#383 := [trans #378 #381]: #382
5.1922 -#372 := [asserted]: #15
5.1923 -#384 := [mp #372 #383]: #379
5.1924 -#1499 := [mp #384 #1498]: #1494
5.1925 -#2138 := [unit-resolution #1499 #2131]: up_6
5.1926 -#151 := (not up_6)
5.1927 -#927 := (or #151 #172)
5.1928 -#184 := (or #172 #151)
5.1929 -#929 := (iff #184 #927)
5.1930 -#930 := [rewrite]: #929
5.1931 -#926 := [asserted]: #184
5.1932 -#933 := [mp #926 #930]: #927
5.1933 -#2139 := [unit-resolution #933 #2138]: #172
5.1934 -#2140 := [unit-resolution #1508 #2139]: up_15
5.1935 -#2147 := [unit-resolution #1037 #2140]: #214
5.1936 -#2159 := [unit-resolution #2011 #2147]: #2158
5.1937 -#2160 := [unit-resolution #2159 #907 #1612 #1457]: up_54
5.1938 -#2161 := [unit-resolution #1453 #2160]: #345
5.1939 -#2162 := [unit-resolution #1524 #2161]: up_56
5.1940 -#2163 := [unit-resolution #1926 #2162 #2157 #1605]: false
5.1941 -#2165 := [lemma #2163]: #2164
5.1942 -#2166 := [unit-resolution #2165 #1605 #1612 #1611 #1457]: up_29
5.1943 -#2148 := (or #226 up_54)
5.1944 -#2141 := [unit-resolution #1032 #2140]: #213
5.1945 -#922 := (or #151 #178)
5.1946 -#183 := (or #178 #151)
5.1947 -#924 := (iff #183 #922)
5.1948 -#925 := [rewrite]: #924
5.1949 -#921 := [asserted]: #183
5.1950 -#928 := [mp #921 #925]: #922
5.1951 -#2142 := [unit-resolution #928 #2138]: #178
5.1952 -#2149 := [unit-resolution #1918 #2147 #2142 #2141]: #2148
5.1953 -#2167 := [unit-resolution #2149 #2166]: up_54
5.1954 -#2154 := (or #226 up_34 up_59)
5.1955 -#2143 := (or #226 up_59 up_40)
5.1956 -#2144 := [unit-resolution #2062 #2142 #2141]: #2143
5.1957 -#2145 := [unit-resolution #2144 #1893 #1929]: up_40
5.1958 -#2146 := [unit-resolution #1225 #2145]: #275
5.1959 -#2150 := [unit-resolution #2149 #1893]: up_54
5.1960 -#2151 := [unit-resolution #1453 #2150]: #345
5.1961 -#2152 := [unit-resolution #1524 #2151]: up_56
5.1962 -#2153 := [unit-resolution #1926 #2152 #2146 #1605]: false
5.1963 -#2155 := [lemma #2153]: #2154
5.1964 -#2168 := [unit-resolution #2155 #2166 #1605]: up_59
5.1965 -#2169 := [unit-resolution #1458 #2168 #2167]: false
5.1966 -#2171 := [lemma #2169]: #2170
5.1967 -#2172 := [unit-resolution #2171 #1612 #1611 #1457]: up_34
5.1968 -#2173 := [unit-resolution #1136 #2172]: #202
5.1969 -#2174 := [unit-resolution #1113 #2172]: #242
5.1970 -#2175 := [unit-resolution #608 #2174 #1611]: up_24
5.1971 -#2176 := [unit-resolution #1016 #2175]: #201
5.1972 -#2177 := [unit-resolution #505 #2176 #1457 #2173]: up_20
5.1973 -#2178 := [unit-resolution #970 #2177]: #161
5.1974 -#2179 := [unit-resolution #1021 #2175]: #170
5.1975 -#2180 := [unit-resolution #430 #2179]: up_11
5.1976 -#2181 := [unit-resolution #886 #2180]: #160
5.1977 -#2182 := [unit-resolution #410 #2181 #2178 #1612]: false
5.1978 -#2184 := [lemma #2182]: #2183
5.1979 -#2235 := [unit-resolution #2184 #1457 #1611]: up_7
5.1980 -#157 := (or #155 #156)
5.1981 -#856 := [asserted]: #157
5.1982 -#2236 := [unit-resolution #856 #2235]: #156
5.1983 -#2299 := (or up_34 up_35 up_12)
5.1984 -#2283 := (or #186 up_34)
5.1985 -#2185 := [hypothesis]: up_19
5.1986 -#2191 := [unit-resolution #1084 #2185]: #227
5.1987 -#2186 := [unit-resolution #1089 #2185]: #218
5.1988 -#2187 := (or up_27 up_28)
5.1989 -#2188 := [unit-resolution #547 #2142 #2141]: #2187
5.1990 -#2189 := [unit-resolution #2188 #2186]: up_28
5.1991 -#2192 := [unit-resolution #1178 #2189]: #259
5.1992 -#2265 := [unit-resolution #1193 #2189]: #254
5.1993 -#2266 := (or up_36 up_37)
5.1994 -#2267 := [unit-resolution #621 #2147]: #2266
5.1995 -#2268 := [unit-resolution #2267 #2265]: up_37
5.1996 -#2269 := [unit-resolution #1292 #2268]: #295
5.1997 -#2190 := [unit-resolution #1188 #2189]: #260
5.1998 -#2270 := [unit-resolution #1297 #2268]: #296
5.1999 -#2271 := [unit-resolution #795 #2270]: up_57
5.2000 -#2272 := [unit-resolution #1428 #2271]: #301
5.2001 -#2273 := [unit-resolution #727 #2272 #2190 #2269]: up_49
5.2002 -#2274 := [unit-resolution #1349 #2273]: #268
5.2003 -#2275 := [unit-resolution #653 #2274 #2192 #2191]: up_40
5.2004 -#2276 := [unit-resolution #1225 #2275]: #275
5.2005 -#2277 := [unit-resolution #1418 #2271]: #337
5.2006 -#2278 := [unit-resolution #1339 #2273]: #309
5.2007 -#2279 := [unit-resolution #819 #2278 #2277]: up_59
5.2008 -#2280 := [unit-resolution #1448 #2279]: #345
5.2009 -#2281 := [unit-resolution #1524 #2280]: up_56
5.2010 -#2282 := [unit-resolution #1926 #2281 #2276 #1605]: false
5.2011 -#2284 := [lemma #2282]: #2283
5.2012 -#2292 := [unit-resolution #2284 #1605]: #186
5.2013 -#2223 := (or up_8 up_18 up_19)
5.2014 -#912 := (or #151 #177)
5.2015 -#181 := (or #177 #151)
5.2016 -#914 := (iff #181 #912)
5.2017 -#915 := [rewrite]: #914
5.2018 -#911 := [asserted]: #181
5.2019 -#918 := [mp #911 #915]: #912
5.2020 -#2222 := [unit-resolution #918 #2138]: #177
5.2021 -#2224 := [unit-resolution #473 #2222]: #2223
5.2022 -#2293 := [unit-resolution #2224 #2292 #2236]: up_18
5.2023 -#2257 := (or #235 up_34)
5.2024 -#2252 := (or #235 up_34 up_54)
5.2025 -#2253 := [unit-resolution #1971 #2147]: #2252
5.2026 -#2254 := [unit-resolution #2253 #1957 #1605]: up_54
5.2027 -#2255 := [unit-resolution #1453 #2254]: #345
5.2028 -#2256 := [unit-resolution #1524 #2255 #1960]: false
5.2029 -#2258 := [lemma #2256]: #2257
5.2030 -#2294 := [unit-resolution #2258 #1605]: #235
5.2031 -#2290 := (or up_29 up_35 up_32 up_12 #185)
5.2032 -#2200 := [hypothesis]: up_18
5.2033 -#2206 := (or #185 up_29 up_32 up_12 up_22)
5.2034 -#2201 := [unit-resolution #965 #2200]: #193
5.2035 -#2202 := [unit-resolution #505 #2201 #1457 #1456]: up_23
5.2036 -#2203 := [unit-resolution #975 #2200]: #194
5.2037 -#2204 := [unit-resolution #579 #2203 #907 #895]: up_31
5.2038 -#2205 := [unit-resolution #1141 #2204 #2202]: false
5.2039 -#2207 := [lemma #2205]: #2206
5.2040 -#2285 := [unit-resolution #2207 #907 #895 #1457 #2200]: up_22
5.2041 -#2286 := [unit-resolution #1016 #2285]: #209
5.2042 -#2287 := [unit-resolution #579 #907 #895 #2203]: up_31
5.2043 -#2288 := [unit-resolution #1121 #2287]: #242
5.2044 -#2289 := [unit-resolution #608 #2288 #2286 #1611]: false
5.2045 -#2291 := [lemma #2289]: #2290
5.2046 -#2295 := [unit-resolution #2291 #2294 #1611 #1457 #2293]: up_29
5.2047 -#2296 := [unit-resolution #2149 #2295]: up_54
5.2048 -#2297 := [unit-resolution #2155 #2295 #1605]: up_59
5.2049 -#2298 := [unit-resolution #1458 #2297 #2296]: false
5.2050 -#2300 := [lemma #2298]: #2299
5.2051 -#2301 := [unit-resolution #2300 #1457 #1611]: up_34
5.2052 -#2302 := [unit-resolution #1136 #2301]: #202
5.2053 -#2303 := [unit-resolution #1113 #2301]: #242
5.2054 -#2304 := [unit-resolution #608 #2303 #1611]: up_24
5.2055 -#2305 := [unit-resolution #1016 #2304]: #201
5.2056 -#2306 := [unit-resolution #505 #2305 #1457 #2302]: up_20
5.2057 -#2307 := [unit-resolution #965 #2306]: #185
5.2058 -#2308 := [unit-resolution #2224 #2307 #2236]: up_19
5.2059 -#2309 := [unit-resolution #957 #2306]: #194
5.2060 -#2310 := [unit-resolution #1131 #2301]: #234
5.2061 -#2311 := [unit-resolution #1074 #2308]: #226
5.2062 -#2312 := [unit-resolution #579 #2311 #2310 #2309]: up_32
5.2063 -#2313 := [unit-resolution #1245 #2312]: #267
5.2064 -#2198 := (or #186 up_59 up_40)
5.2065 -#2193 := [unit-resolution #653 #2192 #1782 #2191]: up_41
5.2066 -#2194 := [unit-resolution #1349 #2193]: #300
5.2067 -#2195 := [unit-resolution #1344 #2193]: #309
5.2068 -#2196 := [unit-resolution #819 #2195 #1929]: up_58
5.2069 -#2197 := [unit-resolution #1781 #2196 #2194 #2190]: false
5.2070 -#2199 := [lemma #2197]: #2198
5.2071 -#2314 := [unit-resolution #2199 #2313 #2308]: up_59
5.2072 -#2315 := [unit-resolution #1448 #2314]: #345
5.2073 -#2316 := [unit-resolution #1524 #2315]: up_56
5.2074 -#2317 := [unit-resolution #1084 #2308]: #227
5.2075 -#2318 := [unit-resolution #1089 #2308]: #218
5.2076 -#2319 := [unit-resolution #2188 #2318]: up_28
5.2077 -#2320 := [unit-resolution #1178 #2319]: #259
5.2078 -#2321 := [unit-resolution #653 #2313 #2320 #2317]: up_41
5.2079 -#2322 := [unit-resolution #1334 #2321]: #308
5.2080 -#2323 := [unit-resolution #1240 #2312]: #276
5.2081 -#2324 := [unit-resolution #1458 #2314]: #317
5.2082 -#2325 := [unit-resolution #759 #2324 #2323 #2322]: up_53
5.2083 -#2326 := [unit-resolution #1391 #2325 #2316]: false
5.2084 -#2328 := [lemma #2326]: #2327
5.2085 -#2337 := [unit-resolution #2328 #1611]: up_12
5.2086 -#2338 := [unit-resolution #878 #2337]: #165
5.2087 -#2339 := [unit-resolution #430 #2338]: up_13
5.2088 -#2340 := [unit-resolution #1021 #2339]: #209
5.2089 -#2341 := [unit-resolution #608 #2340 #1611]: up_33
5.2090 -#2342 := [unit-resolution #1113 #2341]: #243
5.2091 -#2343 := [unit-resolution #2258 #2342]: #235
5.2092 -#2344 := [unit-resolution #1121 #2341]: #234
5.2093 -#2345 := [unit-resolution #2284 #2342]: #186
5.2094 -#2346 := [unit-resolution #891 #2337]: #160
5.2095 -#2335 := (or #194 up_9 up_19)
5.2096 -#2329 := [hypothesis]: #186
5.2097 -#2330 := [unit-resolution #975 #1674]: #185
5.2098 -#2331 := [unit-resolution #2224 #2330 #2329]: up_8
5.2099 -#2332 := [hypothesis]: #160
5.2100 -#2333 := [unit-resolution #410 #1678 #2332]: up_7
5.2101 -#2334 := [unit-resolution #856 #2333 #2331]: false
5.2102 -#2336 := [lemma #2334]: #2335
5.2103 -#2347 := [unit-resolution #2336 #2346 #2345]: #194
5.2104 -#2348 := [unit-resolution #579 #2347 #2344 #2343]: up_29
5.2105 -#2349 := [unit-resolution #2149 #2348]: up_54
5.2106 -#2350 := [unit-resolution #2155 #2348 #2342]: up_59
5.2107 -#2351 := [unit-resolution #1458 #2350 #2349]: false
5.2108 -#2352 := [lemma #2351]: up_35
5.2109 -#2353 := [unit-resolution #1281 #2352]: #291
5.2110 -#2354 := [unit-resolution #1516 #2353]: up_55
5.2111 -#2355 := [unit-resolution #1373 #2354]: #325
5.2112 -#2356 := [unit-resolution #1524 #2355]: up_60
5.2113 -#2357 := [unit-resolution #1453 #2356]: #317
5.2114 -#2358 := [unit-resolution #2149 #2357]: #226
5.2115 -#2359 := [unit-resolution #1448 #2356]: #341
5.2116 -#2217 := (or #308 up_59)
5.2117 -#2218 := [unit-resolution #1939 #2147]: #2217
5.2118 -#2360 := [unit-resolution #2218 #2359]: #308
5.2119 -#2361 := [unit-resolution #1381 #2354]: #316
5.2120 -#2362 := [unit-resolution #759 #2357 #2361 #2360]: up_43
5.2121 -#2363 := [unit-resolution #1235 #2362]: #267
5.2122 -#2364 := [unit-resolution #2199 #2363 #2359]: #186
5.2123 -#1145 := (or #209 #250)
5.2124 -#252 := (or #250 #209)
5.2125 -#1147 := (iff #252 #1145)
5.2126 -#1148 := [rewrite]: #1147
5.2127 -#1144 := [asserted]: #252
5.2128 -#1151 := [mp #1144 #1148]: #1145
5.2129 -#2365 := [unit-resolution #1151 #2352]: #209
5.2130 -#2230 := (or #234 up_54 up_24)
5.2131 -#2231 := [unit-resolution #2025 #2147]: #2230
5.2132 -#2366 := [unit-resolution #2231 #2357 #2365]: #234
5.2133 -#2367 := [unit-resolution #1240 #2362]: #235
5.2134 -#2368 := [unit-resolution #579 #2367 #2366 #2358]: up_21
5.2135 -#2369 := [unit-resolution #2336 #2368 #2364]: up_9
5.2136 -#870 := (or #155 #160)
5.2137 -#163 := (or #160 #155)
5.2138 -#871 := (iff #163 #870)
5.2139 -#872 := [rewrite]: #871
5.2140 -#868 := [asserted]: #163
5.2141 -#875 := [mp #868 #872]: #870
5.2142 -#2370 := [unit-resolution #875 #2369]: #155
5.2143 -#2371 := [unit-resolution #891 #2369]: #166
5.2144 -[unit-resolution #2159 #2371 #2370 #2358 #2357]: false
5.2145 -unsat
5.2146 -d8841d120b7cf772be783d793f759fb6353b9fcd 78 0
5.2147 -#2 := false
5.2148 -decl up_1 :: (-> int bool)
5.2149 -decl ?x1!0 :: int
5.2150 -#54 := ?x1!0
5.2151 -#55 := (up_1 ?x1!0)
5.2152 -#58 := (not #55)
5.2153 -decl ?x2!1 :: int
5.2154 -#66 := ?x2!1
5.2155 -#67 := (up_1 ?x2!1)
5.2156 -#85 := (or #55 #67)
5.2157 -#88 := (not #85)
5.2158 -#91 := (and #55 #88)
5.2159 -#68 := (or #67 #55)
5.2160 -#69 := (not #68)
5.2161 -#63 := (not #58)
5.2162 -#75 := (and #63 #69)
5.2163 -#92 := (iff #75 #91)
5.2164 -#89 := (iff #69 #88)
5.2165 -#86 := (iff #68 #85)
5.2166 -#87 := [rewrite]: #86
5.2167 -#90 := [monotonicity #87]: #89
5.2168 -#83 := (iff #63 #55)
5.2169 -#84 := [rewrite]: #83
5.2170 -#93 := [monotonicity #84 #90]: #92
5.2171 -#6 := (:var 1 int)
5.2172 -#7 := (up_1 #6)
5.2173 -#4 := (:var 0 int)
5.2174 -#5 := (up_1 #4)
5.2175 -#29 := (or #5 #7)
5.2176 -#32 := (forall (vars (?x2 int)) #29)
5.2177 -#38 := (not #5)
5.2178 -#39 := (or #38 #32)
5.2179 -#44 := (forall (vars (?x1 int)) #39)
5.2180 -#47 := (not #44)
5.2181 -#78 := (~ #47 #75)
5.2182 -#56 := (or #5 #55)
5.2183 -#57 := (forall (vars (?x2 int)) #56)
5.2184 -#59 := (or #58 #57)
5.2185 -#60 := (not #59)
5.2186 -#76 := (~ #60 #75)
5.2187 -#70 := (not #57)
5.2188 -#71 := (~ #70 #69)
5.2189 -#72 := [sk]: #71
5.2190 -#64 := (~ #63 #63)
5.2191 -#65 := [refl]: #64
5.2192 -#77 := [nnf-neg #65 #72]: #76
5.2193 -#61 := (~ #47 #60)
5.2194 -#62 := [sk]: #61
5.2195 -#79 := [trans #62 #77]: #78
5.2196 -#8 := (or #7 #5)
5.2197 -#9 := (forall (vars (?x2 int)) #8)
5.2198 -#10 := (implies #5 #9)
5.2199 -#11 := (forall (vars (?x1 int)) #10)
5.2200 -#12 := (not #11)
5.2201 -#48 := (iff #12 #47)
5.2202 -#45 := (iff #11 #44)
5.2203 -#42 := (iff #10 #39)
5.2204 -#35 := (implies #5 #32)
5.2205 -#40 := (iff #35 #39)
5.2206 -#41 := [rewrite]: #40
5.2207 -#36 := (iff #10 #35)
5.2208 -#33 := (iff #9 #32)
5.2209 -#30 := (iff #8 #29)
5.2210 -#31 := [rewrite]: #30
5.2211 -#34 := [quant-intro #31]: #33
5.2212 -#37 := [monotonicity #34]: #36
5.2213 -#43 := [trans #37 #41]: #42
5.2214 -#46 := [quant-intro #43]: #45
5.2215 -#49 := [monotonicity #46]: #48
5.2216 -#28 := [asserted]: #12
5.2217 -#52 := [mp #28 #49]: #47
5.2218 -#80 := [mp~ #52 #79]: #75
5.2219 -#81 := [mp #80 #93]: #91
5.2220 -#94 := [and-elim #81]: #88
5.2221 -#95 := [not-or-elim #94]: #58
5.2222 -#82 := [and-elim #81]: #55
5.2223 -[unit-resolution #82 #95]: false
5.2224 -unsat
5.2225 -bc722e6a73140d95a8643a8d8a522de8bf529dea 135 0
5.2226 -#2 := false
5.2227 -decl up_1 :: (-> T1 T2 bool)
5.2228 -#5 := (:var 0 T2)
5.2229 -decl uf_3 :: T1
5.2230 -#11 := uf_3
5.2231 -#12 := (up_1 uf_3 #5)
5.2232 -#560 := (pattern #12)
5.2233 -#57 := (not #12)
5.2234 -#561 := (forall (vars (?x3 T2)) (:pat #560) #57)
5.2235 -decl uf_4 :: T2
5.2236 -#14 := uf_4
5.2237 -#15 := (up_1 uf_3 uf_4)
5.2238 -decl uf_2 :: T1
5.2239 -#7 := uf_2
5.2240 -#136 := (= uf_2 uf_3)
5.2241 -#543 := (iff #15 #136)
5.2242 -#4 := (:var 1 T1)
5.2243 -#6 := (up_1 #4 #5)
5.2244 -#553 := (pattern #6)
5.2245 -#8 := (= #4 uf_2)
5.2246 -#9 := (iff #6 #8)
5.2247 -#554 := (forall (vars (?x1 T1) (?x2 T2)) (:pat #553) #9)
5.2248 -#10 := (forall (vars (?x1 T1) (?x2 T2)) #9)
5.2249 -#557 := (iff #10 #554)
5.2250 -#555 := (iff #9 #9)
5.2251 -#556 := [refl]: #555
5.2252 -#558 := [quant-intro #556]: #557
5.2253 -#47 := (~ #10 #10)
5.2254 -#45 := (~ #9 #9)
5.2255 -#46 := [refl]: #45
5.2256 -#48 := [nnf-pos #46]: #47
5.2257 -#33 := [asserted]: #10
5.2258 -#49 := [mp~ #33 #48]: #10
5.2259 -#559 := [mp #49 #558]: #554
5.2260 -#227 := (not #554)
5.2261 -#185 := (or #227 #543)
5.2262 -#135 := (= uf_3 uf_2)
5.2263 -#205 := (iff #15 #135)
5.2264 -#528 := (or #227 #205)
5.2265 -#190 := (iff #528 #185)
5.2266 -#192 := (iff #185 #185)
5.2267 -#530 := [rewrite]: #192
5.2268 -#201 := (iff #205 #543)
5.2269 -#223 := (iff #135 #136)
5.2270 -#137 := [rewrite]: #223
5.2271 -#544 := [monotonicity #137]: #201
5.2272 -#191 := [monotonicity #544]: #190
5.2273 -#531 := [trans #191 #530]: #190
5.2274 -#189 := [quant-inst]: #528
5.2275 -#532 := [mp #189 #531]: #185
5.2276 -#539 := [unit-resolution #532 #559]: #543
5.2277 -decl ?x3!0 :: T2
5.2278 -#50 := ?x3!0
5.2279 -#51 := (up_1 uf_3 ?x3!0)
5.2280 -#224 := (iff #51 #136)
5.2281 -#155 := (or #227 #224)
5.2282 -#222 := (iff #51 #135)
5.2283 -#228 := (or #227 #222)
5.2284 -#229 := (iff #228 #155)
5.2285 -#545 := (iff #155 #155)
5.2286 -#547 := [rewrite]: #545
5.2287 -#215 := (iff #222 #224)
5.2288 -#226 := [monotonicity #137]: #215
5.2289 -#208 := [monotonicity #226]: #229
5.2290 -#202 := [trans #208 #547]: #229
5.2291 -#225 := [quant-inst]: #228
5.2292 -#334 := [mp #225 #202]: #155
5.2293 -#537 := [unit-resolution #334 #559]: #224
5.2294 -#541 := (not #224)
5.2295 -#527 := (or #541 #136)
5.2296 -#63 := (not #15)
5.2297 -#540 := [hypothesis]: #63
5.2298 -#68 := (or #15 #51)
5.2299 -#60 := (forall (vars (?x3 T2)) #57)
5.2300 -#69 := (or #63 #60)
5.2301 -#76 := (and #68 #69)
5.2302 -#70 := (and #69 #68)
5.2303 -#77 := (iff #70 #76)
5.2304 -#78 := [rewrite]: #77
5.2305 -#13 := (exists (vars (?x3 T2)) #12)
5.2306 -#35 := (not #13)
5.2307 -#36 := (iff #15 #35)
5.2308 -#71 := (~ #36 #70)
5.2309 -#61 := (~ #35 #60)
5.2310 -#58 := (~ #57 #57)
5.2311 -#59 := [refl]: #58
5.2312 -#62 := [nnf-neg #59]: #61
5.2313 -#54 := (not #35)
5.2314 -#55 := (~ #54 #51)
5.2315 -#42 := (~ #13 #51)
5.2316 -#39 := [sk]: #42
5.2317 -#56 := [nnf-neg #39]: #55
5.2318 -#66 := (~ #15 #15)
5.2319 -#67 := [refl]: #66
5.2320 -#64 := (~ #63 #63)
5.2321 -#65 := [refl]: #64
5.2322 -#72 := [nnf-pos #65 #67 #56 #62]: #71
5.2323 -#16 := (iff #13 #15)
5.2324 -#17 := (not #16)
5.2325 -#37 := (iff #17 #36)
5.2326 -#38 := [rewrite]: #37
5.2327 -#34 := [asserted]: #17
5.2328 -#41 := [mp #34 #38]: #36
5.2329 -#73 := [mp~ #41 #72]: #70
5.2330 -#74 := [mp #73 #78]: #76
5.2331 -#75 := [and-elim #74]: #68
5.2332 -#526 := [unit-resolution #75 #540]: #51
5.2333 -#549 := (not #51)
5.2334 -#550 := (or #541 #549 #136)
5.2335 -#551 := [def-axiom]: #550
5.2336 -#233 := [unit-resolution #551 #526]: #527
5.2337 -#249 := [unit-resolution #233 #537]: #136
5.2338 -#213 := (not #136)
5.2339 -#533 := (not #543)
5.2340 -#250 := (or #533 #213)
5.2341 -#534 := (or #533 #15 #213)
5.2342 -#529 := [def-axiom]: #534
5.2343 -#251 := [unit-resolution #529 #540]: #250
5.2344 -#237 := [unit-resolution #251 #249 #539]: false
5.2345 -#252 := [lemma #237]: #15
5.2346 -#566 := (or #63 #561)
5.2347 -#567 := (iff #69 #566)
5.2348 -#564 := (iff #60 #561)
5.2349 -#562 := (iff #57 #57)
5.2350 -#563 := [refl]: #562
5.2351 -#565 := [quant-intro #563]: #564
5.2352 -#568 := [monotonicity #565]: #567
5.2353 -#79 := [and-elim #74]: #69
5.2354 -#569 := [mp #79 #568]: #566
5.2355 -#535 := [unit-resolution #569 #252]: #561
5.2356 -#536 := (not #561)
5.2357 -#538 := (or #536 #63)
5.2358 -#176 := [quant-inst]: #538
5.2359 -[unit-resolution #176 #252 #535]: false
5.2360 -unsat
5.2361 -3ad10572aa4268ecfd73368c6cc15680136648a3 136 0
5.2362 -WARNING: failed to find a pattern for quantifier (quantifier id: k!12)
5.2363 -#2 := false
5.2364 -decl up_1 :: (-> T1 T2 bool)
5.2365 -#5 := (:var 0 T2)
5.2366 -decl uf_4 :: T1
5.2367 -#18 := uf_4
5.2368 -#19 := (up_1 uf_4 #5)
5.2369 -#635 := (pattern #19)
5.2370 -#116 := (not #19)
5.2371 -#636 := (forall (vars (?x6 T2)) (:pat #635) #116)
5.2372 -decl uf_3 :: T2
5.2373 -#14 := uf_3
5.2374 -#21 := (up_1 uf_4 uf_3)
5.2375 -decl uf_2 :: T1
5.2376 -#7 := uf_2
5.2377 -#195 := (= uf_2 uf_4)
5.2378 -#602 := (iff #21 #195)
5.2379 -#4 := (:var 1 T1)
5.2380 -#6 := (up_1 #4 #5)
5.2381 -#612 := (pattern #6)
5.2382 -#8 := (= #4 uf_2)
5.2383 -#9 := (iff #6 #8)
5.2384 -#613 := (forall (vars (?x1 T1) (?x2 T2)) (:pat #612) #9)
5.2385 -#10 := (forall (vars (?x1 T1) (?x2 T2)) #9)
5.2386 -#616 := (iff #10 #613)
5.2387 -#614 := (iff #9 #9)
5.2388 -#615 := [refl]: #614
5.2389 -#617 := [quant-intro #615]: #616
5.2390 -#56 := (~ #10 #10)
5.2391 -#54 := (~ #9 #9)
5.2392 -#55 := [refl]: #54
5.2393 -#57 := [nnf-pos #55]: #56
5.2394 -#39 := [asserted]: #10
5.2395 -#58 := [mp~ #39 #57]: #10
5.2396 -#618 := [mp #58 #617]: #613
5.2397 -#286 := (not #613)
5.2398 -#244 := (or #286 #602)
5.2399 -#194 := (= uf_4 uf_2)
5.2400 -#264 := (iff #21 #194)
5.2401 -#587 := (or #286 #264)
5.2402 -#249 := (iff #587 #244)
5.2403 -#251 := (iff #244 #244)
5.2404 -#589 := [rewrite]: #251
5.2405 -#260 := (iff #264 #602)
5.2406 -#282 := (iff #194 #195)
5.2407 -#196 := [rewrite]: #282
5.2408 -#603 := [monotonicity #196]: #260
5.2409 -#250 := [monotonicity #603]: #249
5.2410 -#590 := [trans #250 #589]: #249
5.2411 -#248 := [quant-inst]: #587
5.2412 -#591 := [mp #248 #590]: #244
5.2413 -#598 := [unit-resolution #591 #618]: #602
5.2414 -decl ?x6!3 :: T2
5.2415 -#63 := ?x6!3
5.2416 -#64 := (up_1 uf_4 ?x6!3)
5.2417 -#283 := (iff #64 #195)
5.2418 -#214 := (or #286 #283)
5.2419 -#281 := (iff #64 #194)
5.2420 -#287 := (or #286 #281)
5.2421 -#288 := (iff #287 #214)
5.2422 -#604 := (iff #214 #214)
5.2423 -#606 := [rewrite]: #604
5.2424 -#274 := (iff #281 #283)
5.2425 -#285 := [monotonicity #196]: #274
5.2426 -#267 := [monotonicity #285]: #288
5.2427 -#261 := [trans #267 #606]: #288
5.2428 -#284 := [quant-inst]: #287
5.2429 -#393 := [mp #284 #261]: #214
5.2430 -#596 := [unit-resolution #393 #618]: #283
5.2431 -#600 := (not #283)
5.2432 -#586 := (or #600 #195)
5.2433 -#122 := (not #21)
5.2434 -#599 := [hypothesis]: #122
5.2435 -#127 := (or #21 #64)
5.2436 -#119 := (forall (vars (?x6 T2)) #116)
5.2437 -#128 := (or #122 #119)
5.2438 -#135 := (and #127 #128)
5.2439 -#129 := (and #128 #127)
5.2440 -#136 := (iff #129 #135)
5.2441 -#137 := [rewrite]: #136
5.2442 -#20 := (exists (vars (?x6 T2)) #19)
5.2443 -#42 := (not #20)
5.2444 -#43 := (iff #21 #42)
5.2445 -#130 := (~ #43 #129)
5.2446 -#120 := (~ #42 #119)
5.2447 -#117 := (~ #116 #116)
5.2448 -#118 := [refl]: #117
5.2449 -#121 := [nnf-neg #118]: #120
5.2450 -#113 := (not #42)
5.2451 -#114 := (~ #113 #64)
5.2452 -#88 := (~ #20 #64)
5.2453 -#89 := [sk]: #88
5.2454 -#115 := [nnf-neg #89]: #114
5.2455 -#125 := (~ #21 #21)
5.2456 -#126 := [refl]: #125
5.2457 -#123 := (~ #122 #122)
5.2458 -#124 := [refl]: #123
5.2459 -#131 := [nnf-pos #124 #126 #115 #121]: #130
5.2460 -#22 := (iff #20 #21)
5.2461 -#23 := (not #22)
5.2462 -#44 := (iff #23 #43)
5.2463 -#45 := [rewrite]: #44
5.2464 -#41 := [asserted]: #23
5.2465 -#48 := [mp #41 #45]: #43
5.2466 -#132 := [mp~ #48 #131]: #129
5.2467 -#133 := [mp #132 #137]: #135
5.2468 -#134 := [and-elim #133]: #127
5.2469 -#585 := [unit-resolution #134 #599]: #64
5.2470 -#608 := (not #64)
5.2471 -#609 := (or #600 #608 #195)
5.2472 -#610 := [def-axiom]: #609
5.2473 -#292 := [unit-resolution #610 #585]: #586
5.2474 -#308 := [unit-resolution #292 #596]: #195
5.2475 -#272 := (not #195)
5.2476 -#592 := (not #602)
5.2477 -#309 := (or #592 #272)
5.2478 -#593 := (or #592 #21 #272)
5.2479 -#588 := [def-axiom]: #593
5.2480 -#310 := [unit-resolution #588 #599]: #309
5.2481 -#296 := [unit-resolution #310 #308 #598]: false
5.2482 -#311 := [lemma #296]: #21
5.2483 -#641 := (or #122 #636)
5.2484 -#642 := (iff #128 #641)
5.2485 -#639 := (iff #119 #636)
5.2486 -#637 := (iff #116 #116)
5.2487 -#638 := [refl]: #637
5.2488 -#640 := [quant-intro #638]: #639
5.2489 -#643 := [monotonicity #640]: #642
5.2490 -#138 := [and-elim #133]: #128
5.2491 -#644 := [mp #138 #643]: #641
5.2492 -#594 := [unit-resolution #644 #311]: #636
5.2493 -#595 := (not #636)
5.2494 -#597 := (or #595 #122)
5.2495 -#235 := [quant-inst]: #597
5.2496 -[unit-resolution #235 #311 #594]: false
5.2497 -unsat
5.2498 -0e958e27514643bb596851e6dbb61a23f6b348b0 56 0
5.2499 -#2 := false
5.2500 -decl up_1 :: (-> T1 bool)
5.2501 -decl uf_2 :: T1
5.2502 -#4 := uf_2
5.2503 -#5 := (up_1 uf_2)
5.2504 -decl uf_3 :: T1
5.2505 -#13 := uf_3
5.2506 -#14 := (up_1 uf_3)
5.2507 -#34 := (not #5)
5.2508 -#35 := (or #34 #14)
5.2509 -#38 := (not #35)
5.2510 -#15 := (implies #5 #14)
5.2511 -#16 := (not #15)
5.2512 -#39 := (iff #16 #38)
5.2513 -#36 := (iff #15 #35)
5.2514 -#37 := [rewrite]: #36
5.2515 -#40 := [monotonicity #37]: #39
5.2516 -#33 := [asserted]: #16
5.2517 -#43 := [mp #33 #40]: #38
5.2518 -#41 := [not-or-elim #43]: #5
5.2519 -#6 := (:var 0 T1)
5.2520 -#7 := (up_1 #6)
5.2521 -#536 := (pattern #7)
5.2522 -#10 := (not #7)
5.2523 -#537 := (forall (vars (?x2 T1)) (:pat #536) #10)
5.2524 -#11 := (forall (vars (?x2 T1)) #10)
5.2525 -#540 := (iff #11 #537)
5.2526 -#538 := (iff #10 #10)
5.2527 -#539 := [refl]: #538
5.2528 -#541 := [quant-intro #539]: #540
5.2529 -#8 := (exists (vars (?x1 T1)) #7)
5.2530 -#9 := (not #8)
5.2531 -#45 := (~ #9 #11)
5.2532 -#50 := (~ #10 #10)
5.2533 -#51 := [refl]: #50
5.2534 -#59 := [nnf-neg #51]: #45
5.2535 -#12 := (ite #5 #9 #11)
5.2536 -#57 := (iff #12 #9)
5.2537 -#1 := true
5.2538 -#52 := (ite true #9 #11)
5.2539 -#55 := (iff #52 #9)
5.2540 -#56 := [rewrite]: #55
5.2541 -#53 := (iff #12 #52)
5.2542 -#48 := (iff #5 true)
5.2543 -#49 := [iff-true #41]: #48
5.2544 -#54 := [monotonicity #49]: #53
5.2545 -#58 := [trans #54 #56]: #57
5.2546 -#32 := [asserted]: #12
5.2547 -#47 := [mp #32 #58]: #9
5.2548 -#60 := [mp~ #47 #59]: #11
5.2549 -#542 := [mp #60 #541]: #537
5.2550 -#119 := (not #537)
5.2551 -#206 := (or #119 #34)
5.2552 -#120 := [quant-inst]: #206
5.2553 -[unit-resolution #120 #542 #41]: false
5.2554 -unsat
5.2555 -6ecefa4023d224e6c51226d5bee17e2a19cc4333 17 0
5.2556 -#2 := false
5.2557 -#4 := 3::int
5.2558 -#5 := (= 3::int 3::int)
5.2559 -#6 := (not #5)
5.2560 -#30 := (iff #6 false)
5.2561 -#1 := true
5.2562 -#25 := (not true)
5.2563 -#28 := (iff #25 false)
5.2564 -#29 := [rewrite]: #28
5.2565 -#26 := (iff #6 #25)
5.2566 -#23 := (iff #5 true)
5.2567 -#24 := [rewrite]: #23
5.2568 -#27 := [monotonicity #24]: #26
5.2569 -#31 := [trans #27 #29]: #30
5.2570 -#22 := [asserted]: #6
5.2571 -[mp #22 #31]: false
5.2572 -unsat
5.2573 -5e0256133fc82f0e2fea6597b863483e4e61d3c6 17 0
5.2574 -#2 := false
5.2575 -#4 := 3::real
5.2576 -#5 := (= 3::real 3::real)
5.2577 -#6 := (not #5)
5.2578 -#30 := (iff #6 false)
5.2579 -#1 := true
5.2580 -#25 := (not true)
5.2581 -#28 := (iff #25 false)
5.2582 -#29 := [rewrite]: #28
5.2583 -#26 := (iff #6 #25)
5.2584 -#23 := (iff #5 true)
5.2585 -#24 := [rewrite]: #23
5.2586 -#27 := [monotonicity #24]: #26
5.2587 -#31 := [trans #27 #29]: #30
5.2588 -#22 := [asserted]: #6
5.2589 -[mp #22 #31]: false
5.2590 -unsat
5.2591 -55cf32b061b843ac5bcaefb74005a7dd3a24386f 26 0
5.2592 -#2 := false
5.2593 -#7 := 4::int
5.2594 -#5 := 1::int
5.2595 -#4 := 3::int
5.2596 -#6 := (+ 3::int 1::int)
5.2597 -#8 := (= #6 4::int)
5.2598 -#9 := (not #8)
5.2599 -#39 := (iff #9 false)
5.2600 -#1 := true
5.2601 -#34 := (not true)
5.2602 -#37 := (iff #34 false)
5.2603 -#38 := [rewrite]: #37
5.2604 -#35 := (iff #9 #34)
5.2605 -#32 := (iff #8 true)
5.2606 -#27 := (= 4::int 4::int)
5.2607 -#30 := (iff #27 true)
5.2608 -#31 := [rewrite]: #30
5.2609 -#28 := (iff #8 #27)
5.2610 -#26 := [rewrite]: #8
5.2611 -#29 := [monotonicity #26]: #28
5.2612 -#33 := [trans #29 #31]: #32
5.2613 -#36 := [monotonicity #33]: #35
5.2614 -#40 := [trans #36 #38]: #39
5.2615 -#25 := [asserted]: #9
5.2616 -[mp #25 #40]: false
5.2617 -unsat
5.2618 -e81d17ec85af9db5ec6ba5bf4ced62daaa719ef3 41 0
5.2619 -#2 := false
5.2620 -decl uf_1 :: int
5.2621 -#4 := uf_1
5.2622 -decl uf_3 :: int
5.2623 -#6 := uf_3
5.2624 -#9 := (+ uf_3 uf_1)
5.2625 -decl uf_2 :: int
5.2626 -#5 := uf_2
5.2627 -#10 := (+ uf_2 #9)
5.2628 -#7 := (+ uf_2 uf_3)
5.2629 -#8 := (+ uf_1 #7)
5.2630 -#11 := (= #8 #10)
5.2631 -#12 := (not #11)
5.2632 -#51 := (iff #12 false)
5.2633 -#1 := true
5.2634 -#46 := (not true)
5.2635 -#49 := (iff #46 false)
5.2636 -#50 := [rewrite]: #49
5.2637 -#47 := (iff #12 #46)
5.2638 -#44 := (iff #11 true)
5.2639 -#39 := (= #8 #8)
5.2640 -#42 := (iff #39 true)
5.2641 -#43 := [rewrite]: #42
5.2642 -#40 := (iff #11 #39)
5.2643 -#37 := (= #10 #8)
5.2644 -#29 := (+ uf_1 uf_3)
5.2645 -#32 := (+ uf_2 #29)
5.2646 -#35 := (= #32 #8)
5.2647 -#36 := [rewrite]: #35
5.2648 -#33 := (= #10 #32)
5.2649 -#30 := (= #9 #29)
5.2650 -#31 := [rewrite]: #30
5.2651 -#34 := [monotonicity #31]: #33
5.2652 -#38 := [trans #34 #36]: #37
5.2653 -#41 := [monotonicity #38]: #40
5.2654 -#45 := [trans #41 #43]: #44
5.2655 -#48 := [monotonicity #45]: #47
5.2656 -#52 := [trans #48 #50]: #51
5.2657 -#28 := [asserted]: #12
5.2658 -[mp #28 #52]: false
5.2659 -unsat
5.2660 -448f188ebf9d7fbd2920c0a51a8f105192e6af1a 35 0
5.2661 -#2 := false
5.2662 -#5 := 3::int
5.2663 -#6 := 8::int
5.2664 -#7 := (<= 3::int 8::int)
5.2665 -#8 := (ite #7 8::int 3::int)
5.2666 -#4 := 5::int
5.2667 -#9 := (< 5::int #8)
5.2668 -#10 := (not #9)
5.2669 -#50 := (iff #10 false)
5.2670 -#1 := true
5.2671 -#45 := (not true)
5.2672 -#48 := (iff #45 false)
5.2673 -#49 := [rewrite]: #48
5.2674 -#46 := (iff #10 #45)
5.2675 -#43 := (iff #9 true)
5.2676 -#38 := (< 5::int 8::int)
5.2677 -#41 := (iff #38 true)
5.2678 -#42 := [rewrite]: #41
5.2679 -#39 := (iff #9 #38)
5.2680 -#36 := (= #8 8::int)
5.2681 -#31 := (ite true 8::int 3::int)
5.2682 -#34 := (= #31 8::int)
5.2683 -#35 := [rewrite]: #34
5.2684 -#32 := (= #8 #31)
5.2685 -#29 := (iff #7 true)
5.2686 -#30 := [rewrite]: #29
5.2687 -#33 := [monotonicity #30]: #32
5.2688 -#37 := [trans #33 #35]: #36
5.2689 -#40 := [monotonicity #37]: #39
5.2690 -#44 := [trans #40 #42]: #43
5.2691 -#47 := [monotonicity #44]: #46
5.2692 -#51 := [trans #47 #49]: #50
5.2693 -#26 := [asserted]: #10
5.2694 -[mp #26 #51]: false
5.2695 -unsat
5.2696 -c3751ecae7701923f4ba6a90c6c6eee35ee1b13d 250 0
5.2697 -#2 := false
5.2698 -#7 := 0::real
5.2699 -decl uf_2 :: real
5.2700 -#5 := uf_2
5.2701 -#143 := 2::real
5.2702 -#144 := (* 2::real uf_2)
5.2703 -#165 := (<= #144 0::real)
5.2704 -#188 := (not #165)
5.2705 -#88 := (>= uf_2 0::real)
5.2706 -#166 := (or #88 #165)
5.2707 -#191 := (not #166)
5.2708 -decl uf_1 :: real
5.2709 -#4 := uf_1
5.2710 -#76 := (>= uf_1 0::real)
5.2711 -#89 := (not #88)
5.2712 -#146 := (* 2::real uf_1)
5.2713 -#167 := (<= #146 0::real)
5.2714 -#199 := (not #167)
5.2715 -#263 := [hypothesis]: #88
5.2716 -#147 := (+ #146 #144)
5.2717 -#168 := (<= #147 0::real)
5.2718 -#169 := (ite #88 #167 #168)
5.2719 -#194 := (not #169)
5.2720 -#186 := (or #166 #89)
5.2721 -#187 := [def-axiom]: #186
5.2722 -#271 := [unit-resolution #187 #263]: #166
5.2723 -#170 := (ite #76 #166 #169)
5.2724 -#205 := (not #170)
5.2725 -#6 := (+ uf_1 uf_2)
5.2726 -#64 := (>= #6 0::real)
5.2727 -#269 := (or #64 #89)
5.2728 -#65 := (not #64)
5.2729 -#262 := [hypothesis]: #65
5.2730 -#174 := (>= #144 0::real)
5.2731 -#175 := (or #89 #174)
5.2732 -#230 := (not #175)
5.2733 -#257 := [hypothesis]: #230
5.2734 -#225 := (or #175 #88)
5.2735 -#226 := [def-axiom]: #225
5.2736 -#258 := [unit-resolution #226 #257]: #88
5.2737 -#227 := (not #174)
5.2738 -#228 := (or #175 #227)
5.2739 -#229 := [def-axiom]: #228
5.2740 -#259 := [unit-resolution #229 #257]: #227
5.2741 -#260 := [th-lemma #259 #258]: false
5.2742 -#261 := [lemma #260]: #175
5.2743 -#172 := (>= #146 0::real)
5.2744 -#171 := (>= #147 0::real)
5.2745 -#173 := (ite #88 #171 #172)
5.2746 -#176 := (ite #76 #173 #175)
5.2747 -#233 := (not #176)
5.2748 -#264 := (or #64 #233)
5.2749 -#177 := (ite #64 #170 #176)
5.2750 -#182 := (not #177)
5.2751 -#36 := -1::real
5.2752 -#38 := (* -1::real uf_2)
5.2753 -#95 := (ite #88 uf_2 #38)
5.2754 -#107 := (* -1::real #95)
5.2755 -#37 := (* -1::real uf_1)
5.2756 -#83 := (ite #76 uf_1 #37)
5.2757 -#106 := (* -1::real #83)
5.2758 -#108 := (+ #106 #107)
5.2759 -#39 := (+ #37 #38)
5.2760 -#71 := (ite #64 #6 #39)
5.2761 -#109 := (+ #71 #108)
5.2762 -#110 := (<= #109 0::real)
5.2763 -#115 := (not #110)
5.2764 -#183 := (iff #115 #182)
5.2765 -#180 := (iff #110 #177)
5.2766 -#150 := -2::real
5.2767 -#152 := (* -2::real uf_2)
5.2768 -#155 := (ite #88 #152 0::real)
5.2769 -#151 := (* -2::real uf_1)
5.2770 -#153 := (+ #151 #152)
5.2771 -#154 := (ite #88 #153 #151)
5.2772 -#156 := (ite #76 #154 #155)
5.2773 -#148 := (ite #88 #146 #147)
5.2774 -#145 := (ite #88 0::real #144)
5.2775 -#149 := (ite #76 #145 #148)
5.2776 -#157 := (ite #64 #149 #156)
5.2777 -#162 := (<= #157 0::real)
5.2778 -#178 := (iff #162 #177)
5.2779 -#179 := [rewrite]: #178
5.2780 -#163 := (iff #110 #162)
5.2781 -#160 := (= #109 #157)
5.2782 -#133 := (+ uf_1 #38)
5.2783 -#134 := (ite #88 #133 #6)
5.2784 -#131 := (+ #37 uf_2)
5.2785 -#132 := (ite #88 #39 #131)
5.2786 -#135 := (ite #76 #132 #134)
5.2787 -#140 := (+ #71 #135)
5.2788 -#158 := (= #140 #157)
5.2789 -#159 := [rewrite]: #158
5.2790 -#141 := (= #109 #140)
5.2791 -#138 := (= #108 #135)
5.2792 -#125 := (ite #88 #38 uf_2)
5.2793 -#123 := (ite #76 #37 uf_1)
5.2794 -#128 := (+ #123 #125)
5.2795 -#136 := (= #128 #135)
5.2796 -#137 := [rewrite]: #136
5.2797 -#129 := (= #108 #128)
5.2798 -#126 := (= #107 #125)
5.2799 -#127 := [rewrite]: #126
5.2800 -#121 := (= #106 #123)
5.2801 -#124 := [rewrite]: #121
5.2802 -#130 := [monotonicity #124 #127]: #129
5.2803 -#139 := [trans #130 #137]: #138
5.2804 -#142 := [monotonicity #139]: #141
5.2805 -#161 := [trans #142 #159]: #160
5.2806 -#164 := [monotonicity #161]: #163
5.2807 -#181 := [trans #164 #179]: #180
5.2808 -#184 := [monotonicity #181]: #183
5.2809 -#15 := (- uf_2)
5.2810 -#14 := (< uf_2 0::real)
5.2811 -#16 := (ite #14 #15 uf_2)
5.2812 -#12 := (- uf_1)
5.2813 -#11 := (< uf_1 0::real)
5.2814 -#13 := (ite #11 #12 uf_1)
5.2815 -#17 := (+ #13 #16)
5.2816 -#9 := (- #6)
5.2817 -#8 := (< #6 0::real)
5.2818 -#10 := (ite #8 #9 #6)
5.2819 -#18 := (<= #10 #17)
5.2820 -#19 := (not #18)
5.2821 -#118 := (iff #19 #115)
5.2822 -#52 := (ite #14 #38 uf_2)
5.2823 -#47 := (ite #11 #37 uf_1)
5.2824 -#55 := (+ #47 #52)
5.2825 -#42 := (ite #8 #39 #6)
5.2826 -#58 := (<= #42 #55)
5.2827 -#61 := (not #58)
5.2828 -#116 := (iff #61 #115)
5.2829 -#113 := (iff #58 #110)
5.2830 -#100 := (+ #83 #95)
5.2831 -#103 := (<= #71 #100)
5.2832 -#111 := (iff #103 #110)
5.2833 -#112 := [rewrite]: #111
5.2834 -#104 := (iff #58 #103)
5.2835 -#101 := (= #55 #100)
5.2836 -#98 := (= #52 #95)
5.2837 -#92 := (ite #89 #38 uf_2)
5.2838 -#96 := (= #92 #95)
5.2839 -#97 := [rewrite]: #96
5.2840 -#93 := (= #52 #92)
5.2841 -#90 := (iff #14 #89)
5.2842 -#91 := [rewrite]: #90
5.2843 -#94 := [monotonicity #91]: #93
5.2844 -#99 := [trans #94 #97]: #98
5.2845 -#86 := (= #47 #83)
5.2846 -#77 := (not #76)
5.2847 -#80 := (ite #77 #37 uf_1)
5.2848 -#84 := (= #80 #83)
5.2849 -#85 := [rewrite]: #84
5.2850 -#81 := (= #47 #80)
5.2851 -#78 := (iff #11 #77)
5.2852 -#79 := [rewrite]: #78
5.2853 -#82 := [monotonicity #79]: #81
5.2854 -#87 := [trans #82 #85]: #86
5.2855 -#102 := [monotonicity #87 #99]: #101
5.2856 -#74 := (= #42 #71)
5.2857 -#68 := (ite #65 #39 #6)
5.2858 -#72 := (= #68 #71)
5.2859 -#73 := [rewrite]: #72
5.2860 -#69 := (= #42 #68)
5.2861 -#66 := (iff #8 #65)
5.2862 -#67 := [rewrite]: #66
5.2863 -#70 := [monotonicity #67]: #69
5.2864 -#75 := [trans #70 #73]: #74
5.2865 -#105 := [monotonicity #75 #102]: #104
5.2866 -#114 := [trans #105 #112]: #113
5.2867 -#117 := [monotonicity #114]: #116
5.2868 -#62 := (iff #19 #61)
5.2869 -#59 := (iff #18 #58)
5.2870 -#56 := (= #17 #55)
5.2871 -#53 := (= #16 #52)
5.2872 -#50 := (= #15 #38)
5.2873 -#51 := [rewrite]: #50
5.2874 -#54 := [monotonicity #51]: #53
5.2875 -#48 := (= #13 #47)
5.2876 -#45 := (= #12 #37)
5.2877 -#46 := [rewrite]: #45
5.2878 -#49 := [monotonicity #46]: #48
5.2879 -#57 := [monotonicity #49 #54]: #56
5.2880 -#43 := (= #10 #42)
5.2881 -#40 := (= #9 #39)
5.2882 -#41 := [rewrite]: #40
5.2883 -#44 := [monotonicity #41]: #43
5.2884 -#60 := [monotonicity #44 #57]: #59
5.2885 -#63 := [monotonicity #60]: #62
5.2886 -#119 := [trans #63 #117]: #118
5.2887 -#35 := [asserted]: #19
5.2888 -#120 := [mp #35 #119]: #115
5.2889 -#185 := [mp #120 #184]: #182
5.2890 -#248 := (or #177 #64 #233)
5.2891 -#249 := [def-axiom]: #248
5.2892 -#265 := [unit-resolution #249 #185]: #264
5.2893 -#266 := [unit-resolution #265 #262]: #233
5.2894 -#240 := (or #176 #76 #230)
5.2895 -#241 := [def-axiom]: #240
5.2896 -#267 := [unit-resolution #241 #266 #261]: #76
5.2897 -#268 := [th-lemma #267 #263 #262]: false
5.2898 -#270 := [lemma #268]: #269
5.2899 -#272 := [unit-resolution #270 #263]: #64
5.2900 -#273 := (or #65 #205)
5.2901 -#246 := (or #177 #65 #205)
5.2902 -#247 := [def-axiom]: #246
5.2903 -#274 := [unit-resolution #247 #185]: #273
5.2904 -#275 := [unit-resolution #274 #272]: #205
5.2905 -#255 := (or #170 #194 #191)
5.2906 -#250 := [hypothesis]: #169
5.2907 -#251 := [hypothesis]: #205
5.2908 -#252 := [hypothesis]: #166
5.2909 -#210 := (or #170 #77 #191)
5.2910 -#211 := [def-axiom]: #210
5.2911 -#253 := [unit-resolution #211 #251 #252]: #77
5.2912 -#212 := (or #170 #76 #194)
5.2913 -#213 := [def-axiom]: #212
5.2914 -#254 := [unit-resolution #213 #253 #251 #250]: false
5.2915 -#256 := [lemma #254]: #255
5.2916 -#276 := [unit-resolution #256 #275 #271]: #194
5.2917 -#200 := (or #169 #89 #199)
5.2918 -#201 := [def-axiom]: #200
5.2919 -#277 := [unit-resolution #201 #276 #263]: #199
5.2920 -#278 := [unit-resolution #211 #275 #271]: #77
5.2921 -#279 := [th-lemma #278 #277]: false
5.2922 -#280 := [lemma #279]: #89
5.2923 -#281 := [hypothesis]: #77
5.2924 -#282 := [unit-resolution #241 #281 #261]: #176
5.2925 -#283 := [unit-resolution #265 #282]: #64
5.2926 -#284 := [th-lemma #281 #283 #280]: false
5.2927 -#285 := [lemma #284]: #76
5.2928 -#222 := (not #172)
5.2929 -#286 := [hypothesis]: #222
5.2930 -#287 := [th-lemma #285 #286]: false
5.2931 -#288 := [lemma #287]: #172
5.2932 -#223 := (or #173 #88 #222)
5.2933 -#224 := [def-axiom]: #223
5.2934 -#289 := [unit-resolution #224 #288 #280]: #173
5.2935 -#214 := (not #173)
5.2936 -#238 := (or #176 #77 #214)
5.2937 -#239 := [def-axiom]: #238
5.2938 -#290 := [unit-resolution #239 #289 #285]: #176
5.2939 -#291 := [unit-resolution #265 #290]: #64
5.2940 -#292 := [unit-resolution #274 #291]: #205
5.2941 -#293 := [unit-resolution #211 #292 #285]: #191
5.2942 -#189 := (or #166 #188)
5.2943 -#190 := [def-axiom]: #189
5.2944 -#294 := [unit-resolution #190 #293]: #188
5.2945 -[th-lemma #280 #294]: false
5.2946 -unsat
5.2947 -a67db8da0b1a1104d4370e2e261e8521096f24e1 124 0
5.2948 -#2 := false
5.2949 -decl uf_1 :: (-> T1 T2)
5.2950 -decl uf_3 :: T1
5.2951 -#8 := uf_3
5.2952 -#9 := (uf_1 uf_3)
5.2953 -decl uf_2 :: (-> int int T1)
5.2954 -#5 := 3::int
5.2955 -#4 := 2::int
5.2956 -#6 := (uf_2 2::int 3::int)
5.2957 -#7 := (uf_1 #6)
5.2958 -#10 := (= #7 #9)
5.2959 -#225 := (= #6 uf_3)
5.2960 -#13 := (:var 0 int)
5.2961 -#12 := (:var 1 int)
5.2962 -#14 := (uf_2 #12 #13)
5.2963 -#549 := (pattern #14)
5.2964 -#52 := 0::int
5.2965 -#50 := -1::int
5.2966 -#54 := (* -1::int #13)
5.2967 -#55 := (+ #12 #54)
5.2968 -#53 := (>= #55 0::int)
5.2969 -#51 := (not #53)
5.2970 -#36 := (= uf_3 #14)
5.2971 -#61 := (iff #36 #51)
5.2972 -#550 := (forall (vars (?x1 int) (?x2 int)) (:pat #549) #61)
5.2973 -#66 := (forall (vars (?x1 int) (?x2 int)) #61)
5.2974 -#553 := (iff #66 #550)
5.2975 -#551 := (iff #61 #61)
5.2976 -#552 := [refl]: #551
5.2977 -#554 := [quant-intro #552]: #553
5.2978 -#79 := (~ #66 #66)
5.2979 -#77 := (~ #61 #61)
5.2980 -#78 := [refl]: #77
5.2981 -#80 := [nnf-pos #78]: #79
5.2982 -#16 := (< #12 #13)
5.2983 -#15 := (= #14 uf_3)
5.2984 -#17 := (iff #15 #16)
5.2985 -#18 := (forall (vars (?x1 int) (?x2 int)) #17)
5.2986 -#69 := (iff #18 #66)
5.2987 -#42 := (iff #16 #36)
5.2988 -#47 := (forall (vars (?x1 int) (?x2 int)) #42)
5.2989 -#67 := (iff #47 #66)
5.2990 -#64 := (iff #42 #61)
5.2991 -#58 := (iff #51 #36)
5.2992 -#62 := (iff #58 #61)
5.2993 -#63 := [rewrite]: #62
5.2994 -#59 := (iff #42 #58)
5.2995 -#56 := (iff #16 #51)
5.2996 -#57 := [rewrite]: #56
5.2997 -#60 := [monotonicity #57]: #59
5.2998 -#65 := [trans #60 #63]: #64
5.2999 -#68 := [quant-intro #65]: #67
5.3000 -#48 := (iff #18 #47)
5.3001 -#45 := (iff #17 #42)
5.3002 -#39 := (iff #36 #16)
5.3003 -#43 := (iff #39 #42)
5.3004 -#44 := [rewrite]: #43
5.3005 -#40 := (iff #17 #39)
5.3006 -#37 := (iff #15 #36)
5.3007 -#38 := [rewrite]: #37
5.3008 -#41 := [monotonicity #38]: #40
5.3009 -#46 := [trans #41 #44]: #45
5.3010 -#49 := [quant-intro #46]: #48
5.3011 -#70 := [trans #49 #68]: #69
5.3012 -#35 := [asserted]: #18
5.3013 -#71 := [mp #35 #70]: #66
5.3014 -#74 := [mp~ #71 #80]: #66
5.3015 -#555 := [mp #74 #554]: #550
5.3016 -#529 := (not #550)
5.3017 -#530 := (or #529 #225)
5.3018 -#220 := (* -1::int 3::int)
5.3019 -#221 := (+ 2::int #220)
5.3020 -#222 := (>= #221 0::int)
5.3021 -#213 := (not #222)
5.3022 -#135 := (= uf_3 #6)
5.3023 -#224 := (iff #135 #213)
5.3024 -#525 := (or #529 #224)
5.3025 -#169 := (iff #525 #530)
5.3026 -#534 := (iff #530 #530)
5.3027 -#174 := [rewrite]: #534
5.3028 -#527 := (iff #224 #225)
5.3029 -#1 := true
5.3030 -#187 := (iff #225 true)
5.3031 -#190 := (iff #187 #225)
5.3032 -#526 := [rewrite]: #190
5.3033 -#188 := (iff #224 #187)
5.3034 -#183 := (iff #213 true)
5.3035 -#198 := (not false)
5.3036 -#199 := (iff #198 true)
5.3037 -#540 := [rewrite]: #199
5.3038 -#203 := (iff #213 #198)
5.3039 -#548 := (iff #222 false)
5.3040 -#544 := (>= -1::int 0::int)
5.3041 -#547 := (iff #544 false)
5.3042 -#542 := [rewrite]: #547
5.3043 -#545 := (iff #222 #544)
5.3044 -#211 := (= #221 -1::int)
5.3045 -#223 := -3::int
5.3046 -#541 := (+ 2::int -3::int)
5.3047 -#330 := (= #541 -1::int)
5.3048 -#537 := [rewrite]: #330
5.3049 -#543 := (= #221 #541)
5.3050 -#227 := (= #220 -3::int)
5.3051 -#206 := [rewrite]: #227
5.3052 -#200 := [monotonicity #206]: #543
5.3053 -#212 := [trans #200 #537]: #211
5.3054 -#546 := [monotonicity #212]: #545
5.3055 -#538 := [trans #546 #542]: #548
5.3056 -#539 := [monotonicity #538]: #203
5.3057 -#524 := [trans #539 #540]: #183
5.3058 -#153 := (iff #135 #225)
5.3059 -#226 := [rewrite]: #153
5.3060 -#189 := [monotonicity #226 #524]: #188
5.3061 -#528 := [trans #189 #526]: #527
5.3062 -#532 := [monotonicity #528]: #169
5.3063 -#175 := [trans #532 #174]: #169
5.3064 -#531 := [quant-inst]: #525
5.3065 -#535 := [mp #531 #175]: #530
5.3066 -#533 := [unit-resolution #535 #555]: #225
5.3067 -#536 := [monotonicity #533]: #10
5.3068 -#11 := (not #10)
5.3069 -#34 := [asserted]: #11
5.3070 -[unit-resolution #34 #536]: false
5.3071 -unsat
5.3072 -243524c591f6dcfe16a79ddd249c64a337ff3612 54 0
5.3073 -#2 := false
5.3074 -#9 := 1::int
5.3075 -decl uf_1 :: int
5.3076 -#5 := uf_1
5.3077 -#10 := (< uf_1 1::int)
5.3078 -#6 := 3::int
5.3079 -#7 := (+ uf_1 3::int)
5.3080 -#4 := 4::int
5.3081 -#8 := (<= 4::int #7)
5.3082 -#11 := (or #8 #10)
5.3083 -#12 := (not #11)
5.3084 -#66 := (iff #12 false)
5.3085 -#29 := (+ 3::int uf_1)
5.3086 -#32 := (<= 4::int #29)
5.3087 -#38 := (or #10 #32)
5.3088 -#43 := (not #38)
5.3089 -#64 := (iff #43 false)
5.3090 -#1 := true
5.3091 -#59 := (not true)
5.3092 -#62 := (iff #59 false)
5.3093 -#63 := [rewrite]: #62
5.3094 -#60 := (iff #43 #59)
5.3095 -#57 := (iff #38 true)
5.3096 -#48 := (>= uf_1 1::int)
5.3097 -#46 := (not #48)
5.3098 -#52 := (or #46 #48)
5.3099 -#55 := (iff #52 true)
5.3100 -#56 := [rewrite]: #55
5.3101 -#53 := (iff #38 #52)
5.3102 -#50 := (iff #32 #48)
5.3103 -#51 := [rewrite]: #50
5.3104 -#47 := (iff #10 #46)
5.3105 -#49 := [rewrite]: #47
5.3106 -#54 := [monotonicity #49 #51]: #53
5.3107 -#58 := [trans #54 #56]: #57
5.3108 -#61 := [monotonicity #58]: #60
5.3109 -#65 := [trans #61 #63]: #64
5.3110 -#44 := (iff #12 #43)
5.3111 -#41 := (iff #11 #38)
5.3112 -#35 := (or #32 #10)
5.3113 -#39 := (iff #35 #38)
5.3114 -#40 := [rewrite]: #39
5.3115 -#36 := (iff #11 #35)
5.3116 -#33 := (iff #8 #32)
5.3117 -#30 := (= #7 #29)
5.3118 -#31 := [rewrite]: #30
5.3119 -#34 := [monotonicity #31]: #33
5.3120 -#37 := [monotonicity #34]: #36
5.3121 -#42 := [trans #37 #40]: #41
5.3122 -#45 := [monotonicity #42]: #44
5.3123 -#67 := [trans #45 #65]: #66
5.3124 -#28 := [asserted]: #12
5.3125 -[mp #28 #67]: false
5.3126 -unsat
5.3127 -adfe7d6c2da6653191952bd9673c1274f94c2ab2 63 0
5.3128 -#2 := false
5.3129 -#11 := 0::int
5.3130 -decl uf_2 :: int
5.3131 -#7 := uf_2
5.3132 -#42 := -1::int
5.3133 -#45 := (* -1::int uf_2)
5.3134 -decl uf_1 :: int
5.3135 -#5 := uf_1
5.3136 -#46 := (+ uf_1 #45)
5.3137 -#63 := (>= #46 0::int)
5.3138 -#83 := (iff #63 false)
5.3139 -#44 := -4::int
5.3140 -#79 := (>= -4::int 0::int)
5.3141 -#81 := (iff #79 false)
5.3142 -#82 := [rewrite]: #81
5.3143 -#77 := (iff #63 #79)
5.3144 -#47 := (= #46 -4::int)
5.3145 -#8 := 4::int
5.3146 -#9 := (+ uf_1 4::int)
5.3147 -#10 := (= uf_2 #9)
5.3148 -#49 := (iff #10 #47)
5.3149 -#32 := (+ 4::int uf_1)
5.3150 -#39 := (= uf_2 #32)
5.3151 -#43 := (iff #39 #47)
5.3152 -#48 := [rewrite]: #43
5.3153 -#40 := (iff #10 #39)
5.3154 -#37 := (= #9 #32)
5.3155 -#38 := [rewrite]: #37
5.3156 -#41 := [monotonicity #38]: #40
5.3157 -#50 := [trans #41 #48]: #49
5.3158 -#31 := [asserted]: #10
5.3159 -#51 := [mp #31 #50]: #47
5.3160 -#80 := [monotonicity #51]: #77
5.3161 -#84 := [trans #80 #82]: #83
5.3162 -#12 := (- uf_2 uf_1)
5.3163 -#13 := (< 0::int #12)
5.3164 -#14 := (not #13)
5.3165 -#74 := (iff #14 #63)
5.3166 -#53 := (* -1::int uf_1)
5.3167 -#54 := (+ #53 uf_2)
5.3168 -#57 := (< 0::int #54)
5.3169 -#60 := (not #57)
5.3170 -#72 := (iff #60 #63)
5.3171 -#64 := (not #63)
5.3172 -#67 := (not #64)
5.3173 -#70 := (iff #67 #63)
5.3174 -#71 := [rewrite]: #70
5.3175 -#68 := (iff #60 #67)
5.3176 -#65 := (iff #57 #64)
5.3177 -#66 := [rewrite]: #65
5.3178 -#69 := [monotonicity #66]: #68
5.3179 -#73 := [trans #69 #71]: #72
5.3180 -#61 := (iff #14 #60)
5.3181 -#58 := (iff #13 #57)
5.3182 -#55 := (= #12 #54)
5.3183 -#56 := [rewrite]: #55
5.3184 -#59 := [monotonicity #56]: #58
5.3185 -#62 := [monotonicity #59]: #61
5.3186 -#75 := [trans #62 #73]: #74
5.3187 -#52 := [asserted]: #14
5.3188 -#76 := [mp #52 #75]: #63
5.3189 -[mp #76 #84]: false
5.3190 -unsat
5.3191 -3440e29713ba625633b10a2c4fdc186cb6e0cf3e 35 0
5.3192 -#2 := false
5.3193 -#6 := 5::int
5.3194 -#4 := 2::int
5.3195 -#5 := (+ 2::int 2::int)
5.3196 -#7 := (= #5 5::int)
5.3197 -#8 := (not #7)
5.3198 -#9 := (not #8)
5.3199 -#48 := (iff #9 false)
5.3200 -#1 := true
5.3201 -#43 := (not true)
5.3202 -#46 := (iff #43 false)
5.3203 -#47 := [rewrite]: #46
5.3204 -#44 := (iff #9 #43)
5.3205 -#41 := (iff #8 true)
5.3206 -#36 := (not false)
5.3207 -#39 := (iff #36 true)
5.3208 -#40 := [rewrite]: #39
5.3209 -#37 := (iff #8 #36)
5.3210 -#34 := (iff #7 false)
5.3211 -#26 := 4::int
5.3212 -#29 := (= 4::int 5::int)
5.3213 -#32 := (iff #29 false)
5.3214 -#33 := [rewrite]: #32
5.3215 -#30 := (iff #7 #29)
5.3216 -#27 := (= #5 4::int)
5.3217 -#28 := [rewrite]: #27
5.3218 -#31 := [monotonicity #28]: #30
5.3219 -#35 := [trans #31 #33]: #34
5.3220 -#38 := [monotonicity #35]: #37
5.3221 -#42 := [trans #38 #40]: #41
5.3222 -#45 := [monotonicity #42]: #44
5.3223 -#49 := [trans #45 #47]: #48
5.3224 -#25 := [asserted]: #9
5.3225 -[mp #25 #49]: false
5.3226 -unsat
5.3227 -7a45124c81166760c08802d05bb1a73c01b0f138 45 0
5.3228 -#2 := false
5.3229 -#11 := 4::real
5.3230 -decl uf_2 :: real
5.3231 -#8 := uf_2
5.3232 -#7 := 7::real
5.3233 -#9 := (* 7::real uf_2)
5.3234 -decl uf_1 :: real
5.3235 -#5 := uf_1
5.3236 -#4 := 3::real
5.3237 -#6 := (* 3::real uf_1)
5.3238 -#10 := (+ #6 #9)
5.3239 -#41 := (>= #10 4::real)
5.3240 -#39 := (not #41)
5.3241 -#12 := (< #10 4::real)
5.3242 -#40 := (iff #12 #39)
5.3243 -#37 := [rewrite]: #40
5.3244 -#34 := [asserted]: #12
5.3245 -#38 := [mp #34 #37]: #39
5.3246 -#13 := 2::real
5.3247 -#14 := (* 2::real uf_1)
5.3248 -#43 := (<= #14 3::real)
5.3249 -#44 := (not #43)
5.3250 -#15 := (< 3::real #14)
5.3251 -#45 := (iff #15 #44)
5.3252 -#46 := [rewrite]: #45
5.3253 -#35 := [asserted]: #15
5.3254 -#47 := [mp #35 #46]: #44
5.3255 -#16 := 0::real
5.3256 -#51 := (>= uf_2 0::real)
5.3257 -#17 := (< uf_2 0::real)
5.3258 -#18 := (not #17)
5.3259 -#58 := (iff #18 #51)
5.3260 -#49 := (not #51)
5.3261 -#53 := (not #49)
5.3262 -#56 := (iff #53 #51)
5.3263 -#57 := [rewrite]: #56
5.3264 -#54 := (iff #18 #53)
5.3265 -#50 := (iff #17 #49)
5.3266 -#52 := [rewrite]: #50
5.3267 -#55 := [monotonicity #52]: #54
5.3268 -#59 := [trans #55 #57]: #58
5.3269 -#36 := [asserted]: #18
5.3270 -#60 := [mp #36 #59]: #51
5.3271 -[th-lemma #60 #47 #38]: false
5.3272 -unsat
5.3273 -f946ff901958cea1a0225dfba1e556060c889a10 59 0
5.3274 -#2 := false
5.3275 -#16 := (not false)
5.3276 -decl uf_2 :: int
5.3277 -#8 := uf_2
5.3278 -#4 := 0::int
5.3279 -#12 := (<= 0::int uf_2)
5.3280 -#13 := (not #12)
5.3281 -#14 := (or #13 #12)
5.3282 -#6 := 1::int
5.3283 -#7 := (- 1::int)
5.3284 -#9 := (* #7 uf_2)
5.3285 -decl uf_1 :: int
5.3286 -#5 := uf_1
5.3287 -#10 := (+ uf_1 #9)
5.3288 -#11 := (<= 0::int #10)
5.3289 -#15 := (or #11 #14)
5.3290 -#17 := (iff #15 #16)
5.3291 -#18 := (not #17)
5.3292 -#70 := (iff #18 false)
5.3293 -#1 := true
5.3294 -#65 := (not true)
5.3295 -#68 := (iff #65 false)
5.3296 -#69 := [rewrite]: #68
5.3297 -#66 := (iff #18 #65)
5.3298 -#63 := (iff #17 true)
5.3299 -#58 := (iff true true)
5.3300 -#61 := (iff #58 true)
5.3301 -#62 := [rewrite]: #61
5.3302 -#59 := (iff #17 #58)
5.3303 -#56 := (iff #16 true)
5.3304 -#57 := [rewrite]: #56
5.3305 -#54 := (iff #15 true)
5.3306 -#35 := -1::int
5.3307 -#38 := (* -1::int uf_2)
5.3308 -#41 := (+ uf_1 #38)
5.3309 -#44 := (<= 0::int #41)
5.3310 -#49 := (or #44 true)
5.3311 -#52 := (iff #49 true)
5.3312 -#53 := [rewrite]: #52
5.3313 -#50 := (iff #15 #49)
5.3314 -#47 := (iff #14 true)
5.3315 -#48 := [rewrite]: #47
5.3316 -#45 := (iff #11 #44)
5.3317 -#42 := (= #10 #41)
5.3318 -#39 := (= #9 #38)
5.3319 -#36 := (= #7 -1::int)
5.3320 -#37 := [rewrite]: #36
5.3321 -#40 := [monotonicity #37]: #39
5.3322 -#43 := [monotonicity #40]: #42
5.3323 -#46 := [monotonicity #43]: #45
5.3324 -#51 := [monotonicity #46 #48]: #50
5.3325 -#55 := [trans #51 #53]: #54
5.3326 -#60 := [monotonicity #55 #57]: #59
5.3327 -#64 := [trans #60 #62]: #63
5.3328 -#67 := [monotonicity #64]: #66
5.3329 -#71 := [trans #67 #69]: #70
5.3330 -#34 := [asserted]: #18
5.3331 -[mp #34 #71]: false
5.3332 -unsat
5.3333 -88d529b1517abb78e220ec8f58e3b3405bb2453b 212 0
5.3334 -#2 := false
5.3335 -decl uf_4 :: T1
5.3336 -#13 := uf_4
5.3337 -decl uf_1 :: (-> int int T1)
5.3338 -#5 := 3::int
5.3339 -decl uf_2 :: int
5.3340 -#4 := uf_2
5.3341 -#6 := (uf_1 uf_2 3::int)
5.3342 -#559 := (= #6 uf_4)
5.3343 -decl uf_3 :: (-> int int T1)
5.3344 -#7 := (uf_3 3::int uf_2)
5.3345 -#254 := (= #7 uf_4)
5.3346 -#524 := (iff #254 #559)
5.3347 -#529 := (iff #559 #254)
5.3348 -#39 := (= #6 #7)
5.3349 -#8 := (distinct #6 #7)
5.3350 -#9 := (not #8)
5.3351 -#48 := (iff #9 #39)
5.3352 -#40 := (not #39)
5.3353 -#43 := (not #40)
5.3354 -#46 := (iff #43 #39)
5.3355 -#47 := [rewrite]: #46
5.3356 -#44 := (iff #9 #43)
5.3357 -#41 := (iff #8 #40)
5.3358 -#42 := [rewrite]: #41
5.3359 -#45 := [monotonicity #42]: #44
5.3360 -#49 := [trans #45 #47]: #48
5.3361 -#38 := [asserted]: #9
5.3362 -#52 := [mp #38 #49]: #39
5.3363 -#523 := [monotonicity #52]: #529
5.3364 -#530 := [symm #523]: #524
5.3365 -#547 := (not #559)
5.3366 -#570 := (not #254)
5.3367 -#531 := (iff #570 #547)
5.3368 -#525 := [monotonicity #530]: #531
5.3369 -#540 := [hypothesis]: #570
5.3370 -#532 := [mp #540 #525]: #547
5.3371 -#256 := (>= uf_2 3::int)
5.3372 -#579 := (not #256)
5.3373 -#541 := (or #254 #579)
5.3374 -#258 := (iff #254 #256)
5.3375 -#11 := (:var 0 int)
5.3376 -#10 := (:var 1 int)
5.3377 -#12 := (uf_3 #10 #11)
5.3378 -#581 := (pattern #12)
5.3379 -#57 := 0::int
5.3380 -#54 := -1::int
5.3381 -#55 := (* -1::int #11)
5.3382 -#56 := (+ #10 #55)
5.3383 -#58 := (<= #56 0::int)
5.3384 -#14 := (= #12 uf_4)
5.3385 -#61 := (iff #14 #58)
5.3386 -#582 := (forall (vars (?x1 int) (?x2 int)) (:pat #581) #61)
5.3387 -#64 := (forall (vars (?x1 int) (?x2 int)) #61)
5.3388 -#585 := (iff #64 #582)
5.3389 -#583 := (iff #61 #61)
5.3390 -#584 := [refl]: #583
5.3391 -#586 := [quant-intro #584]: #585
5.3392 -#108 := (~ #64 #64)
5.3393 -#106 := (~ #61 #61)
5.3394 -#107 := [refl]: #106
5.3395 -#109 := [nnf-pos #107]: #108
5.3396 -#15 := (<= #10 #11)
5.3397 -#16 := (iff #14 #15)
5.3398 -#17 := (forall (vars (?x1 int) (?x2 int)) #16)
5.3399 -#65 := (iff #17 #64)
5.3400 -#62 := (iff #16 #61)
5.3401 -#59 := (iff #15 #58)
5.3402 -#60 := [rewrite]: #59
5.3403 -#63 := [monotonicity #60]: #62
5.3404 -#66 := [quant-intro #63]: #65
5.3405 -#50 := [asserted]: #17
5.3406 -#67 := [mp #50 #66]: #64
5.3407 -#101 := [mp~ #67 #109]: #64
5.3408 -#587 := [mp #101 #586]: #582
5.3409 -#238 := (not #582)
5.3410 -#573 := (or #238 #258)
5.3411 -#167 := (* -1::int uf_2)
5.3412 -#252 := (+ 3::int #167)
5.3413 -#253 := (<= #252 0::int)
5.3414 -#245 := (iff #254 #253)
5.3415 -#575 := (or #238 #245)
5.3416 -#362 := (iff #575 #573)
5.3417 -#243 := (iff #573 #573)
5.3418 -#244 := [rewrite]: #243
5.3419 -#255 := (iff #245 #258)
5.3420 -#257 := (iff #253 #256)
5.3421 -#185 := [rewrite]: #257
5.3422 -#259 := [monotonicity #185]: #255
5.3423 -#569 := [monotonicity #259]: #362
5.3424 -#576 := [trans #569 #244]: #362
5.3425 -#232 := [quant-inst]: #575
5.3426 -#577 := [mp #232 #576]: #573
5.3427 -#535 := [unit-resolution #577 #587]: #258
5.3428 -#578 := (not #258)
5.3429 -#574 := (or #578 #254 #579)
5.3430 -#580 := [def-axiom]: #574
5.3431 -#382 := [unit-resolution #580 #535]: #541
5.3432 -#383 := [unit-resolution #382 #540]: #579
5.3433 -#526 := (or #559 #256)
5.3434 -#273 := (iff #559 #579)
5.3435 -#18 := (uf_1 #10 #11)
5.3436 -#588 := (pattern #18)
5.3437 -#82 := (>= #56 0::int)
5.3438 -#81 := (not #82)
5.3439 -#53 := (= uf_4 #18)
5.3440 -#88 := (iff #53 #81)
5.3441 -#589 := (forall (vars (?x3 int) (?x4 int)) (:pat #588) #88)
5.3442 -#93 := (forall (vars (?x3 int) (?x4 int)) #88)
5.3443 -#592 := (iff #93 #589)
5.3444 -#590 := (iff #88 #88)
5.3445 -#591 := [refl]: #590
5.3446 -#593 := [quant-intro #591]: #592
5.3447 -#102 := (~ #93 #93)
5.3448 -#99 := (~ #88 #88)
5.3449 -#110 := [refl]: #99
5.3450 -#103 := [nnf-pos #110]: #102
5.3451 -#20 := (< #10 #11)
5.3452 -#19 := (= #18 uf_4)
5.3453 -#21 := (iff #19 #20)
5.3454 -#22 := (forall (vars (?x3 int) (?x4 int)) #21)
5.3455 -#96 := (iff #22 #93)
5.3456 -#73 := (iff #20 #53)
5.3457 -#78 := (forall (vars (?x3 int) (?x4 int)) #73)
5.3458 -#94 := (iff #78 #93)
5.3459 -#91 := (iff #73 #88)
5.3460 -#85 := (iff #81 #53)
5.3461 -#89 := (iff #85 #88)
5.3462 -#90 := [rewrite]: #89
5.3463 -#86 := (iff #73 #85)
5.3464 -#83 := (iff #20 #81)
5.3465 -#84 := [rewrite]: #83
5.3466 -#87 := [monotonicity #84]: #86
5.3467 -#92 := [trans #87 #90]: #91
5.3468 -#95 := [quant-intro #92]: #94
5.3469 -#79 := (iff #22 #78)
5.3470 -#76 := (iff #21 #73)
5.3471 -#70 := (iff #53 #20)
5.3472 -#74 := (iff #70 #73)
5.3473 -#75 := [rewrite]: #74
5.3474 -#71 := (iff #21 #70)
5.3475 -#68 := (iff #19 #53)
5.3476 -#69 := [rewrite]: #68
5.3477 -#72 := [monotonicity #69]: #71
5.3478 -#77 := [trans #72 #75]: #76
5.3479 -#80 := [quant-intro #77]: #79
5.3480 -#97 := [trans #80 #95]: #96
5.3481 -#51 := [asserted]: #22
5.3482 -#98 := [mp #51 #97]: #93
5.3483 -#111 := [mp~ #98 #103]: #93
5.3484 -#594 := [mp #111 #593]: #589
5.3485 -#552 := (not #589)
5.3486 -#549 := (or #552 #273)
5.3487 -#219 := (* -1::int 3::int)
5.3488 -#220 := (+ uf_2 #219)
5.3489 -#221 := (>= #220 0::int)
5.3490 -#222 := (not #221)
5.3491 -#556 := (= uf_4 #6)
5.3492 -#558 := (iff #556 #222)
5.3493 -#553 := (or #552 #558)
5.3494 -#264 := (iff #553 #549)
5.3495 -#266 := (iff #549 #549)
5.3496 -#544 := [rewrite]: #266
5.3497 -#274 := (iff #558 #273)
5.3498 -#550 := (iff #222 #579)
5.3499 -#280 := (iff #221 #256)
5.3500 -#562 := -3::int
5.3501 -#206 := (+ -3::int uf_2)
5.3502 -#554 := (>= #206 0::int)
5.3503 -#278 := (iff #554 #256)
5.3504 -#279 := [rewrite]: #278
5.3505 -#555 := (iff #221 #554)
5.3506 -#565 := (= #220 #206)
5.3507 -#201 := (+ uf_2 -3::int)
5.3508 -#207 := (= #201 #206)
5.3509 -#567 := [rewrite]: #207
5.3510 -#564 := (= #220 #201)
5.3511 -#557 := (= #219 -3::int)
5.3512 -#563 := [rewrite]: #557
5.3513 -#566 := [monotonicity #563]: #564
5.3514 -#568 := [trans #566 #567]: #565
5.3515 -#277 := [monotonicity #568]: #555
5.3516 -#173 := [trans #277 #279]: #280
5.3517 -#551 := [monotonicity #173]: #550
5.3518 -#560 := (iff #556 #559)
5.3519 -#561 := [rewrite]: #560
5.3520 -#548 := [monotonicity #561 #551]: #274
5.3521 -#265 := [monotonicity #548]: #264
5.3522 -#545 := [trans #265 #544]: #264
5.3523 -#263 := [quant-inst]: #553
5.3524 -#260 := [mp #263 #545]: #549
5.3525 -#384 := [unit-resolution #260 #594]: #273
5.3526 -#542 := (not #273)
5.3527 -#546 := (or #542 #559 #256)
5.3528 -#543 := [def-axiom]: #546
5.3529 -#527 := [unit-resolution #543 #384]: #526
5.3530 -#528 := [unit-resolution #527 #383]: #559
5.3531 -#361 := [unit-resolution #528 #532]: false
5.3532 -#363 := [lemma #361]: #254
5.3533 -#522 := [mp #363 #530]: #559
5.3534 -#364 := (or #570 #256)
5.3535 -#230 := (or #578 #570 #256)
5.3536 -#235 := [def-axiom]: #230
5.3537 -#517 := [unit-resolution #235 #535]: #364
5.3538 -#518 := [unit-resolution #517 #363]: #256
5.3539 -#520 := (or #547 #579)
5.3540 -#536 := (or #542 #547 #579)
5.3541 -#537 := [def-axiom]: #536
5.3542 -#521 := [unit-resolution #537 #384]: #520
5.3543 -#519 := [unit-resolution #521 #518]: #547
5.3544 -[unit-resolution #519 #522]: false
5.3545 -unsat
5.3546 -bf36938883aa38907d4d00c1860a1d18e7b620d0 86 0
5.3547 -#2 := false
5.3548 -decl uf_1 :: int
5.3549 -#5 := uf_1
5.3550 -#7 := 2::int
5.3551 -#29 := (* 2::int uf_1)
5.3552 -#4 := 0::int
5.3553 -#54 := (= 0::int #29)
5.3554 -#55 := (not #54)
5.3555 -#61 := (= #29 0::int)
5.3556 -#104 := (not #61)
5.3557 -#110 := (iff #104 #55)
5.3558 -#108 := (iff #61 #54)
5.3559 -#109 := [commutativity]: #108
5.3560 -#111 := [monotonicity #109]: #110
5.3561 -#62 := (<= #29 0::int)
5.3562 -#100 := (not #62)
5.3563 -#30 := (<= uf_1 0::int)
5.3564 -#31 := (not #30)
5.3565 -#6 := (< 0::int uf_1)
5.3566 -#32 := (iff #6 #31)
5.3567 -#33 := [rewrite]: #32
5.3568 -#27 := [asserted]: #6
5.3569 -#34 := [mp #27 #33]: #31
5.3570 -#101 := (or #100 #30)
5.3571 -#102 := [th-lemma]: #101
5.3572 -#103 := [unit-resolution #102 #34]: #100
5.3573 -#105 := (or #104 #62)
5.3574 -#106 := [th-lemma]: #105
5.3575 -#107 := [unit-resolution #106 #103]: #104
5.3576 -#112 := [mp #107 #111]: #55
5.3577 -#56 := (= uf_1 #29)
5.3578 -#57 := (not #56)
5.3579 -#53 := (= 0::int uf_1)
5.3580 -#50 := (not #53)
5.3581 -#58 := (and #50 #55 #57)
5.3582 -#69 := (not #58)
5.3583 -#42 := (distinct 0::int uf_1 #29)
5.3584 -#47 := (not #42)
5.3585 -#9 := (- uf_1 uf_1)
5.3586 -#8 := (* uf_1 2::int)
5.3587 -#10 := (distinct uf_1 #8 #9)
5.3588 -#11 := (not #10)
5.3589 -#48 := (iff #11 #47)
5.3590 -#45 := (iff #10 #42)
5.3591 -#39 := (distinct uf_1 #29 0::int)
5.3592 -#43 := (iff #39 #42)
5.3593 -#44 := [rewrite]: #43
5.3594 -#40 := (iff #10 #39)
5.3595 -#37 := (= #9 0::int)
5.3596 -#38 := [rewrite]: #37
5.3597 -#35 := (= #8 #29)
5.3598 -#36 := [rewrite]: #35
5.3599 -#41 := [monotonicity #36 #38]: #40
5.3600 -#46 := [trans #41 #44]: #45
5.3601 -#49 := [monotonicity #46]: #48
5.3602 -#28 := [asserted]: #11
5.3603 -#52 := [mp #28 #49]: #47
5.3604 -#80 := (or #42 #69)
5.3605 -#81 := [def-axiom]: #80
5.3606 -#82 := [unit-resolution #81 #52]: #69
5.3607 -#59 := (= uf_1 0::int)
5.3608 -#83 := (not #59)
5.3609 -#89 := (iff #83 #50)
5.3610 -#87 := (iff #59 #53)
5.3611 -#88 := [commutativity]: #87
5.3612 -#90 := [monotonicity #88]: #89
5.3613 -#84 := (or #83 #30)
5.3614 -#85 := [th-lemma]: #84
5.3615 -#86 := [unit-resolution #85 #34]: #83
5.3616 -#91 := [mp #86 #90]: #50
5.3617 -#64 := -1::int
5.3618 -#65 := (* -1::int #29)
5.3619 -#66 := (+ uf_1 #65)
5.3620 -#68 := (>= #66 0::int)
5.3621 -#92 := (not #68)
5.3622 -#93 := (or #92 #30)
5.3623 -#94 := [th-lemma]: #93
5.3624 -#95 := [unit-resolution #94 #34]: #92
5.3625 -#96 := (or #57 #68)
5.3626 -#97 := [th-lemma]: #96
5.3627 -#98 := [unit-resolution #97 #95]: #57
5.3628 -#76 := (or #58 #53 #54 #56)
5.3629 -#77 := [def-axiom]: #76
5.3630 -#99 := [unit-resolution #77 #98 #91 #82]: #54
5.3631 -[unit-resolution #99 #112]: false
5.3632 -unsat
5.3633 -d4ecdf21a3d5d758670676ddb9e6e093ea9fcc15 673 0
5.3634 -#2 := false
5.3635 -#169 := 0::int
5.3636 -decl uf_2 :: int
5.3637 -#5 := uf_2
5.3638 -#166 := -1::int
5.3639 -#202 := (* -1::int uf_2)
5.3640 -decl uf_1 :: int
5.3641 -#4 := uf_1
5.3642 -#203 := (+ uf_1 #202)
5.3643 -#218 := (>= #203 0::int)
5.3644 -decl uf_3 :: int
5.3645 -#7 := uf_3
5.3646 -#167 := (* -1::int uf_3)
5.3647 -#168 := (+ uf_1 #167)
5.3648 -#178 := (>= #168 0::int)
5.3649 -#217 := (not #218)
5.3650 -#204 := (<= #203 0::int)
5.3651 -#205 := (not #204)
5.3652 -#692 := [hypothesis]: #205
5.3653 -#177 := (not #178)
5.3654 -#693 := (or #177 #204)
5.3655 -#170 := (<= #168 0::int)
5.3656 -#191 := (+ uf_2 #167)
5.3657 -#237 := (<= #191 0::int)
5.3658 -#238 := (not #237)
5.3659 -#171 := (not #170)
5.3660 -#685 := [hypothesis]: #171
5.3661 -#190 := (>= #191 0::int)
5.3662 -#455 := (or #170 #190)
5.3663 -#189 := (not #190)
5.3664 -#197 := (and #171 #189)
5.3665 -#354 := (not #197)
5.3666 -#464 := (iff #354 #455)
5.3667 -#456 := (not #455)
5.3668 -#459 := (not #456)
5.3669 -#462 := (iff #459 #455)
5.3670 -#463 := [rewrite]: #462
5.3671 -#460 := (iff #354 #459)
5.3672 -#457 := (iff #197 #456)
5.3673 -#458 := [rewrite]: #457
5.3674 -#461 := [monotonicity #458]: #460
5.3675 -#465 := [trans #461 #463]: #464
5.3676 -#287 := (and #189 #217)
5.3677 -#10 := (= uf_2 uf_3)
5.3678 -#279 := (and #10 #217)
5.3679 -#273 := (and #177 #238)
5.3680 -#15 := (= uf_1 uf_3)
5.3681 -#268 := (and #15 #238)
5.3682 -#17 := (= uf_1 uf_2)
5.3683 -#260 := (and #17 #189)
5.3684 -#252 := (and #205 #238)
5.3685 -#244 := (and #17 #238)
5.3686 -#232 := (and #171 #217)
5.3687 -#224 := (and #15 #217)
5.3688 -#214 := (and #10 #205)
5.3689 -#211 := (and #177 #205)
5.3690 -#208 := (and #15 #205)
5.3691 -#184 := (and #17 #177)
5.3692 -#174 := (and #10 #171)
5.3693 -#115 := (and #10 #17)
5.3694 -#337 := (or #115 #174 #184 #197 #208 #211 #214 #224 #232 #244 #252 #260 #268 #273 #279 #287)
5.3695 -#342 := (not #337)
5.3696 -#21 := (= uf_2 uf_1)
5.3697 -#27 := (= uf_3 uf_2)
5.3698 -#34 := (and #27 #21)
5.3699 -#23 := (< uf_3 uf_1)
5.3700 -#33 := (and #10 #23)
5.3701 -#35 := (or #33 #34)
5.3702 -#12 := (< uf_1 uf_3)
5.3703 -#32 := (and #21 #12)
5.3704 -#36 := (or #32 #35)
5.3705 -#8 := (< uf_2 uf_3)
5.3706 -#31 := (and #8 #23)
5.3707 -#37 := (or #31 #36)
5.3708 -#25 := (= uf_3 uf_1)
5.3709 -#19 := (< uf_2 uf_1)
5.3710 -#30 := (and #19 #25)
5.3711 -#38 := (or #30 #37)
5.3712 -#29 := (and #19 #12)
5.3713 -#39 := (or #29 #38)
5.3714 -#28 := (and #27 #19)
5.3715 -#40 := (or #28 #39)
5.3716 -#6 := (< uf_1 uf_2)
5.3717 -#26 := (and #25 #6)
5.3718 -#41 := (or #26 #40)
5.3719 -#24 := (and #23 #6)
5.3720 -#42 := (or #24 #41)
5.3721 -#13 := (< uf_3 uf_2)
5.3722 -#22 := (and #13 #21)
5.3723 -#43 := (or #22 #42)
5.3724 -#20 := (and #13 #19)
5.3725 -#44 := (or #20 #43)
5.3726 -#18 := (and #17 #8)
5.3727 -#45 := (or #18 #44)
5.3728 -#16 := (and #15 #13)
5.3729 -#46 := (or #16 #45)
5.3730 -#14 := (and #12 #13)
5.3731 -#47 := (or #14 #46)
5.3732 -#11 := (and #6 #10)
5.3733 -#48 := (or #11 #47)
5.3734 -#9 := (and #6 #8)
5.3735 -#49 := (or #9 #48)
5.3736 -#50 := (not #49)
5.3737 -#345 := (iff #50 #342)
5.3738 -#118 := (or #33 #115)
5.3739 -#110 := (and #12 #17)
5.3740 -#121 := (or #110 #118)
5.3741 -#124 := (or #31 #121)
5.3742 -#102 := (and #15 #19)
5.3743 -#127 := (or #102 #124)
5.3744 -#96 := (and #12 #19)
5.3745 -#130 := (or #96 #127)
5.3746 -#93 := (and #10 #19)
5.3747 -#133 := (or #93 #130)
5.3748 -#86 := (and #6 #15)
5.3749 -#136 := (or #86 #133)
5.3750 -#78 := (and #6 #23)
5.3751 -#139 := (or #78 #136)
5.3752 -#75 := (and #13 #17)
5.3753 -#142 := (or #75 #139)
5.3754 -#145 := (or #20 #142)
5.3755 -#70 := (and #8 #17)
5.3756 -#148 := (or #70 #145)
5.3757 -#67 := (and #13 #15)
5.3758 -#151 := (or #67 #148)
5.3759 -#154 := (or #14 #151)
5.3760 -#157 := (or #11 #154)
5.3761 -#160 := (or #9 #157)
5.3762 -#163 := (not #160)
5.3763 -#343 := (iff #163 #342)
5.3764 -#340 := (iff #160 #337)
5.3765 -#292 := (or #174 #115)
5.3766 -#295 := (or #184 #292)
5.3767 -#298 := (or #197 #295)
5.3768 -#301 := (or #208 #298)
5.3769 -#304 := (or #211 #301)
5.3770 -#307 := (or #214 #304)
5.3771 -#310 := (or #224 #307)
5.3772 -#313 := (or #232 #310)
5.3773 -#316 := (or #244 #313)
5.3774 -#319 := (or #252 #316)
5.3775 -#322 := (or #260 #319)
5.3776 -#325 := (or #268 #322)
5.3777 -#328 := (or #273 #325)
5.3778 -#331 := (or #279 #328)
5.3779 -#334 := (or #287 #331)
5.3780 -#338 := (iff #334 #337)
5.3781 -#339 := [rewrite]: #338
5.3782 -#335 := (iff #160 #334)
5.3783 -#332 := (iff #157 #331)
5.3784 -#329 := (iff #154 #328)
5.3785 -#326 := (iff #151 #325)
5.3786 -#323 := (iff #148 #322)
5.3787 -#320 := (iff #145 #319)
5.3788 -#317 := (iff #142 #316)
5.3789 -#314 := (iff #139 #313)
5.3790 -#311 := (iff #136 #310)
5.3791 -#308 := (iff #133 #307)
5.3792 -#305 := (iff #130 #304)
5.3793 -#302 := (iff #127 #301)
5.3794 -#299 := (iff #124 #298)
5.3795 -#296 := (iff #121 #295)
5.3796 -#293 := (iff #118 #292)
5.3797 -#175 := (iff #33 #174)
5.3798 -#172 := (iff #23 #171)
5.3799 -#173 := [rewrite]: #172
5.3800 -#176 := [monotonicity #173]: #175
5.3801 -#294 := [monotonicity #176]: #293
5.3802 -#187 := (iff #110 #184)
5.3803 -#181 := (and #177 #17)
5.3804 -#185 := (iff #181 #184)
5.3805 -#186 := [rewrite]: #185
5.3806 -#182 := (iff #110 #181)
5.3807 -#179 := (iff #12 #177)
5.3808 -#180 := [rewrite]: #179
5.3809 -#183 := [monotonicity #180]: #182
5.3810 -#188 := [trans #183 #186]: #187
5.3811 -#297 := [monotonicity #188 #294]: #296
5.3812 -#200 := (iff #31 #197)
5.3813 -#194 := (and #189 #171)
5.3814 -#198 := (iff #194 #197)
5.3815 -#199 := [rewrite]: #198
5.3816 -#195 := (iff #31 #194)
5.3817 -#192 := (iff #8 #189)
5.3818 -#193 := [rewrite]: #192
5.3819 -#196 := [monotonicity #193 #173]: #195
5.3820 -#201 := [trans #196 #199]: #200
5.3821 -#300 := [monotonicity #201 #297]: #299
5.3822 -#209 := (iff #102 #208)
5.3823 -#206 := (iff #19 #205)
5.3824 -#207 := [rewrite]: #206
5.3825 -#210 := [monotonicity #207]: #209
5.3826 -#303 := [monotonicity #210 #300]: #302
5.3827 -#212 := (iff #96 #211)
5.3828 -#213 := [monotonicity #180 #207]: #212
5.3829 -#306 := [monotonicity #213 #303]: #305
5.3830 -#215 := (iff #93 #214)
5.3831 -#216 := [monotonicity #207]: #215
5.3832 -#309 := [monotonicity #216 #306]: #308
5.3833 -#227 := (iff #86 #224)
5.3834 -#221 := (and #217 #15)
5.3835 -#225 := (iff #221 #224)
5.3836 -#226 := [rewrite]: #225
5.3837 -#222 := (iff #86 #221)
5.3838 -#219 := (iff #6 #217)
5.3839 -#220 := [rewrite]: #219
5.3840 -#223 := [monotonicity #220]: #222
5.3841 -#228 := [trans #223 #226]: #227
5.3842 -#312 := [monotonicity #228 #309]: #311
5.3843 -#235 := (iff #78 #232)
5.3844 -#229 := (and #217 #171)
5.3845 -#233 := (iff #229 #232)
5.3846 -#234 := [rewrite]: #233
5.3847 -#230 := (iff #78 #229)
5.3848 -#231 := [monotonicity #220 #173]: #230
5.3849 -#236 := [trans #231 #234]: #235
5.3850 -#315 := [monotonicity #236 #312]: #314
5.3851 -#247 := (iff #75 #244)
5.3852 -#241 := (and #238 #17)
5.3853 -#245 := (iff #241 #244)
5.3854 -#246 := [rewrite]: #245
5.3855 -#242 := (iff #75 #241)
5.3856 -#239 := (iff #13 #238)
5.3857 -#240 := [rewrite]: #239
5.3858 -#243 := [monotonicity #240]: #242
5.3859 -#248 := [trans #243 #246]: #247
5.3860 -#318 := [monotonicity #248 #315]: #317
5.3861 -#255 := (iff #20 #252)
5.3862 -#249 := (and #238 #205)
5.3863 -#253 := (iff #249 #252)
5.3864 -#254 := [rewrite]: #253
5.3865 -#250 := (iff #20 #249)
5.3866 -#251 := [monotonicity #240 #207]: #250
5.3867 -#256 := [trans #251 #254]: #255
5.3868 -#321 := [monotonicity #256 #318]: #320
5.3869 -#263 := (iff #70 #260)
5.3870 -#257 := (and #189 #17)
5.3871 -#261 := (iff #257 #260)
5.3872 -#262 := [rewrite]: #261
5.3873 -#258 := (iff #70 #257)
5.3874 -#259 := [monotonicity #193]: #258
5.3875 -#264 := [trans #259 #262]: #263
5.3876 -#324 := [monotonicity #264 #321]: #323
5.3877 -#271 := (iff #67 #268)
5.3878 -#265 := (and #238 #15)
5.3879 -#269 := (iff #265 #268)
5.3880 -#270 := [rewrite]: #269
5.3881 -#266 := (iff #67 #265)
5.3882 -#267 := [monotonicity #240]: #266
5.3883 -#272 := [trans #267 #270]: #271
5.3884 -#327 := [monotonicity #272 #324]: #326
5.3885 -#274 := (iff #14 #273)
5.3886 -#275 := [monotonicity #180 #240]: #274
5.3887 -#330 := [monotonicity #275 #327]: #329
5.3888 -#282 := (iff #11 #279)
5.3889 -#276 := (and #217 #10)
5.3890 -#280 := (iff #276 #279)
5.3891 -#281 := [rewrite]: #280
5.3892 -#277 := (iff #11 #276)
5.3893 -#278 := [monotonicity #220]: #277
5.3894 -#283 := [trans #278 #281]: #282
5.3895 -#333 := [monotonicity #283 #330]: #332
5.3896 -#290 := (iff #9 #287)
5.3897 -#284 := (and #217 #189)
5.3898 -#288 := (iff #284 #287)
5.3899 -#289 := [rewrite]: #288
5.3900 -#285 := (iff #9 #284)
5.3901 -#286 := [monotonicity #220 #193]: #285
5.3902 -#291 := [trans #286 #289]: #290
5.3903 -#336 := [monotonicity #291 #333]: #335
5.3904 -#341 := [trans #336 #339]: #340
5.3905 -#344 := [monotonicity #341]: #343
5.3906 -#164 := (iff #50 #163)
5.3907 -#161 := (iff #49 #160)
5.3908 -#158 := (iff #48 #157)
5.3909 -#155 := (iff #47 #154)
5.3910 -#152 := (iff #46 #151)
5.3911 -#149 := (iff #45 #148)
5.3912 -#146 := (iff #44 #145)
5.3913 -#143 := (iff #43 #142)
5.3914 -#140 := (iff #42 #139)
5.3915 -#137 := (iff #41 #136)
5.3916 -#134 := (iff #40 #133)
5.3917 -#131 := (iff #39 #130)
5.3918 -#128 := (iff #38 #127)
5.3919 -#125 := (iff #37 #124)
5.3920 -#122 := (iff #36 #121)
5.3921 -#119 := (iff #35 #118)
5.3922 -#116 := (iff #34 #115)
5.3923 -#73 := (iff #21 #17)
5.3924 -#74 := [rewrite]: #73
5.3925 -#91 := (iff #27 #10)
5.3926 -#92 := [rewrite]: #91
5.3927 -#117 := [monotonicity #92 #74]: #116
5.3928 -#120 := [monotonicity #117]: #119
5.3929 -#113 := (iff #32 #110)
5.3930 -#107 := (and #17 #12)
5.3931 -#111 := (iff #107 #110)
5.3932 -#112 := [rewrite]: #111
5.3933 -#108 := (iff #32 #107)
5.3934 -#109 := [monotonicity #74]: #108
5.3935 -#114 := [trans #109 #112]: #113
5.3936 -#123 := [monotonicity #114 #120]: #122
5.3937 -#126 := [monotonicity #123]: #125
5.3938 -#105 := (iff #30 #102)
5.3939 -#99 := (and #19 #15)
5.3940 -#103 := (iff #99 #102)
5.3941 -#104 := [rewrite]: #103
5.3942 -#100 := (iff #30 #99)
5.3943 -#81 := (iff #25 #15)
5.3944 -#82 := [rewrite]: #81
5.3945 -#101 := [monotonicity #82]: #100
5.3946 -#106 := [trans #101 #104]: #105
5.3947 -#129 := [monotonicity #106 #126]: #128
5.3948 -#97 := (iff #29 #96)
5.3949 -#98 := [rewrite]: #97
5.3950 -#132 := [monotonicity #98 #129]: #131
5.3951 -#94 := (iff #28 #93)
5.3952 -#95 := [monotonicity #92]: #94
5.3953 -#135 := [monotonicity #95 #132]: #134
5.3954 -#89 := (iff #26 #86)
5.3955 -#83 := (and #15 #6)
5.3956 -#87 := (iff #83 #86)
5.3957 -#88 := [rewrite]: #87
5.3958 -#84 := (iff #26 #83)
5.3959 -#85 := [monotonicity #82]: #84
5.3960 -#90 := [trans #85 #88]: #89
5.3961 -#138 := [monotonicity #90 #135]: #137
5.3962 -#79 := (iff #24 #78)
5.3963 -#80 := [rewrite]: #79
5.3964 -#141 := [monotonicity #80 #138]: #140
5.3965 -#76 := (iff #22 #75)
5.3966 -#77 := [monotonicity #74]: #76
5.3967 -#144 := [monotonicity #77 #141]: #143
5.3968 -#147 := [monotonicity #144]: #146
5.3969 -#71 := (iff #18 #70)
5.3970 -#72 := [rewrite]: #71
5.3971 -#150 := [monotonicity #72 #147]: #149
5.3972 -#68 := (iff #16 #67)
5.3973 -#69 := [rewrite]: #68
5.3974 -#153 := [monotonicity #69 #150]: #152
5.3975 -#156 := [monotonicity #153]: #155
5.3976 -#159 := [monotonicity #156]: #158
5.3977 -#162 := [monotonicity #159]: #161
5.3978 -#165 := [monotonicity #162]: #164
5.3979 -#346 := [trans #165 #344]: #345
5.3980 -#66 := [asserted]: #50
5.3981 -#347 := [mp #66 #346]: #342
5.3982 -#355 := [not-or-elim #347]: #354
5.3983 -#466 := [mp #355 #465]: #455
5.3984 -#686 := [unit-resolution #466 #685]: #190
5.3985 -#427 := (or #170 #189 #238)
5.3986 -#350 := (not #174)
5.3987 -#430 := (iff #350 #427)
5.3988 -#382 := (or #189 #238)
5.3989 -#414 := (or #170 #382)
5.3990 -#428 := (iff #414 #427)
5.3991 -#429 := [rewrite]: #428
5.3992 -#425 := (iff #350 #414)
5.3993 -#415 := (not #414)
5.3994 -#420 := (not #415)
5.3995 -#423 := (iff #420 #414)
5.3996 -#424 := [rewrite]: #423
5.3997 -#421 := (iff #350 #420)
5.3998 -#418 := (iff #174 #415)
5.3999 -#380 := (not #382)
5.4000 -#411 := (and #380 #171)
5.4001 -#416 := (iff #411 #415)
5.4002 -#417 := [rewrite]: #416
5.4003 -#412 := (iff #174 #411)
5.4004 -#383 := (iff #10 #380)
5.4005 -#384 := [rewrite]: #383
5.4006 -#413 := [monotonicity #384]: #412
5.4007 -#419 := [trans #413 #417]: #418
5.4008 -#422 := [monotonicity #419]: #421
5.4009 -#426 := [trans #422 #424]: #425
5.4010 -#431 := [trans #426 #429]: #430
5.4011 -#351 := [not-or-elim #347]: #350
5.4012 -#432 := [mp #351 #431]: #427
5.4013 -#687 := [unit-resolution #432 #686 #685]: #238
5.4014 -#549 := (or #170 #218)
5.4015 -#364 := (not #232)
5.4016 -#558 := (iff #364 #549)
5.4017 -#550 := (not #549)
5.4018 -#553 := (not #550)
5.4019 -#556 := (iff #553 #549)
5.4020 -#557 := [rewrite]: #556
5.4021 -#554 := (iff #364 #553)
5.4022 -#551 := (iff #232 #550)
5.4023 -#552 := [rewrite]: #551
5.4024 -#555 := [monotonicity #552]: #554
5.4025 -#559 := [trans #555 #557]: #558
5.4026 -#365 := [not-or-elim #347]: #364
5.4027 -#560 := [mp #365 #559]: #549
5.4028 -#688 := [unit-resolution #560 #685]: #218
5.4029 -#577 := (or #205 #217 #237)
5.4030 -#366 := (not #244)
5.4031 -#580 := (iff #366 #577)
5.4032 -#385 := (or #205 #217)
5.4033 -#564 := (or #237 #385)
5.4034 -#578 := (iff #564 #577)
5.4035 -#579 := [rewrite]: #578
5.4036 -#575 := (iff #366 #564)
5.4037 -#565 := (not #564)
5.4038 -#570 := (not #565)
5.4039 -#573 := (iff #570 #564)
5.4040 -#574 := [rewrite]: #573
5.4041 -#571 := (iff #366 #570)
5.4042 -#568 := (iff #244 #565)
5.4043 -#386 := (not #385)
5.4044 -#561 := (and #386 #238)
5.4045 -#566 := (iff #561 #565)
5.4046 -#567 := [rewrite]: #566
5.4047 -#562 := (iff #244 #561)
5.4048 -#387 := (iff #17 #386)
5.4049 -#388 := [rewrite]: #387
5.4050 -#563 := [monotonicity #388]: #562
5.4051 -#569 := [trans #563 #567]: #568
5.4052 -#572 := [monotonicity #569]: #571
5.4053 -#576 := [trans #572 #574]: #575
5.4054 -#581 := [trans #576 #579]: #580
5.4055 -#367 := [not-or-elim #347]: #366
5.4056 -#582 := [mp #367 #581]: #577
5.4057 -#689 := [unit-resolution #582 #688 #687]: #205
5.4058 -#583 := (or #204 #237)
5.4059 -#368 := (not #252)
5.4060 -#592 := (iff #368 #583)
5.4061 -#584 := (not #583)
5.4062 -#587 := (not #584)
5.4063 -#590 := (iff #587 #583)
5.4064 -#591 := [rewrite]: #590
5.4065 -#588 := (iff #368 #587)
5.4066 -#585 := (iff #252 #584)
5.4067 -#586 := [rewrite]: #585
5.4068 -#589 := [monotonicity #586]: #588
5.4069 -#593 := [trans #589 #591]: #592
5.4070 -#369 := [not-or-elim #347]: #368
5.4071 -#594 := [mp #369 #593]: #583
5.4072 -#690 := [unit-resolution #594 #689 #687]: false
5.4073 -#691 := [lemma #690]: #170
5.4074 -#487 := (or #171 #177 #204)
5.4075 -#356 := (not #208)
5.4076 -#490 := (iff #356 #487)
5.4077 -#467 := (or #171 #177)
5.4078 -#474 := (or #204 #467)
5.4079 -#488 := (iff #474 #487)
5.4080 -#489 := [rewrite]: #488
5.4081 -#485 := (iff #356 #474)
5.4082 -#475 := (not #474)
5.4083 -#480 := (not #475)
5.4084 -#483 := (iff #480 #474)
5.4085 -#484 := [rewrite]: #483
5.4086 -#481 := (iff #356 #480)
5.4087 -#478 := (iff #208 #475)
5.4088 -#468 := (not #467)
5.4089 -#471 := (and #468 #205)
5.4090 -#476 := (iff #471 #475)
5.4091 -#477 := [rewrite]: #476
5.4092 -#472 := (iff #208 #471)
5.4093 -#469 := (iff #15 #468)
5.4094 -#470 := [rewrite]: #469
5.4095 -#473 := [monotonicity #470]: #472
5.4096 -#479 := [trans #473 #477]: #478
5.4097 -#482 := [monotonicity #479]: #481
5.4098 -#486 := [trans #482 #484]: #485
5.4099 -#491 := [trans #486 #489]: #490
5.4100 -#357 := [not-or-elim #347]: #356
5.4101 -#492 := [mp #357 #491]: #487
5.4102 -#694 := [unit-resolution #492 #691]: #693
5.4103 -#695 := [unit-resolution #694 #692]: #177
5.4104 -#493 := (or #178 #204)
5.4105 -#358 := (not #211)
5.4106 -#502 := (iff #358 #493)
5.4107 -#494 := (not #493)
5.4108 -#497 := (not #494)
5.4109 -#500 := (iff #497 #493)
5.4110 -#501 := [rewrite]: #500
5.4111 -#498 := (iff #358 #497)
5.4112 -#495 := (iff #211 #494)
5.4113 -#496 := [rewrite]: #495
5.4114 -#499 := [monotonicity #496]: #498
5.4115 -#503 := [trans #499 #501]: #502
5.4116 -#359 := [not-or-elim #347]: #358
5.4117 -#504 := [mp #359 #503]: #493
5.4118 -#696 := [unit-resolution #504 #695 #692]: false
5.4119 -#697 := [lemma #696]: #204
5.4120 -#698 := [hypothesis]: #177
5.4121 -#449 := (or #178 #205 #217)
5.4122 -#352 := (not #184)
5.4123 -#452 := (iff #352 #449)
5.4124 -#436 := (or #178 #385)
5.4125 -#450 := (iff #436 #449)
5.4126 -#451 := [rewrite]: #450
5.4127 -#447 := (iff #352 #436)
5.4128 -#437 := (not #436)
5.4129 -#442 := (not #437)
5.4130 -#445 := (iff #442 #436)
5.4131 -#446 := [rewrite]: #445
5.4132 -#443 := (iff #352 #442)
5.4133 -#440 := (iff #184 #437)
5.4134 -#433 := (and #386 #177)
5.4135 -#438 := (iff #433 #437)
5.4136 -#439 := [rewrite]: #438
5.4137 -#434 := (iff #184 #433)
5.4138 -#435 := [monotonicity #388]: #434
5.4139 -#441 := [trans #435 #439]: #440
5.4140 -#444 := [monotonicity #441]: #443
5.4141 -#448 := [trans #444 #446]: #447
5.4142 -#453 := [trans #448 #451]: #452
5.4143 -#353 := [not-or-elim #347]: #352
5.4144 -#454 := [mp #353 #453]: #449
5.4145 -#699 := [unit-resolution #454 #698 #697]: #217
5.4146 -#639 := (or #178 #237)
5.4147 -#374 := (not #273)
5.4148 -#648 := (iff #374 #639)
5.4149 -#640 := (not #639)
5.4150 -#643 := (not #640)
5.4151 -#646 := (iff #643 #639)
5.4152 -#647 := [rewrite]: #646
5.4153 -#644 := (iff #374 #643)
5.4154 -#641 := (iff #273 #640)
5.4155 -#642 := [rewrite]: #641
5.4156 -#645 := [monotonicity #642]: #644
5.4157 -#649 := [trans #645 #647]: #648
5.4158 -#375 := [not-or-elim #347]: #374
5.4159 -#650 := [mp #375 #649]: #639
5.4160 -#700 := [unit-resolution #650 #698]: #237
5.4161 -#667 := (or #189 #218 #238)
5.4162 -#376 := (not #279)
5.4163 -#670 := (iff #376 #667)
5.4164 -#654 := (or #218 #382)
5.4165 -#668 := (iff #654 #667)
5.4166 -#669 := [rewrite]: #668
5.4167 -#665 := (iff #376 #654)
5.4168 -#655 := (not #654)
5.4169 -#660 := (not #655)
5.4170 -#663 := (iff #660 #654)
5.4171 -#664 := [rewrite]: #663
5.4172 -#661 := (iff #376 #660)
5.4173 -#658 := (iff #279 #655)
5.4174 -#651 := (and #380 #217)
5.4175 -#656 := (iff #651 #655)
5.4176 -#657 := [rewrite]: #656
5.4177 -#652 := (iff #279 #651)
5.4178 -#653 := [monotonicity #384]: #652
5.4179 -#659 := [trans #653 #657]: #658
5.4180 -#662 := [monotonicity #659]: #661
5.4181 -#666 := [trans #662 #664]: #665
5.4182 -#671 := [trans #666 #669]: #670
5.4183 -#377 := [not-or-elim #347]: #376
5.4184 -#672 := [mp #377 #671]: #667
5.4185 -#701 := [unit-resolution #672 #699 #700]: #189
5.4186 -#673 := (or #190 #218)
5.4187 -#378 := (not #287)
5.4188 -#682 := (iff #378 #673)
5.4189 -#674 := (not #673)
5.4190 -#677 := (not #674)
5.4191 -#680 := (iff #677 #673)
5.4192 -#681 := [rewrite]: #680
5.4193 -#678 := (iff #378 #677)
5.4194 -#675 := (iff #287 #674)
5.4195 -#676 := [rewrite]: #675
5.4196 -#679 := [monotonicity #676]: #678
5.4197 -#683 := [trans #679 #681]: #682
5.4198 -#379 := [not-or-elim #347]: #378
5.4199 -#684 := [mp #379 #683]: #673
5.4200 -#702 := [unit-resolution #684 #701 #699]: false
5.4201 -#703 := [lemma #702]: #178
5.4202 -#704 := (or #177 #218)
5.4203 -#543 := (or #171 #177 #218)
5.4204 -#362 := (not #224)
5.4205 -#546 := (iff #362 #543)
5.4206 -#530 := (or #218 #467)
5.4207 -#544 := (iff #530 #543)
5.4208 -#545 := [rewrite]: #544
5.4209 -#541 := (iff #362 #530)
5.4210 -#531 := (not #530)
5.4211 -#536 := (not #531)
5.4212 -#539 := (iff #536 #530)
5.4213 -#540 := [rewrite]: #539
5.4214 -#537 := (iff #362 #536)
5.4215 -#534 := (iff #224 #531)
5.4216 -#527 := (and #468 #217)
5.4217 -#532 := (iff #527 #531)
5.4218 -#533 := [rewrite]: #532
5.4219 -#528 := (iff #224 #527)
5.4220 -#529 := [monotonicity #470]: #528
5.4221 -#535 := [trans #529 #533]: #534
5.4222 -#538 := [monotonicity #535]: #537
5.4223 -#542 := [trans #538 #540]: #541
5.4224 -#547 := [trans #542 #545]: #546
5.4225 -#363 := [not-or-elim #347]: #362
5.4226 -#548 := [mp #363 #547]: #543
5.4227 -#705 := [unit-resolution #548 #691]: #704
5.4228 -#706 := [unit-resolution #705 #703]: #218
5.4229 -#707 := (or #177 #237)
5.4230 -#633 := (or #171 #177 #237)
5.4231 -#372 := (not #268)
5.4232 -#636 := (iff #372 #633)
5.4233 -#620 := (or #237 #467)
5.4234 -#634 := (iff #620 #633)
5.4235 -#635 := [rewrite]: #634
5.4236 -#631 := (iff #372 #620)
5.4237 -#621 := (not #620)
5.4238 -#626 := (not #621)
5.4239 -#629 := (iff #626 #620)
5.4240 -#630 := [rewrite]: #629
5.4241 -#627 := (iff #372 #626)
5.4242 -#624 := (iff #268 #621)
5.4243 -#617 := (and #468 #238)
5.4244 -#622 := (iff #617 #621)
5.4245 -#623 := [rewrite]: #622
5.4246 -#618 := (iff #268 #617)
5.4247 -#619 := [monotonicity #470]: #618
5.4248 -#625 := [trans #619 #623]: #624
5.4249 -#628 := [monotonicity #625]: #627
5.4250 -#632 := [trans #628 #630]: #631
5.4251 -#637 := [trans #632 #635]: #636
5.4252 -#373 := [not-or-elim #347]: #372
5.4253 -#638 := [mp #373 #637]: #633
5.4254 -#708 := [unit-resolution #638 #691]: #707
5.4255 -#709 := [unit-resolution #708 #703]: #237
5.4256 -#611 := (or #190 #205 #217)
5.4257 -#370 := (not #260)
5.4258 -#614 := (iff #370 #611)
5.4259 -#598 := (or #190 #385)
5.4260 -#612 := (iff #598 #611)
5.4261 -#613 := [rewrite]: #612
5.4262 -#609 := (iff #370 #598)
5.4263 -#599 := (not #598)
5.4264 -#604 := (not #599)
5.4265 -#607 := (iff #604 #598)
5.4266 -#608 := [rewrite]: #607
5.4267 -#605 := (iff #370 #604)
5.4268 -#602 := (iff #260 #599)
5.4269 -#595 := (and #386 #189)
5.4270 -#600 := (iff #595 #599)
5.4271 -#601 := [rewrite]: #600
5.4272 -#596 := (iff #260 #595)
5.4273 -#597 := [monotonicity #388]: #596
5.4274 -#603 := [trans #597 #601]: #602
5.4275 -#606 := [monotonicity #603]: #605
5.4276 -#610 := [trans #606 #608]: #609
5.4277 -#615 := [trans #610 #613]: #614
5.4278 -#371 := [not-or-elim #347]: #370
5.4279 -#616 := [mp #371 #615]: #611
5.4280 -#710 := [unit-resolution #616 #706 #697]: #190
5.4281 -#405 := (or #189 #205 #217 #238)
5.4282 -#348 := (not #115)
5.4283 -#408 := (iff #348 #405)
5.4284 -#392 := (or #382 #385)
5.4285 -#406 := (iff #392 #405)
5.4286 -#407 := [rewrite]: #406
5.4287 -#403 := (iff #348 #392)
5.4288 -#393 := (not #392)
5.4289 -#398 := (not #393)
5.4290 -#401 := (iff #398 #392)
5.4291 -#402 := [rewrite]: #401
5.4292 -#399 := (iff #348 #398)
5.4293 -#396 := (iff #115 #393)
5.4294 -#389 := (and #380 #386)
5.4295 -#394 := (iff #389 #393)
5.4296 -#395 := [rewrite]: #394
5.4297 -#390 := (iff #115 #389)
5.4298 -#391 := [monotonicity #384 #388]: #390
5.4299 -#397 := [trans #391 #395]: #396
5.4300 -#400 := [monotonicity #397]: #399
5.4301 -#404 := [trans #400 #402]: #403
5.4302 -#409 := [trans #404 #407]: #408
5.4303 -#349 := [not-or-elim #347]: #348
5.4304 -#410 := [mp #349 #409]: #405
5.4305 -[unit-resolution #410 #710 #709 #697 #706]: false
5.4306 -unsat
5.4307 -efea5b71ce31ca68241e4ee8755a8335445d88e6 2291 0
5.4308 -#2 := false
5.4309 -#6 := 0::int
5.4310 -decl z3name!0 :: int
5.4311 -#647 := z3name!0
5.4312 -#81 := -1::int
5.4313 -#656 := (* -1::int z3name!0)
5.4314 -decl uf_2 :: int
5.4315 -#5 := uf_2
5.4316 -#882 := (+ uf_2 #656)
5.4317 -#883 := (<= #882 0::int)
5.4318 -#885 := (not #883)
5.4319 -#881 := (>= #882 0::int)
5.4320 -#884 := (not #881)
5.4321 -#886 := (or #884 #885)
5.4322 -decl uf_11 :: int
5.4323 -#55 := uf_11
5.4324 -#513 := (* -1::int uf_11)
5.4325 -#514 := (+ uf_2 #513)
5.4326 -#515 := (<= #514 0::int)
5.4327 -decl z3name!5 :: int
5.4328 -#777 := z3name!5
5.4329 -decl uf_7 :: int
5.4330 -#31 := uf_7
5.4331 -#1083 := (+ uf_7 z3name!5)
5.4332 -#1084 := (<= #1083 0::int)
5.4333 -#335 := (>= uf_7 0::int)
5.4334 -#1085 := (>= #1083 0::int)
5.4335 -#1087 := (not #1085)
5.4336 -#1086 := (not #1084)
5.4337 -#1088 := (or #1086 #1087)
5.4338 -#2302 := [hypothesis]: #1086
5.4339 -#1289 := (or #1088 #1084)
5.4340 -#1290 := [def-axiom]: #1289
5.4341 -#2303 := [unit-resolution #1290 #2302]: #1088
5.4342 -#1089 := (not #1088)
5.4343 -#1092 := (or #335 #1089)
5.4344 -#1099 := (not #1092)
5.4345 -#786 := (* -1::int z3name!5)
5.4346 -#1072 := (+ uf_7 #786)
5.4347 -#1073 := (<= #1072 0::int)
5.4348 -#1075 := (not #1073)
5.4349 -#1071 := (>= #1072 0::int)
5.4350 -#1074 := (not #1071)
5.4351 -#1076 := (or #1074 #1075)
5.4352 -#1077 := (not #1076)
5.4353 -#336 := (not #335)
5.4354 -#1080 := (or #336 #1077)
5.4355 -#1098 := (not #1080)
5.4356 -#1100 := (or #1098 #1099)
5.4357 -#1101 := (not #1100)
5.4358 -#318 := (* -1::int uf_7)
5.4359 -#780 := (= z3name!5 #318)
5.4360 -#781 := (or #335 #780)
5.4361 -#778 := (= z3name!5 uf_7)
5.4362 -#779 := (or #336 #778)
5.4363 -#782 := (and #779 #781)
5.4364 -#1104 := (iff #782 #1101)
5.4365 -#1095 := (and #1080 #1092)
5.4366 -#1102 := (iff #1095 #1101)
5.4367 -#1103 := [rewrite]: #1102
5.4368 -#1096 := (iff #782 #1095)
5.4369 -#1093 := (iff #781 #1092)
5.4370 -#1090 := (iff #780 #1089)
5.4371 -#1091 := [rewrite]: #1090
5.4372 -#1094 := [monotonicity #1091]: #1093
5.4373 -#1081 := (iff #779 #1080)
5.4374 -#1078 := (iff #778 #1077)
5.4375 -#1079 := [rewrite]: #1078
5.4376 -#1082 := [monotonicity #1079]: #1081
5.4377 -#1097 := [monotonicity #1082 #1094]: #1096
5.4378 -#1105 := [trans #1097 #1103]: #1104
5.4379 -#783 := [intro-def]: #782
5.4380 -#1106 := [mp #783 #1105]: #1101
5.4381 -#1108 := [not-or-elim #1106]: #1092
5.4382 -#2304 := [unit-resolution #1108 #2303]: #335
5.4383 -decl uf_4 :: int
5.4384 -#13 := uf_4
5.4385 -#194 := (>= uf_4 0::int)
5.4386 -decl uf_10 :: int
5.4387 -#49 := uf_10
5.4388 -#459 := (* -1::int uf_10)
5.4389 -decl uf_3 :: int
5.4390 -#10 := uf_3
5.4391 -#508 := (+ uf_3 #459)
5.4392 -#509 := (>= #508 0::int)
5.4393 -decl z3name!1 :: int
5.4394 -#673 := z3name!1
5.4395 -#682 := (* -1::int z3name!1)
5.4396 -decl uf_1 :: int
5.4397 -#4 := uf_1
5.4398 -#920 := (+ uf_1 #682)
5.4399 -#921 := (<= #920 0::int)
5.4400 -#931 := (+ uf_1 z3name!1)
5.4401 -#933 := (>= #931 0::int)
5.4402 -#935 := (not #933)
5.4403 -#932 := (<= #931 0::int)
5.4404 -#934 := (not #932)
5.4405 -#936 := (or #934 #935)
5.4406 -#937 := (not #936)
5.4407 -#147 := (>= uf_1 0::int)
5.4408 -#148 := (not #147)
5.4409 -#923 := (not #921)
5.4410 -#919 := (>= #920 0::int)
5.4411 -#922 := (not #919)
5.4412 -#924 := (or #922 #923)
5.4413 -#2022 := [hypothesis]: #923
5.4414 -#1237 := (or #924 #921)
5.4415 -#1238 := [def-axiom]: #1237
5.4416 -#2023 := [unit-resolution #1238 #2022]: #924
5.4417 -#925 := (not #924)
5.4418 -#928 := (or #148 #925)
5.4419 -#940 := (or #147 #937)
5.4420 -#947 := (not #940)
5.4421 -#946 := (not #928)
5.4422 -#948 := (or #946 #947)
5.4423 -#949 := (not #948)
5.4424 -#130 := (* -1::int uf_1)
5.4425 -#676 := (= z3name!1 #130)
5.4426 -#677 := (or #147 #676)
5.4427 -#674 := (= z3name!1 uf_1)
5.4428 -#675 := (or #148 #674)
5.4429 -#678 := (and #675 #677)
5.4430 -#952 := (iff #678 #949)
5.4431 -#943 := (and #928 #940)
5.4432 -#950 := (iff #943 #949)
5.4433 -#951 := [rewrite]: #950
5.4434 -#944 := (iff #678 #943)
5.4435 -#941 := (iff #677 #940)
5.4436 -#938 := (iff #676 #937)
5.4437 -#939 := [rewrite]: #938
5.4438 -#942 := [monotonicity #939]: #941
5.4439 -#929 := (iff #675 #928)
5.4440 -#926 := (iff #674 #925)
5.4441 -#927 := [rewrite]: #926
5.4442 -#930 := [monotonicity #927]: #929
5.4443 -#945 := [monotonicity #930 #942]: #944
5.4444 -#953 := [trans #945 #951]: #952
5.4445 -#679 := [intro-def]: #678
5.4446 -#954 := [mp #679 #953]: #949
5.4447 -#955 := [not-or-elim #954]: #928
5.4448 -#2024 := [unit-resolution #955 #2023]: #148
5.4449 -#956 := [not-or-elim #954]: #940
5.4450 -#2025 := [unit-resolution #956 #2024]: #937
5.4451 -#2026 := (or #921 #919)
5.4452 -#2027 := [th-lemma]: #2026
5.4453 -#2028 := [unit-resolution #2027 #2022]: #919
5.4454 -#2029 := (or #922 #147 #935)
5.4455 -#2030 := [th-lemma]: #2029
5.4456 -#2031 := [unit-resolution #2030 #2024 #2028]: #935
5.4457 -#1243 := (or #936 #933)
5.4458 -#1244 := [def-axiom]: #1243
5.4459 -#2032 := [unit-resolution #1244 #2031 #2025]: false
5.4460 -#2033 := [lemma #2032]: #921
5.4461 -decl z3name!7 :: int
5.4462 -#829 := z3name!7
5.4463 -decl uf_9 :: int
5.4464 -#43 := uf_9
5.4465 -#1159 := (+ uf_9 z3name!7)
5.4466 -#1160 := (<= #1159 0::int)
5.4467 -#838 := (* -1::int z3name!7)
5.4468 -#1148 := (+ uf_9 #838)
5.4469 -#1147 := (>= #1148 0::int)
5.4470 -decl z3name!4 :: int
5.4471 -#751 := z3name!4
5.4472 -#760 := (* -1::int z3name!4)
5.4473 -decl uf_6 :: int
5.4474 -#25 := uf_6
5.4475 -#1034 := (+ uf_6 #760)
5.4476 -#1033 := (>= #1034 0::int)
5.4477 -#1035 := (<= #1034 0::int)
5.4478 -#1037 := (not #1035)
5.4479 -#1036 := (not #1033)
5.4480 -#1038 := (or #1036 #1037)
5.4481 -#1039 := (not #1038)
5.4482 -#288 := (>= uf_6 0::int)
5.4483 -#893 := (+ uf_2 z3name!0)
5.4484 -#895 := (>= #893 0::int)
5.4485 -#897 := (not #895)
5.4486 -#894 := (<= #893 0::int)
5.4487 -#896 := (not #894)
5.4488 -#898 := (or #896 #897)
5.4489 -#899 := (not #898)
5.4490 -#100 := (>= uf_2 0::int)
5.4491 -#101 := (not #100)
5.4492 -#1736 := [hypothesis]: #885
5.4493 -#1225 := (or #886 #883)
5.4494 -#1226 := [def-axiom]: #1225
5.4495 -#1737 := [unit-resolution #1226 #1736]: #886
5.4496 -#887 := (not #886)
5.4497 -#890 := (or #101 #887)
5.4498 -#902 := (or #100 #899)
5.4499 -#909 := (not #902)
5.4500 -#908 := (not #890)
5.4501 -#910 := (or #908 #909)
5.4502 -#911 := (not #910)
5.4503 -#82 := (* -1::int uf_2)
5.4504 -#650 := (= z3name!0 #82)
5.4505 -#651 := (or #100 #650)
5.4506 -#648 := (= z3name!0 uf_2)
5.4507 -#649 := (or #101 #648)
5.4508 -#652 := (and #649 #651)
5.4509 -#914 := (iff #652 #911)
5.4510 -#905 := (and #890 #902)
5.4511 -#912 := (iff #905 #911)
5.4512 -#913 := [rewrite]: #912
5.4513 -#906 := (iff #652 #905)
5.4514 -#903 := (iff #651 #902)
5.4515 -#900 := (iff #650 #899)
5.4516 -#901 := [rewrite]: #900
5.4517 -#904 := [monotonicity #901]: #903
5.4518 -#891 := (iff #649 #890)
5.4519 -#888 := (iff #648 #887)
5.4520 -#889 := [rewrite]: #888
5.4521 -#892 := [monotonicity #889]: #891
5.4522 -#907 := [monotonicity #892 #904]: #906
5.4523 -#915 := [trans #907 #913]: #914
5.4524 -#653 := [intro-def]: #652
5.4525 -#916 := [mp #653 #915]: #911
5.4526 -#917 := [not-or-elim #916]: #890
5.4527 -#1738 := [unit-resolution #917 #1737]: #101
5.4528 -#918 := [not-or-elim #916]: #902
5.4529 -#1739 := [unit-resolution #918 #1738]: #899
5.4530 -#1231 := (or #898 #895)
5.4531 -#1232 := [def-axiom]: #1231
5.4532 -#1740 := [unit-resolution #1232 #1739]: #895
5.4533 -#1741 := [th-lemma #1736 #1738 #1740]: false
5.4534 -#1742 := [lemma #1741]: #883
5.4535 -#1149 := (<= #1148 0::int)
5.4536 -#1151 := (not #1149)
5.4537 -#1150 := (not #1147)
5.4538 -#1152 := (or #1150 #1151)
5.4539 -#1153 := (not #1152)
5.4540 -#429 := (>= uf_9 0::int)
5.4541 -decl z3name!6 :: int
5.4542 -#803 := z3name!6
5.4543 -#812 := (* -1::int z3name!6)
5.4544 -decl uf_8 :: int
5.4545 -#37 := uf_8
5.4546 -#1110 := (+ uf_8 #812)
5.4547 -#1111 := (<= #1110 0::int)
5.4548 -#1113 := (not #1111)
5.4549 -#1109 := (>= #1110 0::int)
5.4550 -#1112 := (not #1109)
5.4551 -#1114 := (or #1112 #1113)
5.4552 -#1865 := [hypothesis]: #1113
5.4553 -#1297 := (or #1114 #1111)
5.4554 -#1298 := [def-axiom]: #1297
5.4555 -#1866 := [unit-resolution #1298 #1865]: #1114
5.4556 -#382 := (>= uf_8 0::int)
5.4557 -#1685 := (or #1111 #1109)
5.4558 -#1686 := [th-lemma]: #1685
5.4559 -#1867 := [unit-resolution #1686 #1865]: #1109
5.4560 -#1734 := (or #382 #1112)
5.4561 -#1121 := (+ uf_8 z3name!6)
5.4562 -#1123 := (>= #1121 0::int)
5.4563 -#1125 := (not #1123)
5.4564 -#1122 := (<= #1121 0::int)
5.4565 -#1124 := (not #1122)
5.4566 -#1126 := (or #1124 #1125)
5.4567 -#1127 := (not #1126)
5.4568 -#383 := (not #382)
5.4569 -#1428 := [hypothesis]: #383
5.4570 -#1130 := (or #382 #1127)
5.4571 -#1137 := (not #1130)
5.4572 -#1115 := (not #1114)
5.4573 -#1118 := (or #383 #1115)
5.4574 -#1136 := (not #1118)
5.4575 -#1138 := (or #1136 #1137)
5.4576 -#1139 := (not #1138)
5.4577 -#365 := (* -1::int uf_8)
5.4578 -#806 := (= z3name!6 #365)
5.4579 -#807 := (or #382 #806)
5.4580 -#804 := (= z3name!6 uf_8)
5.4581 -#805 := (or #383 #804)
5.4582 -#808 := (and #805 #807)
5.4583 -#1142 := (iff #808 #1139)
5.4584 -#1133 := (and #1118 #1130)
5.4585 -#1140 := (iff #1133 #1139)
5.4586 -#1141 := [rewrite]: #1140
5.4587 -#1134 := (iff #808 #1133)
5.4588 -#1131 := (iff #807 #1130)
5.4589 -#1128 := (iff #806 #1127)
5.4590 -#1129 := [rewrite]: #1128
5.4591 -#1132 := [monotonicity #1129]: #1131
5.4592 -#1119 := (iff #805 #1118)
5.4593 -#1116 := (iff #804 #1115)
5.4594 -#1117 := [rewrite]: #1116
5.4595 -#1120 := [monotonicity #1117]: #1119
5.4596 -#1135 := [monotonicity #1120 #1132]: #1134
5.4597 -#1143 := [trans #1135 #1141]: #1142
5.4598 -#809 := [intro-def]: #808
5.4599 -#1144 := [mp #809 #1143]: #1139
5.4600 -#1146 := [not-or-elim #1144]: #1130
5.4601 -#1729 := [unit-resolution #1146 #1428]: #1127
5.4602 -#1637 := [hypothesis]: #1109
5.4603 -#1730 := (or #1112 #1125 #382)
5.4604 -#1731 := [th-lemma]: #1730
5.4605 -#1732 := [unit-resolution #1731 #1428 #1637]: #1125
5.4606 -#1303 := (or #1126 #1123)
5.4607 -#1304 := [def-axiom]: #1303
5.4608 -#1733 := [unit-resolution #1304 #1732 #1729]: false
5.4609 -#1735 := [lemma #1733]: #1734
5.4610 -#1868 := [unit-resolution #1735 #1867]: #382
5.4611 -#1145 := [not-or-elim #1144]: #1118
5.4612 -#1869 := [unit-resolution #1145 #1868 #1866]: false
5.4613 -#1870 := [lemma #1869]: #1111
5.4614 -#289 := (not #288)
5.4615 -#1405 := [hypothesis]: #289
5.4616 -#1688 := (or #288 #429 #1113)
5.4617 -#815 := (+ uf_9 #812)
5.4618 -#818 := (+ uf_7 #815)
5.4619 -#825 := (>= #818 0::int)
5.4620 -#389 := (ite #382 uf_8 #365)
5.4621 -#400 := (* -1::int #389)
5.4622 -#401 := (+ uf_9 #400)
5.4623 -#402 := (+ uf_7 #401)
5.4624 -#599 := (>= #402 0::int)
5.4625 -#826 := (= #599 #825)
5.4626 -#819 := (~ #402 #818)
5.4627 -#816 := (~ #401 #815)
5.4628 -#813 := (~ #400 #812)
5.4629 -#810 := (~ #389 z3name!6)
5.4630 -#811 := [apply-def #809]: #810
5.4631 -#814 := [monotonicity #811]: #813
5.4632 -#817 := [monotonicity #814]: #816
5.4633 -#820 := [monotonicity #817]: #819
5.4634 -#827 := [monotonicity #820]: #826
5.4635 -#601 := (not #599)
5.4636 -#598 := (<= #402 0::int)
5.4637 -#600 := (not #598)
5.4638 -#602 := (or #600 #601)
5.4639 -#603 := (not #602)
5.4640 -#403 := (= #402 0::int)
5.4641 -#604 := (iff #403 #603)
5.4642 -#605 := [rewrite]: #604
5.4643 -#45 := (- uf_8)
5.4644 -#44 := (< uf_8 0::int)
5.4645 -#46 := (ite #44 #45 uf_8)
5.4646 -#47 := (- #46 uf_7)
5.4647 -#48 := (= uf_9 #47)
5.4648 -#408 := (iff #48 #403)
5.4649 -#368 := (ite #44 #365 uf_8)
5.4650 -#374 := (+ #318 #368)
5.4651 -#379 := (= uf_9 #374)
5.4652 -#406 := (iff #379 #403)
5.4653 -#394 := (+ #318 #389)
5.4654 -#397 := (= uf_9 #394)
5.4655 -#404 := (iff #397 #403)
5.4656 -#405 := [rewrite]: #404
5.4657 -#398 := (iff #379 #397)
5.4658 -#395 := (= #374 #394)
5.4659 -#392 := (= #368 #389)
5.4660 -#386 := (ite #383 #365 uf_8)
5.4661 -#390 := (= #386 #389)
5.4662 -#391 := [rewrite]: #390
5.4663 -#387 := (= #368 #386)
5.4664 -#384 := (iff #44 #383)
5.4665 -#385 := [rewrite]: #384
5.4666 -#388 := [monotonicity #385]: #387
5.4667 -#393 := [trans #388 #391]: #392
5.4668 -#396 := [monotonicity #393]: #395
5.4669 -#399 := [monotonicity #396]: #398
5.4670 -#407 := [trans #399 #405]: #406
5.4671 -#380 := (iff #48 #379)
5.4672 -#377 := (= #47 #374)
5.4673 -#371 := (- #368 uf_7)
5.4674 -#375 := (= #371 #374)
5.4675 -#376 := [rewrite]: #375
5.4676 -#372 := (= #47 #371)
5.4677 -#369 := (= #46 #368)
5.4678 -#366 := (= #45 #365)
5.4679 -#367 := [rewrite]: #366
5.4680 -#370 := [monotonicity #367]: #369
5.4681 -#373 := [monotonicity #370]: #372
5.4682 -#378 := [trans #373 #376]: #377
5.4683 -#381 := [monotonicity #378]: #380
5.4684 -#409 := [trans #381 #407]: #408
5.4685 -#364 := [asserted]: #48
5.4686 -#410 := [mp #364 #409]: #403
5.4687 -#606 := [mp #410 #605]: #603
5.4688 -#608 := [not-or-elim #606]: #599
5.4689 -#828 := [mp~ #608 #827]: #825
5.4690 -#1441 := [hypothesis]: #1075
5.4691 -#1285 := (or #1076 #1073)
5.4692 -#1286 := [def-axiom]: #1285
5.4693 -#1442 := [unit-resolution #1286 #1441]: #1076
5.4694 -#1107 := [not-or-elim #1106]: #1080
5.4695 -#1443 := [unit-resolution #1107 #1442]: #336
5.4696 -#1444 := [unit-resolution #1108 #1443]: #1089
5.4697 -#1291 := (or #1088 #1085)
5.4698 -#1292 := [def-axiom]: #1291
5.4699 -#1445 := [unit-resolution #1292 #1444]: #1085
5.4700 -#1446 := [th-lemma #1441 #1445 #1443]: false
5.4701 -#1447 := [lemma #1446]: #1073
5.4702 -#789 := (+ uf_8 #786)
5.4703 -#792 := (+ uf_6 #789)
5.4704 -#799 := (>= #792 0::int)
5.4705 -#342 := (ite #335 uf_7 #318)
5.4706 -#353 := (* -1::int #342)
5.4707 -#354 := (+ uf_8 #353)
5.4708 -#355 := (+ uf_6 #354)
5.4709 -#588 := (>= #355 0::int)
5.4710 -#800 := (= #588 #799)
5.4711 -#793 := (~ #355 #792)
5.4712 -#790 := (~ #354 #789)
5.4713 -#787 := (~ #353 #786)
5.4714 -#784 := (~ #342 z3name!5)
5.4715 -#785 := [apply-def #783]: #784
5.4716 -#788 := [monotonicity #785]: #787
5.4717 -#791 := [monotonicity #788]: #790
5.4718 -#794 := [monotonicity #791]: #793
5.4719 -#801 := [monotonicity #794]: #800
5.4720 -#590 := (not #588)
5.4721 -#587 := (<= #355 0::int)
5.4722 -#589 := (not #587)
5.4723 -#591 := (or #589 #590)
5.4724 -#592 := (not #591)
5.4725 -#356 := (= #355 0::int)
5.4726 -#593 := (iff #356 #592)
5.4727 -#594 := [rewrite]: #593
5.4728 -#39 := (- uf_7)
5.4729 -#38 := (< uf_7 0::int)
5.4730 -#40 := (ite #38 #39 uf_7)
5.4731 -#41 := (- #40 uf_6)
5.4732 -#42 := (= uf_8 #41)
5.4733 -#361 := (iff #42 #356)
5.4734 -#321 := (ite #38 #318 uf_7)
5.4735 -#271 := (* -1::int uf_6)
5.4736 -#327 := (+ #271 #321)
5.4737 -#332 := (= uf_8 #327)
5.4738 -#359 := (iff #332 #356)
5.4739 -#347 := (+ #271 #342)
5.4740 -#350 := (= uf_8 #347)
5.4741 -#357 := (iff #350 #356)
5.4742 -#358 := [rewrite]: #357
5.4743 -#351 := (iff #332 #350)
5.4744 -#348 := (= #327 #347)
5.4745 -#345 := (= #321 #342)
5.4746 -#339 := (ite #336 #318 uf_7)
5.4747 -#343 := (= #339 #342)
5.4748 -#344 := [rewrite]: #343
5.4749 -#340 := (= #321 #339)
5.4750 -#337 := (iff #38 #336)
5.4751 -#338 := [rewrite]: #337
5.4752 -#341 := [monotonicity #338]: #340
5.4753 -#346 := [trans #341 #344]: #345
5.4754 -#349 := [monotonicity #346]: #348
5.4755 -#352 := [monotonicity #349]: #351
5.4756 -#360 := [trans #352 #358]: #359
5.4757 -#333 := (iff #42 #332)
5.4758 -#330 := (= #41 #327)
5.4759 -#324 := (- #321 uf_6)
5.4760 -#328 := (= #324 #327)
5.4761 -#329 := [rewrite]: #328
5.4762 -#325 := (= #41 #324)
5.4763 -#322 := (= #40 #321)
5.4764 -#319 := (= #39 #318)
5.4765 -#320 := [rewrite]: #319
5.4766 -#323 := [monotonicity #320]: #322
5.4767 -#326 := [monotonicity #323]: #325
5.4768 -#331 := [trans #326 #329]: #330
5.4769 -#334 := [monotonicity #331]: #333
5.4770 -#362 := [trans #334 #360]: #361
5.4771 -#317 := [asserted]: #42
5.4772 -#363 := [mp #317 #362]: #356
5.4773 -#595 := [mp #363 #594]: #592
5.4774 -#597 := [not-or-elim #595]: #588
5.4775 -#802 := [mp~ #597 #801]: #799
5.4776 -#1343 := (not #825)
5.4777 -#1350 := (not #799)
5.4778 -#1351 := (or #288 #1075 #1350 #429 #1113 #1343)
5.4779 -#1352 := [th-lemma]: #1351
5.4780 -#1689 := [unit-resolution #1352 #802 #1447 #828]: #1688
5.4781 -#2046 := [unit-resolution #1689 #1405 #1870]: #429
5.4782 -#430 := (not #429)
5.4783 -#1156 := (or #430 #1153)
5.4784 -#1161 := (>= #1159 0::int)
5.4785 -#1163 := (not #1161)
5.4786 -#1162 := (not #1160)
5.4787 -#1164 := (or #1162 #1163)
5.4788 -#1165 := (not #1164)
5.4789 -#1168 := (or #429 #1165)
5.4790 -#1175 := (not #1168)
5.4791 -#1174 := (not #1156)
5.4792 -#1176 := (or #1174 #1175)
5.4793 -#1177 := (not #1176)
5.4794 -#412 := (* -1::int uf_9)
5.4795 -#832 := (= z3name!7 #412)
5.4796 -#833 := (or #429 #832)
5.4797 -#830 := (= z3name!7 uf_9)
5.4798 -#831 := (or #430 #830)
5.4799 -#834 := (and #831 #833)
5.4800 -#1180 := (iff #834 #1177)
5.4801 -#1171 := (and #1156 #1168)
5.4802 -#1178 := (iff #1171 #1177)
5.4803 -#1179 := [rewrite]: #1178
5.4804 -#1172 := (iff #834 #1171)
5.4805 -#1169 := (iff #833 #1168)
5.4806 -#1166 := (iff #832 #1165)
5.4807 -#1167 := [rewrite]: #1166
5.4808 -#1170 := [monotonicity #1167]: #1169
5.4809 -#1157 := (iff #831 #1156)
5.4810 -#1154 := (iff #830 #1153)
5.4811 -#1155 := [rewrite]: #1154
5.4812 -#1158 := [monotonicity #1155]: #1157
5.4813 -#1173 := [monotonicity #1158 #1170]: #1172
5.4814 -#1181 := [trans #1173 #1179]: #1180
5.4815 -#835 := [intro-def]: #834
5.4816 -#1182 := [mp #835 #1181]: #1177
5.4817 -#1183 := [not-or-elim #1182]: #1156
5.4818 -#2047 := [unit-resolution #1183 #2046]: #1153
5.4819 -#1307 := (or #1152 #1147)
5.4820 -#1308 := [def-axiom]: #1307
5.4821 -#2112 := [unit-resolution #1308 #2047]: #1147
5.4822 -#2009 := (or #288 #382)
5.4823 -#1998 := (or #1036 #288)
5.4824 -#1045 := (+ uf_6 z3name!4)
5.4825 -#1047 := (>= #1045 0::int)
5.4826 -#1049 := (not #1047)
5.4827 -#1046 := (<= #1045 0::int)
5.4828 -#1048 := (not #1046)
5.4829 -#1050 := (or #1048 #1049)
5.4830 -#1460 := [hypothesis]: #1049
5.4831 -#1279 := (or #1050 #1047)
5.4832 -#1280 := [def-axiom]: #1279
5.4833 -#1461 := [unit-resolution #1280 #1460]: #1050
5.4834 -#1464 := (or #1047 #289)
5.4835 -#1051 := (not #1050)
5.4836 -#1448 := [hypothesis]: #1037
5.4837 -#1273 := (or #1038 #1035)
5.4838 -#1274 := [def-axiom]: #1273
5.4839 -#1449 := [unit-resolution #1274 #1448]: #1038
5.4840 -#1042 := (or #289 #1039)
5.4841 -#1054 := (or #288 #1051)
5.4842 -#1061 := (not #1054)
5.4843 -#1060 := (not #1042)
5.4844 -#1062 := (or #1060 #1061)
5.4845 -#1063 := (not #1062)
5.4846 -#754 := (= z3name!4 #271)
5.4847 -#755 := (or #288 #754)
5.4848 -#752 := (= z3name!4 uf_6)
5.4849 -#753 := (or #289 #752)
5.4850 -#756 := (and #753 #755)
5.4851 -#1066 := (iff #756 #1063)
5.4852 -#1057 := (and #1042 #1054)
5.4853 -#1064 := (iff #1057 #1063)
5.4854 -#1065 := [rewrite]: #1064
5.4855 -#1058 := (iff #756 #1057)
5.4856 -#1055 := (iff #755 #1054)
5.4857 -#1052 := (iff #754 #1051)
5.4858 -#1053 := [rewrite]: #1052
5.4859 -#1056 := [monotonicity #1053]: #1055
5.4860 -#1043 := (iff #753 #1042)
5.4861 -#1040 := (iff #752 #1039)
5.4862 -#1041 := [rewrite]: #1040
5.4863 -#1044 := [monotonicity #1041]: #1043
5.4864 -#1059 := [monotonicity #1044 #1056]: #1058
5.4865 -#1067 := [trans #1059 #1065]: #1066
5.4866 -#757 := [intro-def]: #756
5.4867 -#1068 := [mp #757 #1067]: #1063
5.4868 -#1069 := [not-or-elim #1068]: #1042
5.4869 -#1450 := [unit-resolution #1069 #1449]: #289
5.4870 -#1070 := [not-or-elim #1068]: #1054
5.4871 -#1451 := [unit-resolution #1070 #1450]: #1051
5.4872 -#1452 := (or #1035 #1033)
5.4873 -#1453 := [th-lemma]: #1452
5.4874 -#1454 := [unit-resolution #1453 #1448]: #1033
5.4875 -#1455 := (or #1036 #288 #1049)
5.4876 -#1456 := [th-lemma]: #1455
5.4877 -#1457 := [unit-resolution #1456 #1450 #1454]: #1049
5.4878 -#1458 := [unit-resolution #1280 #1457 #1451]: false
5.4879 -#1459 := [lemma #1458]: #1035
5.4880 -#1462 := (or #1047 #1037 #289)
5.4881 -#1463 := [th-lemma]: #1462
5.4882 -#1465 := [unit-resolution #1463 #1459]: #1464
5.4883 -#1466 := [unit-resolution #1465 #1460]: #289
5.4884 -#1467 := [unit-resolution #1070 #1466 #1461]: false
5.4885 -#1468 := [lemma #1467]: #1047
5.4886 -#1999 := [unit-resolution #1456 #1468]: #1998
5.4887 -#2000 := [unit-resolution #1999 #1405]: #1036
5.4888 -#1407 := [unit-resolution #1070 #1405]: #1051
5.4889 -#1277 := (or #1050 #1046)
5.4890 -#1278 := [def-axiom]: #1277
5.4891 -#1497 := [unit-resolution #1278 #1407]: #1046
5.4892 -#2001 := (or #336 #1048 #1033 #382 #1350 #1075)
5.4893 -#2002 := [th-lemma]: #2001
5.4894 -#2003 := [unit-resolution #2002 #1497 #2000 #1447 #802 #1428]: #336
5.4895 -#2004 := (or #1087 #1075 #1048 #1033 #382 #1350)
5.4896 -#2005 := [th-lemma]: #2004
5.4897 -#2006 := [unit-resolution #2005 #1497 #1447 #2000 #802 #1428]: #1087
5.4898 -#2007 := [unit-resolution #1292 #2006]: #1088
5.4899 -#2008 := [unit-resolution #1108 #2007 #2003]: false
5.4900 -#2010 := [lemma #2008]: #2009
5.4901 -#2113 := [unit-resolution #2010 #1405]: #382
5.4902 -#2114 := [unit-resolution #1145 #2113]: #1115
5.4903 -#1295 := (or #1114 #1109)
5.4904 -#1296 := [def-axiom]: #1295
5.4905 -#2115 := [unit-resolution #1296 #2114]: #1109
5.4906 -decl z3name!2 :: int
5.4907 -#699 := z3name!2
5.4908 -#708 := (* -1::int z3name!2)
5.4909 -#958 := (+ uf_4 #708)
5.4910 -#957 := (>= #958 0::int)
5.4911 -#959 := (<= #958 0::int)
5.4912 -#961 := (not #959)
5.4913 -#960 := (not #957)
5.4914 -#962 := (or #960 #961)
5.4915 -#963 := (not #962)
5.4916 -decl uf_5 :: int
5.4917 -#19 := uf_5
5.4918 -#241 := (>= uf_5 0::int)
5.4919 -#242 := (not #241)
5.4920 -#1406 := [hypothesis]: #242
5.4921 -#1579 := (or #1048 #241)
5.4922 -#516 := (>= #514 0::int)
5.4923 -#476 := (>= uf_10 0::int)
5.4924 -#477 := (not #476)
5.4925 -#1484 := (or #382 #241)
5.4926 -#1430 := (or #382 #241 #1075 #1037)
5.4927 -#1421 := [hypothesis]: #1035
5.4928 -#1427 := [hypothesis]: #1073
5.4929 -#763 := (+ uf_7 #760)
5.4930 -#766 := (+ uf_5 #763)
5.4931 -#773 := (>= #766 0::int)
5.4932 -#295 := (ite #288 uf_6 #271)
5.4933 -#306 := (* -1::int #295)
5.4934 -#307 := (+ uf_7 #306)
5.4935 -#308 := (+ uf_5 #307)
5.4936 -#577 := (>= #308 0::int)
5.4937 -#774 := (= #577 #773)
5.4938 -#767 := (~ #308 #766)
5.4939 -#764 := (~ #307 #763)
5.4940 -#761 := (~ #306 #760)
5.4941 -#758 := (~ #295 z3name!4)
5.4942 -#759 := [apply-def #757]: #758
5.4943 -#762 := [monotonicity #759]: #761
5.4944 -#765 := [monotonicity #762]: #764
5.4945 -#768 := [monotonicity #765]: #767
5.4946 -#775 := [monotonicity #768]: #774
5.4947 -#579 := (not #577)
5.4948 -#576 := (<= #308 0::int)
5.4949 -#578 := (not #576)
5.4950 -#580 := (or #578 #579)
5.4951 -#581 := (not #580)
5.4952 -#309 := (= #308 0::int)
5.4953 -#582 := (iff #309 #581)
5.4954 -#583 := [rewrite]: #582
5.4955 -#33 := (- uf_6)
5.4956 -#32 := (< uf_6 0::int)
5.4957 -#34 := (ite #32 #33 uf_6)
5.4958 -#35 := (- #34 uf_5)
5.4959 -#36 := (= uf_7 #35)
5.4960 -#314 := (iff #36 #309)
5.4961 -#274 := (ite #32 #271 uf_6)
5.4962 -#224 := (* -1::int uf_5)
5.4963 -#280 := (+ #224 #274)
5.4964 -#285 := (= uf_7 #280)
5.4965 -#312 := (iff #285 #309)
5.4966 -#300 := (+ #224 #295)
5.4967 -#303 := (= uf_7 #300)
5.4968 -#310 := (iff #303 #309)
5.4969 -#311 := [rewrite]: #310
5.4970 -#304 := (iff #285 #303)
5.4971 -#301 := (= #280 #300)
5.4972 -#298 := (= #274 #295)
5.4973 -#292 := (ite #289 #271 uf_6)
5.4974 -#296 := (= #292 #295)
5.4975 -#297 := [rewrite]: #296
5.4976 -#293 := (= #274 #292)
5.4977 -#290 := (iff #32 #289)
5.4978 -#291 := [rewrite]: #290
5.4979 -#294 := [monotonicity #291]: #293
5.4980 -#299 := [trans #294 #297]: #298
5.4981 -#302 := [monotonicity #299]: #301
5.4982 -#305 := [monotonicity #302]: #304
5.4983 -#313 := [trans #305 #311]: #312
5.4984 -#286 := (iff #36 #285)
5.4985 -#283 := (= #35 #280)
5.4986 -#277 := (- #274 uf_5)
5.4987 -#281 := (= #277 #280)
5.4988 -#282 := [rewrite]: #281
5.4989 -#278 := (= #35 #277)
5.4990 -#275 := (= #34 #274)
5.4991 -#272 := (= #33 #271)
5.4992 -#273 := [rewrite]: #272
5.4993 -#276 := [monotonicity #273]: #275
5.4994 -#279 := [monotonicity #276]: #278
5.4995 -#284 := [trans #279 #282]: #283
5.4996 -#287 := [monotonicity #284]: #286
5.4997 -#315 := [trans #287 #313]: #314
5.4998 -#270 := [asserted]: #36
5.4999 -#316 := [mp #270 #315]: #309
5.5000 -#584 := [mp #316 #583]: #581
5.5001 -#586 := [not-or-elim #584]: #577
5.5002 -#776 := [mp~ #586 #775]: #773
5.5003 -#1429 := [th-lemma #776 #1406 #1428 #1427 #802 #1421]: false
5.5004 -#1431 := [lemma #1429]: #1430
5.5005 -#1485 := [unit-resolution #1431 #1447 #1459]: #1484
5.5006 -#1486 := [unit-resolution #1485 #1406]: #382
5.5007 -#1487 := [unit-resolution #1145 #1486]: #1115
5.5008 -#1496 := [unit-resolution #1298 #1487]: #1111
5.5009 -#1545 := [hypothesis]: #1046
5.5010 -#1548 := (or #1048 #1113 #429)
5.5011 -#1546 := (or #1048 #1113 #429 #1343 #1075 #1350 #1037)
5.5012 -#1547 := [th-lemma]: #1546
5.5013 -#1549 := [unit-resolution #1547 #1447 #802 #1459 #828]: #1548
5.5014 -#1550 := [unit-resolution #1549 #1545 #1496]: #429
5.5015 -#1551 := [unit-resolution #1183 #1550]: #1153
5.5016 -#1552 := [unit-resolution #1308 #1551]: #1147
5.5017 -#1543 := (or #477 #241 #1150)
5.5018 -#1488 := [unit-resolution #1296 #1487]: #1109
5.5019 -#821 := (<= #818 0::int)
5.5020 -#822 := (= #598 #821)
5.5021 -#823 := [monotonicity #820]: #822
5.5022 -#607 := [not-or-elim #606]: #598
5.5023 -#824 := [mp~ #607 #823]: #821
5.5024 -#841 := (+ uf_10 #838)
5.5025 -#844 := (+ uf_8 #841)
5.5026 -#847 := (<= #844 0::int)
5.5027 -#436 := (ite #429 uf_9 #412)
5.5028 -#447 := (* -1::int #436)
5.5029 -#448 := (+ uf_10 #447)
5.5030 -#449 := (+ uf_8 #448)
5.5031 -#609 := (<= #449 0::int)
5.5032 -#848 := (= #609 #847)
5.5033 -#845 := (~ #449 #844)
5.5034 -#842 := (~ #448 #841)
5.5035 -#839 := (~ #447 #838)
5.5036 -#836 := (~ #436 z3name!7)
5.5037 -#837 := [apply-def #835]: #836
5.5038 -#840 := [monotonicity #837]: #839
5.5039 -#843 := [monotonicity #840]: #842
5.5040 -#846 := [monotonicity #843]: #845
5.5041 -#849 := [monotonicity #846]: #848
5.5042 -#610 := (>= #449 0::int)
5.5043 -#612 := (not #610)
5.5044 -#611 := (not #609)
5.5045 -#613 := (or #611 #612)
5.5046 -#614 := (not #613)
5.5047 -#450 := (= #449 0::int)
5.5048 -#615 := (iff #450 #614)
5.5049 -#616 := [rewrite]: #615
5.5050 -#51 := (- uf_9)
5.5051 -#50 := (< uf_9 0::int)
5.5052 -#52 := (ite #50 #51 uf_9)
5.5053 -#53 := (- #52 uf_8)
5.5054 -#54 := (= uf_10 #53)
5.5055 -#455 := (iff #54 #450)
5.5056 -#415 := (ite #50 #412 uf_9)
5.5057 -#421 := (+ #365 #415)
5.5058 -#426 := (= uf_10 #421)
5.5059 -#453 := (iff #426 #450)
5.5060 -#441 := (+ #365 #436)
5.5061 -#444 := (= uf_10 #441)
5.5062 -#451 := (iff #444 #450)
5.5063 -#452 := [rewrite]: #451
5.5064 -#445 := (iff #426 #444)
5.5065 -#442 := (= #421 #441)
5.5066 -#439 := (= #415 #436)
5.5067 -#433 := (ite #430 #412 uf_9)
5.5068 -#437 := (= #433 #436)
5.5069 -#438 := [rewrite]: #437
5.5070 -#434 := (= #415 #433)
5.5071 -#431 := (iff #50 #430)
5.5072 -#432 := [rewrite]: #431
5.5073 -#435 := [monotonicity #432]: #434
5.5074 -#440 := [trans #435 #438]: #439
5.5075 -#443 := [monotonicity #440]: #442
5.5076 -#446 := [monotonicity #443]: #445
5.5077 -#454 := [trans #446 #452]: #453
5.5078 -#427 := (iff #54 #426)
5.5079 -#424 := (= #53 #421)
5.5080 -#418 := (- #415 uf_8)
5.5081 -#422 := (= #418 #421)
5.5082 -#423 := [rewrite]: #422
5.5083 -#419 := (= #53 #418)
5.5084 -#416 := (= #52 #415)
5.5085 -#413 := (= #51 #412)
5.5086 -#414 := [rewrite]: #413
5.5087 -#417 := [monotonicity #414]: #416
5.5088 -#420 := [monotonicity #417]: #419
5.5089 -#425 := [trans #420 #423]: #424
5.5090 -#428 := [monotonicity #425]: #427
5.5091 -#456 := [trans #428 #454]: #455
5.5092 -#411 := [asserted]: #54
5.5093 -#457 := [mp #411 #456]: #450
5.5094 -#617 := [mp #457 #616]: #614
5.5095 -#618 := [not-or-elim #617]: #609
5.5096 -#850 := [mp~ #618 #849]: #847
5.5097 -#1540 := [hypothesis]: #1147
5.5098 -#1541 := [hypothesis]: #476
5.5099 -#1542 := [th-lemma #1468 #1406 #1541 #1540 #850 #824 #1488 #776 #1459]: false
5.5100 -#1544 := [lemma #1542]: #1543
5.5101 -#1553 := [unit-resolution #1544 #1552 #1406]: #477
5.5102 -#851 := (>= #844 0::int)
5.5103 -#852 := (= #610 #851)
5.5104 -#853 := [monotonicity #846]: #852
5.5105 -#619 := [not-or-elim #617]: #610
5.5106 -#854 := [mp~ #619 #853]: #851
5.5107 -#1309 := (or #1152 #1149)
5.5108 -#1310 := [def-axiom]: #1309
5.5109 -#1554 := [unit-resolution #1310 #1551]: #1149
5.5110 -#769 := (<= #766 0::int)
5.5111 -#770 := (= #576 #769)
5.5112 -#771 := [monotonicity #768]: #770
5.5113 -#585 := [not-or-elim #584]: #576
5.5114 -#772 := [mp~ #585 #771]: #769
5.5115 -decl z3name!3 :: int
5.5116 -#725 := z3name!3
5.5117 -#1007 := (+ uf_5 z3name!3)
5.5118 -#1009 := (>= #1007 0::int)
5.5119 -#1011 := (not #1009)
5.5120 -#1398 := [hypothesis]: #1011
5.5121 -#734 := (* -1::int z3name!3)
5.5122 -#996 := (+ uf_5 #734)
5.5123 -#997 := (<= #996 0::int)
5.5124 -#999 := (not #997)
5.5125 -#995 := (>= #996 0::int)
5.5126 -#998 := (not #995)
5.5127 -#1000 := (or #998 #999)
5.5128 -#1001 := (not #1000)
5.5129 -#1008 := (<= #1007 0::int)
5.5130 -#1010 := (not #1008)
5.5131 -#1012 := (or #1010 #1011)
5.5132 -#1267 := (or #1012 #1009)
5.5133 -#1268 := [def-axiom]: #1267
5.5134 -#1399 := [unit-resolution #1268 #1398]: #1012
5.5135 -#1013 := (not #1012)
5.5136 -#1016 := (or #241 #1013)
5.5137 -#1023 := (not #1016)
5.5138 -#1004 := (or #242 #1001)
5.5139 -#1022 := (not #1004)
5.5140 -#1024 := (or #1022 #1023)
5.5141 -#1025 := (not #1024)
5.5142 -#728 := (= z3name!3 #224)
5.5143 -#729 := (or #241 #728)
5.5144 -#726 := (= z3name!3 uf_5)
5.5145 -#727 := (or #242 #726)
5.5146 -#730 := (and #727 #729)
5.5147 -#1028 := (iff #730 #1025)
5.5148 -#1019 := (and #1004 #1016)
5.5149 -#1026 := (iff #1019 #1025)
5.5150 -#1027 := [rewrite]: #1026
5.5151 -#1020 := (iff #730 #1019)
5.5152 -#1017 := (iff #729 #1016)
5.5153 -#1014 := (iff #728 #1013)
5.5154 -#1015 := [rewrite]: #1014
5.5155 -#1018 := [monotonicity #1015]: #1017
5.5156 -#1005 := (iff #727 #1004)
5.5157 -#1002 := (iff #726 #1001)
5.5158 -#1003 := [rewrite]: #1002
5.5159 -#1006 := [monotonicity #1003]: #1005
5.5160 -#1021 := [monotonicity #1006 #1018]: #1020
5.5161 -#1029 := [trans #1021 #1027]: #1028
5.5162 -#731 := [intro-def]: #730
5.5163 -#1030 := [mp #731 #1029]: #1025
5.5164 -#1032 := [not-or-elim #1030]: #1016
5.5165 -#1400 := [unit-resolution #1032 #1399]: #241
5.5166 -#1031 := [not-or-elim #1030]: #1004
5.5167 -#1401 := [unit-resolution #1031 #1400]: #1001
5.5168 -#1261 := (or #1000 #997)
5.5169 -#1262 := [def-axiom]: #1261
5.5170 -#1402 := [unit-resolution #1262 #1401]: #997
5.5171 -#1403 := [th-lemma #1400 #1402 #1398]: false
5.5172 -#1404 := [lemma #1403]: #1009
5.5173 -#737 := (+ uf_6 #734)
5.5174 -#740 := (+ uf_4 #737)
5.5175 -#747 := (>= #740 0::int)
5.5176 -#248 := (ite #241 uf_5 #224)
5.5177 -#259 := (* -1::int #248)
5.5178 -#260 := (+ uf_6 #259)
5.5179 -#261 := (+ uf_4 #260)
5.5180 -#566 := (>= #261 0::int)
5.5181 -#748 := (= #566 #747)
5.5182 -#741 := (~ #261 #740)
5.5183 -#738 := (~ #260 #737)
5.5184 -#735 := (~ #259 #734)
5.5185 -#732 := (~ #248 z3name!3)
5.5186 -#733 := [apply-def #731]: #732
5.5187 -#736 := [monotonicity #733]: #735
5.5188 -#739 := [monotonicity #736]: #738
5.5189 -#742 := [monotonicity #739]: #741
5.5190 -#749 := [monotonicity #742]: #748
5.5191 -#568 := (not #566)
5.5192 -#565 := (<= #261 0::int)
5.5193 -#567 := (not #565)
5.5194 -#569 := (or #567 #568)
5.5195 -#570 := (not #569)
5.5196 -#262 := (= #261 0::int)
5.5197 -#571 := (iff #262 #570)
5.5198 -#572 := [rewrite]: #571
5.5199 -#27 := (- uf_5)
5.5200 -#26 := (< uf_5 0::int)
5.5201 -#28 := (ite #26 #27 uf_5)
5.5202 -#29 := (- #28 uf_4)
5.5203 -#30 := (= uf_6 #29)
5.5204 -#267 := (iff #30 #262)
5.5205 -#227 := (ite #26 #224 uf_5)
5.5206 -#177 := (* -1::int uf_4)
5.5207 -#233 := (+ #177 #227)
5.5208 -#238 := (= uf_6 #233)
5.5209 -#265 := (iff #238 #262)
5.5210 -#253 := (+ #177 #248)
5.5211 -#256 := (= uf_6 #253)
5.5212 -#263 := (iff #256 #262)
5.5213 -#264 := [rewrite]: #263
5.5214 -#257 := (iff #238 #256)
5.5215 -#254 := (= #233 #253)
5.5216 -#251 := (= #227 #248)
5.5217 -#245 := (ite #242 #224 uf_5)
5.5218 -#249 := (= #245 #248)
5.5219 -#250 := [rewrite]: #249
5.5220 -#246 := (= #227 #245)
5.5221 -#243 := (iff #26 #242)
5.5222 -#244 := [rewrite]: #243
5.5223 -#247 := [monotonicity #244]: #246
5.5224 -#252 := [trans #247 #250]: #251
5.5225 -#255 := [monotonicity #252]: #254
5.5226 -#258 := [monotonicity #255]: #257
5.5227 -#266 := [trans #258 #264]: #265
5.5228 -#239 := (iff #30 #238)
5.5229 -#236 := (= #29 #233)
5.5230 -#230 := (- #227 uf_4)
5.5231 -#234 := (= #230 #233)
5.5232 -#235 := [rewrite]: #234
5.5233 -#231 := (= #29 #230)
5.5234 -#228 := (= #28 #227)
5.5235 -#225 := (= #27 #224)
5.5236 -#226 := [rewrite]: #225
5.5237 -#229 := [monotonicity #226]: #228
5.5238 -#232 := [monotonicity #229]: #231
5.5239 -#237 := [trans #232 #235]: #236
5.5240 -#240 := [monotonicity #237]: #239
5.5241 -#268 := [trans #240 #266]: #267
5.5242 -#223 := [asserted]: #30
5.5243 -#269 := [mp #223 #268]: #262
5.5244 -#573 := [mp #269 #572]: #570
5.5245 -#575 := [not-or-elim #573]: #566
5.5246 -#750 := [mp~ #575 #749]: #747
5.5247 -#1364 := (not #747)
5.5248 -#1357 := (not #769)
5.5249 -#1337 := (not #851)
5.5250 -#1555 := (or #194 #476 #1151 #1337 #1343 #1113 #1048 #1357 #1364 #1011)
5.5251 -#1556 := [th-lemma]: #1555
5.5252 -#1557 := [unit-resolution #1556 #1545 #750 #1404 #772 #1496 #828 #1554 #854 #1553]: #194
5.5253 -#195 := (not #194)
5.5254 -#966 := (or #195 #963)
5.5255 -#969 := (+ uf_4 z3name!2)
5.5256 -#971 := (>= #969 0::int)
5.5257 -#973 := (not #971)
5.5258 -#970 := (<= #969 0::int)
5.5259 -#972 := (not #970)
5.5260 -#974 := (or #972 #973)
5.5261 -#975 := (not #974)
5.5262 -#978 := (or #194 #975)
5.5263 -#985 := (not #978)
5.5264 -#984 := (not #966)
5.5265 -#986 := (or #984 #985)
5.5266 -#987 := (not #986)
5.5267 -#702 := (= z3name!2 #177)
5.5268 -#703 := (or #194 #702)
5.5269 -#700 := (= z3name!2 uf_4)
5.5270 -#701 := (or #195 #700)
5.5271 -#704 := (and #701 #703)
5.5272 -#990 := (iff #704 #987)
5.5273 -#981 := (and #966 #978)
5.5274 -#988 := (iff #981 #987)
5.5275 -#989 := [rewrite]: #988
5.5276 -#982 := (iff #704 #981)
5.5277 -#979 := (iff #703 #978)
5.5278 -#976 := (iff #702 #975)
5.5279 -#977 := [rewrite]: #976
5.5280 -#980 := [monotonicity #977]: #979
5.5281 -#967 := (iff #701 #966)
5.5282 -#964 := (iff #700 #963)
5.5283 -#965 := [rewrite]: #964
5.5284 -#968 := [monotonicity #965]: #967
5.5285 -#983 := [monotonicity #968 #980]: #982
5.5286 -#991 := [trans #983 #989]: #990
5.5287 -#705 := [intro-def]: #704
5.5288 -#992 := [mp #705 #991]: #987
5.5289 -#993 := [not-or-elim #992]: #966
5.5290 -#1558 := [unit-resolution #993 #1557]: #963
5.5291 -#1249 := (or #962 #959)
5.5292 -#1250 := [def-axiom]: #1249
5.5293 -#1559 := [unit-resolution #1250 #1558]: #959
5.5294 -decl z3name!8 :: int
5.5295 -#855 := z3name!8
5.5296 -#864 := (* -1::int z3name!8)
5.5297 -#867 := (+ uf_11 #864)
5.5298 -#870 := (+ uf_9 #867)
5.5299 -#873 := (<= #870 0::int)
5.5300 -#483 := (ite #476 uf_10 #459)
5.5301 -#494 := (* -1::int #483)
5.5302 -#495 := (+ uf_11 #494)
5.5303 -#496 := (+ uf_9 #495)
5.5304 -#620 := (<= #496 0::int)
5.5305 -#874 := (= #620 #873)
5.5306 -#871 := (~ #496 #870)
5.5307 -#868 := (~ #495 #867)
5.5308 -#865 := (~ #494 #864)
5.5309 -#862 := (~ #483 z3name!8)
5.5310 -#858 := (= z3name!8 #459)
5.5311 -#859 := (or #476 #858)
5.5312 -#856 := (= z3name!8 uf_10)
5.5313 -#857 := (or #477 #856)
5.5314 -#860 := (and #857 #859)
5.5315 -#861 := [intro-def]: #860
5.5316 -#863 := [apply-def #861]: #862
5.5317 -#866 := [monotonicity #863]: #865
5.5318 -#869 := [monotonicity #866]: #868
5.5319 -#872 := [monotonicity #869]: #871
5.5320 -#875 := [monotonicity #872]: #874
5.5321 -#621 := (>= #496 0::int)
5.5322 -#623 := (not #621)
5.5323 -#622 := (not #620)
5.5324 -#624 := (or #622 #623)
5.5325 -#625 := (not #624)
5.5326 -#497 := (= #496 0::int)
5.5327 -#626 := (iff #497 #625)
5.5328 -#627 := [rewrite]: #626
5.5329 -#57 := (- uf_10)
5.5330 -#56 := (< uf_10 0::int)
5.5331 -#58 := (ite #56 #57 uf_10)
5.5332 -#59 := (- #58 uf_9)
5.5333 -#60 := (= uf_11 #59)
5.5334 -#502 := (iff #60 #497)
5.5335 -#462 := (ite #56 #459 uf_10)
5.5336 -#468 := (+ #412 #462)
5.5337 -#473 := (= uf_11 #468)
5.5338 -#500 := (iff #473 #497)
5.5339 -#488 := (+ #412 #483)
5.5340 -#491 := (= uf_11 #488)
5.5341 -#498 := (iff #491 #497)
5.5342 -#499 := [rewrite]: #498
5.5343 -#492 := (iff #473 #491)
5.5344 -#489 := (= #468 #488)
5.5345 -#486 := (= #462 #483)
5.5346 -#480 := (ite #477 #459 uf_10)
5.5347 -#484 := (= #480 #483)
5.5348 -#485 := [rewrite]: #484
5.5349 -#481 := (= #462 #480)
5.5350 -#478 := (iff #56 #477)
5.5351 -#479 := [rewrite]: #478
5.5352 -#482 := [monotonicity #479]: #481
5.5353 -#487 := [trans #482 #485]: #486
5.5354 -#490 := [monotonicity #487]: #489
5.5355 -#493 := [monotonicity #490]: #492
5.5356 -#501 := [trans #493 #499]: #500
5.5357 -#474 := (iff #60 #473)
5.5358 -#471 := (= #59 #468)
5.5359 -#465 := (- #462 uf_9)
5.5360 -#469 := (= #465 #468)
5.5361 -#470 := [rewrite]: #469
5.5362 -#466 := (= #59 #465)
5.5363 -#463 := (= #58 #462)
5.5364 -#460 := (= #57 #459)
5.5365 -#461 := [rewrite]: #460
5.5366 -#464 := [monotonicity #461]: #463
5.5367 -#467 := [monotonicity #464]: #466
5.5368 -#472 := [trans #467 #470]: #471
5.5369 -#475 := [monotonicity #472]: #474
5.5370 -#503 := [trans #475 #501]: #502
5.5371 -#458 := [asserted]: #60
5.5372 -#504 := [mp #458 #503]: #497
5.5373 -#628 := [mp #504 #627]: #625
5.5374 -#629 := [not-or-elim #628]: #620
5.5375 -#876 := [mp~ #629 #875]: #873
5.5376 -#1197 := (+ uf_10 z3name!8)
5.5377 -#1198 := (<= #1197 0::int)
5.5378 -#1199 := (>= #1197 0::int)
5.5379 -#1201 := (not #1199)
5.5380 -#1200 := (not #1198)
5.5381 -#1202 := (or #1200 #1201)
5.5382 -#1203 := (not #1202)
5.5383 -#1206 := (or #476 #1203)
5.5384 -#1213 := (not #1206)
5.5385 -#1186 := (+ uf_10 #864)
5.5386 -#1187 := (<= #1186 0::int)
5.5387 -#1189 := (not #1187)
5.5388 -#1185 := (>= #1186 0::int)
5.5389 -#1188 := (not #1185)
5.5390 -#1190 := (or #1188 #1189)
5.5391 -#1191 := (not #1190)
5.5392 -#1194 := (or #477 #1191)
5.5393 -#1212 := (not #1194)
5.5394 -#1214 := (or #1212 #1213)
5.5395 -#1215 := (not #1214)
5.5396 -#1218 := (iff #860 #1215)
5.5397 -#1209 := (and #1194 #1206)
5.5398 -#1216 := (iff #1209 #1215)
5.5399 -#1217 := [rewrite]: #1216
5.5400 -#1210 := (iff #860 #1209)
5.5401 -#1207 := (iff #859 #1206)
5.5402 -#1204 := (iff #858 #1203)
5.5403 -#1205 := [rewrite]: #1204
5.5404 -#1208 := [monotonicity #1205]: #1207
5.5405 -#1195 := (iff #857 #1194)
5.5406 -#1192 := (iff #856 #1191)
5.5407 -#1193 := [rewrite]: #1192
5.5408 -#1196 := [monotonicity #1193]: #1195
5.5409 -#1211 := [monotonicity #1196 #1208]: #1210
5.5410 -#1219 := [trans #1211 #1217]: #1218
5.5411 -#1220 := [mp #861 #1219]: #1215
5.5412 -#1222 := [not-or-elim #1220]: #1206
5.5413 -#1560 := [unit-resolution #1222 #1553]: #1203
5.5414 -#1325 := (or #1202 #1198)
5.5415 -#1326 := [def-axiom]: #1325
5.5416 -#1561 := [unit-resolution #1326 #1560]: #1198
5.5417 -#711 := (+ uf_5 #708)
5.5418 -#714 := (+ uf_1 #711)
5.5419 -#721 := (>= #714 0::int)
5.5420 -#201 := (ite #194 uf_4 #177)
5.5421 -#212 := (* -1::int #201)
5.5422 -#213 := (+ uf_5 #212)
5.5423 -#214 := (+ uf_1 #213)
5.5424 -#555 := (>= #214 0::int)
5.5425 -#722 := (= #555 #721)
5.5426 -#715 := (~ #214 #714)
5.5427 -#712 := (~ #213 #711)
5.5428 -#709 := (~ #212 #708)
5.5429 -#706 := (~ #201 z3name!2)
5.5430 -#707 := [apply-def #705]: #706
5.5431 -#710 := [monotonicity #707]: #709
5.5432 -#713 := [monotonicity #710]: #712
5.5433 -#716 := [monotonicity #713]: #715
5.5434 -#723 := [monotonicity #716]: #722
5.5435 -#557 := (not #555)
5.5436 -#554 := (<= #214 0::int)
5.5437 -#556 := (not #554)
5.5438 -#558 := (or #556 #557)
5.5439 -#559 := (not #558)
5.5440 -#215 := (= #214 0::int)
5.5441 -#560 := (iff #215 #559)
5.5442 -#561 := [rewrite]: #560
5.5443 -#21 := (- uf_4)
5.5444 -#20 := (< uf_4 0::int)
5.5445 -#22 := (ite #20 #21 uf_4)
5.5446 -#23 := (- #22 uf_1)
5.5447 -#24 := (= uf_5 #23)
5.5448 -#220 := (iff #24 #215)
5.5449 -#180 := (ite #20 #177 uf_4)
5.5450 -#186 := (+ #130 #180)
5.5451 -#191 := (= uf_5 #186)
5.5452 -#218 := (iff #191 #215)
5.5453 -#206 := (+ #130 #201)
5.5454 -#209 := (= uf_5 #206)
5.5455 -#216 := (iff #209 #215)
5.5456 -#217 := [rewrite]: #216
5.5457 -#210 := (iff #191 #209)
5.5458 -#207 := (= #186 #206)
5.5459 -#204 := (= #180 #201)
5.5460 -#198 := (ite #195 #177 uf_4)
5.5461 -#202 := (= #198 #201)
5.5462 -#203 := [rewrite]: #202
5.5463 -#199 := (= #180 #198)
5.5464 -#196 := (iff #20 #195)
5.5465 -#197 := [rewrite]: #196
5.5466 -#200 := [monotonicity #197]: #199
5.5467 -#205 := [trans #200 #203]: #204
5.5468 -#208 := [monotonicity #205]: #207
5.5469 -#211 := [monotonicity #208]: #210
5.5470 -#219 := [trans #211 #217]: #218
5.5471 -#192 := (iff #24 #191)
5.5472 -#189 := (= #23 #186)
5.5473 -#183 := (- #180 uf_1)
5.5474 -#187 := (= #183 #186)
5.5475 -#188 := [rewrite]: #187
5.5476 -#184 := (= #23 #183)
5.5477 -#181 := (= #22 #180)
5.5478 -#178 := (= #21 #177)
5.5479 -#179 := [rewrite]: #178
5.5480 -#182 := [monotonicity #179]: #181
5.5481 -#185 := [monotonicity #182]: #184
5.5482 -#190 := [trans #185 #188]: #189
5.5483 -#193 := [monotonicity #190]: #192
5.5484 -#221 := [trans #193 #219]: #220
5.5485 -#176 := [asserted]: #24
5.5486 -#222 := [mp #176 #221]: #215
5.5487 -#562 := [mp #222 #561]: #559
5.5488 -#564 := [not-or-elim #562]: #555
5.5489 -#724 := [mp~ #564 #723]: #721
5.5490 -#685 := (+ uf_4 #682)
5.5491 -#688 := (+ uf_2 #685)
5.5492 -#695 := (>= #688 0::int)
5.5493 -#154 := (ite #147 uf_1 #130)
5.5494 -#165 := (* -1::int #154)
5.5495 -#166 := (+ uf_4 #165)
5.5496 -#167 := (+ uf_2 #166)
5.5497 -#544 := (>= #167 0::int)
5.5498 -#696 := (= #544 #695)
5.5499 -#689 := (~ #167 #688)
5.5500 -#686 := (~ #166 #685)
5.5501 -#683 := (~ #165 #682)
5.5502 -#680 := (~ #154 z3name!1)
5.5503 -#681 := [apply-def #679]: #680
5.5504 -#684 := [monotonicity #681]: #683
5.5505 -#687 := [monotonicity #684]: #686
5.5506 -#690 := [monotonicity #687]: #689
5.5507 -#697 := [monotonicity #690]: #696
5.5508 -#546 := (not #544)
5.5509 -#543 := (<= #167 0::int)
5.5510 -#545 := (not #543)
5.5511 -#547 := (or #545 #546)
5.5512 -#548 := (not #547)
5.5513 -#168 := (= #167 0::int)
5.5514 -#549 := (iff #168 #548)
5.5515 -#550 := [rewrite]: #549
5.5516 -#15 := (- uf_1)
5.5517 -#14 := (< uf_1 0::int)
5.5518 -#16 := (ite #14 #15 uf_1)
5.5519 -#17 := (- #16 uf_2)
5.5520 -#18 := (= uf_4 #17)
5.5521 -#173 := (iff #18 #168)
5.5522 -#133 := (ite #14 #130 uf_1)
5.5523 -#139 := (+ #82 #133)
5.5524 -#144 := (= uf_4 #139)
5.5525 -#171 := (iff #144 #168)
5.5526 -#159 := (+ #82 #154)
5.5527 -#162 := (= uf_4 #159)
5.5528 -#169 := (iff #162 #168)
5.5529 -#170 := [rewrite]: #169
5.5530 -#163 := (iff #144 #162)
5.5531 -#160 := (= #139 #159)
5.5532 -#157 := (= #133 #154)
5.5533 -#151 := (ite #148 #130 uf_1)
5.5534 -#155 := (= #151 #154)
5.5535 -#156 := [rewrite]: #155
5.5536 -#152 := (= #133 #151)
5.5537 -#149 := (iff #14 #148)
5.5538 -#150 := [rewrite]: #149
5.5539 -#153 := [monotonicity #150]: #152
5.5540 -#158 := [trans #153 #156]: #157
5.5541 -#161 := [monotonicity #158]: #160
5.5542 -#164 := [monotonicity #161]: #163
5.5543 -#172 := [trans #164 #170]: #171
5.5544 -#145 := (iff #18 #144)
5.5545 -#142 := (= #17 #139)
5.5546 -#136 := (- #133 uf_2)
5.5547 -#140 := (= #136 #139)
5.5548 -#141 := [rewrite]: #140
5.5549 -#137 := (= #17 #136)
5.5550 -#134 := (= #16 #133)
5.5551 -#131 := (= #15 #130)
5.5552 -#132 := [rewrite]: #131
5.5553 -#135 := [monotonicity #132]: #134
5.5554 -#138 := [monotonicity #135]: #137
5.5555 -#143 := [trans #138 #141]: #142
5.5556 -#146 := [monotonicity #143]: #145
5.5557 -#174 := [trans #146 #172]: #173
5.5558 -#129 := [asserted]: #18
5.5559 -#175 := [mp #129 #174]: #168
5.5560 -#551 := [mp #175 #550]: #548
5.5561 -#553 := [not-or-elim #551]: #544
5.5562 -#698 := [mp~ #553 #697]: #695
5.5563 -#1373 := (not #721)
5.5564 -#1562 := (or #147 #1373 #961 #241 #195)
5.5565 -#1563 := [th-lemma]: #1562
5.5566 -#1564 := [unit-resolution #1563 #1559 #1557 #724 #1406]: #147
5.5567 -#1565 := [unit-resolution #955 #1564]: #925
5.5568 -#1566 := [unit-resolution #1238 #1565]: #921
5.5569 -#1372 := (not #873)
5.5570 -#1371 := (not #695)
5.5571 -#1498 := (or #516 #923 #1373 #1371 #1372 #1343 #1200 #1075 #1350 #1113 #961 #1151 #1337 #1048 #1357)
5.5572 -#1499 := [th-lemma]: #1498
5.5573 -#1567 := [unit-resolution #1499 #1566 #698 #724 #1545 #772 #1447 #802 #1496 #828 #1554 #854 #1561 #876 #1559]: #516
5.5574 -#1247 := (or #962 #957)
5.5575 -#1248 := [def-axiom]: #1247
5.5576 -#1568 := [unit-resolution #1248 #1558]: #957
5.5577 -#877 := (>= #870 0::int)
5.5578 -#878 := (= #621 #877)
5.5579 -#879 := [monotonicity #872]: #878
5.5580 -#630 := [not-or-elim #628]: #621
5.5581 -#880 := [mp~ #630 #879]: #877
5.5582 -#1327 := (or #1202 #1199)
5.5583 -#1328 := [def-axiom]: #1327
5.5584 -#1569 := [unit-resolution #1328 #1560]: #1199
5.5585 -#795 := (<= #792 0::int)
5.5586 -#796 := (= #587 #795)
5.5587 -#797 := [monotonicity #794]: #796
5.5588 -#596 := [not-or-elim #595]: #587
5.5589 -#798 := [mp~ #596 #797]: #795
5.5590 -#1503 := (or #335 #1049 #241)
5.5591 -#1425 := (or #335 #1049 #241 #1037)
5.5592 -#1422 := [hypothesis]: #336
5.5593 -#1423 := [hypothesis]: #1047
5.5594 -#1424 := [th-lemma #1423 #1422 #776 #1406 #1421]: false
5.5595 -#1426 := [lemma #1424]: #1425
5.5596 -#1504 := [unit-resolution #1426 #1459]: #1503
5.5597 -#1505 := [unit-resolution #1504 #1406 #1468]: #335
5.5598 -#1506 := [unit-resolution #1107 #1505]: #1077
5.5599 -#1283 := (or #1076 #1071)
5.5600 -#1284 := [def-axiom]: #1283
5.5601 -#1507 := [unit-resolution #1284 #1506]: #1071
5.5602 -#717 := (<= #714 0::int)
5.5603 -#718 := (= #554 #717)
5.5604 -#719 := [monotonicity #716]: #718
5.5605 -#563 := [not-or-elim #562]: #554
5.5606 -#720 := [mp~ #563 #719]: #717
5.5607 -#691 := (<= #688 0::int)
5.5608 -#692 := (= #543 #691)
5.5609 -#693 := [monotonicity #690]: #692
5.5610 -#552 := [not-or-elim #551]: #543
5.5611 -#694 := [mp~ #552 #693]: #691
5.5612 -#1235 := (or #924 #919)
5.5613 -#1236 := [def-axiom]: #1235
5.5614 -#1570 := [unit-resolution #1236 #1565]: #919
5.5615 -#1409 := (not #773)
5.5616 -#1489 := (not #847)
5.5617 -#1358 := (not #795)
5.5618 -#1365 := (not #821)
5.5619 -#1511 := (not #877)
5.5620 -#1510 := (not #691)
5.5621 -#1509 := (not #717)
5.5622 -#1512 := (or #515 #922 #1509 #1510 #1511 #1365 #1201 #1074 #1358 #1112 #960 #1150 #1489 #1049 #1409)
5.5623 -#1513 := [th-lemma]: #1512
5.5624 -#1571 := [unit-resolution #1513 #1570 #694 #720 #1468 #776 #1507 #798 #1488 #824 #1552 #850 #1569 #880 #1568]: #515
5.5625 -#506 := (<= #508 0::int)
5.5626 -#659 := (+ uf_3 #656)
5.5627 -#662 := (+ uf_1 #659)
5.5628 -#665 := (<= #662 0::int)
5.5629 -#107 := (ite #100 uf_2 #82)
5.5630 -#118 := (* -1::int #107)
5.5631 -#119 := (+ uf_3 #118)
5.5632 -#120 := (+ uf_1 #119)
5.5633 -#532 := (<= #120 0::int)
5.5634 -#666 := (= #532 #665)
5.5635 -#663 := (~ #120 #662)
5.5636 -#660 := (~ #119 #659)
5.5637 -#657 := (~ #118 #656)
5.5638 -#654 := (~ #107 z3name!0)
5.5639 -#655 := [apply-def #653]: #654
5.5640 -#658 := [monotonicity #655]: #657
5.5641 -#661 := [monotonicity #658]: #660
5.5642 -#664 := [monotonicity #661]: #663
5.5643 -#667 := [monotonicity #664]: #666
5.5644 -#533 := (>= #120 0::int)
5.5645 -#535 := (not #533)
5.5646 -#534 := (not #532)
5.5647 -#536 := (or #534 #535)
5.5648 -#537 := (not #536)
5.5649 -#121 := (= #120 0::int)
5.5650 -#538 := (iff #121 #537)
5.5651 -#539 := [rewrite]: #538
5.5652 -#8 := (- uf_2)
5.5653 -#7 := (< uf_2 0::int)
5.5654 -#9 := (ite #7 #8 uf_2)
5.5655 -#11 := (- #9 uf_3)
5.5656 -#12 := (= uf_1 #11)
5.5657 -#126 := (iff #12 #121)
5.5658 -#85 := (ite #7 #82 uf_2)
5.5659 -#91 := (* -1::int uf_3)
5.5660 -#92 := (+ #91 #85)
5.5661 -#97 := (= uf_1 #92)
5.5662 -#124 := (iff #97 #121)
5.5663 -#112 := (+ #91 #107)
5.5664 -#115 := (= uf_1 #112)
5.5665 -#122 := (iff #115 #121)
5.5666 -#123 := [rewrite]: #122
5.5667 -#116 := (iff #97 #115)
5.5668 -#113 := (= #92 #112)
5.5669 -#110 := (= #85 #107)
5.5670 -#104 := (ite #101 #82 uf_2)
5.5671 -#108 := (= #104 #107)
5.5672 -#109 := [rewrite]: #108
5.5673 -#105 := (= #85 #104)
5.5674 -#102 := (iff #7 #101)
5.5675 -#103 := [rewrite]: #102
5.5676 -#106 := [monotonicity #103]: #105
5.5677 -#111 := [trans #106 #109]: #110
5.5678 -#114 := [monotonicity #111]: #113
5.5679 -#117 := [monotonicity #114]: #116
5.5680 -#125 := [trans #117 #123]: #124
5.5681 -#98 := (iff #12 #97)
5.5682 -#95 := (= #11 #92)
5.5683 -#88 := (- #85 uf_3)
5.5684 -#93 := (= #88 #92)
5.5685 -#94 := [rewrite]: #93
5.5686 -#89 := (= #11 #88)
5.5687 -#86 := (= #9 #85)
5.5688 -#83 := (= #8 #82)
5.5689 -#84 := [rewrite]: #83
5.5690 -#87 := [monotonicity #84]: #86
5.5691 -#90 := [monotonicity #87]: #89
5.5692 -#96 := [trans #90 #94]: #95
5.5693 -#99 := [monotonicity #96]: #98
5.5694 -#127 := [trans #99 #125]: #126
5.5695 -#80 := [asserted]: #12
5.5696 -#128 := [mp #80 #127]: #121
5.5697 -#540 := [mp #128 #539]: #537
5.5698 -#541 := [not-or-elim #540]: #532
5.5699 -#668 := [mp~ #541 #667]: #665
5.5700 -#1515 := (or #100 #241 #923 #1373 #1371 #961)
5.5701 -#1516 := [th-lemma]: #1515
5.5702 -#1572 := [unit-resolution #1516 #1566 #698 #1559 #724 #1406]: #100
5.5703 -#1573 := [unit-resolution #917 #1572]: #887
5.5704 -#1223 := (or #886 #881)
5.5705 -#1224 := [def-axiom]: #1223
5.5706 -#1574 := [unit-resolution #1224 #1573]: #881
5.5707 -#1528 := (not #665)
5.5708 -#1529 := (or #506 #884 #1528 #1364 #1011 #1343 #1113 #1151 #1337 #1048 #1357 #922 #1510)
5.5709 -#1530 := [th-lemma]: #1529
5.5710 -#1575 := [unit-resolution #1530 #1574 #668 #694 #1404 #750 #1545 #772 #1496 #828 #1554 #854 #1570]: #506
5.5711 -#743 := (<= #740 0::int)
5.5712 -#744 := (= #565 #743)
5.5713 -#745 := [monotonicity #742]: #744
5.5714 -#574 := [not-or-elim #573]: #565
5.5715 -#746 := [mp~ #574 #745]: #743
5.5716 -#1520 := [unit-resolution #1032 #1406]: #1013
5.5717 -#1265 := (or #1012 #1008)
5.5718 -#1266 := [def-axiom]: #1265
5.5719 -#1521 := [unit-resolution #1266 #1520]: #1008
5.5720 -#669 := (>= #662 0::int)
5.5721 -#670 := (= #533 #669)
5.5722 -#671 := [monotonicity #664]: #670
5.5723 -#542 := [not-or-elim #540]: #533
5.5724 -#672 := [mp~ #542 #671]: #669
5.5725 -#1576 := [unit-resolution #1226 #1573]: #883
5.5726 -#1523 := (not #743)
5.5727 -#1522 := (not #669)
5.5728 -#1524 := (or #509 #885 #1522 #1523 #1010 #1365 #1112 #1150 #1489 #1049 #1409 #923 #1371)
5.5729 -#1525 := [th-lemma]: #1524
5.5730 -#1577 := [unit-resolution #1525 #1576 #672 #698 #1521 #746 #1468 #776 #1488 #824 #1552 #850 #1566]: #509
5.5731 -#634 := (not #516)
5.5732 -#633 := (not #515)
5.5733 -#632 := (not #509)
5.5734 -#631 := (not #506)
5.5735 -#635 := (or #631 #632 #633 #634)
5.5736 -#523 := (and #506 #509 #515 #516)
5.5737 -#528 := (not #523)
5.5738 -#644 := (iff #528 #635)
5.5739 -#636 := (not #635)
5.5740 -#639 := (not #636)
5.5741 -#642 := (iff #639 #635)
5.5742 -#643 := [rewrite]: #642
5.5743 -#640 := (iff #528 #639)
5.5744 -#637 := (iff #523 #636)
5.5745 -#638 := [rewrite]: #637
5.5746 -#641 := [monotonicity #638]: #640
5.5747 -#645 := [trans #641 #643]: #644
5.5748 -#62 := (= uf_2 uf_11)
5.5749 -#61 := (= uf_3 uf_10)
5.5750 -#63 := (and #61 #62)
5.5751 -#64 := (not #63)
5.5752 -#529 := (iff #64 #528)
5.5753 -#526 := (iff #63 #523)
5.5754 -#517 := (and #515 #516)
5.5755 -#510 := (and #506 #509)
5.5756 -#520 := (and #510 #517)
5.5757 -#524 := (iff #520 #523)
5.5758 -#525 := [rewrite]: #524
5.5759 -#521 := (iff #63 #520)
5.5760 -#518 := (iff #62 #517)
5.5761 -#519 := [rewrite]: #518
5.5762 -#511 := (iff #61 #510)
5.5763 -#512 := [rewrite]: #511
5.5764 -#522 := [monotonicity #512 #519]: #521
5.5765 -#527 := [trans #522 #525]: #526
5.5766 -#530 := [monotonicity #527]: #529
5.5767 -#505 := [asserted]: #64
5.5768 -#531 := [mp #505 #530]: #528
5.5769 -#646 := [mp #531 #645]: #635
5.5770 -#1578 := [unit-resolution #646 #1577 #1575 #1571 #1567]: false
5.5771 -#1580 := [lemma #1578]: #1579
5.5772 -#1657 := [unit-resolution #1580 #1406]: #1048
5.5773 -#1625 := (or #194 #241)
5.5774 -#1535 := [hypothesis]: #195
5.5775 -#1538 := (or #194 #960)
5.5776 -#1432 := [hypothesis]: #973
5.5777 -#1255 := (or #974 #971)
5.5778 -#1256 := [def-axiom]: #1255
5.5779 -#1433 := [unit-resolution #1256 #1432]: #974
5.5780 -#994 := [not-or-elim #992]: #978
5.5781 -#1434 := [unit-resolution #994 #1433]: #194
5.5782 -#1435 := [unit-resolution #993 #1434]: #963
5.5783 -#1436 := (or #971 #195 #961)
5.5784 -#1437 := [th-lemma]: #1436
5.5785 -#1438 := [unit-resolution #1437 #1434 #1432]: #961
5.5786 -#1439 := [unit-resolution #1250 #1438 #1435]: false
5.5787 -#1440 := [lemma #1439]: #971
5.5788 -#1536 := [hypothesis]: #957
5.5789 -#1537 := [th-lemma #1536 #1535 #1440]: false
5.5790 -#1539 := [lemma #1537]: #1538
5.5791 -#1581 := [unit-resolution #1539 #1535]: #960
5.5792 -#1582 := (or #959 #957)
5.5793 -#1583 := [th-lemma]: #1582
5.5794 -#1584 := [unit-resolution #1583 #1581]: #959
5.5795 -#1585 := (or #147 #1373 #241 #194 #973)
5.5796 -#1586 := [th-lemma]: #1585
5.5797 -#1587 := [unit-resolution #1586 #1535 #1440 #724 #1406]: #147
5.5798 -#1588 := [unit-resolution #955 #1587]: #925
5.5799 -#1589 := [unit-resolution #1238 #1588]: #921
5.5800 -#1590 := [unit-resolution #1516 #1589 #698 #1584 #724 #1406]: #100
5.5801 -#1591 := [unit-resolution #917 #1590]: #887
5.5802 -#1592 := [unit-resolution #1224 #1591]: #881
5.5803 -#1593 := (or #430 #1365 #1074 #1358 #1112 #194 #1364 #1011 #241)
5.5804 -#1594 := [th-lemma]: #1593
5.5805 -#1595 := [unit-resolution #1594 #1535 #1404 #750 #1507 #798 #1488 #824 #1406]: #430
5.5806 -#1184 := [not-or-elim #1182]: #1168
5.5807 -#1596 := [unit-resolution #1184 #1595]: #1165
5.5808 -#1315 := (or #1164 #1161)
5.5809 -#1316 := [def-axiom]: #1315
5.5810 -#1597 := [unit-resolution #1316 #1596]: #1161
5.5811 -#1533 := (or #288 #241)
5.5812 -#1471 := (or #194 #288 #241)
5.5813 -#1469 := (or #194 #288 #241 #1364 #1011)
5.5814 -#1470 := [th-lemma]: #1469
5.5815 -#1472 := [unit-resolution #1470 #1404 #750]: #1471
5.5816 -#1473 := [unit-resolution #1472 #1405 #1406]: #194
5.5817 -#1474 := [unit-resolution #993 #1473]: #963
5.5818 -#1475 := [unit-resolution #1250 #1474]: #959
5.5819 -#1476 := (or #147 #1373 #1364 #1011 #961 #241 #288)
5.5820 -#1477 := [th-lemma]: #1476
5.5821 -#1478 := [unit-resolution #1477 #1475 #724 #1406 #1404 #750 #1405]: #147
5.5822 -#1479 := [unit-resolution #955 #1478]: #925
5.5823 -#1480 := [unit-resolution #1238 #1479]: #921
5.5824 -#1419 := (or #288 #241 #429)
5.5825 -#1333 := [hypothesis]: #430
5.5826 -#1408 := [unit-resolution #1280 #1407]: #1047
5.5827 -#1410 := (or #335 #1049 #1409 #288 #241)
5.5828 -#1411 := [th-lemma]: #1410
5.5829 -#1412 := [unit-resolution #1411 #1405 #1408 #776 #1406]: #335
5.5830 -#1413 := [unit-resolution #1107 #1412]: #1077
5.5831 -#1414 := [unit-resolution #1286 #1413]: #1073
5.5832 -#1415 := [unit-resolution #1352 #1414 #802 #1405 #828 #1333]: #1113
5.5833 -#1416 := [unit-resolution #1298 #1415]: #1114
5.5834 -#1417 := [unit-resolution #1145 #1416]: #383
5.5835 -#1418 := [th-lemma #1414 #802 #1405 #1408 #776 #1406 #1417]: false
5.5836 -#1420 := [lemma #1418]: #1419
5.5837 -#1481 := [unit-resolution #1420 #1405 #1406]: #429
5.5838 -#1482 := [unit-resolution #1183 #1481]: #1153
5.5839 -#1483 := [unit-resolution #1308 #1482]: #1147
5.5840 -#1490 := (or #477 #1150 #1489 #1365 #1112 #1049 #241 #1409 #288)
5.5841 -#1491 := [th-lemma]: #1490
5.5842 -#1492 := [unit-resolution #1491 #1405 #1468 #776 #1488 #824 #1483 #850 #1406]: #477
5.5843 -#1493 := [unit-resolution #1222 #1492]: #1203
5.5844 -#1494 := [unit-resolution #1326 #1493]: #1198
5.5845 -#1495 := [unit-resolution #1310 #1482]: #1149
5.5846 -#1500 := [unit-resolution #1499 #1475 #698 #724 #1497 #772 #1447 #802 #1496 #828 #1495 #854 #1494 #876 #1480]: #516
5.5847 -#1501 := [unit-resolution #1236 #1479]: #919
5.5848 -#1502 := [unit-resolution #1328 #1493]: #1199
5.5849 -#1508 := [unit-resolution #1248 #1474]: #957
5.5850 -#1514 := [unit-resolution #1513 #1508 #694 #720 #1468 #776 #1507 #798 #1488 #824 #1483 #850 #1502 #880 #1501]: #515
5.5851 -#1517 := [unit-resolution #1516 #1480 #698 #1475 #724 #1406]: #100
5.5852 -#1518 := [unit-resolution #917 #1517]: #887
5.5853 -#1519 := [unit-resolution #1226 #1518]: #883
5.5854 -#1526 := [unit-resolution #1525 #1480 #672 #698 #1521 #746 #1468 #776 #1488 #824 #1483 #850 #1519]: #509
5.5855 -#1527 := [unit-resolution #1224 #1518]: #881
5.5856 -#1531 := [unit-resolution #1530 #1501 #668 #694 #1404 #750 #1497 #772 #1496 #828 #1495 #854 #1527]: #506
5.5857 -#1532 := [unit-resolution #646 #1531 #1526 #1514 #1500]: false
5.5858 -#1534 := [lemma #1532]: #1533
5.5859 -#1598 := [unit-resolution #1534 #1406]: #288
5.5860 -#1599 := [unit-resolution #1069 #1598]: #1039
5.5861 -#1271 := (or #1038 #1033)
5.5862 -#1272 := [def-axiom]: #1271
5.5863 -#1600 := [unit-resolution #1272 #1599]: #1033
5.5864 -#1601 := [unit-resolution #1236 #1588]: #919
5.5865 -#1602 := (or #506 #884 #1528 #1364 #1011 #1365 #1112 #1337 #1357 #922 #1510 #1036 #1163 #1074 #1358)
5.5866 -#1603 := [th-lemma]: #1602
5.5867 -#1604 := [unit-resolution #1603 #1601 #668 #694 #1404 #750 #1600 #772 #1507 #798 #1488 #824 #1597 #854 #1592]: #506
5.5868 -#1605 := [unit-resolution #1226 #1591]: #883
5.5869 -#1313 := (or #1164 #1160)
5.5870 -#1314 := [def-axiom]: #1313
5.5871 -#1606 := [unit-resolution #1314 #1596]: #1160
5.5872 -#1607 := (or #509 #885 #1522 #1523 #1010 #1343 #1113 #1489 #1409 #923 #1371 #1037 #1162 #1075 #1350)
5.5873 -#1608 := [th-lemma]: #1607
5.5874 -#1609 := [unit-resolution #1608 #1589 #672 #698 #1521 #746 #1459 #776 #1447 #802 #1496 #828 #1606 #850 #1605]: #509
5.5875 -#1610 := (or #476 #1036 #1337 #1365 #1112 #1357 #194 #1364 #1011 #1163 #1074 #1358)
5.5876 -#1611 := [th-lemma]: #1610
5.5877 -#1612 := [unit-resolution #1611 #1597 #750 #1600 #772 #1507 #798 #1488 #824 #1404 #854 #1535]: #476
5.5878 -#1221 := [not-or-elim #1220]: #1194
5.5879 -#1613 := [unit-resolution #1221 #1612]: #1191
5.5880 -#1319 := (or #1190 #1185)
5.5881 -#1320 := [def-axiom]: #1319
5.5882 -#1614 := [unit-resolution #1320 #1613]: #1185
5.5883 -#1615 := (or #516 #923 #1373 #1371 #1372 #1075 #1350 #1489 #1409 #1037 #973 #1162 #1188 #1343 #1113 #1523 #1010)
5.5884 -#1616 := [th-lemma]: #1615
5.5885 -#1617 := [unit-resolution #1616 #1606 #1440 #724 #1521 #746 #1459 #776 #1447 #802 #1496 #828 #698 #850 #1614 #876 #1589]: #516
5.5886 -#1321 := (or #1190 #1187)
5.5887 -#1322 := [def-axiom]: #1321
5.5888 -#1618 := [unit-resolution #1322 #1613]: #1187
5.5889 -#1619 := [unit-resolution #994 #1535]: #975
5.5890 -#1253 := (or #974 #970)
5.5891 -#1254 := [def-axiom]: #1253
5.5892 -#1620 := [unit-resolution #1254 #1619]: #970
5.5893 -#1621 := (or #515 #922 #1509 #1510 #1511 #1074 #1358 #1337 #1357 #1036 #972 #1163 #1189 #1365 #1112 #1364 #1011)
5.5894 -#1622 := [th-lemma]: #1621
5.5895 -#1623 := [unit-resolution #1622 #1620 #694 #720 #1404 #750 #1600 #772 #1507 #798 #1488 #824 #1597 #854 #1618 #880 #1601]: #515
5.5896 -#1624 := [unit-resolution #646 #1623 #1617 #1609 #1604]: false
5.5897 -#1626 := [lemma #1624]: #1625
5.5898 -#1658 := [unit-resolution #1626 #1406]: #194
5.5899 -#1659 := [unit-resolution #993 #1658]: #963
5.5900 -#1660 := [unit-resolution #1250 #1659]: #959
5.5901 -#1661 := [unit-resolution #1563 #1660 #1658 #724 #1406]: #147
5.5902 -#1662 := [unit-resolution #955 #1661]: #925
5.5903 -#1663 := [unit-resolution #1238 #1662]: #921
5.5904 -#1664 := [unit-resolution #1516 #1663 #698 #1660 #724 #1406]: #100
5.5905 -#1665 := [unit-resolution #917 #1664]: #887
5.5906 -#1666 := [unit-resolution #1226 #1665]: #883
5.5907 -#1667 := [unit-resolution #1224 #1665]: #881
5.5908 -#1668 := [unit-resolution #1236 #1662]: #919
5.5909 -#1669 := [unit-resolution #1248 #1659]: #957
5.5910 -#1655 := (or #429 #1113 #1010 #960 #1036 #1074 #1112 #922 #923 #884 #885)
5.5911 -#1632 := [hypothesis]: #919
5.5912 -#1636 := [hypothesis]: #881
5.5913 -#1638 := [hypothesis]: #1071
5.5914 -#1639 := [hypothesis]: #1033
5.5915 -#1334 := [unit-resolution #1184 #1333]: #1165
5.5916 -#1335 := [unit-resolution #1316 #1334]: #1161
5.5917 -#1640 := [unit-resolution #1603 #1335 #668 #694 #1404 #750 #1639 #772 #1638 #798 #1637 #824 #1632 #854 #1636]: #506
5.5918 -#1641 := [hypothesis]: #883
5.5919 -#1642 := [hypothesis]: #921
5.5920 -#1643 := [hypothesis]: #1111
5.5921 -#1644 := [hypothesis]: #1008
5.5922 -#1631 := [unit-resolution #1314 #1334]: #1160
5.5923 -#1645 := [unit-resolution #1608 #1631 #672 #698 #1644 #746 #1459 #776 #1447 #802 #1643 #828 #1642 #850 #1641]: #509
5.5924 -#1634 := (or #1202 #922 #960 #632 #631 #429)
5.5925 -#1627 := [hypothesis]: #506
5.5926 -#1628 := [hypothesis]: #509
5.5927 -#1384 := [hypothesis]: #1203
5.5928 -#1396 := (or #1202 #516 #429)
5.5929 -#1331 := [hypothesis]: #634
5.5930 -#1385 := [unit-resolution #1326 #1384]: #1198
5.5931 -#1382 := (or #1189 #1200 #516 #429)
5.5932 -#1332 := [hypothesis]: #1198
5.5933 -#1336 := [hypothesis]: #1187
5.5934 -#1338 := (or #382 #1189 #1337 #429 #1163 #1200)
5.5935 -#1339 := [th-lemma]: #1338
5.5936 -#1340 := [unit-resolution #1339 #1336 #1335 #854 #1333 #1332]: #382
5.5937 -#1341 := [unit-resolution #1145 #1340]: #1115
5.5938 -#1342 := [unit-resolution #1298 #1341]: #1111
5.5939 -#1344 := (or #335 #1113 #429 #1343 #1189 #1337 #1163 #1200)
5.5940 -#1345 := [th-lemma]: #1344
5.5941 -#1346 := [unit-resolution #1345 #1342 #828 #1333 #1335 #854 #1336 #1332]: #335
5.5942 -#1347 := [unit-resolution #1107 #1346]: #1077
5.5943 -#1348 := [unit-resolution #1284 #1347]: #1071
5.5944 -#1349 := [unit-resolution #1286 #1347]: #1073
5.5945 -#1353 := [unit-resolution #1352 #1349 #802 #1342 #828 #1333]: #288
5.5946 -#1354 := [unit-resolution #1069 #1353]: #1039
5.5947 -#1355 := [unit-resolution #1272 #1354]: #1033
5.5948 -#1356 := [unit-resolution #1296 #1341]: #1109
5.5949 -#1359 := (or #242 #1036 #1357 #429 #1189 #1337 #1163 #1200 #1074 #1358)
5.5950 -#1360 := [th-lemma]: #1359
5.5951 -#1361 := [unit-resolution #1360 #1355 #772 #1348 #798 #1333 #1335 #854 #1336 #1332]: #242
5.5952 -#1362 := [unit-resolution #1032 #1361]: #1013
5.5953 -#1363 := [unit-resolution #1268 #1362]: #1009
5.5954 -#1366 := (or #194 #1011 #1364 #1074 #1358 #1112 #1365 #1036 #1357 #1189 #1337 #1163 #1200)
5.5955 -#1367 := [th-lemma]: #1366
5.5956 -#1368 := [unit-resolution #1367 #1363 #750 #1355 #772 #1348 #798 #1356 #824 #1335 #854 #1336 #1332]: #194
5.5957 -#1369 := [unit-resolution #993 #1368]: #963
5.5958 -#1370 := [unit-resolution #1250 #1369]: #959
5.5959 -#1374 := (or #923 #1371 #516 #1372 #1200 #961 #1373 #1036 #1357 #1337 #1163 #1074 #1358)
5.5960 -#1375 := [th-lemma]: #1374
5.5961 -#1376 := [unit-resolution #1375 #1370 #698 #724 #1355 #772 #1348 #798 #1335 #854 #1332 #876 #1331]: #923
5.5962 -#1377 := (or #147 #195 #961 #1373 #1036 #1357 #429 #1189 #1337 #1163 #1200 #1074 #1358)
5.5963 -#1378 := [th-lemma]: #1377
5.5964 -#1379 := [unit-resolution #1378 #1368 #1370 #724 #1355 #772 #1348 #798 #1333 #1335 #854 #1336 #1332]: #147
5.5965 -#1380 := [unit-resolution #955 #1379]: #925
5.5966 -#1381 := [unit-resolution #1238 #1380 #1376]: false
5.5967 -#1383 := [lemma #1381]: #1382
5.5968 -#1386 := [unit-resolution #1383 #1385 #1331 #1333]: #1189
5.5969 -#1387 := [unit-resolution #1322 #1386]: #1190
5.5970 -#1388 := [unit-resolution #1328 #1384]: #1199
5.5971 -#1389 := (or #1187 #1185)
5.5972 -#1390 := [th-lemma]: #1389
5.5973 -#1391 := [unit-resolution #1390 #1386]: #1185
5.5974 -#1392 := (or #476 #1188 #1201)
5.5975 -#1393 := [th-lemma]: #1392
5.5976 -#1394 := [unit-resolution #1393 #1391 #1388]: #476
5.5977 -#1395 := [unit-resolution #1221 #1394 #1387]: false
5.5978 -#1397 := [lemma #1395]: #1396
5.5979 -#1629 := [unit-resolution #1397 #1384 #1333]: #516
5.5980 -#1630 := [unit-resolution #646 #1629 #1628 #1627]: #633
5.5981 -#1633 := [th-lemma #1632 #720 #694 #880 #1447 #802 #850 #776 #1459 #1631 #1536 #1388 #1630]: false
5.5982 -#1635 := [lemma #1633]: #1634
5.5983 -#1646 := [unit-resolution #1635 #1645 #1536 #1632 #1640 #1333]: #1202
5.5984 -#1647 := [unit-resolution #1222 #1646]: #476
5.5985 -#1648 := [unit-resolution #1221 #1647]: #1191
5.5986 -#1649 := [unit-resolution #1322 #1648]: #1187
5.5987 -#1650 := [unit-resolution #1320 #1648]: #1185
5.5988 -#1651 := [unit-resolution #1616 #1650 #1440 #724 #1644 #746 #1459 #776 #1447 #802 #1643 #828 #698 #850 #1631 #876 #1642]: #516
5.5989 -#1652 := [unit-resolution #646 #1651 #1645 #1640]: #633
5.5990 -#1653 := [unit-resolution #1622 #1652 #694 #720 #1404 #750 #1639 #772 #1638 #798 #1637 #824 #1335 #854 #1649 #880 #1632]: #972
5.5991 -#1654 := [th-lemma #1459 #1647 #850 #828 #1643 #776 #746 #1644 #1631 #1447 #802 #1536 #1653]: false
5.5992 -#1656 := [lemma #1654]: #1655
5.5993 -#1670 := [unit-resolution #1656 #1496 #1521 #1669 #1600 #1507 #1488 #1668 #1663 #1667 #1666]: #429
5.5994 -#1671 := [th-lemma #1600 #1670 #824 #1507 #798 #1488 #1657]: false
5.5995 -#1672 := [lemma #1671]: #241
5.5996 -#1683 := [unit-resolution #1031 #1672]: #1001
5.5997 -#1703 := [unit-resolution #1262 #1683]: #997
5.5998 -#1920 := (or #194 #242 #1364 #999 #288)
5.5999 -#1921 := [th-lemma]: #1920
5.6000 -#1922 := [unit-resolution #1921 #1405 #1703 #750 #1672]: #194
5.6001 -#1923 := [unit-resolution #993 #1922]: #963
5.6002 -#1924 := [unit-resolution #1248 #1923]: #957
5.6003 -#1925 := [unit-resolution #1250 #1923]: #959
5.6004 -#1843 := (or #288 #961 #147)
5.6005 -#1763 := [hypothesis]: #148
5.6006 -#1828 := [hypothesis]: #959
5.6007 -#1842 := [th-lemma #724 #750 #1703 #1828 #1405 #1763]: false
5.6008 -#1844 := [lemma #1842]: #1843
5.6009 -#1926 := [unit-resolution #1844 #1925 #1405]: #147
5.6010 -#1927 := [unit-resolution #955 #1926]: #925
5.6011 -#1928 := [unit-resolution #1236 #1927]: #919
5.6012 -#2116 := [unit-resolution #1310 #2047]: #1149
5.6013 -#2084 := (or #288 #516)
5.6014 -#2050 := (or #288 #961 #516)
5.6015 -#2037 := [hypothesis]: #1087
5.6016 -#2038 := [unit-resolution #1292 #2037]: #1088
5.6017 -#2041 := (or #1085 #336)
5.6018 -#2039 := (or #1085 #1075 #336)
5.6019 -#2040 := [th-lemma]: #2039
5.6020 -#2042 := [unit-resolution #2040 #1447]: #2041
5.6021 -#2043 := [unit-resolution #2042 #2037]: #336
5.6022 -#2044 := [unit-resolution #1108 #2043 #2038]: false
5.6023 -#2045 := [lemma #2044]: #1085
5.6024 -#2035 := (or #1087 #1150 #961 #1048 #516)
5.6025 -#1845 := [hypothesis]: #1085
5.6026 -#1874 := [hypothesis]: #477
5.6027 -#1901 := (or #335 #476)
5.6028 -#1895 := [unit-resolution #1222 #1874]: #1203
5.6029 -#1896 := [unit-resolution #1326 #1895]: #1198
5.6030 -#1893 := (or #429 #1200)
5.6031 -#1880 := (or #335 #1113 #429 #1163 #1200)
5.6032 -#1857 := [hypothesis]: #1189
5.6033 -#1858 := [unit-resolution #1322 #1857]: #1190
5.6034 -#1859 := [unit-resolution #1221 #1858]: #477
5.6035 -#1860 := [unit-resolution #1222 #1859]: #1203
5.6036 -#1861 := [unit-resolution #1390 #1857]: #1185
5.6037 -#1862 := [unit-resolution #1393 #1859 #1861]: #1201
5.6038 -#1863 := [unit-resolution #1328 #1862 #1860]: false
5.6039 -#1864 := [lemma #1863]: #1187
5.6040 -#1878 := (or #335 #1113 #429 #1189 #1163 #1200)
5.6041 -#1879 := [unit-resolution #1345 #828 #854]: #1878
5.6042 -#1881 := [unit-resolution #1879 #1864]: #1880
5.6043 -#1882 := [unit-resolution #1881 #1335 #1870 #1333 #1332]: #335
5.6044 -#1883 := [unit-resolution #1107 #1882]: #1077
5.6045 -#1884 := [unit-resolution #1689 #1333 #1870]: #288
5.6046 -#1885 := [unit-resolution #1069 #1884]: #1039
5.6047 -#1886 := [unit-resolution #1272 #1885]: #1033
5.6048 -#1889 := (or #1036 #429 #1163 #1200 #1074)
5.6049 -#1887 := (or #242 #1036 #429 #1189 #1163 #1200 #1074)
5.6050 -#1888 := [unit-resolution #1360 #772 #798 #854]: #1887
5.6051 -#1890 := [unit-resolution #1888 #1672 #1864]: #1889
5.6052 -#1891 := [unit-resolution #1890 #1886 #1332 #1333 #1335]: #1074
5.6053 -#1892 := [unit-resolution #1284 #1891 #1883]: false
5.6054 -#1894 := [lemma #1892]: #1893
5.6055 -#1897 := [unit-resolution #1894 #1896]: #429
5.6056 -#1898 := [unit-resolution #1183 #1897]: #1153
5.6057 -#1899 := [unit-resolution #1310 #1898]: #1149
5.6058 -#1900 := [th-lemma #854 #1899 #1870 #828 #1422 #1874]: false
5.6059 -#1902 := [lemma #1900]: #1901
5.6060 -#1950 := [unit-resolution #1902 #1874]: #335
5.6061 -#1951 := [unit-resolution #1107 #1950]: #1077
5.6062 -#1952 := [unit-resolution #1284 #1951]: #1071
5.6063 -#1953 := [unit-resolution #1328 #1895]: #1199
5.6064 -#1876 := (or #1109 #476)
5.6065 -#1673 := [hypothesis]: #1112
5.6066 -#1760 := (or #429 #1109)
5.6067 -#1674 := [unit-resolution #1296 #1673]: #1114
5.6068 -#1675 := [unit-resolution #1145 #1674]: #383
5.6069 -#1676 := [unit-resolution #1146 #1675]: #1127
5.6070 -#1677 := [unit-resolution #1304 #1676]: #1123
5.6071 -#1687 := [unit-resolution #1686 #1673]: #1111
5.6072 -#1743 := [unit-resolution #1689 #1333 #1687]: #288
5.6073 -#1744 := [unit-resolution #1069 #1743]: #1039
5.6074 -#1745 := [unit-resolution #1272 #1744]: #1033
5.6075 -#1678 := (or #335 #1343 #429 #382 #1125)
5.6076 -#1679 := [th-lemma]: #1678
5.6077 -#1746 := [unit-resolution #1679 #1333 #1675 #828 #1677]: #335
5.6078 -#1747 := [unit-resolution #1107 #1746]: #1077
5.6079 -#1748 := [unit-resolution #1284 #1747]: #1071
5.6080 -#1259 := (or #1000 #995)
5.6081 -#1260 := [def-axiom]: #1259
5.6082 -#1684 := [unit-resolution #1260 #1683]: #995
5.6083 -#1693 := (or #147 #1373 #1343 #1074 #1358 #1523 #429 #973 #998 #1036 #1357 #1125)
5.6084 -#1694 := [th-lemma]: #1693
5.6085 -#1749 := [unit-resolution #1694 #1745 #724 #1684 #746 #1440 #772 #1748 #798 #1677 #828 #1333]: #147
5.6086 -#1750 := [unit-resolution #955 #1749]: #925
5.6087 -#1751 := [unit-resolution #1238 #1750]: #921
5.6088 -#1714 := (or #100 #923 #1373 #1371 #1343 #1523 #1074 #1358 #973 #429 #382 #1036 #1357 #998 #1125)
5.6089 -#1715 := [th-lemma]: #1714
5.6090 -#1752 := [unit-resolution #1715 #1751 #698 #1440 #724 #1684 #746 #1675 #772 #1748 #798 #1745 #1677 #828 #1333]: #100
5.6091 -#1753 := [unit-resolution #1236 #1750]: #919
5.6092 -#1727 := (or #1109 #429 #972)
5.6093 -#1680 := [unit-resolution #1679 #1675 #1677 #828 #1333]: #335
5.6094 -#1681 := [unit-resolution #1107 #1680]: #1077
5.6095 -#1682 := [unit-resolution #1284 #1681]: #1071
5.6096 -#1690 := [unit-resolution #1689 #1687 #1333]: #288
5.6097 -#1691 := [unit-resolution #1069 #1690]: #1039
5.6098 -#1692 := [unit-resolution #1272 #1691]: #1033
5.6099 -#1695 := [unit-resolution #1694 #1692 #724 #1684 #746 #1440 #772 #1682 #798 #1677 #828 #1333]: #147
5.6100 -#1696 := [unit-resolution #955 #1695]: #925
5.6101 -#1697 := [unit-resolution #1236 #1696]: #919
5.6102 -#1698 := (or #476 #429 #1337 #1163 #382)
5.6103 -#1699 := [th-lemma]: #1698
5.6104 -#1700 := [unit-resolution #1699 #1675 #1335 #854 #1333]: #476
5.6105 -#1701 := [unit-resolution #1221 #1700]: #1191
5.6106 -#1702 := [unit-resolution #1322 #1701]: #1187
5.6107 -#1704 := [hypothesis]: #970
5.6108 -#1301 := (or #1126 #1122)
5.6109 -#1302 := [def-axiom]: #1301
5.6110 -#1705 := [unit-resolution #1302 #1676]: #1122
5.6111 -#1706 := (or #515 #922 #1509 #1510 #1511 #1075 #1350 #1337 #1409 #1037 #1163 #1365 #1364 #972 #999 #1124 #1189)
5.6112 -#1707 := [th-lemma]: #1706
5.6113 -#1708 := [unit-resolution #1707 #1705 #1704 #720 #1703 #750 #1459 #776 #1447 #802 #694 #824 #1335 #854 #1702 #880 #1697]: #515
5.6114 -#1709 := [unit-resolution #1238 #1696]: #921
5.6115 -#1710 := [unit-resolution #1320 #1701]: #1185
5.6116 -#1711 := (or #516 #923 #1373 #1371 #1372 #1074 #1358 #1489 #1357 #1036 #1162 #1343 #1523 #973 #998 #1125 #1188)
5.6117 -#1712 := [th-lemma]: #1711
5.6118 -#1713 := [unit-resolution #1712 #1692 #1440 #724 #1684 #746 #698 #772 #1682 #798 #1677 #828 #1631 #850 #1710 #876 #1709]: #516
5.6119 -#1716 := [unit-resolution #1715 #1709 #698 #1440 #724 #1684 #746 #1692 #772 #1682 #798 #1675 #1677 #828 #1333]: #100
5.6120 -#1717 := [unit-resolution #917 #1716]: #887
5.6121 -#1718 := [unit-resolution #1226 #1717]: #883
5.6122 -#1719 := (or #509 #885 #1522 #1523 #1343 #1489 #1357 #923 #1371 #1036 #1162 #998 #1125)
5.6123 -#1720 := [th-lemma]: #1719
5.6124 -#1721 := [unit-resolution #1720 #1709 #672 #698 #1684 #746 #1692 #772 #1677 #828 #1631 #850 #1718]: #509
5.6125 -#1722 := [unit-resolution #1224 #1717]: #881
5.6126 -#1723 := (or #506 #884 #1528 #1364 #1365 #1337 #1409 #922 #1510 #1037 #1163 #999 #1124)
5.6127 -#1724 := [th-lemma]: #1723
5.6128 -#1725 := [unit-resolution #1724 #1697 #668 #694 #1703 #750 #1459 #776 #1705 #824 #1335 #854 #1722]: #506
5.6129 -#1726 := [unit-resolution #646 #1725 #1721 #1713 #1708]: false
5.6130 -#1728 := [lemma #1726]: #1727
5.6131 -#1754 := [unit-resolution #1728 #1333 #1673]: #972
5.6132 -#1755 := [unit-resolution #1254 #1754]: #974
5.6133 -#1756 := [unit-resolution #994 #1755]: #194
5.6134 -#1757 := [unit-resolution #993 #1756]: #963
5.6135 -#1758 := [unit-resolution #1248 #1757]: #957
5.6136 -#1759 := [th-lemma #1758 #1753 #720 #694 #1675 #1459 #776 #1447 #802 #1752]: false
5.6137 -#1761 := [lemma #1759]: #1760
5.6138 -#1871 := [unit-resolution #1761 #1673]: #429
5.6139 -#1872 := [unit-resolution #1183 #1871]: #1153
5.6140 -#1873 := [unit-resolution #1310 #1872]: #1149
5.6141 -#1875 := [th-lemma #1675 #1874 #854 #1873 #1871]: false
5.6142 -#1877 := [lemma #1875]: #1876
5.6143 -#1954 := [unit-resolution #1877 #1874]: #1109
5.6144 -#1948 := (or #288 #1112 #1200 #1201 #1074)
5.6145 -#1917 := [unit-resolution #1894 #1332]: #429
5.6146 -#1918 := [unit-resolution #1183 #1917]: #1153
5.6147 -#1919 := [unit-resolution #1308 #1918]: #1147
5.6148 -#1929 := [unit-resolution #1310 #1918]: #1149
5.6149 -#1930 := [unit-resolution #1238 #1927]: #921
5.6150 -#1931 := [hypothesis]: #1199
5.6151 -#1932 := (or #515 #922 #1201 #1074 #1112 #960 #1150)
5.6152 -#1933 := [unit-resolution #1513 #694 #720 #1468 #776 #798 #824 #850 #880]: #1932
5.6153 -#1934 := [unit-resolution #1933 #1928 #1931 #1637 #1638 #1919 #1924]: #515
5.6154 -#1935 := (or #516 #923 #1200 #1113 #961 #1151 #1048)
5.6155 -#1936 := [unit-resolution #1499 #698 #724 #772 #1447 #802 #828 #854 #876]: #1935
5.6156 -#1937 := [unit-resolution #1936 #1930 #1870 #1332 #1929 #1497 #1925]: #516
5.6157 -#1915 := (or #898 #634 #633 #923 #961 #1048 #1151 #922 #960 #1112 #1150)
5.6158 -#1903 := [hypothesis]: #515
5.6159 -#1904 := [hypothesis]: #516
5.6160 -#1905 := [hypothesis]: #899
5.6161 -#1906 := [unit-resolution #1232 #1905]: #895
5.6162 -#1907 := (or #509 #1522 #1523 #897 #998 #1489 #1150 #960 #1509 #1112 #1365 #1049 #922 #1510 #1409)
5.6163 -#1908 := [th-lemma]: #1907
5.6164 -#1909 := [unit-resolution #1908 #1906 #1632 #694 #1536 #720 #1684 #746 #1468 #776 #1637 #824 #1540 #850 #672]: #509
5.6165 -#1774 := [hypothesis]: #1149
5.6166 -#1229 := (or #898 #894)
5.6167 -#1230 := [def-axiom]: #1229
5.6168 -#1910 := [unit-resolution #1230 #1905]: #894
5.6169 -#1911 := (or #506 #1528 #1364 #896 #999 #1337 #1151 #961 #1373 #1113 #1343 #1048 #923 #1371 #1357)
5.6170 -#1912 := [th-lemma]: #1911
5.6171 -#1913 := [unit-resolution #1912 #1910 #1642 #698 #1828 #724 #1703 #750 #1545 #772 #1870 #828 #1774 #854 #668]: #506
5.6172 -#1914 := [unit-resolution #646 #1913 #1909 #1904 #1903]: false
5.6173 -#1916 := [lemma #1914]: #1915
5.6174 -#1938 := [unit-resolution #1916 #1937 #1934 #1930 #1925 #1497 #1929 #1928 #1924 #1637 #1919]: #898
5.6175 -#1939 := [unit-resolution #918 #1938]: #100
5.6176 -#1940 := [unit-resolution #917 #1939]: #887
5.6177 -#1941 := [unit-resolution #1224 #1940]: #881
5.6178 -#1942 := (or #506 #884 #1113 #1151 #1048 #922)
5.6179 -#1943 := [unit-resolution #1530 #668 #694 #1404 #750 #772 #828 #854]: #1942
5.6180 -#1944 := [unit-resolution #1943 #1941 #1497 #1870 #1929 #1928]: #506
5.6181 -#1945 := [unit-resolution #646 #1944 #1937 #1934]: #632
5.6182 -#1946 := [unit-resolution #1908 #1945 #1928 #694 #1924 #720 #1684 #746 #1468 #776 #1637 #824 #1919 #850 #672]: #897
5.6183 -#1947 := [th-lemma #1946 #1939 #1742]: false
5.6184 -#1949 := [lemma #1947]: #1948
5.6185 -#1955 := [unit-resolution #1949 #1954 #1896 #1953 #1952]: #288
5.6186 -#1956 := [unit-resolution #1069 #1955]: #1039
5.6187 -#1957 := [unit-resolution #1272 #1956]: #1033
5.6188 -#1958 := [unit-resolution #1735 #1954]: #382
5.6189 -#1959 := (or #1123 #383 #1113)
5.6190 -#1960 := [th-lemma]: #1959
5.6191 -#1961 := [unit-resolution #1960 #1958 #1870]: #1123
5.6192 -#1962 := [unit-resolution #1308 #1898]: #1147
5.6193 -#1965 := (or #1160 #1112 #1074 #289 #1150)
5.6194 -#1963 := (or #1160 #1365 #1112 #1074 #1358 #289 #1150)
5.6195 -#1964 := [th-lemma]: #1963
5.6196 -#1966 := [unit-resolution #1964 #798 #824]: #1965
5.6197 -#1967 := [unit-resolution #1966 #1955 #1954 #1962 #1952]: #1160
5.6198 -#1970 := (or #1162 #1151 #1036 #1125 #147 #1074)
5.6199 -#1968 := (or #1162 #1151 #1343 #1523 #998 #1036 #1357 #1125 #973 #147 #1373 #1074 #1358)
5.6200 -#1969 := [th-lemma]: #1968
5.6201 -#1971 := [unit-resolution #1969 #724 #1684 #746 #1440 #772 #798 #828]: #1970
5.6202 -#1972 := [unit-resolution #1971 #1967 #1952 #1961 #1899 #1957]: #147
5.6203 -#1973 := [unit-resolution #955 #1972]: #925
5.6204 -#1974 := [unit-resolution #1236 #1973]: #919
5.6205 -#1975 := (or #1161 #1151 #430)
5.6206 -#1976 := [th-lemma]: #1975
5.6207 -#1977 := [unit-resolution #1976 #1899 #1897]: #1161
5.6208 -#1978 := (or #476 #1036 #1112 #194 #1163 #1074)
5.6209 -#1979 := [unit-resolution #1611 #750 #772 #798 #824 #1404 #854]: #1978
5.6210 -#1980 := [unit-resolution #1979 #1957 #1874 #1954 #1952 #1977]: #194
5.6211 -#1981 := [unit-resolution #993 #1980]: #963
5.6212 -#1982 := [unit-resolution #1248 #1981]: #957
5.6213 -#1983 := [unit-resolution #1933 #1974 #1953 #1954 #1952 #1962 #1982]: #515
5.6214 -#1984 := [unit-resolution #1238 #1973]: #921
5.6215 -#1985 := [unit-resolution #1250 #1981]: #959
5.6216 -#1849 := (or #923 #516 #1200 #961 #1036 #1163 #1074)
5.6217 -#1850 := [unit-resolution #1375 #698 #724 #772 #798 #854 #876]: #1849
5.6218 -#1986 := [unit-resolution #1850 #1985 #1896 #1952 #1977 #1957 #1984]: #516
5.6219 -#1987 := (or #509 #923 #1036 #1162 #1125)
5.6220 -#1988 := [unit-resolution #1720 #672 #698 #1684 #746 #1742 #772 #828 #850]: #1987
5.6221 -#1989 := [unit-resolution #1988 #1984 #1961 #1967 #1957]: #509
5.6222 -#1990 := [unit-resolution #646 #1989 #1986 #1983]: #631
5.6223 -#1991 := (or #506 #884 #1112 #922 #1036 #1163 #1074)
5.6224 -#1992 := [unit-resolution #1603 #668 #694 #1404 #750 #772 #798 #824 #854]: #1991
5.6225 -#1993 := [unit-resolution #1992 #1990 #1977 #1954 #1952 #1957 #1974]: #884
5.6226 -#1994 := [unit-resolution #1224 #1993]: #886
5.6227 -#1995 := [unit-resolution #917 #1994]: #101
5.6228 -#1996 := [th-lemma #746 #1684 #1957 #1874 #854 #1899 #1870 #828 #1984 #1995 #698 #772 #1972]: false
5.6229 -#1997 := [lemma #1996]: #476
5.6230 -#2014 := [unit-resolution #1221 #1997]: #1191
5.6231 -#2015 := [unit-resolution #1320 #2014]: #1185
5.6232 -#2034 := [th-lemma #876 #850 #1540 #2015 #802 #2033 #698 #772 #1828 #724 #1545 #1845 #1331]: false
5.6233 -#2036 := [lemma #2034]: #2035
5.6234 -#2048 := [unit-resolution #2036 #1497 #2045 #1828 #1331]: #1150
5.6235 -#2049 := [unit-resolution #1308 #2048 #2047]: false
5.6236 -#2051 := [lemma #2049]: #2050
5.6237 -#2082 := [unit-resolution #2051 #1405 #1331]: #961
5.6238 -#2083 := [unit-resolution #1250 #1923 #2082]: false
5.6239 -#2085 := [lemma #2083]: #2084
5.6240 -#2089 := [unit-resolution #2085 #1331]: #288
5.6241 -#2090 := [unit-resolution #1069 #2089]: #1039
5.6242 -#2091 := [unit-resolution #1272 #2090]: #1033
5.6243 -#2065 := [hypothesis]: #935
5.6244 -#2066 := [unit-resolution #1244 #2065]: #936
5.6245 -#2067 := [unit-resolution #956 #2066]: #147
5.6246 -#2068 := [th-lemma #2065 #2033 #2067]: false
5.6247 -#2069 := [lemma #2068]: #933
5.6248 -#2100 := (or #429 #516)
5.6249 -#2063 := (or #429 #1086 #516)
5.6250 -#2052 := [unit-resolution #1761 #1333]: #1109
5.6251 -#2053 := [unit-resolution #1735 #2052]: #382
5.6252 -#2054 := [hypothesis]: #1084
5.6253 -#2055 := (or #1200 #516 #429)
5.6254 -#2056 := [unit-resolution #1383 #1864]: #2055
5.6255 -#2057 := [unit-resolution #2056 #1333 #1331]: #1200
5.6256 -#2060 := (or #1086 #383 #1113 #1188 #1162 #1198)
5.6257 -#2058 := (or #1086 #383 #1113 #1343 #1188 #1489 #1162 #1198 #1075)
5.6258 -#2059 := [th-lemma]: #2058
5.6259 -#2061 := [unit-resolution #2059 #1447 #828 #850]: #2060
5.6260 -#2062 := [unit-resolution #2061 #1631 #2057 #2015 #1870 #2054 #2053]: false
5.6261 -#2064 := [lemma #2062]: #2063
5.6262 -#2086 := [unit-resolution #2064 #1333 #1331]: #1086
5.6263 -#2087 := [unit-resolution #1290 #2086]: #1088
5.6264 -#2088 := [unit-resolution #1108 #2087]: #335
5.6265 -#2080 := (or #1109 #516)
5.6266 -#2070 := [unit-resolution #1308 #1872]: #1147
5.6267 -#2020 := (or #194 #1150 #516 #1125 #1151 #1124)
5.6268 -#1762 := [hypothesis]: #1122
5.6269 -#1775 := [hypothesis]: #1123
5.6270 -#1803 := (or #194 #1151 #1150 #1125 #147 #1124)
5.6271 -#1764 := [unit-resolution #956 #1763]: #937
5.6272 -#1765 := [unit-resolution #1244 #1764]: #933
5.6273 -#1766 := (or #509 #885 #1522 #1364 #1365 #1489 #999 #1124 #1371 #1037 #1409 #935 #1150 #972 #1509 #1075 #1350)
5.6274 -#1767 := [th-lemma]: #1766
5.6275 -#1768 := [unit-resolution #1767 #1620 #1765 #698 #672 #720 #1703 #750 #1459 #776 #1447 #802 #1762 #824 #1540 #850 #1742]: #509
5.6276 -#1769 := (or #100 #1371 #935 #194 #147)
5.6277 -#1770 := [th-lemma]: #1769
5.6278 -#1771 := [unit-resolution #1770 #1535 #1765 #698 #1763]: #100
5.6279 -#1772 := [unit-resolution #917 #1771]: #887
5.6280 -#1773 := [unit-resolution #1224 #1772]: #881
5.6281 -#1776 := (or #335 #194 #1364 #1037 #1409 #999)
5.6282 -#1777 := [th-lemma]: #1776
5.6283 -#1778 := [unit-resolution #1777 #1535 #750 #1459 #776 #1703]: #335
5.6284 -#1779 := [unit-resolution #1107 #1778]: #1077
5.6285 -#1780 := [unit-resolution #1284 #1779]: #1071
5.6286 -#1241 := (or #936 #932)
5.6287 -#1242 := [def-axiom]: #1241
5.6288 -#1781 := [unit-resolution #1242 #1764]: #932
5.6289 -#1782 := (or #288 #1364 #999 #973 #147 #1373 #194)
5.6290 -#1783 := [th-lemma]: #1782
5.6291 -#1784 := [unit-resolution #1783 #1535 #1440 #724 #1703 #750 #1763]: #288
5.6292 -#1785 := [unit-resolution #1069 #1784]: #1039
5.6293 -#1786 := [unit-resolution #1272 #1785]: #1033
5.6294 -#1787 := (or #506 #884 #1528 #1523 #1343 #1337 #998 #1125 #1510 #1036 #1357 #934 #1151 #973 #1373 #1074 #1358)
5.6295 -#1788 := [th-lemma]: #1787
5.6296 -#1789 := [unit-resolution #1788 #1786 #1781 #694 #1440 #724 #1684 #746 #668 #772 #1780 #798 #1775 #828 #1774 #854 #1773]: #506
5.6297 -#1790 := (or #476 #1337 #1343 #1523 #1036 #1357 #998 #1125 #973 #147 #1373 #1074 #1358 #1151 #194)
5.6298 -#1791 := [th-lemma]: #1790
5.6299 -#1792 := [unit-resolution #1791 #1535 #1440 #724 #1684 #746 #1786 #772 #1780 #798 #1775 #828 #1774 #854 #1763]: #476
5.6300 -#1793 := [unit-resolution #1221 #1792]: #1191
5.6301 -#1794 := [unit-resolution #1320 #1793]: #1185
5.6302 -#1795 := (or #516 #1372 #1489 #1409 #1037 #1188 #1371 #935 #972 #1509 #1075 #1350 #1150)
5.6303 -#1796 := [th-lemma]: #1795
5.6304 -#1797 := [unit-resolution #1796 #1620 #698 #720 #1459 #776 #1447 #802 #1540 #850 #1794 #876 #1765]: #516
5.6305 -#1798 := [unit-resolution #1322 #1793]: #1187
5.6306 -#1799 := (or #515 #1511 #1337 #1357 #1036 #1189 #1510 #934 #973 #1373 #1074 #1358 #1151)
5.6307 -#1800 := [th-lemma]: #1799
5.6308 -#1801 := [unit-resolution #1800 #1786 #1440 #724 #694 #772 #1780 #798 #1774 #854 #1798 #880 #1781]: #515
5.6309 -#1802 := [unit-resolution #646 #1801 #1797 #1789 #1768]: false
5.6310 -#1804 := [lemma #1802]: #1803
5.6311 -#2011 := [unit-resolution #1804 #1535 #1540 #1775 #1774 #1762]: #147
5.6312 -#2012 := [unit-resolution #955 #2011]: #925
5.6313 -#2013 := [unit-resolution #1238 #2012]: #921
5.6314 -#2016 := (or #516 #1188 #935 #972 #1150)
5.6315 -#2017 := [unit-resolution #1796 #698 #720 #1459 #776 #1447 #802 #850 #876]: #2016
5.6316 -#2018 := [unit-resolution #2017 #1620 #2015 #1540 #1331]: #935
5.6317 -#2019 := [th-lemma #2018 #2013 #2011]: false
5.6318 -#2021 := [lemma #2019]: #2020
5.6319 -#2071 := [unit-resolution #2021 #2070 #1331 #1677 #1873 #1705]: #194
5.6320 -#2072 := [unit-resolution #993 #2071]: #963
5.6321 -#2073 := [unit-resolution #2010 #1675]: #288
5.6322 -#2074 := [unit-resolution #1069 #2073]: #1039
5.6323 -#2075 := [unit-resolution #1272 #2074]: #1033
5.6324 -#2076 := (or #516 #1036 #1188 #935 #1150 #960 #1087)
5.6325 -#1823 := (or #516 #1372 #1489 #1357 #1036 #1188 #1371 #935 #1509 #1350 #1150 #960 #1523 #998 #1087)
5.6326 -#1824 := [th-lemma]: #1823
5.6327 -#2077 := [unit-resolution #1824 #720 #1684 #746 #698 #772 #802 #850 #876]: #2076
5.6328 -#2078 := [unit-resolution #2077 #2075 #2015 #2045 #2069 #1331 #2070]: #960
5.6329 -#2079 := [unit-resolution #1248 #2078 #2072]: false
5.6330 -#2081 := [lemma #2079]: #2080
5.6331 -#2092 := [unit-resolution #2081 #1331]: #1109
5.6332 -#2093 := [unit-resolution #1735 #2092]: #382
5.6333 -#2094 := [unit-resolution #1960 #2093 #1870]: #1123
5.6334 -#2095 := (or #516 #923 #1074 #1036 #1162 #1125 #1188)
5.6335 -#2096 := [unit-resolution #1712 #1440 #724 #1684 #746 #698 #772 #798 #828 #850 #876]: #2095
5.6336 -#2097 := [unit-resolution #2096 #1631 #2015 #2094 #1331 #2091 #2033]: #1074
5.6337 -#2098 := [unit-resolution #1284 #2097]: #1076
5.6338 -#2099 := [unit-resolution #1107 #2098 #2088]: false
5.6339 -#2101 := [lemma #2099]: #2100
5.6340 -#2102 := [unit-resolution #2101 #1331]: #429
5.6341 -#2103 := [unit-resolution #1183 #2102]: #1153
5.6342 -#2104 := [unit-resolution #1308 #2103]: #1147
5.6343 -#2105 := [unit-resolution #2077 #2104 #2015 #2045 #2069 #1331 #2091]: #960
5.6344 -#2106 := [unit-resolution #1248 #2105]: #962
5.6345 -#2107 := [unit-resolution #2017 #2104 #2015 #2069 #1331]: #972
5.6346 -#2108 := [unit-resolution #1254 #2107]: #974
5.6347 -#2109 := [unit-resolution #994 #2108]: #194
5.6348 -#2110 := [unit-resolution #993 #2109 #2106]: false
5.6349 -#2111 := [lemma #2110]: #516
5.6350 -#2127 := (or #1199 #1189 #477)
5.6351 -#2128 := [th-lemma]: #2127
5.6352 -#2129 := [unit-resolution #2128 #1864 #1997]: #1199
5.6353 -#2125 := (or #335 #288)
5.6354 -#1806 := [unit-resolution #1108 #1422]: #1089
5.6355 -#1829 := [unit-resolution #1290 #1806]: #1084
5.6356 -#2117 := (or #515 #1511 #1337 #1151 #1189 #1358 #922 #1510 #1409 #960 #1509 #1049 #1086)
5.6357 -#2118 := [th-lemma]: #2117
5.6358 -#2119 := [unit-resolution #2118 #1829 #1924 #720 #1468 #776 #694 #798 #2116 #854 #1864 #880 #1928]: #515
5.6359 -#2120 := (or #101 #922 #1510 #1409 #960 #1509 #1049 #335 #288)
5.6360 -#2121 := [th-lemma]: #2120
5.6361 -#2122 := [unit-resolution #2121 #1422 #694 #1924 #720 #1405 #1468 #776 #1928]: #101
5.6362 -#2123 := [unit-resolution #918 #2122]: #899
5.6363 -#2124 := [unit-resolution #1916 #2123 #2119 #2111 #1497 #1925 #2033 #2116 #1928 #1924 #2115 #2112]: false
5.6364 -#2126 := [lemma #2124]: #2125
5.6365 -#2130 := [unit-resolution #2126 #1405]: #335
5.6366 -#2131 := [unit-resolution #1107 #2130]: #1077
5.6367 -#2132 := [unit-resolution #1284 #2131]: #1071
5.6368 -#2133 := [unit-resolution #1933 #2132 #2129 #2115 #1928 #2112 #1924]: #515
5.6369 -#2134 := [unit-resolution #1916 #2133 #2111 #1497 #1925 #2033 #2116 #1928 #1924 #2115 #2112]: #898
5.6370 -#2135 := [unit-resolution #918 #2134]: #100
5.6371 -#2136 := [unit-resolution #917 #2135]: #887
5.6372 -#2137 := [unit-resolution #1224 #2136]: #881
5.6373 -#2138 := [unit-resolution #1943 #2137 #1497 #1870 #2116 #1928]: #506
5.6374 -#2139 := [unit-resolution #646 #2138 #2111 #2133]: #632
5.6375 -#2140 := [unit-resolution #1908 #2139 #1928 #694 #1924 #720 #1684 #746 #1468 #776 #2115 #824 #2112 #850 #672]: #897
5.6376 -#2141 := [th-lemma #2140 #2135 #1742]: false
5.6377 -#2142 := [lemma #2141]: #288
5.6378 -#2143 := [unit-resolution #1069 #2142]: #1039
5.6379 -#2144 := [unit-resolution #1272 #2143]: #1033
5.6380 -#2145 := [hypothesis]: #1150
5.6381 -#2146 := [unit-resolution #1308 #2145]: #1152
5.6382 -#2147 := [unit-resolution #1183 #2146]: #430
5.6383 -#2148 := [unit-resolution #1184 #2147]: #1165
5.6384 -#2149 := [unit-resolution #1314 #2148]: #1160
5.6385 -#2150 := [unit-resolution #1761 #2147]: #1109
5.6386 -#2151 := [unit-resolution #1735 #2150]: #382
5.6387 -#2152 := [unit-resolution #1960 #2151 #1870]: #1123
5.6388 -#2153 := [unit-resolution #1988 #2152 #2149 #2033 #2144]: #509
5.6389 -#2154 := (or #1149 #1147)
5.6390 -#2155 := [th-lemma]: #2154
5.6391 -#2156 := [unit-resolution #2155 #2145]: #1149
5.6392 -#2157 := [unit-resolution #1894 #2147]: #1200
5.6393 -#2158 := [unit-resolution #2061 #2149 #2015 #1870 #2157 #2151]: #1086
5.6394 -#2159 := [unit-resolution #1290 #2158]: #1088
5.6395 -#2160 := [unit-resolution #1108 #2159]: #335
5.6396 -#2161 := [unit-resolution #1107 #2160]: #1077
5.6397 -#2162 := [unit-resolution #1284 #2161]: #1071
5.6398 -#2163 := [unit-resolution #1971 #2162 #2149 #2152 #2156 #2144]: #147
5.6399 -#2164 := [unit-resolution #955 #2163]: #925
5.6400 -#2165 := [unit-resolution #1236 #2164]: #919
5.6401 -#2166 := [unit-resolution #1316 #2148]: #1161
5.6402 -#2167 := (or #100 #923 #1371 #1357 #1523 #998 #1036 #383 #429 #1343 #1113 #973 #1373 #1074 #1358)
5.6403 -#2168 := [th-lemma]: #2167
5.6404 -#2169 := [unit-resolution #2168 #2162 #698 #1440 #724 #1684 #746 #2144 #772 #2033 #798 #2151 #1870 #828 #2147]: #100
5.6405 -#2170 := [unit-resolution #917 #2169]: #887
5.6406 -#2171 := [unit-resolution #1224 #2170]: #881
5.6407 -#2172 := [unit-resolution #1992 #2171 #2166 #2150 #2162 #2144 #2165]: #506
5.6408 -#2173 := (or #195 #1357 #1523 #998 #1036 #383 #429 #1343 #1113)
5.6409 -#2174 := [th-lemma]: #2173
5.6410 -#2175 := [unit-resolution #2174 #2151 #746 #2144 #772 #1684 #1870 #828 #2147]: #195
5.6411 -#2176 := [unit-resolution #994 #2175]: #975
5.6412 -#2177 := [unit-resolution #1254 #2176]: #970
5.6413 -#2178 := (or #515 #922 #1074 #1036 #972 #1163 #1112)
5.6414 -#2179 := [unit-resolution #1622 #694 #720 #1404 #750 #772 #1864 #798 #824 #854 #880]: #2178
5.6415 -#2180 := [unit-resolution #2179 #2177 #2150 #2162 #2166 #2144 #2165]: #515
5.6416 -#2181 := [unit-resolution #646 #2180 #2172 #2111 #2153]: false
5.6417 -#2182 := [lemma #2181]: #1147
5.6418 -#1805 := [unit-resolution #1302 #1729]: #1122
5.6419 -#2231 := (or #194 #382)
5.6420 -#2183 := (or #1150 #429 #1163)
5.6421 -#2184 := [th-lemma]: #2183
5.6422 -#2185 := [unit-resolution #2184 #1333 #2182]: #1163
5.6423 -#2186 := [unit-resolution #1316 #2185 #1334]: false
5.6424 -#2187 := [lemma #2186]: #429
5.6425 -#2196 := [unit-resolution #1183 #2187]: #1153
5.6426 -#2197 := [unit-resolution #1310 #2196]: #1149
5.6427 -#1817 := [unit-resolution #1304 #1729]: #1123
5.6428 -#2217 := [unit-resolution #1804 #1535 #2182 #1817 #2197 #1805]: #147
5.6429 -#2218 := [unit-resolution #955 #2217]: #925
5.6430 -#2219 := [unit-resolution #1236 #2218]: #919
5.6431 -#2210 := [unit-resolution #1976 #2197 #2187]: #1161
5.6432 -#2220 := (or #509 #1124 #935 #1150 #972)
5.6433 -#2221 := [unit-resolution #1767 #698 #672 #720 #1703 #750 #1459 #776 #1447 #802 #824 #850 #1742]: #2220
5.6434 -#2222 := [unit-resolution #2221 #1620 #2069 #1805 #2182]: #509
5.6435 -#2223 := (or #515 #922 #1163 #972 #1124)
5.6436 -#2224 := [unit-resolution #1707 #720 #1703 #750 #1459 #776 #1447 #802 #694 #824 #854 #880 #1864]: #2223
5.6437 -#2225 := [unit-resolution #2224 #2219 #1805 #1620 #2210]: #515
5.6438 -#2226 := [unit-resolution #646 #2225 #2111 #2222]: #631
5.6439 -#2211 := (or #506 #884 #922 #1163 #1124)
5.6440 -#2212 := [unit-resolution #1724 #668 #694 #1703 #750 #1459 #776 #824 #854]: #2211
5.6441 -#2227 := [unit-resolution #2212 #2226 #1805 #2210 #2219]: #884
5.6442 -#2228 := [unit-resolution #1224 #2227]: #886
5.6443 -#2229 := [unit-resolution #917 #2228]: #101
5.6444 -#2230 := [th-lemma #1620 #720 #1459 #776 #1447 #802 #2033 #2229 #698 #1428 #2217]: false
5.6445 -#2232 := [lemma #2230]: #2231
5.6446 -#2242 := [unit-resolution #2232 #1428]: #194
5.6447 -#2243 := [unit-resolution #993 #2242]: #963
5.6448 -#2244 := [unit-resolution #1248 #2243]: #957
5.6449 -#2193 := (or #509 #1124 #1036 #935 #1150 #960 #1087)
5.6450 -#1814 := (or #509 #885 #1522 #1523 #1365 #1489 #998 #1124 #1371 #1036 #1357 #935 #1150 #1509 #1350 #960 #1087)
5.6451 -#1815 := [th-lemma]: #1814
5.6452 -#2194 := [unit-resolution #1815 #698 #720 #1684 #746 #672 #772 #802 #824 #850 #1742]: #2193
5.6453 -#2245 := [unit-resolution #2194 #2244 #2069 #2144 #2045 #1805 #2182]: #509
5.6454 -#2205 := (or #100 #935 #1036 #382 #960 #1087)
5.6455 -#1834 := (or #100 #1371 #935 #1523 #1036 #1357 #998 #1509 #382 #1350 #960 #1087)
5.6456 -#1835 := [th-lemma]: #1834
5.6457 -#2206 := [unit-resolution #1835 #698 #720 #1684 #746 #772 #802]: #2205
5.6458 -#2246 := [unit-resolution #2206 #2244 #2045 #2069 #2144 #1428]: #100
5.6459 -#2247 := [unit-resolution #917 #2246]: #887
5.6460 -#2248 := [unit-resolution #1224 #2247]: #881
5.6461 -#2215 := (or #335 #382)
5.6462 -#2188 := (or #335 #194)
5.6463 -#2189 := [unit-resolution #1777 #750 #1459 #776 #1703]: #2188
5.6464 -#2190 := [unit-resolution #2189 #1422]: #194
5.6465 -#2191 := [unit-resolution #993 #2190]: #963
5.6466 -#2192 := [unit-resolution #1248 #2191]: #957
5.6467 -#2195 := [unit-resolution #2194 #2192 #2069 #2144 #2045 #1805 #2182]: #509
5.6468 -#2198 := [unit-resolution #1250 #2191]: #959
5.6469 -#1840 := (or #335 #934 #1151 #961 #935 #960 #1150 #382)
5.6470 -#1807 := [unit-resolution #1292 #1806]: #1085
5.6471 -#1808 := [hypothesis]: #933
5.6472 -#1809 := (or #288 #382 #1350 #335 #1087)
5.6473 -#1810 := [th-lemma]: #1809
5.6474 -#1811 := [unit-resolution #1810 #1422 #1807 #802 #1428]: #288
5.6475 -#1812 := [unit-resolution #1069 #1811]: #1039
5.6476 -#1813 := [unit-resolution #1272 #1812]: #1033
5.6477 -#1816 := [unit-resolution #1815 #1813 #1808 #698 #1536 #720 #1684 #746 #672 #772 #1807 #802 #1805 #824 #1540 #850 #1742]: #509
5.6478 -#1818 := (or #476 #1337 #1343 #1125 #1151 #335 #382)
5.6479 -#1819 := [th-lemma]: #1818
5.6480 -#1820 := [unit-resolution #1819 #1422 #1817 #828 #1774 #854 #1428]: #476
5.6481 -#1821 := [unit-resolution #1221 #1820]: #1191
5.6482 -#1822 := [unit-resolution #1320 #1821]: #1185
5.6483 -#1825 := [unit-resolution #1824 #1813 #1536 #720 #1684 #746 #698 #772 #1807 #802 #1540 #850 #1822 #876 #1808]: #516
5.6484 -#1826 := [hypothesis]: #932
5.6485 -#1827 := [unit-resolution #1322 #1821]: #1187
5.6486 -#1830 := (or #515 #1511 #1337 #1409 #1037 #1189 #1510 #934 #1373 #1358 #1151 #961 #1364 #999 #1086)
5.6487 -#1831 := [th-lemma]: #1830
5.6488 -#1832 := [unit-resolution #1831 #1829 #1828 #724 #1703 #750 #1459 #776 #694 #798 #1774 #854 #1827 #880 #1826]: #515
5.6489 -#1833 := [unit-resolution #646 #1832 #1825 #1816]: #631
5.6490 -#1836 := [unit-resolution #1835 #1813 #698 #1536 #720 #1684 #746 #1808 #772 #1807 #802 #1428]: #100
5.6491 -#1837 := [unit-resolution #917 #1836]: #887
5.6492 -#1838 := [unit-resolution #1224 #1837]: #881
5.6493 -#1839 := [th-lemma #1838 #668 #750 #828 #854 #1703 #1817 #694 #1459 #776 #1826 #1774 #724 #798 #1828 #1829 #1833]: false
5.6494 -#1841 := [lemma #1839]: #1840
5.6495 -#2199 := [unit-resolution #1841 #2198 #2069 #1422 #2197 #2192 #2182 #1428]: #934
5.6496 -#2200 := [unit-resolution #1242 #2199]: #936
5.6497 -#2201 := [unit-resolution #956 #2200]: #147
5.6498 -#2202 := [unit-resolution #955 #2201]: #925
5.6499 -#2203 := [unit-resolution #1236 #2202]: #919
5.6500 -#2204 := [unit-resolution #2118 #2203 #1829 #720 #1468 #776 #694 #798 #2197 #854 #1864 #880 #2192]: #515
5.6501 -#2207 := [unit-resolution #2206 #2192 #2045 #2069 #2144 #1428]: #100
5.6502 -#2208 := [unit-resolution #917 #2207]: #887
5.6503 -#2209 := [unit-resolution #1224 #2208]: #881
5.6504 -#2213 := [unit-resolution #2212 #2203 #1805 #2210 #2209]: #506
5.6505 -#2214 := [unit-resolution #646 #2213 #2204 #2111 #2195]: false
5.6506 -#2216 := [lemma #2214]: #2215
5.6507 -#2249 := [unit-resolution #2216 #1428]: #335
5.6508 -#2250 := [unit-resolution #1107 #2249]: #1077
5.6509 -#2251 := [unit-resolution #1284 #2250]: #1071
5.6510 -#2252 := (or #1084 #1074 #1357 #1523 #998 #1036 #195)
5.6511 -#2253 := [th-lemma]: #2252
5.6512 -#2254 := [unit-resolution #2253 #2251 #746 #2144 #772 #1684 #2242]: #1084
5.6513 -#2255 := [unit-resolution #1250 #2243]: #959
5.6514 -#2240 := (or #934 #632 #884 #1074 #1125 #961 #1086)
5.6515 -#2233 := (or #515 #934 #1151 #961 #1086)
5.6516 -#2234 := [unit-resolution #1831 #1864 #724 #1703 #750 #1459 #776 #694 #798 #854 #880]: #2233
5.6517 -#2235 := [unit-resolution #2234 #1826 #2197 #1828 #2054]: #515
5.6518 -#2236 := (or #506 #884 #1125 #1036 #934 #1151 #1074)
5.6519 -#2237 := [unit-resolution #1788 #694 #1440 #724 #1684 #746 #668 #772 #798 #828 #854]: #2236
5.6520 -#2238 := [unit-resolution #2237 #1826 #1636 #1638 #1775 #2197 #2144]: #506
5.6521 -#2239 := [unit-resolution #646 #2238 #2235 #2111 #1628]: false
5.6522 -#2241 := [lemma #2239]: #2240
5.6523 -#2256 := [unit-resolution #2241 #2245 #2248 #2251 #1817 #2255 #2254]: #934
5.6524 -#2257 := [unit-resolution #1242 #2256]: #936
5.6525 -#2258 := [unit-resolution #956 #2257]: #147
5.6526 -#2259 := [unit-resolution #955 #2258]: #925
5.6527 -#2260 := [unit-resolution #1236 #2259]: #919
5.6528 -#2261 := [unit-resolution #2212 #2260 #1805 #2210 #2248]: #506
5.6529 -#2262 := [unit-resolution #2118 #2260 #2254 #720 #1468 #776 #694 #798 #2197 #854 #1864 #880 #2244]: #515
5.6530 -#2263 := [unit-resolution #646 #2262 #2261 #2111 #2245]: false
5.6531 -#2264 := [lemma #2263]: #382
5.6532 -#2265 := [unit-resolution #1145 #2264]: #1115
5.6533 -#2266 := [unit-resolution #1296 #2265]: #1109
5.6534 -#2267 := [unit-resolution #2189 #1535]: #335
5.6535 -#2268 := [unit-resolution #1107 #2267]: #1077
5.6536 -#2269 := [unit-resolution #1284 #2268]: #1071
5.6537 -#2270 := [unit-resolution #1966 #2269 #2142 #2266 #2182]: #1160
5.6538 -#2271 := (or #1008 #998 #1036 #1357 #1074 #1358 #383)
5.6539 -#2272 := [th-lemma]: #2271
5.6540 -#2273 := [unit-resolution #2272 #2269 #2144 #772 #1684 #798 #2264]: #1008
5.6541 -#2274 := (or #509 #1010 #1113 #923 #1162)
5.6542 -#2275 := [unit-resolution #1608 #672 #698 #1742 #746 #1459 #776 #1447 #802 #828 #850]: #2274
5.6543 -#2276 := [unit-resolution #2275 #2273 #1870 #2270 #2033]: #509
5.6544 -#2277 := [unit-resolution #1960 #2264 #1870]: #1123
5.6545 -#2278 := [unit-resolution #1971 #2270 #2269 #2277 #2197 #2144]: #147
5.6546 -#2279 := [unit-resolution #955 #2278]: #925
5.6547 -#2280 := [unit-resolution #1236 #2279]: #919
5.6548 -#2281 := (or #1010 #999 #923 #100 #1371 #961 #1373)
5.6549 -#2282 := [th-lemma]: #2281
5.6550 -#2283 := [unit-resolution #2282 #2273 #698 #1584 #724 #1703 #2033]: #100
5.6551 -#2284 := [unit-resolution #917 #2283]: #887
5.6552 -#2285 := [unit-resolution #1224 #2284]: #881
5.6553 -#2286 := [unit-resolution #1992 #2285 #2210 #2266 #2269 #2144 #2280]: #506
5.6554 -#2287 := [unit-resolution #2179 #2280 #2266 #1620 #2210 #2144 #2269]: #515
5.6555 -#2288 := [unit-resolution #646 #2287 #2286 #2111 #2276]: false
5.6556 -#2289 := [lemma #2288]: #194
5.6557 -#2305 := [unit-resolution #2253 #2302 #746 #2144 #772 #1684 #2289]: #1074
5.6558 -#2306 := [unit-resolution #1284 #2305]: #1076
5.6559 -#2307 := [unit-resolution #1107 #2306 #2304]: false
5.6560 -#2308 := [lemma #2307]: #1084
5.6561 -#2300 := (or #1086 #515)
5.6562 -#2290 := [hypothesis]: #633
5.6563 -#2291 := [unit-resolution #993 #2289]: #963
5.6564 -#2292 := [unit-resolution #1250 #2291]: #959
5.6565 -#2293 := [unit-resolution #2234 #2054 #2197 #2292 #2290]: #934
5.6566 -#2294 := [unit-resolution #1242 #2293]: #936
5.6567 -#2295 := [unit-resolution #1248 #2291]: #957
5.6568 -#2296 := [unit-resolution #2118 #2054 #2290 #720 #1468 #776 #694 #798 #2197 #854 #1864 #880 #2295]: #922
5.6569 -#2297 := [unit-resolution #1236 #2296]: #924
5.6570 -#2298 := [unit-resolution #955 #2297]: #148
5.6571 -#2299 := [unit-resolution #956 #2298 #2294]: false
5.6572 -#2301 := [lemma #2299]: #2300
5.6573 -#1848 := [unit-resolution #2301 #2308]: #515
5.6574 -#1851 := [hypothesis]: #632
5.6575 -#1852 := (or #897 #1522 #509 #1523 #998 #1365 #1489 #1150 #1509 #1350 #633 #1372 #1188 #960 #1087 #1112)
5.6576 -#1853 := [th-lemma]: #1852
5.6577 -#1846 := [unit-resolution #1853 #1851 #2295 #720 #1684 #746 #2045 #802 #2266 #824 #2182 #850 #2015 #876 #672 #1848]: #897
5.6578 -#1847 := [unit-resolution #1232 #1846]: #898
5.6579 -#1854 := [unit-resolution #918 #1847]: #100
5.6580 -#1855 := (or #509 #1124)
5.6581 -#1856 := [unit-resolution #2194 #2069 #2144 #2045 #2295 #2182]: #1855
5.6582 -#2309 := [unit-resolution #1856 #1851]: #1124
5.6583 -#2310 := [th-lemma #1848 #876 #850 #2182 #2015 #2309 #2266 #1854]: false
5.6584 -#2311 := [lemma #2310]: #509
5.6585 -#2312 := (or #631 #632)
5.6586 -#2313 := [unit-resolution #646 #2111 #1848]: #2312
5.6587 -#2314 := [unit-resolution #2313 #2311]: #631
5.6588 -#2315 := (or #884 #633 #1372 #1188 #1125 #1528 #506 #1364 #999 #1343 #1373 #1358 #961 #1086)
5.6589 -#2316 := [th-lemma]: #2315
5.6590 -#2317 := [unit-resolution #2316 #668 #2292 #724 #1703 #750 #2308 #798 #2277 #828 #2015 #876 #2314 #1848]: #884
5.6591 -#2318 := [unit-resolution #1224 #2317]: #886
5.6592 -#2319 := (or #896 #1528 #506 #1364 #999 #1343 #1337 #1151 #1373 #1358 #634 #1511 #1189 #961 #1086 #1113)
5.6593 -#2320 := [th-lemma]: #2319
5.6594 -#2321 := [unit-resolution #2320 #668 #2292 #724 #1703 #750 #2308 #798 #1870 #828 #2197 #854 #1864 #880 #2314 #2111]: #896
5.6595 -#2322 := [unit-resolution #1230 #2321]: #898
5.6596 -#2323 := [unit-resolution #918 #2322]: #100
5.6597 -[unit-resolution #917 #2323 #2318]: false
5.6598 -unsat
5.6599 -258b6cd4609a61b7800235c7f356739cfb8996c5 52 0
5.6600 -#2 := false
5.6601 -#8 := 1::real
5.6602 -decl uf_1 :: real
5.6603 -#4 := uf_1
5.6604 -#6 := 2::real
5.6605 -#7 := (* 2::real uf_1)
5.6606 -#9 := (+ #7 1::real)
5.6607 -#5 := (+ uf_1 uf_1)
5.6608 -#10 := (< #5 #9)
5.6609 -#11 := (or false #10)
5.6610 -#12 := (or #10 #11)
5.6611 -#13 := (not #12)
5.6612 -#64 := (iff #13 false)
5.6613 -#32 := (+ 1::real #7)
5.6614 -#35 := (< #7 #32)
5.6615 -#52 := (not #35)
5.6616 -#62 := (iff #52 false)
5.6617 -#1 := true
5.6618 -#57 := (not true)
5.6619 -#60 := (iff #57 false)
5.6620 -#61 := [rewrite]: #60
5.6621 -#58 := (iff #52 #57)
5.6622 -#55 := (iff #35 true)
5.6623 -#56 := [rewrite]: #55
5.6624 -#59 := [monotonicity #56]: #58
5.6625 -#63 := [trans #59 #61]: #62
5.6626 -#53 := (iff #13 #52)
5.6627 -#50 := (iff #12 #35)
5.6628 -#45 := (or #35 #35)
5.6629 -#48 := (iff #45 #35)
5.6630 -#49 := [rewrite]: #48
5.6631 -#46 := (iff #12 #45)
5.6632 -#43 := (iff #11 #35)
5.6633 -#38 := (or false #35)
5.6634 -#41 := (iff #38 #35)
5.6635 -#42 := [rewrite]: #41
5.6636 -#39 := (iff #11 #38)
5.6637 -#36 := (iff #10 #35)
5.6638 -#33 := (= #9 #32)
5.6639 -#34 := [rewrite]: #33
5.6640 -#30 := (= #5 #7)
5.6641 -#31 := [rewrite]: #30
5.6642 -#37 := [monotonicity #31 #34]: #36
5.6643 -#40 := [monotonicity #37]: #39
5.6644 -#44 := [trans #40 #42]: #43
5.6645 -#47 := [monotonicity #37 #44]: #46
5.6646 -#51 := [trans #47 #49]: #50
5.6647 -#54 := [monotonicity #51]: #53
5.6648 -#65 := [trans #54 #63]: #64
5.6649 -#29 := [asserted]: #13
5.6650 -[mp #29 #65]: false
5.6651 -unsat
5.6652 -3d1d0473f97c11d6c4d10f6e0313b2e2f4aac879 59 0
5.6653 -#2 := false
5.6654 -#55 := 0::int
5.6655 -#7 := 2::int
5.6656 -decl uf_1 :: int
5.6657 -#4 := uf_1
5.6658 -#8 := (mod uf_1 2::int)
5.6659 -#58 := (>= #8 0::int)
5.6660 -#61 := (not #58)
5.6661 -#5 := 1::int
5.6662 -#9 := (* 2::int #8)
5.6663 -#10 := (+ #9 1::int)
5.6664 -#11 := (+ uf_1 #10)
5.6665 -#6 := (+ uf_1 1::int)
5.6666 -#12 := (<= #6 #11)
5.6667 -#13 := (not #12)
5.6668 -#66 := (iff #13 #61)
5.6669 -#39 := (+ uf_1 #9)
5.6670 -#40 := (+ 1::int #39)
5.6671 -#30 := (+ 1::int uf_1)
5.6672 -#45 := (<= #30 #40)
5.6673 -#48 := (not #45)
5.6674 -#64 := (iff #48 #61)
5.6675 -#56 := (>= #9 0::int)
5.6676 -#51 := (not #56)
5.6677 -#62 := (iff #51 #61)
5.6678 -#59 := (iff #56 #58)
5.6679 -#60 := [rewrite]: #59
5.6680 -#63 := [monotonicity #60]: #62
5.6681 -#52 := (iff #48 #51)
5.6682 -#53 := (iff #45 #56)
5.6683 -#54 := [rewrite]: #53
5.6684 -#57 := [monotonicity #54]: #52
5.6685 -#65 := [trans #57 #63]: #64
5.6686 -#49 := (iff #13 #48)
5.6687 -#46 := (iff #12 #45)
5.6688 -#43 := (= #11 #40)
5.6689 -#33 := (+ 1::int #9)
5.6690 -#36 := (+ uf_1 #33)
5.6691 -#41 := (= #36 #40)
5.6692 -#42 := [rewrite]: #41
5.6693 -#37 := (= #11 #36)
5.6694 -#34 := (= #10 #33)
5.6695 -#35 := [rewrite]: #34
5.6696 -#38 := [monotonicity #35]: #37
5.6697 -#44 := [trans #38 #42]: #43
5.6698 -#31 := (= #6 #30)
5.6699 -#32 := [rewrite]: #31
5.6700 -#47 := [monotonicity #32 #44]: #46
5.6701 -#50 := [monotonicity #47]: #49
5.6702 -#67 := [trans #50 #65]: #66
5.6703 -#29 := [asserted]: #13
5.6704 -#68 := [mp #29 #67]: #61
5.6705 -#1 := true
5.6706 -#28 := [true-axiom]: true
5.6707 -#142 := (or false #58)
5.6708 -#143 := [th-lemma]: #142
5.6709 -#144 := [unit-resolution #143 #28]: #58
5.6710 -[unit-resolution #144 #68]: false
5.6711 -unsat
5.6712 -f768cbe713eb8031e45b1a78d0f49a07f5398eb8 54 0
5.6713 -#2 := false
5.6714 -#5 := 2::int
5.6715 -decl uf_1 :: int
5.6716 -#4 := uf_1
5.6717 -#6 := (mod uf_1 2::int)
5.6718 -#55 := (>= #6 2::int)
5.6719 -#9 := 3::int
5.6720 -#10 := (+ uf_1 3::int)
5.6721 -#7 := (+ #6 #6)
5.6722 -#8 := (+ uf_1 #7)
5.6723 -#11 := (< #8 #10)
5.6724 -#12 := (not #11)
5.6725 -#60 := (iff #12 #55)
5.6726 -#35 := (+ 3::int uf_1)
5.6727 -#29 := (* 2::int #6)
5.6728 -#32 := (+ uf_1 #29)
5.6729 -#38 := (< #32 #35)
5.6730 -#41 := (not #38)
5.6731 -#58 := (iff #41 #55)
5.6732 -#48 := (>= #29 3::int)
5.6733 -#56 := (iff #48 #55)
5.6734 -#57 := [rewrite]: #56
5.6735 -#53 := (iff #41 #48)
5.6736 -#46 := (not #48)
5.6737 -#45 := (not #46)
5.6738 -#51 := (iff #45 #48)
5.6739 -#52 := [rewrite]: #51
5.6740 -#49 := (iff #41 #45)
5.6741 -#47 := (iff #38 #46)
5.6742 -#44 := [rewrite]: #47
5.6743 -#50 := [monotonicity #44]: #49
5.6744 -#54 := [trans #50 #52]: #53
5.6745 -#59 := [trans #54 #57]: #58
5.6746 -#42 := (iff #12 #41)
5.6747 -#39 := (iff #11 #38)
5.6748 -#36 := (= #10 #35)
5.6749 -#37 := [rewrite]: #36
5.6750 -#33 := (= #8 #32)
5.6751 -#30 := (= #7 #29)
5.6752 -#31 := [rewrite]: #30
5.6753 -#34 := [monotonicity #31]: #33
5.6754 -#40 := [monotonicity #34 #37]: #39
5.6755 -#43 := [monotonicity #40]: #42
5.6756 -#61 := [trans #43 #59]: #60
5.6757 -#28 := [asserted]: #12
5.6758 -#62 := [mp #28 #61]: #55
5.6759 -#127 := (not #55)
5.6760 -#1 := true
5.6761 -#27 := [true-axiom]: true
5.6762 -#137 := (or false #127)
5.6763 -#138 := [th-lemma]: #137
5.6764 -#139 := [unit-resolution #138 #27]: #127
5.6765 -[unit-resolution #139 #62]: false
5.6766 -unsat
5.6767 -2c2bcacfbe018175dd39ce04dd5cbe02c800a0dd 118 0
5.6768 -#2 := false
5.6769 -#5 := 0::real
5.6770 -decl uf_1 :: real
5.6771 -#4 := uf_1
5.6772 -#94 := (<= uf_1 0::real)
5.6773 -#17 := 2::real
5.6774 -#40 := (* 2::real uf_1)
5.6775 -#102 := (<= #40 0::real)
5.6776 -#103 := (>= #40 0::real)
5.6777 -#105 := (not #103)
5.6778 -#104 := (not #102)
5.6779 -#106 := (or #104 #105)
5.6780 -#107 := (not #106)
5.6781 -#88 := (= #40 0::real)
5.6782 -#108 := (iff #88 #107)
5.6783 -#109 := [rewrite]: #108
5.6784 -#16 := 4::real
5.6785 -#11 := (- uf_1)
5.6786 -#10 := (< uf_1 0::real)
5.6787 -#12 := (ite #10 #11 uf_1)
5.6788 -#9 := 1::real
5.6789 -#13 := (< 1::real #12)
5.6790 -#14 := (not #13)
5.6791 -#15 := (or #13 #14)
5.6792 -#18 := (ite #15 4::real 2::real)
5.6793 -#19 := (* #18 uf_1)
5.6794 -#8 := (+ uf_1 uf_1)
5.6795 -#20 := (= #8 #19)
5.6796 -#21 := (not #20)
5.6797 -#22 := (not #21)
5.6798 -#89 := (iff #22 #88)
5.6799 -#70 := (* 4::real uf_1)
5.6800 -#73 := (= #40 #70)
5.6801 -#86 := (iff #73 #88)
5.6802 -#87 := [rewrite]: #86
5.6803 -#84 := (iff #22 #73)
5.6804 -#76 := (not #73)
5.6805 -#79 := (not #76)
5.6806 -#82 := (iff #79 #73)
5.6807 -#83 := [rewrite]: #82
5.6808 -#80 := (iff #22 #79)
5.6809 -#77 := (iff #21 #76)
5.6810 -#74 := (iff #20 #73)
5.6811 -#71 := (= #19 #70)
5.6812 -#68 := (= #18 4::real)
5.6813 -#1 := true
5.6814 -#63 := (ite true 4::real 2::real)
5.6815 -#66 := (= #63 4::real)
5.6816 -#67 := [rewrite]: #66
5.6817 -#64 := (= #18 #63)
5.6818 -#61 := (iff #15 true)
5.6819 -#43 := -1::real
5.6820 -#44 := (* -1::real uf_1)
5.6821 -#47 := (ite #10 #44 uf_1)
5.6822 -#50 := (< 1::real #47)
5.6823 -#53 := (not #50)
5.6824 -#56 := (or #50 #53)
5.6825 -#59 := (iff #56 true)
5.6826 -#60 := [rewrite]: #59
5.6827 -#57 := (iff #15 #56)
5.6828 -#54 := (iff #14 #53)
5.6829 -#51 := (iff #13 #50)
5.6830 -#48 := (= #12 #47)
5.6831 -#45 := (= #11 #44)
5.6832 -#46 := [rewrite]: #45
5.6833 -#49 := [monotonicity #46]: #48
5.6834 -#52 := [monotonicity #49]: #51
5.6835 -#55 := [monotonicity #52]: #54
5.6836 -#58 := [monotonicity #52 #55]: #57
5.6837 -#62 := [trans #58 #60]: #61
5.6838 -#65 := [monotonicity #62]: #64
5.6839 -#69 := [trans #65 #67]: #68
5.6840 -#72 := [monotonicity #69]: #71
5.6841 -#41 := (= #8 #40)
5.6842 -#42 := [rewrite]: #41
5.6843 -#75 := [monotonicity #42 #72]: #74
5.6844 -#78 := [monotonicity #75]: #77
5.6845 -#81 := [monotonicity #78]: #80
5.6846 -#85 := [trans #81 #83]: #84
5.6847 -#90 := [trans #85 #87]: #89
5.6848 -#39 := [asserted]: #22
5.6849 -#91 := [mp #39 #90]: #88
5.6850 -#110 := [mp #91 #109]: #107
5.6851 -#111 := [not-or-elim #110]: #102
5.6852 -#127 := (or #94 #104)
5.6853 -#128 := [th-lemma]: #127
5.6854 -#129 := [unit-resolution #128 #111]: #94
5.6855 -#92 := (>= uf_1 0::real)
5.6856 -#112 := [not-or-elim #110]: #103
5.6857 -#130 := (or #92 #105)
5.6858 -#131 := [th-lemma]: #130
5.6859 -#132 := [unit-resolution #131 #112]: #92
5.6860 -#114 := (not #94)
5.6861 -#113 := (not #92)
5.6862 -#115 := (or #113 #114)
5.6863 -#95 := (and #92 #94)
5.6864 -#98 := (not #95)
5.6865 -#124 := (iff #98 #115)
5.6866 -#116 := (not #115)
5.6867 -#119 := (not #116)
5.6868 -#122 := (iff #119 #115)
5.6869 -#123 := [rewrite]: #122
5.6870 -#120 := (iff #98 #119)
5.6871 -#117 := (iff #95 #116)
5.6872 -#118 := [rewrite]: #117
5.6873 -#121 := [monotonicity #118]: #120
5.6874 -#125 := [trans #121 #123]: #124
5.6875 -#6 := (= uf_1 0::real)
5.6876 -#7 := (not #6)
5.6877 -#99 := (iff #7 #98)
5.6878 -#96 := (iff #6 #95)
5.6879 -#97 := [rewrite]: #96
5.6880 -#100 := [monotonicity #97]: #99
5.6881 -#38 := [asserted]: #7
5.6882 -#101 := [mp #38 #100]: #98
5.6883 -#126 := [mp #101 #125]: #115
5.6884 -[unit-resolution #126 #132 #129]: false
5.6885 -unsat
5.6886 -8bded5c2f0cd48cce9a86100cc4c6ce26ec88a2e 208 0
5.6887 -#2 := false
5.6888 -#9 := 0::int
5.6889 -#11 := 4::int
5.6890 -decl uf_1 :: int
5.6891 -#4 := uf_1
5.6892 -#189 := (div uf_1 4::int)
5.6893 -#210 := -4::int
5.6894 -#211 := (* -4::int #189)
5.6895 -#12 := (mod uf_1 4::int)
5.6896 -#134 := -1::int
5.6897 -#209 := (* -1::int #12)
5.6898 -#212 := (+ #209 #211)
5.6899 -#213 := (+ uf_1 #212)
5.6900 -#214 := (<= #213 0::int)
5.6901 -#215 := (not #214)
5.6902 -#208 := (>= #213 0::int)
5.6903 -#207 := (not #208)
5.6904 -#216 := (or #207 #215)
5.6905 -#217 := (not #216)
5.6906 -#1 := true
5.6907 -#36 := [true-axiom]: true
5.6908 -#393 := (or false #217)
5.6909 -#394 := [th-lemma]: #393
5.6910 -#395 := [unit-resolution #394 #36]: #217
5.6911 -#224 := (or #216 #214)
5.6912 -#225 := [def-axiom]: #224
5.6913 -#396 := [unit-resolution #225 #395]: #214
5.6914 -#222 := (or #216 #208)
5.6915 -#223 := [def-axiom]: #222
5.6916 -#397 := [unit-resolution #223 #395]: #208
5.6917 -#250 := (>= #12 4::int)
5.6918 -#251 := (not #250)
5.6919 -#398 := (or false #251)
5.6920 -#399 := [th-lemma]: #398
5.6921 -#400 := [unit-resolution #399 #36]: #251
5.6922 -#13 := 3::int
5.6923 -#90 := (>= #12 3::int)
5.6924 -#92 := (not #90)
5.6925 -#89 := (<= #12 3::int)
5.6926 -#91 := (not #89)
5.6927 -#93 := (or #91 #92)
5.6928 -#94 := (not #93)
5.6929 -#14 := (= #12 3::int)
5.6930 -#95 := (iff #14 #94)
5.6931 -#96 := [rewrite]: #95
5.6932 -#38 := [asserted]: #14
5.6933 -#97 := [mp #38 #96]: #94
5.6934 -#99 := [not-or-elim #97]: #90
5.6935 -#7 := 2::int
5.6936 -#261 := (div uf_1 2::int)
5.6937 -#140 := -2::int
5.6938 -#276 := (* -2::int #261)
5.6939 -#15 := (mod uf_1 2::int)
5.6940 -#275 := (* -1::int #15)
5.6941 -#277 := (+ #275 #276)
5.6942 -#278 := (+ uf_1 #277)
5.6943 -#279 := (<= #278 0::int)
5.6944 -#280 := (not #279)
5.6945 -#274 := (>= #278 0::int)
5.6946 -#273 := (not #274)
5.6947 -#281 := (or #273 #280)
5.6948 -#282 := (not #281)
5.6949 -#408 := (or false #282)
5.6950 -#409 := [th-lemma]: #408
5.6951 -#410 := [unit-resolution #409 #36]: #282
5.6952 -#289 := (or #281 #279)
5.6953 -#290 := [def-axiom]: #289
5.6954 -#411 := [unit-resolution #290 #410]: #279
5.6955 -#287 := (or #281 #274)
5.6956 -#288 := [def-axiom]: #287
5.6957 -#412 := [unit-resolution #288 #410]: #274
5.6958 -#16 := 1::int
5.6959 -#55 := (>= #15 1::int)
5.6960 -#100 := (not #55)
5.6961 -decl uf_2 :: int
5.6962 -#5 := uf_2
5.6963 -#18 := (mod uf_2 2::int)
5.6964 -#61 := (<= #18 1::int)
5.6965 -#102 := (not #61)
5.6966 -#375 := [hypothesis]: #102
5.6967 -#358 := (>= #18 2::int)
5.6968 -#359 := (not #358)
5.6969 -#403 := (or false #359)
5.6970 -#404 := [th-lemma]: #403
5.6971 -#405 := [unit-resolution #404 #36]: #359
5.6972 -#406 := [th-lemma #405 #375]: false
5.6973 -#407 := [lemma #406]: #61
5.6974 -#413 := (or #100 #102)
5.6975 -#62 := (>= #18 1::int)
5.6976 -#315 := (div uf_2 2::int)
5.6977 -#330 := (* -2::int #315)
5.6978 -#329 := (* -1::int #18)
5.6979 -#331 := (+ #329 #330)
5.6980 -#332 := (+ uf_2 #331)
5.6981 -#333 := (<= #332 0::int)
5.6982 -#334 := (not #333)
5.6983 -#328 := (>= #332 0::int)
5.6984 -#327 := (not #328)
5.6985 -#335 := (or #327 #334)
5.6986 -#336 := (not #335)
5.6987 -#376 := (or false #336)
5.6988 -#377 := [th-lemma]: #376
5.6989 -#378 := [unit-resolution #377 #36]: #336
5.6990 -#343 := (or #335 #333)
5.6991 -#344 := [def-axiom]: #343
5.6992 -#379 := [unit-resolution #344 #378]: #333
5.6993 -#341 := (or #335 #328)
5.6994 -#342 := [def-axiom]: #341
5.6995 -#380 := [unit-resolution #342 #378]: #328
5.6996 -#103 := (not #62)
5.6997 -#381 := [hypothesis]: #103
5.6998 -#352 := (>= #18 0::int)
5.6999 -#382 := (or false #352)
5.7000 -#383 := [th-lemma]: #382
5.7001 -#384 := [unit-resolution #383 #36]: #352
5.7002 -#6 := (+ uf_1 uf_2)
5.7003 -#116 := (div #6 2::int)
5.7004 -#141 := (* -2::int #116)
5.7005 -#8 := (mod #6 2::int)
5.7006 -#139 := (* -1::int #8)
5.7007 -#142 := (+ #139 #141)
5.7008 -#143 := (+ uf_2 #142)
5.7009 -#144 := (+ uf_1 #143)
5.7010 -#138 := (<= #144 0::int)
5.7011 -#136 := (not #138)
5.7012 -#137 := (>= #144 0::int)
5.7013 -#135 := (not #137)
5.7014 -#145 := (or #135 #136)
5.7015 -#146 := (not #145)
5.7016 -#385 := (or false #146)
5.7017 -#386 := [th-lemma]: #385
5.7018 -#387 := [unit-resolution #386 #36]: #146
5.7019 -#153 := (or #145 #138)
5.7020 -#154 := [def-axiom]: #153
5.7021 -#388 := [unit-resolution #154 #387]: #138
5.7022 -#151 := (or #145 #137)
5.7023 -#152 := [def-axiom]: #151
5.7024 -#389 := [unit-resolution #152 #387]: #137
5.7025 -#78 := (<= #8 0::int)
5.7026 -#79 := (>= #8 0::int)
5.7027 -#81 := (not #79)
5.7028 -#80 := (not #78)
5.7029 -#82 := (or #80 #81)
5.7030 -#83 := (not #82)
5.7031 -#10 := (= #8 0::int)
5.7032 -#84 := (iff #10 #83)
5.7033 -#85 := [rewrite]: #84
5.7034 -#37 := [asserted]: #10
5.7035 -#86 := [mp #37 #85]: #83
5.7036 -#87 := [not-or-elim #86]: #78
5.7037 -#390 := (or false #79)
5.7038 -#391 := [th-lemma]: #390
5.7039 -#392 := [unit-resolution #391 #36]: #79
5.7040 -#401 := [th-lemma #99 #400 #397 #396 #392 #87 #389 #388 #384 #381 #380 #379]: false
5.7041 -#402 := [lemma #401]: #62
5.7042 -#57 := (<= #15 1::int)
5.7043 -#101 := (not #57)
5.7044 -#369 := [hypothesis]: #101
5.7045 -#304 := (>= #15 2::int)
5.7046 -#305 := (not #304)
5.7047 -#370 := (or false #305)
5.7048 -#371 := [th-lemma]: #370
5.7049 -#372 := [unit-resolution #371 #36]: #305
5.7050 -#373 := [th-lemma #372 #369]: false
5.7051 -#374 := [lemma #373]: #57
5.7052 -#104 := (or #100 #101 #102 #103)
5.7053 -#69 := (and #55 #57 #61 #62)
5.7054 -#74 := (not #69)
5.7055 -#113 := (iff #74 #104)
5.7056 -#105 := (not #104)
5.7057 -#108 := (not #105)
5.7058 -#111 := (iff #108 #104)
5.7059 -#112 := [rewrite]: #111
5.7060 -#109 := (iff #74 #108)
5.7061 -#106 := (iff #69 #105)
5.7062 -#107 := [rewrite]: #106
5.7063 -#110 := [monotonicity #107]: #109
5.7064 -#114 := [trans #110 #112]: #113
5.7065 -#19 := (= #18 1::int)
5.7066 -#17 := (= #15 1::int)
5.7067 -#20 := (and #17 #19)
5.7068 -#21 := (not #20)
5.7069 -#75 := (iff #21 #74)
5.7070 -#72 := (iff #20 #69)
5.7071 -#63 := (and #61 #62)
5.7072 -#58 := (and #55 #57)
5.7073 -#66 := (and #58 #63)
5.7074 -#70 := (iff #66 #69)
5.7075 -#71 := [rewrite]: #70
5.7076 -#67 := (iff #20 #66)
5.7077 -#64 := (iff #19 #63)
5.7078 -#65 := [rewrite]: #64
5.7079 -#59 := (iff #17 #58)
5.7080 -#60 := [rewrite]: #59
5.7081 -#68 := [monotonicity #60 #65]: #67
5.7082 -#73 := [trans #68 #71]: #72
5.7083 -#76 := [monotonicity #73]: #75
5.7084 -#39 := [asserted]: #21
5.7085 -#77 := [mp #39 #76]: #74
5.7086 -#115 := [mp #77 #114]: #104
5.7087 -#414 := [unit-resolution #115 #374 #402]: #413
5.7088 -#415 := [unit-resolution #414 #407]: #100
5.7089 -#298 := (>= #15 0::int)
5.7090 -#416 := (or false #298)
5.7091 -#417 := [th-lemma]: #416
5.7092 -#418 := [unit-resolution #417 #36]: #298
5.7093 -[th-lemma #418 #415 #412 #411 #99 #400 #397 #396]: false
5.7094 -unsat
5.7095 -7beaddc803d2c23197634dc63d56d564292d85fe 24 0
5.7096 -#2 := false
5.7097 -#4 := (exists (vars (?x1 int)) false)
5.7098 -#5 := (not #4)
5.7099 -#6 := (not #5)
5.7100 -#37 := (iff #6 false)
5.7101 -#1 := true
5.7102 -#32 := (not true)
5.7103 -#35 := (iff #32 false)
5.7104 -#36 := [rewrite]: #35
5.7105 -#33 := (iff #6 #32)
5.7106 -#30 := (iff #5 true)
5.7107 -#25 := (not false)
5.7108 -#28 := (iff #25 true)
5.7109 -#29 := [rewrite]: #28
5.7110 -#26 := (iff #5 #25)
5.7111 -#23 := (iff #4 false)
5.7112 -#24 := [elim-unused]: #23
5.7113 -#27 := [monotonicity #24]: #26
5.7114 -#31 := [trans #27 #29]: #30
5.7115 -#34 := [monotonicity #31]: #33
5.7116 -#38 := [trans #34 #36]: #37
5.7117 -#22 := [asserted]: #6
5.7118 -[mp #22 #38]: false
5.7119 -unsat
5.7120 -723fcd1ecb9fa59a7e0fede642f23063fb499818 24 0
5.7121 -#2 := false
5.7122 -#4 := (exists (vars (?x1 real)) false)
5.7123 -#5 := (not #4)
5.7124 -#6 := (not #5)
5.7125 -#37 := (iff #6 false)
5.7126 -#1 := true
5.7127 -#32 := (not true)
5.7128 -#35 := (iff #32 false)
5.7129 -#36 := [rewrite]: #35
5.7130 -#33 := (iff #6 #32)
5.7131 -#30 := (iff #5 true)
5.7132 -#25 := (not false)
5.7133 -#28 := (iff #25 true)
5.7134 -#29 := [rewrite]: #28
5.7135 -#26 := (iff #5 #25)
5.7136 -#23 := (iff #4 false)
5.7137 -#24 := [elim-unused]: #23
5.7138 -#27 := [monotonicity #24]: #26
5.7139 -#31 := [trans #27 #29]: #30
5.7140 -#34 := [monotonicity #31]: #33
5.7141 -#38 := [trans #34 #36]: #37
5.7142 -#22 := [asserted]: #6
5.7143 -[mp #22 #38]: false
5.7144 -unsat
5.7145 -a72d0e977596e1fac0cccee600f0bf9d29ed71aa 1 0
5.7146 -unsat
5.7147 -70141a690f46561f859d3deed80b9611816f9f81 1 0
5.7148 -unsat
5.7149 -41b6ddffa2c7efc9285d0e0a65d74c4325ef6ddb 1 0
5.7150 -unsat
5.7151 -a08fcdd29520930b0a940df57c3d8266dbefd10f 73 0
5.7152 -#2 := false
5.7153 -#5 := 0::int
5.7154 -#8 := 1::int
5.7155 -#143 := (= 1::int 0::int)
5.7156 -#145 := (iff #143 false)
5.7157 -#146 := [rewrite]: #145
5.7158 -decl ?x1!1 :: int
5.7159 -#47 := ?x1!1
5.7160 -#51 := (= ?x1!1 0::int)
5.7161 -decl ?x2!0 :: int
5.7162 -#46 := ?x2!0
5.7163 -#50 := (= ?x2!0 1::int)
5.7164 -#63 := (and #50 #51)
5.7165 -#69 := (= ?x2!0 ?x1!1)
5.7166 -#72 := (not #69)
5.7167 -#66 := (not #63)
5.7168 -#75 := (or #66 #72)
5.7169 -#78 := (not #75)
5.7170 -#48 := (= ?x1!1 ?x2!0)
5.7171 -#49 := (not #48)
5.7172 -#52 := (and #51 #50)
5.7173 -#53 := (not #52)
5.7174 -#54 := (or #53 #49)
5.7175 -#55 := (not #54)
5.7176 -#79 := (iff #55 #78)
5.7177 -#76 := (iff #54 #75)
5.7178 -#73 := (iff #49 #72)
5.7179 -#70 := (iff #48 #69)
5.7180 -#71 := [rewrite]: #70
5.7181 -#74 := [monotonicity #71]: #73
5.7182 -#67 := (iff #53 #66)
5.7183 -#64 := (iff #52 #63)
5.7184 -#65 := [rewrite]: #64
5.7185 -#68 := [monotonicity #65]: #67
5.7186 -#77 := [monotonicity #68 #74]: #76
5.7187 -#80 := [monotonicity #77]: #79
5.7188 -#7 := (:var 0 int)
5.7189 -#4 := (:var 1 int)
5.7190 -#11 := (= #4 #7)
5.7191 -#12 := (not #11)
5.7192 -#9 := (= #7 1::int)
5.7193 -#6 := (= #4 0::int)
5.7194 -#10 := (and #6 #9)
5.7195 -#32 := (not #10)
5.7196 -#33 := (or #32 #12)
5.7197 -#36 := (forall (vars (?x1 int) (?x2 int)) #33)
5.7198 -#39 := (not #36)
5.7199 -#56 := (~ #39 #55)
5.7200 -#57 := [sk]: #56
5.7201 -#13 := (implies #10 #12)
5.7202 -#14 := (forall (vars (?x1 int) (?x2 int)) #13)
5.7203 -#15 := (not #14)
5.7204 -#40 := (iff #15 #39)
5.7205 -#37 := (iff #14 #36)
5.7206 -#34 := (iff #13 #33)
5.7207 -#35 := [rewrite]: #34
5.7208 -#38 := [quant-intro #35]: #37
5.7209 -#41 := [monotonicity #38]: #40
5.7210 -#31 := [asserted]: #15
5.7211 -#44 := [mp #31 #41]: #39
5.7212 -#60 := [mp~ #44 #57]: #55
5.7213 -#61 := [mp #60 #80]: #78
5.7214 -#62 := [not-or-elim #61]: #63
5.7215 -#82 := [and-elim #62]: #51
5.7216 -#141 := (= 1::int ?x1!1)
5.7217 -#83 := [not-or-elim #61]: #69
5.7218 -#139 := (= 1::int ?x2!0)
5.7219 -#81 := [and-elim #62]: #50
5.7220 -#140 := [symm #81]: #139
5.7221 -#142 := [trans #140 #83]: #141
5.7222 -#144 := [trans #142 #82]: #143
5.7223 -[mp #144 #146]: false
5.7224 -unsat
5.7225 -470993954e986ab72716000fd7da9fa600b05225 82 0
5.7226 -#2 := false
5.7227 -#5 := (:var 0 int)
5.7228 -#7 := 0::int
5.7229 -#9 := (<= 0::int #5)
5.7230 -#8 := (< #5 0::int)
5.7231 -#10 := (or #8 #9)
5.7232 -#4 := (:var 1 int)
5.7233 -#6 := (< #4 #5)
5.7234 -#11 := (implies #6 #10)
5.7235 -#12 := (forall (vars (?x2 int)) #11)
5.7236 -#13 := (exists (vars (?x1 int)) #12)
5.7237 -#14 := (not #13)
5.7238 -#95 := (iff #14 false)
5.7239 -#31 := (not #6)
5.7240 -#32 := (or #31 #10)
5.7241 -#35 := (forall (vars (?x2 int)) #32)
5.7242 -#38 := (exists (vars (?x1 int)) #35)
5.7243 -#41 := (not #38)
5.7244 -#93 := (iff #41 false)
5.7245 -#1 := true
5.7246 -#88 := (not true)
5.7247 -#91 := (iff #88 false)
5.7248 -#92 := [rewrite]: #91
5.7249 -#89 := (iff #41 #88)
5.7250 -#86 := (iff #38 true)
5.7251 -#81 := (exists (vars (?x1 int)) true)
5.7252 -#84 := (iff #81 true)
5.7253 -#85 := [elim-unused]: #84
5.7254 -#82 := (iff #38 #81)
5.7255 -#79 := (iff #35 true)
5.7256 -#74 := (forall (vars (?x2 int)) true)
5.7257 -#77 := (iff #74 true)
5.7258 -#78 := [elim-unused]: #77
5.7259 -#75 := (iff #35 #74)
5.7260 -#72 := (iff #32 true)
5.7261 -#46 := (>= #5 0::int)
5.7262 -#44 := (not #46)
5.7263 -#64 := (or #44 #46)
5.7264 -#50 := -1::int
5.7265 -#53 := (* -1::int #5)
5.7266 -#54 := (+ #4 #53)
5.7267 -#52 := (>= #54 0::int)
5.7268 -#67 := (or #52 #64)
5.7269 -#70 := (iff #67 true)
5.7270 -#71 := [rewrite]: #70
5.7271 -#68 := (iff #32 #67)
5.7272 -#65 := (iff #10 #64)
5.7273 -#48 := (iff #9 #46)
5.7274 -#49 := [rewrite]: #48
5.7275 -#45 := (iff #8 #44)
5.7276 -#47 := [rewrite]: #45
5.7277 -#66 := [monotonicity #47 #49]: #65
5.7278 -#62 := (iff #31 #52)
5.7279 -#51 := (not #52)
5.7280 -#57 := (not #51)
5.7281 -#60 := (iff #57 #52)
5.7282 -#61 := [rewrite]: #60
5.7283 -#58 := (iff #31 #57)
5.7284 -#55 := (iff #6 #51)
5.7285 -#56 := [rewrite]: #55
5.7286 -#59 := [monotonicity #56]: #58
5.7287 -#63 := [trans #59 #61]: #62
5.7288 -#69 := [monotonicity #63 #66]: #68
5.7289 -#73 := [trans #69 #71]: #72
5.7290 -#76 := [quant-intro #73]: #75
5.7291 -#80 := [trans #76 #78]: #79
5.7292 -#83 := [quant-intro #80]: #82
5.7293 -#87 := [trans #83 #85]: #86
5.7294 -#90 := [monotonicity #87]: #89
5.7295 -#94 := [trans #90 #92]: #93
5.7296 -#42 := (iff #14 #41)
5.7297 -#39 := (iff #13 #38)
5.7298 -#36 := (iff #12 #35)
5.7299 -#33 := (iff #11 #32)
5.7300 -#34 := [rewrite]: #33
5.7301 -#37 := [quant-intro #34]: #36
5.7302 -#40 := [quant-intro #37]: #39
5.7303 -#43 := [monotonicity #40]: #42
5.7304 -#96 := [trans #43 #94]: #95
5.7305 -#30 := [asserted]: #14
5.7306 -[mp #30 #96]: false
5.7307 -unsat
5.7308 -40c93af1a084932780f95bda03b3df7712e01201 78 0
5.7309 -#2 := false
5.7310 -#5 := (:var 0 int)
5.7311 -#7 := 2::int
5.7312 -#11 := (* 2::int #5)
5.7313 -#9 := 1::int
5.7314 -#4 := (:var 1 int)
5.7315 -#8 := (* 2::int #4)
5.7316 -#10 := (+ #8 1::int)
5.7317 -#12 := (< #10 #11)
5.7318 -#6 := (< #4 #5)
5.7319 -#13 := (implies #6 #12)
5.7320 -#14 := (forall (vars (?x1 int) (?x2 int)) #13)
5.7321 -#15 := (not #14)
5.7322 -#91 := (iff #15 false)
5.7323 -#32 := (+ 1::int #8)
5.7324 -#35 := (< #32 #11)
5.7325 -#41 := (not #6)
5.7326 -#42 := (or #41 #35)
5.7327 -#47 := (forall (vars (?x1 int) (?x2 int)) #42)
5.7328 -#50 := (not #47)
5.7329 -#89 := (iff #50 false)
5.7330 -#1 := true
5.7331 -#84 := (not true)
5.7332 -#87 := (iff #84 false)
5.7333 -#88 := [rewrite]: #87
5.7334 -#85 := (iff #50 #84)
5.7335 -#82 := (iff #47 true)
5.7336 -#77 := (forall (vars (?x1 int) (?x2 int)) true)
5.7337 -#80 := (iff #77 true)
5.7338 -#81 := [elim-unused]: #80
5.7339 -#78 := (iff #47 #77)
5.7340 -#75 := (iff #42 true)
5.7341 -#55 := 0::int
5.7342 -#53 := -1::int
5.7343 -#57 := (* -1::int #5)
5.7344 -#58 := (+ #4 #57)
5.7345 -#56 := (>= #58 0::int)
5.7346 -#54 := (not #56)
5.7347 -#69 := (or #56 #54)
5.7348 -#73 := (iff #69 true)
5.7349 -#74 := [rewrite]: #73
5.7350 -#71 := (iff #42 #69)
5.7351 -#70 := (iff #35 #54)
5.7352 -#68 := [rewrite]: #70
5.7353 -#66 := (iff #41 #56)
5.7354 -#61 := (not #54)
5.7355 -#64 := (iff #61 #56)
5.7356 -#65 := [rewrite]: #64
5.7357 -#62 := (iff #41 #61)
5.7358 -#59 := (iff #6 #54)
5.7359 -#60 := [rewrite]: #59
5.7360 -#63 := [monotonicity #60]: #62
5.7361 -#67 := [trans #63 #65]: #66
5.7362 -#72 := [monotonicity #67 #68]: #71
5.7363 -#76 := [trans #72 #74]: #75
5.7364 -#79 := [quant-intro #76]: #78
5.7365 -#83 := [trans #79 #81]: #82
5.7366 -#86 := [monotonicity #83]: #85
5.7367 -#90 := [trans #86 #88]: #89
5.7368 -#51 := (iff #15 #50)
5.7369 -#48 := (iff #14 #47)
5.7370 -#45 := (iff #13 #42)
5.7371 -#38 := (implies #6 #35)
5.7372 -#43 := (iff #38 #42)
5.7373 -#44 := [rewrite]: #43
5.7374 -#39 := (iff #13 #38)
5.7375 -#36 := (iff #12 #35)
5.7376 -#33 := (= #10 #32)
5.7377 -#34 := [rewrite]: #33
5.7378 -#37 := [monotonicity #34]: #36
5.7379 -#40 := [monotonicity #37]: #39
5.7380 -#46 := [trans #40 #44]: #45
5.7381 -#49 := [quant-intro #46]: #48
5.7382 -#52 := [monotonicity #49]: #51
5.7383 -#92 := [trans #52 #90]: #91
5.7384 -#31 := [asserted]: #15
5.7385 -[mp #31 #92]: false
5.7386 -unsat
5.7387 -26b175ea54cef59293a917c6fb083751b00d312a 61 0
5.7388 -#2 := false
5.7389 -#9 := (:var 0 int)
5.7390 -#4 := 2::int
5.7391 -#10 := (* 2::int #9)
5.7392 -#7 := 1::int
5.7393 -#5 := (:var 1 int)
5.7394 -#6 := (* 2::int #5)
5.7395 -#8 := (+ #6 1::int)
5.7396 -#11 := (= #8 #10)
5.7397 -#12 := (not #11)
5.7398 -#13 := (forall (vars (?x1 int) (?x2 int)) #12)
5.7399 -#14 := (not #13)
5.7400 -#74 := (iff #14 false)
5.7401 -#31 := (+ 1::int #6)
5.7402 -#37 := (= #10 #31)
5.7403 -#42 := (not #37)
5.7404 -#45 := (forall (vars (?x1 int) (?x2 int)) #42)
5.7405 -#48 := (not #45)
5.7406 -#72 := (iff #48 false)
5.7407 -#1 := true
5.7408 -#67 := (not true)
5.7409 -#70 := (iff #67 false)
5.7410 -#71 := [rewrite]: #70
5.7411 -#68 := (iff #48 #67)
5.7412 -#65 := (iff #45 true)
5.7413 -#60 := (forall (vars (?x1 int) (?x2 int)) true)
5.7414 -#63 := (iff #60 true)
5.7415 -#64 := [elim-unused]: #63
5.7416 -#61 := (iff #45 #60)
5.7417 -#58 := (iff #42 true)
5.7418 -#51 := (not false)
5.7419 -#56 := (iff #51 true)
5.7420 -#57 := [rewrite]: #56
5.7421 -#52 := (iff #42 #51)
5.7422 -#53 := (iff #37 false)
5.7423 -#54 := [rewrite]: #53
5.7424 -#55 := [monotonicity #54]: #52
5.7425 -#59 := [trans #55 #57]: #58
5.7426 -#62 := [quant-intro #59]: #61
5.7427 -#66 := [trans #62 #64]: #65
5.7428 -#69 := [monotonicity #66]: #68
5.7429 -#73 := [trans #69 #71]: #72
5.7430 -#49 := (iff #14 #48)
5.7431 -#46 := (iff #13 #45)
5.7432 -#43 := (iff #12 #42)
5.7433 -#40 := (iff #11 #37)
5.7434 -#34 := (= #31 #10)
5.7435 -#38 := (iff #34 #37)
5.7436 -#39 := [rewrite]: #38
5.7437 -#35 := (iff #11 #34)
5.7438 -#32 := (= #8 #31)
5.7439 -#33 := [rewrite]: #32
5.7440 -#36 := [monotonicity #33]: #35
5.7441 -#41 := [trans #36 #39]: #40
5.7442 -#44 := [monotonicity #41]: #43
5.7443 -#47 := [quant-intro #44]: #46
5.7444 -#50 := [monotonicity #47]: #49
5.7445 -#75 := [trans #50 #73]: #74
5.7446 -#30 := [asserted]: #14
5.7447 -[mp #30 #75]: false
5.7448 -unsat
5.7449 -74037c10b4f126275ba21e7140b7f1e159b39ed9 111 0
5.7450 -#2 := false
5.7451 -#4 := 2::int
5.7452 -decl ?x1!1 :: int
5.7453 -#85 := ?x1!1
5.7454 -decl ?x2!0 :: int
5.7455 -#84 := ?x2!0
5.7456 -#101 := (+ ?x2!0 ?x1!1)
5.7457 -#107 := (>= #101 2::int)
5.7458 -#113 := (<= #101 2::int)
5.7459 -#116 := (not #113)
5.7460 -#110 := (not #107)
5.7461 -#104 := (= #101 2::int)
5.7462 -#119 := (or #104 #110 #116)
5.7463 -#122 := (not #119)
5.7464 -#86 := (+ ?x1!1 ?x2!0)
5.7465 -#87 := (<= #86 2::int)
5.7466 -#88 := (not #87)
5.7467 -#89 := (>= #86 2::int)
5.7468 -#90 := (not #89)
5.7469 -#91 := (= #86 2::int)
5.7470 -#92 := (or #91 #90 #88)
5.7471 -#93 := (not #92)
5.7472 -#123 := (iff #93 #122)
5.7473 -#120 := (iff #92 #119)
5.7474 -#117 := (iff #88 #116)
5.7475 -#114 := (iff #87 #113)
5.7476 -#102 := (= #86 #101)
5.7477 -#103 := [rewrite]: #102
5.7478 -#115 := [monotonicity #103]: #114
5.7479 -#118 := [monotonicity #115]: #117
5.7480 -#111 := (iff #90 #110)
5.7481 -#108 := (iff #89 #107)
5.7482 -#109 := [monotonicity #103]: #108
5.7483 -#112 := [monotonicity #109]: #111
5.7484 -#105 := (iff #91 #104)
5.7485 -#106 := [monotonicity #103]: #105
5.7486 -#121 := [monotonicity #106 #112 #118]: #120
5.7487 -#124 := [monotonicity #121]: #123
5.7488 -#6 := (:var 0 int)
5.7489 -#5 := (:var 1 int)
5.7490 -#7 := (+ #5 #6)
5.7491 -#56 := (<= #7 2::int)
5.7492 -#58 := (not #56)
5.7493 -#54 := (>= #7 2::int)
5.7494 -#51 := (not #54)
5.7495 -#9 := (= #7 2::int)
5.7496 -#67 := (or #9 #51 #58)
5.7497 -#72 := (forall (vars (?x1 int) (?x2 int)) #67)
5.7498 -#75 := (not #72)
5.7499 -#94 := (~ #75 #93)
5.7500 -#95 := [sk]: #94
5.7501 -#10 := (< #7 2::int)
5.7502 -#11 := (or #9 #10)
5.7503 -#8 := (< 2::int #7)
5.7504 -#12 := (or #8 #11)
5.7505 -#13 := (forall (vars (?x1 int) (?x2 int)) #12)
5.7506 -#14 := (not #13)
5.7507 -#78 := (iff #14 #75)
5.7508 -#31 := (= 2::int #7)
5.7509 -#37 := (or #10 #31)
5.7510 -#42 := (or #8 #37)
5.7511 -#45 := (forall (vars (?x1 int) (?x2 int)) #42)
5.7512 -#48 := (not #45)
5.7513 -#76 := (iff #48 #75)
5.7514 -#73 := (iff #45 #72)
5.7515 -#70 := (iff #42 #67)
5.7516 -#61 := (or #51 #9)
5.7517 -#64 := (or #58 #61)
5.7518 -#68 := (iff #64 #67)
5.7519 -#69 := [rewrite]: #68
5.7520 -#65 := (iff #42 #64)
5.7521 -#62 := (iff #37 #61)
5.7522 -#55 := (iff #31 #9)
5.7523 -#57 := [rewrite]: #55
5.7524 -#53 := (iff #10 #51)
5.7525 -#52 := [rewrite]: #53
5.7526 -#63 := [monotonicity #52 #57]: #62
5.7527 -#59 := (iff #8 #58)
5.7528 -#60 := [rewrite]: #59
5.7529 -#66 := [monotonicity #60 #63]: #65
5.7530 -#71 := [trans #66 #69]: #70
5.7531 -#74 := [quant-intro #71]: #73
5.7532 -#77 := [monotonicity #74]: #76
5.7533 -#49 := (iff #14 #48)
5.7534 -#46 := (iff #13 #45)
5.7535 -#43 := (iff #12 #42)
5.7536 -#40 := (iff #11 #37)
5.7537 -#34 := (or #31 #10)
5.7538 -#38 := (iff #34 #37)
5.7539 -#39 := [rewrite]: #38
5.7540 -#35 := (iff #11 #34)
5.7541 -#32 := (iff #9 #31)
5.7542 -#33 := [rewrite]: #32
5.7543 -#36 := [monotonicity #33]: #35
5.7544 -#41 := [trans #36 #39]: #40
5.7545 -#44 := [monotonicity #41]: #43
5.7546 -#47 := [quant-intro #44]: #46
5.7547 -#50 := [monotonicity #47]: #49
5.7548 -#79 := [trans #50 #77]: #78
5.7549 -#30 := [asserted]: #14
5.7550 -#80 := [mp #30 #79]: #75
5.7551 -#98 := [mp~ #80 #95]: #93
5.7552 -#99 := [mp #98 #124]: #122
5.7553 -#126 := [not-or-elim #99]: #107
5.7554 -#100 := (not #104)
5.7555 -#125 := [not-or-elim #99]: #100
5.7556 -#127 := [not-or-elim #99]: #113
5.7557 -#183 := (or #104 #116 #110)
5.7558 -#184 := [th-lemma]: #183
5.7559 -[unit-resolution #184 #127 #125 #126]: false
5.7560 -unsat
5.7561 -628c1b88ca8fb09c896ae05059a52dc2f8e25db2 89 0
5.7562 -#2 := false
5.7563 -#4 := 0::int
5.7564 -decl ?x1!0 :: int
5.7565 -#78 := ?x1!0
5.7566 -#83 := (<= ?x1!0 0::int)
5.7567 -#146 := (not #83)
5.7568 -#155 := [hypothesis]: #83
5.7569 -#7 := 1::int
5.7570 -#81 := (>= ?x1!0 1::int)
5.7571 -#82 := (not #81)
5.7572 -#156 := (or #82 #146)
5.7573 -#157 := [th-lemma]: #156
5.7574 -#158 := [unit-resolution #157 #155]: #82
5.7575 -#159 := (or #146 #81)
5.7576 -#49 := -1::int
5.7577 -#79 := (<= ?x1!0 -1::int)
5.7578 -#80 := (not #79)
5.7579 -#84 := (ite #83 #82 #80)
5.7580 -#85 := (not #84)
5.7581 -#5 := (:var 0 int)
5.7582 -#50 := (<= #5 -1::int)
5.7583 -#51 := (not #50)
5.7584 -#55 := (>= #5 1::int)
5.7585 -#54 := (not #55)
5.7586 -#45 := (<= #5 0::int)
5.7587 -#61 := (ite #45 #54 #51)
5.7588 -#66 := (forall (vars (?x1 int)) #61)
5.7589 -#69 := (not #66)
5.7590 -#86 := (~ #69 #85)
5.7591 -#87 := [sk]: #86
5.7592 -#10 := (< #5 1::int)
5.7593 -#8 := (+ #5 1::int)
5.7594 -#9 := (< 0::int #8)
5.7595 -#6 := (< 0::int #5)
5.7596 -#11 := (ite #6 #9 #10)
5.7597 -#12 := (forall (vars (?x1 int)) #11)
5.7598 -#13 := (not #12)
5.7599 -#72 := (iff #13 #69)
5.7600 -#30 := (+ 1::int #5)
5.7601 -#33 := (< 0::int #30)
5.7602 -#36 := (ite #6 #33 #10)
5.7603 -#39 := (forall (vars (?x1 int)) #36)
5.7604 -#42 := (not #39)
5.7605 -#70 := (iff #42 #69)
5.7606 -#67 := (iff #39 #66)
5.7607 -#64 := (iff #36 #61)
5.7608 -#46 := (not #45)
5.7609 -#58 := (ite #46 #51 #54)
5.7610 -#62 := (iff #58 #61)
5.7611 -#63 := [rewrite]: #62
5.7612 -#59 := (iff #36 #58)
5.7613 -#56 := (iff #10 #54)
5.7614 -#57 := [rewrite]: #56
5.7615 -#52 := (iff #33 #51)
5.7616 -#53 := [rewrite]: #52
5.7617 -#47 := (iff #6 #46)
5.7618 -#48 := [rewrite]: #47
5.7619 -#60 := [monotonicity #48 #53 #57]: #59
5.7620 -#65 := [trans #60 #63]: #64
5.7621 -#68 := [quant-intro #65]: #67
5.7622 -#71 := [monotonicity #68]: #70
5.7623 -#43 := (iff #13 #42)
5.7624 -#40 := (iff #12 #39)
5.7625 -#37 := (iff #11 #36)
5.7626 -#34 := (iff #9 #33)
5.7627 -#31 := (= #8 #30)
5.7628 -#32 := [rewrite]: #31
5.7629 -#35 := [monotonicity #32]: #34
5.7630 -#38 := [monotonicity #35]: #37
5.7631 -#41 := [quant-intro #38]: #40
5.7632 -#44 := [monotonicity #41]: #43
5.7633 -#73 := [trans #44 #71]: #72
5.7634 -#29 := [asserted]: #13
5.7635 -#74 := [mp #29 #73]: #69
5.7636 -#90 := [mp~ #74 #87]: #85
5.7637 -#151 := (or #84 #146 #81)
5.7638 -#152 := [def-axiom]: #151
5.7639 -#160 := [unit-resolution #152 #90]: #159
5.7640 -#161 := [unit-resolution #160 #158 #155]: false
5.7641 -#162 := [lemma #161]: #146
5.7642 -#163 := (or #80 #83)
5.7643 -#164 := [th-lemma]: #163
5.7644 -#165 := [unit-resolution #164 #162]: #80
5.7645 -#166 := (or #83 #79)
5.7646 -#153 := (or #84 #83 #79)
5.7647 -#154 := [def-axiom]: #153
5.7648 -#167 := [unit-resolution #154 #90]: #166
5.7649 -[unit-resolution #167 #165 #162]: false
5.7650 -unsat
5.7651 -b7c4f9440c4594c46eee14ce57f17610bb7e2536 84 0
5.7652 -WARNING: failed to find a pattern for quantifier (quantifier id: k!2)
5.7653 -#2 := false
5.7654 -#5 := 0::int
5.7655 -#4 := (:var 0 int)
5.7656 -#42 := (<= #4 0::int)
5.7657 -#43 := (not #42)
5.7658 -#40 := (>= #4 0::int)
5.7659 -#38 := (not #40)
5.7660 -#46 := (or #38 #43)
5.7661 -#49 := (forall (vars (?x1 int)) #46)
5.7662 -#182 := (not #49)
5.7663 -#118 := (<= 0::int 0::int)
5.7664 -#204 := (not #118)
5.7665 -#119 := (>= 0::int 0::int)
5.7666 -#205 := (not #119)
5.7667 -#206 := (or #205 #204)
5.7668 -#187 := (or #182 #206)
5.7669 -#172 := (iff #187 #182)
5.7670 -#183 := (or #182 false)
5.7671 -#509 := (iff #183 #182)
5.7672 -#171 := [rewrite]: #509
5.7673 -#525 := (iff #187 #183)
5.7674 -#533 := (iff #206 false)
5.7675 -#529 := (or false false)
5.7676 -#532 := (iff #529 false)
5.7677 -#527 := [rewrite]: #532
5.7678 -#530 := (iff #206 #529)
5.7679 -#195 := (iff #204 false)
5.7680 -#1 := true
5.7681 -#209 := (not true)
5.7682 -#207 := (iff #209 false)
5.7683 -#211 := [rewrite]: #207
5.7684 -#315 := (iff #204 #209)
5.7685 -#528 := (iff #118 true)
5.7686 -#184 := [rewrite]: #528
5.7687 -#522 := [monotonicity #184]: #315
5.7688 -#196 := [trans #522 #211]: #195
5.7689 -#190 := (iff #205 false)
5.7690 -#137 := (iff #205 #209)
5.7691 -#197 := (iff #119 true)
5.7692 -#208 := [rewrite]: #197
5.7693 -#210 := [monotonicity #208]: #137
5.7694 -#526 := [trans #210 #211]: #190
5.7695 -#531 := [monotonicity #526 #196]: #530
5.7696 -#523 := [trans #531 #527]: #533
5.7697 -#167 := [monotonicity #523]: #525
5.7698 -#173 := [trans #167 #171]: #172
5.7699 -#524 := [quant-inst]: #187
5.7700 -#174 := [mp #524 #173]: #182
5.7701 -#60 := (~ #49 #49)
5.7702 -#58 := (~ #46 #46)
5.7703 -#59 := [refl]: #58
5.7704 -#61 := [nnf-pos #59]: #60
5.7705 -#7 := (< 0::int #4)
5.7706 -#6 := (< #4 0::int)
5.7707 -#8 := (or #6 #7)
5.7708 -#9 := (forall (vars (?x1 int)) #8)
5.7709 -#10 := (ite #9 false true)
5.7710 -#11 := (not #10)
5.7711 -#52 := (iff #11 #49)
5.7712 -#50 := (iff #9 #49)
5.7713 -#47 := (iff #8 #46)
5.7714 -#44 := (iff #7 #43)
5.7715 -#45 := [rewrite]: #44
5.7716 -#39 := (iff #6 #38)
5.7717 -#41 := [rewrite]: #39
5.7718 -#48 := [monotonicity #41 #45]: #47
5.7719 -#51 := [quant-intro #48]: #50
5.7720 -#36 := (iff #11 #9)
5.7721 -#28 := (not #9)
5.7722 -#31 := (not #28)
5.7723 -#34 := (iff #31 #9)
5.7724 -#35 := [rewrite]: #34
5.7725 -#32 := (iff #11 #31)
5.7726 -#29 := (iff #10 #28)
5.7727 -#30 := [rewrite]: #29
5.7728 -#33 := [monotonicity #30]: #32
5.7729 -#37 := [trans #33 #35]: #36
5.7730 -#53 := [trans #37 #51]: #52
5.7731 -#27 := [asserted]: #11
5.7732 -#54 := [mp #27 #53]: #49
5.7733 -#62 := [mp~ #54 #61]: #49
5.7734 -[unit-resolution #62 #174]: false
5.7735 -unsat
5.7736 -7a9cc3ee85422788d981af84d181bd61d65f774c 181 0
5.7737 -WARNING: failed to find a pattern for quantifier (quantifier id: k!2)
5.7738 -#2 := false
5.7739 -#4 := 0::int
5.7740 -#5 := (:var 0 int)
5.7741 -#48 := (<= #5 0::int)
5.7742 -#49 := (not #48)
5.7743 -#45 := (>= #5 0::int)
5.7744 -#44 := (not #45)
5.7745 -#52 := (or #44 #49)
5.7746 -#55 := (forall (vars (?x1 int)) #52)
5.7747 -#86 := (not #55)
5.7748 -#263 := (<= 0::int 0::int)
5.7749 -#268 := (not #263)
5.7750 -#604 := (>= 0::int 0::int)
5.7751 -#264 := (not #604)
5.7752 -#605 := (or #264 #268)
5.7753 -#588 := (or #86 #605)
5.7754 -#584 := (iff #588 #86)
5.7755 -#311 := (or #86 false)
5.7756 -#207 := (iff #311 #86)
5.7757 -#583 := [rewrite]: #207
5.7758 -#312 := (iff #588 #311)
5.7759 -#601 := (iff #605 false)
5.7760 -#599 := (or false false)
5.7761 -#600 := (iff #599 false)
5.7762 -#598 := [rewrite]: #600
5.7763 -#239 := (iff #605 #599)
5.7764 -#234 := (iff #268 false)
5.7765 -#1 := true
5.7766 -#252 := (not true)
5.7767 -#255 := (iff #252 false)
5.7768 -#591 := [rewrite]: #255
5.7769 -#590 := (iff #268 #252)
5.7770 -#594 := (iff #263 true)
5.7771 -#595 := [rewrite]: #594
5.7772 -#596 := [monotonicity #595]: #590
5.7773 -#597 := [trans #596 #591]: #234
5.7774 -#592 := (iff #264 false)
5.7775 -#253 := (iff #264 #252)
5.7776 -#248 := (iff #604 true)
5.7777 -#589 := [rewrite]: #248
5.7778 -#254 := [monotonicity #589]: #253
5.7779 -#593 := [trans #254 #591]: #592
5.7780 -#240 := [monotonicity #593 #597]: #239
5.7781 -#587 := [trans #240 #598]: #601
5.7782 -#313 := [monotonicity #587]: #312
5.7783 -#306 := [trans #313 #583]: #584
5.7784 -#310 := [quant-inst]: #588
5.7785 -#307 := [mp #310 #306]: #86
5.7786 -decl z3name!0 :: bool
5.7787 -#83 := z3name!0
5.7788 -#12 := 3::int
5.7789 -#32 := -1::int
5.7790 -#92 := (ite z3name!0 -1::int 3::int)
5.7791 -#290 := (= #92 3::int)
5.7792 -#610 := (not #290)
5.7793 -#608 := (>= #92 3::int)
5.7794 -#265 := (not #608)
5.7795 -#95 := (<= #92 0::int)
5.7796 -#58 := (ite #55 -1::int 3::int)
5.7797 -#64 := (<= #58 0::int)
5.7798 -#96 := (~ #64 #95)
5.7799 -#93 := (= #58 #92)
5.7800 -#90 := (~ #55 z3name!0)
5.7801 -#87 := (or z3name!0 #86)
5.7802 -#84 := (not z3name!0)
5.7803 -#85 := (or #84 #55)
5.7804 -#88 := (and #85 #87)
5.7805 -#89 := [intro-def]: #88
5.7806 -#91 := [apply-def #89]: #90
5.7807 -#94 := [monotonicity #91]: #93
5.7808 -#97 := [monotonicity #94]: #96
5.7809 -#10 := 1::int
5.7810 -#11 := (- 1::int)
5.7811 -#7 := (< 0::int #5)
5.7812 -#6 := (< #5 0::int)
5.7813 -#8 := (or #6 #7)
5.7814 -#9 := (forall (vars (?x1 int)) #8)
5.7815 -#13 := (ite #9 #11 3::int)
5.7816 -#14 := (< 0::int #13)
5.7817 -#15 := (not #14)
5.7818 -#77 := (iff #15 #64)
5.7819 -#35 := (ite #9 -1::int 3::int)
5.7820 -#38 := (< 0::int #35)
5.7821 -#41 := (not #38)
5.7822 -#75 := (iff #41 #64)
5.7823 -#65 := (not #64)
5.7824 -#70 := (not #65)
5.7825 -#73 := (iff #70 #64)
5.7826 -#74 := [rewrite]: #73
5.7827 -#71 := (iff #41 #70)
5.7828 -#68 := (iff #38 #65)
5.7829 -#61 := (< 0::int #58)
5.7830 -#66 := (iff #61 #65)
5.7831 -#67 := [rewrite]: #66
5.7832 -#62 := (iff #38 #61)
5.7833 -#59 := (= #35 #58)
5.7834 -#56 := (iff #9 #55)
5.7835 -#53 := (iff #8 #52)
5.7836 -#50 := (iff #7 #49)
5.7837 -#51 := [rewrite]: #50
5.7838 -#46 := (iff #6 #44)
5.7839 -#47 := [rewrite]: #46
5.7840 -#54 := [monotonicity #47 #51]: #53
5.7841 -#57 := [quant-intro #54]: #56
5.7842 -#60 := [monotonicity #57]: #59
5.7843 -#63 := [monotonicity #60]: #62
5.7844 -#69 := [trans #63 #67]: #68
5.7845 -#72 := [monotonicity #69]: #71
5.7846 -#76 := [trans #72 #74]: #75
5.7847 -#42 := (iff #15 #41)
5.7848 -#39 := (iff #14 #38)
5.7849 -#36 := (= #13 #35)
5.7850 -#33 := (= #11 -1::int)
5.7851 -#34 := [rewrite]: #33
5.7852 -#37 := [monotonicity #34]: #36
5.7853 -#40 := [monotonicity #37]: #39
5.7854 -#43 := [monotonicity #40]: #42
5.7855 -#78 := [trans #43 #76]: #77
5.7856 -#31 := [asserted]: #15
5.7857 -#79 := [mp #31 #78]: #64
5.7858 -#126 := [mp~ #79 #97]: #95
5.7859 -#395 := (not #95)
5.7860 -#602 := (or #265 #395)
5.7861 -#276 := [th-lemma]: #602
5.7862 -#277 := [unit-resolution #276 #126]: #265
5.7863 -#609 := [hypothesis]: #290
5.7864 -#611 := (or #610 #608)
5.7865 -#612 := [th-lemma]: #611
5.7866 -#607 := [unit-resolution #612 #609 #277]: false
5.7867 -#613 := [lemma #607]: #610
5.7868 -#292 := (or z3name!0 #290)
5.7869 -#271 := [def-axiom]: #292
5.7870 -#581 := [unit-resolution #271 #613]: z3name!0
5.7871 -#129 := (or #55 #84)
5.7872 -decl ?x1!1 :: int
5.7873 -#108 := ?x1!1
5.7874 -#111 := (>= ?x1!1 0::int)
5.7875 -#112 := (not #111)
5.7876 -#109 := (<= ?x1!1 0::int)
5.7877 -#110 := (not #109)
5.7878 -#132 := (or #110 #112)
5.7879 -#135 := (not #132)
5.7880 -#138 := (or z3name!0 #135)
5.7881 -#141 := (and #129 #138)
5.7882 -#113 := (or #112 #110)
5.7883 -#114 := (not #113)
5.7884 -#119 := (or z3name!0 #114)
5.7885 -#122 := (and #85 #119)
5.7886 -#142 := (iff #122 #141)
5.7887 -#139 := (iff #119 #138)
5.7888 -#136 := (iff #114 #135)
5.7889 -#133 := (iff #113 #132)
5.7890 -#134 := [rewrite]: #133
5.7891 -#137 := [monotonicity #134]: #136
5.7892 -#140 := [monotonicity #137]: #139
5.7893 -#130 := (iff #85 #129)
5.7894 -#131 := [rewrite]: #130
5.7895 -#143 := [monotonicity #131 #140]: #142
5.7896 -#123 := (~ #88 #122)
5.7897 -#120 := (~ #87 #119)
5.7898 -#115 := (~ #86 #114)
5.7899 -#116 := [sk]: #115
5.7900 -#106 := (~ z3name!0 z3name!0)
5.7901 -#107 := [refl]: #106
5.7902 -#121 := [monotonicity #107 #116]: #120
5.7903 -#104 := (~ #85 #85)
5.7904 -#102 := (~ #55 #55)
5.7905 -#100 := (~ #52 #52)
5.7906 -#101 := [refl]: #100
5.7907 -#103 := [nnf-pos #101]: #102
5.7908 -#98 := (~ #84 #84)
5.7909 -#99 := [refl]: #98
5.7910 -#105 := [monotonicity #99 #103]: #104
5.7911 -#124 := [monotonicity #105 #121]: #123
5.7912 -#125 := [mp~ #89 #124]: #122
5.7913 -#127 := [mp #125 #143]: #141
5.7914 -#128 := [and-elim #127]: #129
5.7915 -#585 := [unit-resolution #128 #581]: #55
5.7916 -[unit-resolution #585 #307]: false
5.7917 -unsat
5.7918 -5201b12abd6b3d0f247a34c1fd9f443fc951c55f 68 0
5.7919 -#2 := false
5.7920 -#12 := 1::int
5.7921 -#9 := (:var 1 int)
5.7922 -#7 := 6::int
5.7923 -#8 := (- 6::int)
5.7924 -#10 := (* #8 #9)
5.7925 -#5 := (:var 2 int)
5.7926 -#4 := 4::int
5.7927 -#6 := (* 4::int #5)
5.7928 -#11 := (+ #6 #10)
5.7929 -#13 := (= #11 1::int)
5.7930 -#14 := (exists (vars (?x1 int) (?x2 int) (?x3 int)) #13)
5.7931 -#15 := (not #14)
5.7932 -#16 := (not #15)
5.7933 -#82 := (iff #16 false)
5.7934 -#53 := (:var 0 int)
5.7935 -#33 := -6::int
5.7936 -#54 := (* -6::int #53)
5.7937 -#55 := (* 4::int #9)
5.7938 -#56 := (+ #55 #54)
5.7939 -#57 := (= 1::int #56)
5.7940 -#58 := (exists (vars (?x1 int) (?x2 int)) #57)
5.7941 -#80 := (iff #58 false)
5.7942 -#76 := (exists (vars (?x1 int) (?x2 int)) false)
5.7943 -#78 := (iff #76 false)
5.7944 -#79 := [elim-unused]: #78
5.7945 -#77 := (iff #58 #76)
5.7946 -#73 := (iff #57 false)
5.7947 -#74 := [rewrite]: #73
5.7948 -#75 := [quant-intro #74]: #77
5.7949 -#81 := [trans #75 #79]: #80
5.7950 -#71 := (iff #16 #58)
5.7951 -#63 := (not #58)
5.7952 -#66 := (not #63)
5.7953 -#69 := (iff #66 #58)
5.7954 -#70 := [rewrite]: #69
5.7955 -#67 := (iff #16 #66)
5.7956 -#64 := (iff #15 #63)
5.7957 -#61 := (iff #14 #58)
5.7958 -#36 := (* -6::int #9)
5.7959 -#39 := (+ #6 #36)
5.7960 -#45 := (= 1::int #39)
5.7961 -#50 := (exists (vars (?x1 int) (?x2 int) (?x3 int)) #45)
5.7962 -#59 := (iff #50 #58)
5.7963 -#60 := [elim-unused]: #59
5.7964 -#51 := (iff #14 #50)
5.7965 -#48 := (iff #13 #45)
5.7966 -#42 := (= #39 1::int)
5.7967 -#46 := (iff #42 #45)
5.7968 -#47 := [rewrite]: #46
5.7969 -#43 := (iff #13 #42)
5.7970 -#40 := (= #11 #39)
5.7971 -#37 := (= #10 #36)
5.7972 -#34 := (= #8 -6::int)
5.7973 -#35 := [rewrite]: #34
5.7974 -#38 := [monotonicity #35]: #37
5.7975 -#41 := [monotonicity #38]: #40
5.7976 -#44 := [monotonicity #41]: #43
5.7977 -#49 := [trans #44 #47]: #48
5.7978 -#52 := [quant-intro #49]: #51
5.7979 -#62 := [trans #52 #60]: #61
5.7980 -#65 := [monotonicity #62]: #64
5.7981 -#68 := [monotonicity #65]: #67
5.7982 -#72 := [trans #68 #70]: #71
5.7983 -#83 := [trans #72 #81]: #82
5.7984 -#32 := [asserted]: #16
5.7985 -[mp #32 #83]: false
5.7986 -unsat
5.7987 -0f9091dc6853772b5280c29fc11ae1382022f24d 107 0
5.7988 -#2 := false
5.7989 -#4 := 0::int
5.7990 -decl ?x2!1 :: int
5.7991 -#83 := ?x2!1
5.7992 -decl ?x3!0 :: int
5.7993 -#82 := ?x3!0
5.7994 -#108 := (+ ?x3!0 ?x2!1)
5.7995 -#111 := (<= #108 0::int)
5.7996 -#114 := (not #111)
5.7997 -#89 := (<= ?x2!1 0::int)
5.7998 -#90 := (not #89)
5.7999 -#87 := (<= ?x3!0 0::int)
5.8000 -#88 := (not #87)
5.8001 -#102 := (and #88 #90)
5.8002 -#105 := (not #102)
5.8003 -#117 := (or #105 #114)
5.8004 -#120 := (not #117)
5.8005 -#84 := (+ ?x2!1 ?x3!0)
5.8006 -#85 := (<= #84 0::int)
5.8007 -#86 := (not #85)
5.8008 -#91 := (and #90 #88)
5.8009 -#92 := (not #91)
5.8010 -#93 := (or #92 #86)
5.8011 -#94 := (not #93)
5.8012 -#121 := (iff #94 #120)
5.8013 -#118 := (iff #93 #117)
5.8014 -#115 := (iff #86 #114)
5.8015 -#112 := (iff #85 #111)
5.8016 -#109 := (= #84 #108)
5.8017 -#110 := [rewrite]: #109
5.8018 -#113 := [monotonicity #110]: #112
5.8019 -#116 := [monotonicity #113]: #115
5.8020 -#106 := (iff #92 #105)
5.8021 -#103 := (iff #91 #102)
5.8022 -#104 := [rewrite]: #103
5.8023 -#107 := [monotonicity #104]: #106
5.8024 -#119 := [monotonicity #107 #116]: #118
5.8025 -#122 := [monotonicity #119]: #121
5.8026 -#7 := (:var 0 int)
5.8027 -#5 := (:var 1 int)
5.8028 -#10 := (+ #5 #7)
5.8029 -#63 := (<= #10 0::int)
5.8030 -#64 := (not #63)
5.8031 -#53 := (<= #7 0::int)
5.8032 -#54 := (not #53)
5.8033 -#49 := (<= #5 0::int)
5.8034 -#50 := (not #49)
5.8035 -#57 := (and #50 #54)
5.8036 -#60 := (not #57)
5.8037 -#67 := (or #60 #64)
5.8038 -#70 := (forall (vars (?x2 int) (?x3 int)) #67)
5.8039 -#73 := (not #70)
5.8040 -#95 := (~ #73 #94)
5.8041 -#96 := [sk]: #95
5.8042 -#11 := (< 0::int #10)
5.8043 -#8 := (< 0::int #7)
5.8044 -#6 := (< 0::int #5)
5.8045 -#9 := (and #6 #8)
5.8046 -#12 := (implies #9 #11)
5.8047 -#13 := (forall (vars (?x2 int) (?x3 int)) #12)
5.8048 -#14 := (exists (vars (?x1 int)) #13)
5.8049 -#15 := (not #14)
5.8050 -#76 := (iff #15 #73)
5.8051 -#32 := (not #9)
5.8052 -#33 := (or #32 #11)
5.8053 -#36 := (forall (vars (?x2 int) (?x3 int)) #33)
5.8054 -#46 := (not #36)
5.8055 -#74 := (iff #46 #73)
5.8056 -#71 := (iff #36 #70)
5.8057 -#68 := (iff #33 #67)
5.8058 -#65 := (iff #11 #64)
5.8059 -#66 := [rewrite]: #65
5.8060 -#61 := (iff #32 #60)
5.8061 -#58 := (iff #9 #57)
5.8062 -#55 := (iff #8 #54)
5.8063 -#56 := [rewrite]: #55
5.8064 -#51 := (iff #6 #50)
5.8065 -#52 := [rewrite]: #51
5.8066 -#59 := [monotonicity #52 #56]: #58
5.8067 -#62 := [monotonicity #59]: #61
5.8068 -#69 := [monotonicity #62 #66]: #68
5.8069 -#72 := [quant-intro #69]: #71
5.8070 -#75 := [monotonicity #72]: #74
5.8071 -#47 := (iff #15 #46)
5.8072 -#44 := (iff #14 #36)
5.8073 -#39 := (exists (vars (?x1 int)) #36)
5.8074 -#42 := (iff #39 #36)
5.8075 -#43 := [elim-unused]: #42
5.8076 -#40 := (iff #14 #39)
5.8077 -#37 := (iff #13 #36)
5.8078 -#34 := (iff #12 #33)
5.8079 -#35 := [rewrite]: #34
5.8080 -#38 := [quant-intro #35]: #37
5.8081 -#41 := [quant-intro #38]: #40
5.8082 -#45 := [trans #41 #43]: #44
5.8083 -#48 := [monotonicity #45]: #47
5.8084 -#77 := [trans #48 #75]: #76
5.8085 -#31 := [asserted]: #15
5.8086 -#78 := [mp #31 #77]: #73
5.8087 -#99 := [mp~ #78 #96]: #94
5.8088 -#100 := [mp #99 #122]: #120
5.8089 -#125 := [not-or-elim #100]: #111
5.8090 -#101 := [not-or-elim #100]: #102
5.8091 -#124 := [and-elim #101]: #90
5.8092 -#123 := [and-elim #101]: #88
5.8093 -[th-lemma #123 #124 #125]: false
5.8094 -unsat
5.8095 -a19e2cec45cb985989328595a0e06836a1e0fbc3 117 0
5.8096 -#2 := false
5.8097 -#4 := 0::int
5.8098 -decl ?x2!1 :: int
5.8099 -#91 := ?x2!1
5.8100 -#98 := (<= ?x2!1 0::int)
5.8101 -#99 := (not #98)
5.8102 -#7 := 0::real
5.8103 -decl ?x3!0 :: real
5.8104 -#93 := ?x3!0
5.8105 -#96 := (<= ?x3!0 0::real)
5.8106 -#97 := (not #96)
5.8107 -#111 := (and #97 #99)
5.8108 -#114 := (not #111)
5.8109 -#33 := -1::int
5.8110 -#94 := (<= ?x2!1 -1::int)
5.8111 -#95 := (not #94)
5.8112 -#120 := (or #95 #114)
5.8113 -#125 := (not #120)
5.8114 -#100 := (and #99 #97)
5.8115 -#101 := (not #100)
5.8116 -#102 := (or #101 #95)
5.8117 -#103 := (not #102)
5.8118 -#126 := (iff #103 #125)
5.8119 -#123 := (iff #102 #120)
5.8120 -#117 := (or #114 #95)
5.8121 -#121 := (iff #117 #120)
5.8122 -#122 := [rewrite]: #121
5.8123 -#118 := (iff #102 #117)
5.8124 -#115 := (iff #101 #114)
5.8125 -#112 := (iff #100 #111)
5.8126 -#113 := [rewrite]: #112
5.8127 -#116 := [monotonicity #113]: #115
5.8128 -#119 := [monotonicity #116]: #118
5.8129 -#124 := [trans #119 #122]: #123
5.8130 -#127 := [monotonicity #124]: #126
5.8131 -#5 := (:var 1 int)
5.8132 -#75 := (<= #5 -1::int)
5.8133 -#76 := (not #75)
5.8134 -#8 := (:var 0 real)
5.8135 -#65 := (<= #8 0::real)
5.8136 -#66 := (not #65)
5.8137 -#61 := (<= #5 0::int)
5.8138 -#62 := (not #61)
5.8139 -#69 := (and #62 #66)
5.8140 -#72 := (not #69)
5.8141 -#79 := (or #72 #76)
5.8142 -#82 := (forall (vars (?x2 int) (?x3 real)) #79)
5.8143 -#85 := (not #82)
5.8144 -#104 := (~ #85 #103)
5.8145 -#105 := [sk]: #104
5.8146 -#11 := 1::int
5.8147 -#12 := (- 1::int)
5.8148 -#13 := (< #12 #5)
5.8149 -#9 := (< 0::real #8)
5.8150 -#6 := (< 0::int #5)
5.8151 -#10 := (and #6 #9)
5.8152 -#14 := (implies #10 #13)
5.8153 -#15 := (forall (vars (?x2 int) (?x3 real)) #14)
5.8154 -#16 := (exists (vars (?x1 int)) #15)
5.8155 -#17 := (not #16)
5.8156 -#88 := (iff #17 #85)
5.8157 -#36 := (< -1::int #5)
5.8158 -#42 := (not #10)
5.8159 -#43 := (or #42 #36)
5.8160 -#48 := (forall (vars (?x2 int) (?x3 real)) #43)
5.8161 -#58 := (not #48)
5.8162 -#86 := (iff #58 #85)
5.8163 -#83 := (iff #48 #82)
5.8164 -#80 := (iff #43 #79)
5.8165 -#77 := (iff #36 #76)
5.8166 -#78 := [rewrite]: #77
5.8167 -#73 := (iff #42 #72)
5.8168 -#70 := (iff #10 #69)
5.8169 -#67 := (iff #9 #66)
5.8170 -#68 := [rewrite]: #67
5.8171 -#63 := (iff #6 #62)
5.8172 -#64 := [rewrite]: #63
5.8173 -#71 := [monotonicity #64 #68]: #70
5.8174 -#74 := [monotonicity #71]: #73
5.8175 -#81 := [monotonicity #74 #78]: #80
5.8176 -#84 := [quant-intro #81]: #83
5.8177 -#87 := [monotonicity #84]: #86
5.8178 -#59 := (iff #17 #58)
5.8179 -#56 := (iff #16 #48)
5.8180 -#51 := (exists (vars (?x1 int)) #48)
5.8181 -#54 := (iff #51 #48)
5.8182 -#55 := [elim-unused]: #54
5.8183 -#52 := (iff #16 #51)
5.8184 -#49 := (iff #15 #48)
5.8185 -#46 := (iff #14 #43)
5.8186 -#39 := (implies #10 #36)
5.8187 -#44 := (iff #39 #43)
5.8188 -#45 := [rewrite]: #44
5.8189 -#40 := (iff #14 #39)
5.8190 -#37 := (iff #13 #36)
5.8191 -#34 := (= #12 -1::int)
5.8192 -#35 := [rewrite]: #34
5.8193 -#38 := [monotonicity #35]: #37
5.8194 -#41 := [monotonicity #38]: #40
5.8195 -#47 := [trans #41 #45]: #46
5.8196 -#50 := [quant-intro #47]: #49
5.8197 -#53 := [quant-intro #50]: #52
5.8198 -#57 := [trans #53 #55]: #56
5.8199 -#60 := [monotonicity #57]: #59
5.8200 -#89 := [trans #60 #87]: #88
5.8201 -#32 := [asserted]: #17
5.8202 -#90 := [mp #32 #89]: #85
5.8203 -#108 := [mp~ #90 #105]: #103
5.8204 -#109 := [mp #108 #127]: #125
5.8205 -#128 := [not-or-elim #109]: #111
5.8206 -#130 := [and-elim #128]: #99
5.8207 -#110 := [not-or-elim #109]: #94
5.8208 -#186 := (or #95 #98)
5.8209 -#187 := [th-lemma]: #186
5.8210 -#188 := [unit-resolution #187 #110]: #98
5.8211 -[unit-resolution #188 #130]: false
5.8212 -unsat
5.8213 -34bf666106f50c4ee2e8834de4912d59c6e7d9d9 148 0
5.8214 -#2 := false
5.8215 -#144 := (not false)
5.8216 -#7 := 0::int
5.8217 -#5 := (:var 0 int)
5.8218 -#52 := (<= #5 0::int)
5.8219 -#53 := (not #52)
5.8220 -#147 := (or #53 #144)
5.8221 -#150 := (not #147)
5.8222 -#153 := (forall (vars (?x1 int)) #150)
5.8223 -#180 := (iff #153 false)
5.8224 -#175 := (forall (vars (?x1 int)) false)
5.8225 -#178 := (iff #175 false)
5.8226 -#179 := [elim-unused]: #178
5.8227 -#176 := (iff #153 #175)
5.8228 -#173 := (iff #150 false)
5.8229 -#1 := true
5.8230 -#168 := (not true)
5.8231 -#171 := (iff #168 false)
5.8232 -#172 := [rewrite]: #171
5.8233 -#169 := (iff #150 #168)
5.8234 -#166 := (iff #147 true)
5.8235 -#161 := (or #53 true)
5.8236 -#164 := (iff #161 true)
5.8237 -#165 := [rewrite]: #164
5.8238 -#162 := (iff #147 #161)
5.8239 -#159 := (iff #144 true)
5.8240 -#160 := [rewrite]: #159
5.8241 -#163 := [monotonicity #160]: #162
5.8242 -#167 := [trans #163 #165]: #166
5.8243 -#170 := [monotonicity #167]: #169
5.8244 -#174 := [trans #170 #172]: #173
5.8245 -#177 := [quant-intro #174]: #176
5.8246 -#181 := [trans #177 #179]: #180
5.8247 -#56 := -1::int
5.8248 -#57 := (* -1::int #5)
5.8249 -#4 := (:var 1 int)
5.8250 -#58 := (+ #4 #57)
5.8251 -#59 := (<= #58 0::int)
5.8252 -#62 := (not #59)
5.8253 -#68 := (or #53 #62)
5.8254 -#73 := (forall (vars (?x2 int)) #68)
5.8255 -#76 := (not #73)
5.8256 -#79 := (or #53 #76)
5.8257 -#105 := (not #79)
5.8258 -#123 := (forall (vars (?x1 int)) #105)
5.8259 -#156 := (iff #123 #153)
5.8260 -#127 := (forall (vars (?x2 int)) #53)
5.8261 -#130 := (not #127)
5.8262 -#133 := (or #53 #130)
5.8263 -#136 := (not #133)
5.8264 -#139 := (forall (vars (?x1 int)) #136)
5.8265 -#154 := (iff #139 #153)
5.8266 -#155 := [rewrite]: #154
5.8267 -#140 := (iff #123 #139)
5.8268 -#141 := [rewrite]: #140
5.8269 -#157 := [trans #141 #155]: #156
5.8270 -#116 := (and #52 #73)
5.8271 -#119 := (forall (vars (?x1 int)) #116)
5.8272 -#124 := (iff #119 #123)
5.8273 -#113 := (iff #116 #105)
5.8274 -#122 := [rewrite]: #113
5.8275 -#125 := [quant-intro #122]: #124
5.8276 -#94 := (not #53)
5.8277 -#104 := (and #94 #73)
5.8278 -#108 := (forall (vars (?x1 int)) #104)
5.8279 -#120 := (iff #108 #119)
5.8280 -#117 := (iff #104 #116)
5.8281 -#114 := (iff #94 #52)
5.8282 -#115 := [rewrite]: #114
5.8283 -#118 := [monotonicity #115]: #117
5.8284 -#121 := [quant-intro #118]: #120
5.8285 -#82 := (exists (vars (?x1 int)) #79)
5.8286 -#85 := (not #82)
5.8287 -#109 := (~ #85 #108)
5.8288 -#106 := (~ #105 #104)
5.8289 -#101 := (not #76)
5.8290 -#102 := (~ #101 #73)
5.8291 -#99 := (~ #73 #73)
5.8292 -#97 := (~ #68 #68)
5.8293 -#98 := [refl]: #97
5.8294 -#100 := [nnf-pos #98]: #99
5.8295 -#103 := [nnf-neg #100]: #102
5.8296 -#95 := (~ #94 #94)
5.8297 -#96 := [refl]: #95
5.8298 -#107 := [nnf-neg #96 #103]: #106
5.8299 -#110 := [nnf-neg #107]: #109
5.8300 -#8 := (< 0::int #5)
5.8301 -#6 := (<= #4 #5)
5.8302 -#9 := (implies #6 #8)
5.8303 -#10 := (forall (vars (?x2 int)) #9)
5.8304 -#11 := (implies #10 #8)
5.8305 -#12 := (exists (vars (?x1 int)) #11)
5.8306 -#13 := (not #12)
5.8307 -#88 := (iff #13 #85)
5.8308 -#30 := (not #6)
5.8309 -#31 := (or #30 #8)
5.8310 -#34 := (forall (vars (?x2 int)) #31)
5.8311 -#40 := (not #34)
5.8312 -#41 := (or #8 #40)
5.8313 -#46 := (exists (vars (?x1 int)) #41)
5.8314 -#49 := (not #46)
5.8315 -#86 := (iff #49 #85)
5.8316 -#83 := (iff #46 #82)
5.8317 -#80 := (iff #41 #79)
5.8318 -#77 := (iff #40 #76)
5.8319 -#74 := (iff #34 #73)
5.8320 -#71 := (iff #31 #68)
5.8321 -#65 := (or #62 #53)
5.8322 -#69 := (iff #65 #68)
5.8323 -#70 := [rewrite]: #69
5.8324 -#66 := (iff #31 #65)
5.8325 -#54 := (iff #8 #53)
5.8326 -#55 := [rewrite]: #54
5.8327 -#63 := (iff #30 #62)
5.8328 -#60 := (iff #6 #59)
5.8329 -#61 := [rewrite]: #60
5.8330 -#64 := [monotonicity #61]: #63
5.8331 -#67 := [monotonicity #64 #55]: #66
5.8332 -#72 := [trans #67 #70]: #71
5.8333 -#75 := [quant-intro #72]: #74
5.8334 -#78 := [monotonicity #75]: #77
5.8335 -#81 := [monotonicity #55 #78]: #80
5.8336 -#84 := [quant-intro #81]: #83
5.8337 -#87 := [monotonicity #84]: #86
5.8338 -#50 := (iff #13 #49)
5.8339 -#47 := (iff #12 #46)
5.8340 -#44 := (iff #11 #41)
5.8341 -#37 := (implies #34 #8)
5.8342 -#42 := (iff #37 #41)
5.8343 -#43 := [rewrite]: #42
5.8344 -#38 := (iff #11 #37)
5.8345 -#35 := (iff #10 #34)
5.8346 -#32 := (iff #9 #31)
5.8347 -#33 := [rewrite]: #32
5.8348 -#36 := [quant-intro #33]: #35
5.8349 -#39 := [monotonicity #36]: #38
5.8350 -#45 := [trans #39 #43]: #44
5.8351 -#48 := [quant-intro #45]: #47
5.8352 -#51 := [monotonicity #48]: #50
5.8353 -#89 := [trans #51 #87]: #88
5.8354 -#29 := [asserted]: #13
5.8355 -#90 := [mp #29 #89]: #85
5.8356 -#111 := [mp~ #90 #110]: #108
5.8357 -#112 := [mp #111 #121]: #119
5.8358 -#126 := [mp #112 #125]: #123
5.8359 -#158 := [mp #126 #157]: #153
5.8360 -[mp #158 #181]: false
5.8361 -unsat
5.8362 -1d6946d9384f22b76e98f04aff657c54e4fe51ad 67 0
5.8363 -#2 := false
5.8364 -#4 := (:var 0 int)
5.8365 -#5 := (pattern #4)
5.8366 -decl uf_1 :: int
5.8367 -#6 := uf_1
5.8368 -#8 := 2::int
5.8369 -#10 := (* 2::int uf_1)
5.8370 -#9 := (* 2::int #4)
5.8371 -#11 := (< #9 #10)
5.8372 -#7 := (< #4 uf_1)
5.8373 -#12 := (implies #7 #11)
5.8374 -#13 := (forall (vars (?x1 int)) (:pat #5) #12)
5.8375 -#14 := (not #13)
5.8376 -#79 := (iff #14 false)
5.8377 -#31 := (not #7)
5.8378 -#32 := (or #31 #11)
5.8379 -#35 := (forall (vars (?x1 int)) (:pat #5) #32)
5.8380 -#38 := (not #35)
5.8381 -#77 := (iff #38 false)
5.8382 -#1 := true
5.8383 -#72 := (not true)
5.8384 -#75 := (iff #72 false)
5.8385 -#76 := [rewrite]: #75
5.8386 -#73 := (iff #38 #72)
5.8387 -#70 := (iff #35 true)
5.8388 -#65 := (forall (vars (?x1 int)) (:pat #5) true)
5.8389 -#68 := (iff #65 true)
5.8390 -#69 := [elim-unused]: #68
5.8391 -#66 := (iff #35 #65)
5.8392 -#63 := (iff #32 true)
5.8393 -#43 := 0::int
5.8394 -#41 := -1::int
5.8395 -#45 := (* -1::int uf_1)
5.8396 -#46 := (+ #4 #45)
5.8397 -#44 := (>= #46 0::int)
5.8398 -#42 := (not #44)
5.8399 -#57 := (or #44 #42)
5.8400 -#61 := (iff #57 true)
5.8401 -#62 := [rewrite]: #61
5.8402 -#59 := (iff #32 #57)
5.8403 -#58 := (iff #11 #42)
5.8404 -#56 := [rewrite]: #58
5.8405 -#54 := (iff #31 #44)
5.8406 -#49 := (not #42)
5.8407 -#52 := (iff #49 #44)
5.8408 -#53 := [rewrite]: #52
5.8409 -#50 := (iff #31 #49)
5.8410 -#47 := (iff #7 #42)
5.8411 -#48 := [rewrite]: #47
5.8412 -#51 := [monotonicity #48]: #50
5.8413 -#55 := [trans #51 #53]: #54
5.8414 -#60 := [monotonicity #55 #56]: #59
5.8415 -#64 := [trans #60 #62]: #63
5.8416 -#67 := [quant-intro #64]: #66
5.8417 -#71 := [trans #67 #69]: #70
5.8418 -#74 := [monotonicity #71]: #73
5.8419 -#78 := [trans #74 #76]: #77
5.8420 -#39 := (iff #14 #38)
5.8421 -#36 := (iff #13 #35)
5.8422 -#33 := (iff #12 #32)
5.8423 -#34 := [rewrite]: #33
5.8424 -#37 := [quant-intro #34]: #36
5.8425 -#40 := [monotonicity #37]: #39
5.8426 -#80 := [trans #40 #78]: #79
5.8427 -#30 := [asserted]: #14
5.8428 -[mp #30 #80]: false
5.8429 -unsat
5.8430 -d938f8b556e86b20a82e4661e3a61bad7d95357d 1 0
5.8431 -unsat
5.8432 -dfca84a72c9a54145743ea34eaa7c75e8665fd45 75 0
5.8433 -#2 := false
5.8434 -#6 := 1::int
5.8435 -decl uf_3 :: int
5.8436 -#8 := uf_3
5.8437 -#12 := (+ uf_3 1::int)
5.8438 -decl uf_1 :: int
5.8439 -#4 := uf_1
5.8440 -#13 := (* uf_1 #12)
5.8441 -decl uf_2 :: int
5.8442 -#5 := uf_2
5.8443 -#11 := (* uf_1 uf_2)
5.8444 -#14 := (+ #11 #13)
5.8445 -#7 := (+ uf_2 1::int)
5.8446 -#9 := (+ #7 uf_3)
5.8447 -#10 := (* uf_1 #9)
5.8448 -#15 := (= #10 #14)
5.8449 -#16 := (not #15)
5.8450 -#85 := (iff #16 false)
5.8451 -#1 := true
5.8452 -#80 := (not true)
5.8453 -#83 := (iff #80 false)
5.8454 -#84 := [rewrite]: #83
5.8455 -#81 := (iff #16 #80)
5.8456 -#78 := (iff #15 true)
5.8457 -#48 := (* uf_1 uf_3)
5.8458 -#49 := (+ #11 #48)
5.8459 -#50 := (+ uf_1 #49)
5.8460 -#73 := (= #50 #50)
5.8461 -#76 := (iff #73 true)
5.8462 -#77 := [rewrite]: #76
5.8463 -#74 := (iff #15 #73)
5.8464 -#71 := (= #14 #50)
5.8465 -#61 := (+ uf_1 #48)
5.8466 -#66 := (+ #11 #61)
5.8467 -#69 := (= #66 #50)
5.8468 -#70 := [rewrite]: #69
5.8469 -#67 := (= #14 #66)
5.8470 -#64 := (= #13 #61)
5.8471 -#55 := (+ 1::int uf_3)
5.8472 -#58 := (* uf_1 #55)
5.8473 -#62 := (= #58 #61)
5.8474 -#63 := [rewrite]: #62
5.8475 -#59 := (= #13 #58)
5.8476 -#56 := (= #12 #55)
5.8477 -#57 := [rewrite]: #56
5.8478 -#60 := [monotonicity #57]: #59
5.8479 -#65 := [trans #60 #63]: #64
5.8480 -#68 := [monotonicity #65]: #67
5.8481 -#72 := [trans #68 #70]: #71
5.8482 -#53 := (= #10 #50)
5.8483 -#39 := (+ uf_2 uf_3)
5.8484 -#40 := (+ 1::int #39)
5.8485 -#45 := (* uf_1 #40)
5.8486 -#51 := (= #45 #50)
5.8487 -#52 := [rewrite]: #51
5.8488 -#46 := (= #10 #45)
5.8489 -#43 := (= #9 #40)
5.8490 -#33 := (+ 1::int uf_2)
5.8491 -#36 := (+ #33 uf_3)
5.8492 -#41 := (= #36 #40)
5.8493 -#42 := [rewrite]: #41
5.8494 -#37 := (= #9 #36)
5.8495 -#34 := (= #7 #33)
5.8496 -#35 := [rewrite]: #34
5.8497 -#38 := [monotonicity #35]: #37
5.8498 -#44 := [trans #38 #42]: #43
5.8499 -#47 := [monotonicity #44]: #46
5.8500 -#54 := [trans #47 #52]: #53
5.8501 -#75 := [monotonicity #54 #72]: #74
5.8502 -#79 := [trans #75 #77]: #78
5.8503 -#82 := [monotonicity #79]: #81
5.8504 -#86 := [trans #82 #84]: #85
5.8505 -#32 := [asserted]: #16
5.8506 -[mp #32 #86]: false
5.8507 -unsat
5.8508 -2662a556257bfe403cd3fda75e9fe55964bc9dcd 62 0
5.8509 -#2 := false
5.8510 -decl uf_2 :: real
5.8511 -#6 := uf_2
5.8512 -decl uf_1 :: real
5.8513 -#4 := uf_1
5.8514 -#12 := 2::real
5.8515 -#13 := (* 2::real uf_1)
5.8516 -#14 := (* #13 uf_2)
5.8517 -#5 := 1::real
5.8518 -#9 := (- 1::real uf_2)
5.8519 -#10 := (* uf_1 #9)
5.8520 -#7 := (+ 1::real uf_2)
5.8521 -#8 := (* uf_1 #7)
5.8522 -#11 := (- #8 #10)
5.8523 -#15 := (= #11 #14)
5.8524 -#16 := (not #15)
5.8525 -#73 := (iff #16 false)
5.8526 -#1 := true
5.8527 -#68 := (not true)
5.8528 -#71 := (iff #68 false)
5.8529 -#72 := [rewrite]: #71
5.8530 -#69 := (iff #16 #68)
5.8531 -#66 := (iff #15 true)
5.8532 -#33 := (* uf_1 uf_2)
5.8533 -#55 := (* 2::real #33)
5.8534 -#61 := (= #55 #55)
5.8535 -#64 := (iff #61 true)
5.8536 -#65 := [rewrite]: #64
5.8537 -#62 := (iff #15 #61)
5.8538 -#59 := (= #14 #55)
5.8539 -#60 := [rewrite]: #59
5.8540 -#57 := (= #11 #55)
5.8541 -#37 := -1::real
5.8542 -#45 := (* -1::real #33)
5.8543 -#46 := (+ uf_1 #45)
5.8544 -#34 := (+ uf_1 #33)
5.8545 -#51 := (- #34 #46)
5.8546 -#54 := (= #51 #55)
5.8547 -#56 := [rewrite]: #54
5.8548 -#52 := (= #11 #51)
5.8549 -#49 := (= #10 #46)
5.8550 -#38 := (* -1::real uf_2)
5.8551 -#39 := (+ 1::real #38)
5.8552 -#42 := (* uf_1 #39)
5.8553 -#47 := (= #42 #46)
5.8554 -#48 := [rewrite]: #47
5.8555 -#43 := (= #10 #42)
5.8556 -#40 := (= #9 #39)
5.8557 -#41 := [rewrite]: #40
5.8558 -#44 := [monotonicity #41]: #43
5.8559 -#50 := [trans #44 #48]: #49
5.8560 -#35 := (= #8 #34)
5.8561 -#36 := [rewrite]: #35
5.8562 -#53 := [monotonicity #36 #50]: #52
5.8563 -#58 := [trans #53 #56]: #57
5.8564 -#63 := [monotonicity #58 #60]: #62
5.8565 -#67 := [trans #63 #65]: #66
5.8566 -#70 := [monotonicity #67]: #69
5.8567 -#74 := [trans #70 #72]: #73
5.8568 -#32 := [asserted]: #16
5.8569 -[mp #32 #74]: false
5.8570 -unsat
5.8571 -a89308e99854a72f032798efa6ed32cee1f069ad 141 0
5.8572 -#2 := false
5.8573 -decl uf_4 :: int
5.8574 -#9 := uf_4
5.8575 -decl uf_5 :: int
5.8576 -#13 := uf_5
5.8577 -decl uf_3 :: int
5.8578 -#8 := uf_3
5.8579 -#24 := (+ uf_3 uf_5)
5.8580 -#25 := (+ #24 uf_4)
5.8581 -decl uf_2 :: int
5.8582 -#6 := uf_2
5.8583 -#5 := 1::int
5.8584 -#7 := (+ 1::int uf_2)
5.8585 -#26 := (* #7 #25)
5.8586 -#21 := (* uf_5 uf_2)
5.8587 -#19 := (* #7 uf_5)
5.8588 -#10 := (+ uf_3 uf_4)
5.8589 -#16 := 2::int
5.8590 -#17 := (* 2::int #7)
5.8591 -#18 := (* #17 #10)
5.8592 -#20 := (+ #18 #19)
5.8593 -#22 := (+ #20 #21)
5.8594 -decl uf_1 :: int
5.8595 -#4 := uf_1
5.8596 -#23 := (+ uf_1 #22)
5.8597 -#27 := (- #23 #26)
5.8598 -#14 := (* uf_2 uf_5)
5.8599 -#11 := (* #7 #10)
5.8600 -#12 := (+ uf_1 #11)
5.8601 -#15 := (+ #12 #14)
5.8602 -#28 := (= #15 #27)
5.8603 -#29 := (not #28)
5.8604 -#149 := (iff #29 false)
5.8605 -#1 := true
5.8606 -#144 := (not true)
5.8607 -#147 := (iff #144 false)
5.8608 -#148 := [rewrite]: #147
5.8609 -#145 := (iff #29 #144)
5.8610 -#142 := (iff #28 true)
5.8611 -#47 := (* uf_2 uf_4)
5.8612 -#46 := (* uf_2 uf_3)
5.8613 -#48 := (+ #46 #47)
5.8614 -#59 := (+ #14 #48)
5.8615 -#60 := (+ uf_4 #59)
5.8616 -#61 := (+ uf_3 #60)
5.8617 -#62 := (+ uf_1 #61)
5.8618 -#136 := (= #62 #62)
5.8619 -#140 := (iff #136 true)
5.8620 -#141 := [rewrite]: #140
5.8621 -#135 := (iff #28 #136)
5.8622 -#138 := (= #27 #62)
5.8623 -#123 := (+ uf_5 #59)
5.8624 -#124 := (+ uf_4 #123)
5.8625 -#125 := (+ uf_3 #124)
5.8626 -#77 := (* 2::int #47)
5.8627 -#75 := (* 2::int #46)
5.8628 -#78 := (+ #75 #77)
5.8629 -#104 := (* 2::int #14)
5.8630 -#105 := (+ #104 #78)
5.8631 -#106 := (+ uf_5 #105)
5.8632 -#76 := (* 2::int uf_4)
5.8633 -#107 := (+ #76 #106)
5.8634 -#74 := (* 2::int uf_3)
5.8635 -#108 := (+ #74 #107)
5.8636 -#113 := (+ uf_1 #108)
5.8637 -#130 := (- #113 #125)
5.8638 -#133 := (= #130 #62)
5.8639 -#139 := [rewrite]: #133
5.8640 -#131 := (= #27 #130)
5.8641 -#128 := (= #26 #125)
5.8642 -#116 := (+ uf_4 uf_5)
5.8643 -#117 := (+ uf_3 #116)
5.8644 -#120 := (* #7 #117)
5.8645 -#126 := (= #120 #125)
5.8646 -#127 := [rewrite]: #126
5.8647 -#121 := (= #26 #120)
5.8648 -#118 := (= #25 #117)
5.8649 -#119 := [rewrite]: #118
5.8650 -#122 := [monotonicity #119]: #121
5.8651 -#129 := [trans #122 #127]: #128
5.8652 -#114 := (= #23 #113)
5.8653 -#111 := (= #22 #108)
5.8654 -#91 := (+ #14 #78)
5.8655 -#92 := (+ uf_5 #91)
5.8656 -#93 := (+ #76 #92)
5.8657 -#94 := (+ #74 #93)
5.8658 -#101 := (+ #94 #14)
5.8659 -#109 := (= #101 #108)
5.8660 -#110 := [rewrite]: #109
5.8661 -#102 := (= #22 #101)
5.8662 -#99 := (= #21 #14)
5.8663 -#100 := [rewrite]: #99
5.8664 -#97 := (= #20 #94)
5.8665 -#85 := (+ uf_5 #14)
5.8666 -#79 := (+ #76 #78)
5.8667 -#80 := (+ #74 #79)
5.8668 -#88 := (+ #80 #85)
5.8669 -#95 := (= #88 #94)
5.8670 -#96 := [rewrite]: #95
5.8671 -#89 := (= #20 #88)
5.8672 -#86 := (= #19 #85)
5.8673 -#87 := [rewrite]: #86
5.8674 -#83 := (= #18 #80)
5.8675 -#67 := (* 2::int uf_2)
5.8676 -#68 := (+ 2::int #67)
5.8677 -#71 := (* #68 #10)
5.8678 -#81 := (= #71 #80)
5.8679 -#82 := [rewrite]: #81
5.8680 -#72 := (= #18 #71)
5.8681 -#69 := (= #17 #68)
5.8682 -#70 := [rewrite]: #69
5.8683 -#73 := [monotonicity #70]: #72
5.8684 -#84 := [trans #73 #82]: #83
5.8685 -#90 := [monotonicity #84 #87]: #89
5.8686 -#98 := [trans #90 #96]: #97
5.8687 -#103 := [monotonicity #98 #100]: #102
5.8688 -#112 := [trans #103 #110]: #111
5.8689 -#115 := [monotonicity #112]: #114
5.8690 -#132 := [monotonicity #115 #129]: #131
5.8691 -#137 := [trans #132 #139]: #138
5.8692 -#65 := (= #15 #62)
5.8693 -#49 := (+ uf_4 #48)
5.8694 -#50 := (+ uf_3 #49)
5.8695 -#53 := (+ uf_1 #50)
5.8696 -#56 := (+ #53 #14)
5.8697 -#63 := (= #56 #62)
5.8698 -#64 := [rewrite]: #63
5.8699 -#57 := (= #15 #56)
5.8700 -#54 := (= #12 #53)
5.8701 -#51 := (= #11 #50)
5.8702 -#52 := [rewrite]: #51
5.8703 -#55 := [monotonicity #52]: #54
5.8704 -#58 := [monotonicity #55]: #57
5.8705 -#66 := [trans #58 #64]: #65
5.8706 -#134 := [monotonicity #66 #137]: #135
5.8707 -#143 := [trans #134 #141]: #142
5.8708 -#146 := [monotonicity #143]: #145
5.8709 -#150 := [trans #146 #148]: #149
5.8710 -#45 := [asserted]: #29
5.8711 -[mp #45 #150]: false
5.8712 -unsat
5.8713 -2e721ab2035f9845f1e87e78db6dfc67c28f6d40 252 0
5.8714 -#2 := false
5.8715 -#9 := 0::int
5.8716 -decl uf_2 :: (-> T1 int)
5.8717 -decl uf_1 :: (-> int T1)
5.8718 -decl uf_3 :: T1
5.8719 -#22 := uf_3
5.8720 -#23 := (uf_2 uf_3)
5.8721 -#21 := 2::int
5.8722 -#24 := (* 2::int #23)
5.8723 -#25 := (uf_1 #24)
5.8724 -#293 := (uf_2 #25)
5.8725 -#295 := -1::int
5.8726 -#274 := (* -1::int #293)
5.8727 -#610 := (+ #24 #274)
5.8728 -#594 := (<= #610 0::int)
5.8729 -#612 := (= #610 0::int)
5.8730 -#606 := (>= #23 0::int)
5.8731 -#237 := (= #293 0::int)
5.8732 -#549 := (not #237)
5.8733 -#588 := (<= #293 0::int)
5.8734 -#457 := (not #588)
5.8735 -#26 := 1::int
5.8736 -#558 := (>= #293 1::int)
5.8737 -#555 := (= #293 1::int)
5.8738 -#27 := (uf_1 1::int)
5.8739 -#589 := (uf_2 #27)
5.8740 -#301 := (= #589 1::int)
5.8741 -#10 := (:var 0 int)
5.8742 -#12 := (uf_1 #10)
5.8743 -#626 := (pattern #12)
5.8744 -#70 := (>= #10 0::int)
5.8745 -#71 := (not #70)
5.8746 -#13 := (uf_2 #12)
5.8747 -#52 := (= #10 #13)
5.8748 -#77 := (or #52 #71)
5.8749 -#627 := (forall (vars (?x2 int)) (:pat #626) #77)
5.8750 -#82 := (forall (vars (?x2 int)) #77)
5.8751 -#630 := (iff #82 #627)
5.8752 -#628 := (iff #77 #77)
5.8753 -#629 := [refl]: #628
5.8754 -#631 := [quant-intro #629]: #630
5.8755 -#132 := (~ #82 #82)
5.8756 -#144 := (~ #77 #77)
5.8757 -#145 := [refl]: #144
5.8758 -#130 := [nnf-pos #145]: #132
5.8759 -#14 := (= #13 #10)
5.8760 -#11 := (<= 0::int #10)
5.8761 -#15 := (implies #11 #14)
5.8762 -#16 := (forall (vars (?x2 int)) #15)
5.8763 -#85 := (iff #16 #82)
5.8764 -#59 := (not #11)
5.8765 -#60 := (or #59 #52)
5.8766 -#65 := (forall (vars (?x2 int)) #60)
5.8767 -#83 := (iff #65 #82)
5.8768 -#80 := (iff #60 #77)
5.8769 -#74 := (or #71 #52)
5.8770 -#78 := (iff #74 #77)
5.8771 -#79 := [rewrite]: #78
5.8772 -#75 := (iff #60 #74)
5.8773 -#72 := (iff #59 #71)
5.8774 -#68 := (iff #11 #70)
5.8775 -#69 := [rewrite]: #68
5.8776 -#73 := [monotonicity #69]: #72
5.8777 -#76 := [monotonicity #73]: #75
5.8778 -#81 := [trans #76 #79]: #80
5.8779 -#84 := [quant-intro #81]: #83
5.8780 -#66 := (iff #16 #65)
5.8781 -#63 := (iff #15 #60)
5.8782 -#56 := (implies #11 #52)
5.8783 -#61 := (iff #56 #60)
5.8784 -#62 := [rewrite]: #61
5.8785 -#57 := (iff #15 #56)
5.8786 -#54 := (iff #14 #52)
5.8787 -#55 := [rewrite]: #54
5.8788 -#58 := [monotonicity #55]: #57
5.8789 -#64 := [trans #58 #62]: #63
5.8790 -#67 := [quant-intro #64]: #66
5.8791 -#86 := [trans #67 #84]: #85
5.8792 -#51 := [asserted]: #16
5.8793 -#87 := [mp #51 #86]: #82
5.8794 -#146 := [mp~ #87 #130]: #82
5.8795 -#632 := [mp #146 #631]: #627
5.8796 -#609 := (not #627)
5.8797 -#578 := (or #609 #301)
5.8798 -#311 := (>= 1::int 0::int)
5.8799 -#585 := (not #311)
5.8800 -#586 := (= 1::int #589)
5.8801 -#590 := (or #586 #585)
5.8802 -#419 := (or #609 #590)
5.8803 -#421 := (iff #419 #578)
5.8804 -#564 := (iff #578 #578)
5.8805 -#565 := [rewrite]: #564
5.8806 -#577 := (iff #590 #301)
5.8807 -#574 := (or #301 false)
5.8808 -#571 := (iff #574 #301)
5.8809 -#576 := [rewrite]: #571
5.8810 -#575 := (iff #590 #574)
5.8811 -#584 := (iff #585 false)
5.8812 -#1 := true
5.8813 -#582 := (not true)
5.8814 -#583 := (iff #582 false)
5.8815 -#580 := [rewrite]: #583
5.8816 -#296 := (iff #585 #582)
5.8817 -#303 := (iff #311 true)
5.8818 -#581 := [rewrite]: #303
5.8819 -#579 := [monotonicity #581]: #296
5.8820 -#573 := [trans #579 #580]: #584
5.8821 -#300 := (iff #586 #301)
5.8822 -#302 := [rewrite]: #300
5.8823 -#570 := [monotonicity #302 #573]: #575
5.8824 -#572 := [trans #570 #576]: #577
5.8825 -#563 := [monotonicity #572]: #421
5.8826 -#566 := [trans #563 #565]: #421
5.8827 -#420 := [quant-inst]: #419
5.8828 -#560 := [mp #420 #566]: #578
5.8829 -#442 := [unit-resolution #560 #632]: #301
5.8830 -#443 := (= #293 #589)
5.8831 -#28 := (= #25 #27)
5.8832 -#129 := [asserted]: #28
5.8833 -#436 := [monotonicity #129]: #443
5.8834 -#451 := [trans #436 #442]: #555
5.8835 -#453 := (not #555)
5.8836 -#454 := (or #453 #558)
5.8837 -#447 := [th-lemma]: #454
5.8838 -#455 := [unit-resolution #447 #451]: #558
5.8839 -#456 := (not #558)
5.8840 -#458 := (or #456 #457)
5.8841 -#459 := [th-lemma]: #458
5.8842 -#552 := [unit-resolution #459 #455]: #457
5.8843 -#553 := (or #549 #588)
5.8844 -#540 := [th-lemma]: #553
5.8845 -#542 := [unit-resolution #540 #552]: #549
5.8846 -#603 := (or #237 #606)
5.8847 -#18 := (= #13 0::int)
5.8848 -#118 := (or #18 #70)
5.8849 -#633 := (forall (vars (?x3 int)) (:pat #626) #118)
5.8850 -#123 := (forall (vars (?x3 int)) #118)
5.8851 -#636 := (iff #123 #633)
5.8852 -#634 := (iff #118 #118)
5.8853 -#635 := [refl]: #634
5.8854 -#637 := [quant-intro #635]: #636
5.8855 -#133 := (~ #123 #123)
5.8856 -#147 := (~ #118 #118)
5.8857 -#148 := [refl]: #147
5.8858 -#134 := [nnf-pos #148]: #133
5.8859 -#17 := (< #10 0::int)
5.8860 -#19 := (implies #17 #18)
5.8861 -#20 := (forall (vars (?x3 int)) #19)
5.8862 -#126 := (iff #20 #123)
5.8863 -#89 := (= 0::int #13)
5.8864 -#95 := (not #17)
5.8865 -#96 := (or #95 #89)
5.8866 -#101 := (forall (vars (?x3 int)) #96)
5.8867 -#124 := (iff #101 #123)
5.8868 -#121 := (iff #96 #118)
5.8869 -#115 := (or #70 #18)
5.8870 -#119 := (iff #115 #118)
5.8871 -#120 := [rewrite]: #119
5.8872 -#116 := (iff #96 #115)
5.8873 -#113 := (iff #89 #18)
5.8874 -#114 := [rewrite]: #113
5.8875 -#111 := (iff #95 #70)
5.8876 -#106 := (not #71)
5.8877 -#109 := (iff #106 #70)
5.8878 -#110 := [rewrite]: #109
5.8879 -#107 := (iff #95 #106)
5.8880 -#104 := (iff #17 #71)
5.8881 -#105 := [rewrite]: #104
5.8882 -#108 := [monotonicity #105]: #107
5.8883 -#112 := [trans #108 #110]: #111
5.8884 -#117 := [monotonicity #112 #114]: #116
5.8885 -#122 := [trans #117 #120]: #121
5.8886 -#125 := [quant-intro #122]: #124
5.8887 -#102 := (iff #20 #101)
5.8888 -#99 := (iff #19 #96)
5.8889 -#92 := (implies #17 #89)
5.8890 -#97 := (iff #92 #96)
5.8891 -#98 := [rewrite]: #97
5.8892 -#93 := (iff #19 #92)
5.8893 -#90 := (iff #18 #89)
5.8894 -#91 := [rewrite]: #90
5.8895 -#94 := [monotonicity #91]: #93
5.8896 -#100 := [trans #94 #98]: #99
5.8897 -#103 := [quant-intro #100]: #102
5.8898 -#127 := [trans #103 #125]: #126
5.8899 -#88 := [asserted]: #20
5.8900 -#128 := [mp #88 #127]: #123
5.8901 -#149 := [mp~ #128 #134]: #123
5.8902 -#638 := [mp #149 #637]: #633
5.8903 -#604 := (not #633)
5.8904 -#602 := (or #604 #237 #606)
5.8905 -#204 := (>= #24 0::int)
5.8906 -#601 := (or #237 #204)
5.8907 -#605 := (or #604 #601)
5.8908 -#317 := (iff #605 #602)
5.8909 -#592 := (or #604 #603)
5.8910 -#315 := (iff #592 #602)
5.8911 -#316 := [rewrite]: #315
5.8912 -#299 := (iff #605 #592)
5.8913 -#242 := (iff #601 #603)
5.8914 -#279 := (iff #204 #606)
5.8915 -#280 := [rewrite]: #279
5.8916 -#243 := [monotonicity #280]: #242
5.8917 -#314 := [monotonicity #243]: #299
5.8918 -#210 := [trans #314 #316]: #317
5.8919 -#591 := [quant-inst]: #605
5.8920 -#587 := [mp #591 #210]: #602
5.8921 -#534 := [unit-resolution #587 #638]: #603
5.8922 -#531 := [unit-resolution #534 #542]: #606
5.8923 -#613 := (not #606)
5.8924 -#607 := (or #613 #612)
5.8925 -#251 := (or #609 #613 #612)
5.8926 -#289 := (not #204)
5.8927 -#294 := (= #24 #293)
5.8928 -#291 := (or #294 #289)
5.8929 -#593 := (or #609 #291)
5.8930 -#597 := (iff #593 #251)
5.8931 -#256 := (or #609 #607)
5.8932 -#595 := (iff #256 #251)
5.8933 -#596 := [rewrite]: #595
5.8934 -#257 := (iff #593 #256)
5.8935 -#608 := (iff #291 #607)
5.8936 -#616 := (or #612 #613)
5.8937 -#266 := (iff #616 #607)
5.8938 -#271 := [rewrite]: #266
5.8939 -#611 := (iff #291 #616)
5.8940 -#614 := (iff #289 #613)
5.8941 -#615 := [monotonicity #280]: #614
5.8942 -#268 := (iff #294 #612)
5.8943 -#399 := [rewrite]: #268
5.8944 -#617 := [monotonicity #399 #615]: #611
5.8945 -#267 := [trans #617 #271]: #608
5.8946 -#258 := [monotonicity #267]: #257
5.8947 -#598 := [trans #258 #596]: #597
5.8948 -#255 := [quant-inst]: #593
5.8949 -#599 := [mp #255 #598]: #251
5.8950 -#533 := [unit-resolution #599 #632]: #607
5.8951 -#543 := [unit-resolution #533 #531]: #612
5.8952 -#544 := (not #612)
5.8953 -#545 := (or #544 #594)
5.8954 -#541 := [th-lemma]: #545
5.8955 -#546 := [unit-resolution #541 #543]: #594
5.8956 -#600 := (>= #610 0::int)
5.8957 -#535 := (or #544 #600)
5.8958 -#536 := [th-lemma]: #535
5.8959 -#537 := [unit-resolution #536 #543]: #600
5.8960 -#557 := (<= #293 1::int)
5.8961 -#538 := (or #453 #557)
5.8962 -#532 := [th-lemma]: #538
5.8963 -#539 := [unit-resolution #532 #451]: #557
5.8964 -[th-lemma #455 #539 #537 #546]: false
5.8965 -unsat
5.8966 -5d4787d5f6bf7b62bda1a48bdd01dc6863801852 223 0
5.8967 -#2 := false
5.8968 -#23 := 3::int
5.8969 -decl uf_2 :: (-> T1 int)
5.8970 -decl uf_3 :: T1
5.8971 -#21 := uf_3
5.8972 -#22 := (uf_2 uf_3)
5.8973 -#137 := (>= #22 3::int)
5.8974 -#135 := (not #137)
5.8975 -#24 := (< #22 3::int)
5.8976 -#136 := (iff #24 #135)
5.8977 -#138 := [rewrite]: #136
5.8978 -#132 := [asserted]: #24
5.8979 -#139 := [mp #132 #138]: #135
5.8980 -#9 := 0::int
5.8981 -decl uf_1 :: (-> int T1)
5.8982 -#25 := 2::int
5.8983 -#26 := (* 2::int #22)
5.8984 -#27 := (uf_1 #26)
5.8985 -#28 := (uf_2 #27)
5.8986 -#632 := -1::int
5.8987 -#634 := (* -1::int #28)
5.8988 -#290 := (+ #26 #634)
5.8989 -#623 := (>= #290 0::int)
5.8990 -#421 := (= #290 0::int)
5.8991 -#302 := (>= #22 0::int)
5.8992 -#625 := (= #28 0::int)
5.8993 -#318 := (not #625)
5.8994 -#322 := (<= #28 0::int)
5.8995 -#324 := (not #322)
5.8996 -#29 := 7::int
5.8997 -#143 := (>= #28 7::int)
5.8998 -#30 := (< #28 7::int)
5.8999 -#31 := (not #30)
5.9000 -#150 := (iff #31 #143)
5.9001 -#141 := (not #143)
5.9002 -#145 := (not #141)
5.9003 -#148 := (iff #145 #143)
5.9004 -#149 := [rewrite]: #148
5.9005 -#146 := (iff #31 #145)
5.9006 -#142 := (iff #30 #141)
5.9007 -#144 := [rewrite]: #142
5.9008 -#147 := [monotonicity #144]: #146
5.9009 -#151 := [trans #147 #149]: #150
5.9010 -#133 := [asserted]: #31
5.9011 -#152 := [mp #133 #151]: #143
5.9012 -#325 := (or #324 #141)
5.9013 -#603 := [th-lemma]: #325
5.9014 -#604 := [unit-resolution #603 #152]: #324
5.9015 -#601 := (or #318 #322)
5.9016 -#605 := [th-lemma]: #601
5.9017 -#602 := [unit-resolution #605 #604]: #318
5.9018 -#10 := (:var 0 int)
5.9019 -#12 := (uf_1 #10)
5.9020 -#648 := (pattern #12)
5.9021 -#73 := (>= #10 0::int)
5.9022 -#13 := (uf_2 #12)
5.9023 -#18 := (= #13 0::int)
5.9024 -#121 := (or #18 #73)
5.9025 -#655 := (forall (vars (?x3 int)) (:pat #648) #121)
5.9026 -#126 := (forall (vars (?x3 int)) #121)
5.9027 -#658 := (iff #126 #655)
5.9028 -#656 := (iff #121 #121)
5.9029 -#657 := [refl]: #656
5.9030 -#659 := [quant-intro #657]: #658
5.9031 -#154 := (~ #126 #126)
5.9032 -#170 := (~ #121 #121)
5.9033 -#171 := [refl]: #170
5.9034 -#155 := [nnf-pos #171]: #154
5.9035 -#17 := (< #10 0::int)
5.9036 -#19 := (implies #17 #18)
5.9037 -#20 := (forall (vars (?x3 int)) #19)
5.9038 -#129 := (iff #20 #126)
5.9039 -#92 := (= 0::int #13)
5.9040 -#98 := (not #17)
5.9041 -#99 := (or #98 #92)
5.9042 -#104 := (forall (vars (?x3 int)) #99)
5.9043 -#127 := (iff #104 #126)
5.9044 -#124 := (iff #99 #121)
5.9045 -#118 := (or #73 #18)
5.9046 -#122 := (iff #118 #121)
5.9047 -#123 := [rewrite]: #122
5.9048 -#119 := (iff #99 #118)
5.9049 -#116 := (iff #92 #18)
5.9050 -#117 := [rewrite]: #116
5.9051 -#114 := (iff #98 #73)
5.9052 -#74 := (not #73)
5.9053 -#109 := (not #74)
5.9054 -#112 := (iff #109 #73)
5.9055 -#113 := [rewrite]: #112
5.9056 -#110 := (iff #98 #109)
5.9057 -#107 := (iff #17 #74)
5.9058 -#108 := [rewrite]: #107
5.9059 -#111 := [monotonicity #108]: #110
5.9060 -#115 := [trans #111 #113]: #114
5.9061 -#120 := [monotonicity #115 #117]: #119
5.9062 -#125 := [trans #120 #123]: #124
5.9063 -#128 := [quant-intro #125]: #127
5.9064 -#105 := (iff #20 #104)
5.9065 -#102 := (iff #19 #99)
5.9066 -#95 := (implies #17 #92)
5.9067 -#100 := (iff #95 #99)
5.9068 -#101 := [rewrite]: #100
5.9069 -#96 := (iff #19 #95)
5.9070 -#93 := (iff #18 #92)
5.9071 -#94 := [rewrite]: #93
5.9072 -#97 := [monotonicity #94]: #96
5.9073 -#103 := [trans #97 #101]: #102
5.9074 -#106 := [quant-intro #103]: #105
5.9075 -#130 := [trans #106 #128]: #129
5.9076 -#91 := [asserted]: #20
5.9077 -#131 := [mp #91 #130]: #126
5.9078 -#172 := [mp~ #131 #155]: #126
5.9079 -#660 := [mp #172 #659]: #655
5.9080 -#337 := (not #655)
5.9081 -#338 := (or #337 #302 #625)
5.9082 -#315 := (>= #26 0::int)
5.9083 -#264 := (or #625 #315)
5.9084 -#339 := (or #337 #264)
5.9085 -#611 := (iff #339 #338)
5.9086 -#627 := (or #302 #625)
5.9087 -#609 := (or #337 #627)
5.9088 -#333 := (iff #609 #338)
5.9089 -#607 := [rewrite]: #333
5.9090 -#610 := (iff #339 #609)
5.9091 -#321 := (iff #264 #627)
5.9092 -#265 := (or #625 #302)
5.9093 -#613 := (iff #265 #627)
5.9094 -#614 := [rewrite]: #613
5.9095 -#626 := (iff #264 #265)
5.9096 -#635 := (iff #315 #302)
5.9097 -#636 := [rewrite]: #635
5.9098 -#624 := [monotonicity #636]: #626
5.9099 -#336 := [trans #624 #614]: #321
5.9100 -#332 := [monotonicity #336]: #610
5.9101 -#608 := [trans #332 #607]: #611
5.9102 -#231 := [quant-inst]: #339
5.9103 -#612 := [mp #231 #608]: #338
5.9104 -#606 := [unit-resolution #612 #660 #602]: #302
5.9105 -#637 := (not #302)
5.9106 -#293 := (or #637 #421)
5.9107 -#55 := (= #10 #13)
5.9108 -#80 := (or #55 #74)
5.9109 -#649 := (forall (vars (?x2 int)) (:pat #648) #80)
5.9110 -#85 := (forall (vars (?x2 int)) #80)
5.9111 -#652 := (iff #85 #649)
5.9112 -#650 := (iff #80 #80)
5.9113 -#651 := [refl]: #650
5.9114 -#653 := [quant-intro #651]: #652
5.9115 -#153 := (~ #85 #85)
5.9116 -#167 := (~ #80 #80)
5.9117 -#168 := [refl]: #167
5.9118 -#134 := [nnf-pos #168]: #153
5.9119 -#14 := (= #13 #10)
5.9120 -#11 := (<= 0::int #10)
5.9121 -#15 := (implies #11 #14)
5.9122 -#16 := (forall (vars (?x2 int)) #15)
5.9123 -#88 := (iff #16 #85)
5.9124 -#62 := (not #11)
5.9125 -#63 := (or #62 #55)
5.9126 -#68 := (forall (vars (?x2 int)) #63)
5.9127 -#86 := (iff #68 #85)
5.9128 -#83 := (iff #63 #80)
5.9129 -#77 := (or #74 #55)
5.9130 -#81 := (iff #77 #80)
5.9131 -#82 := [rewrite]: #81
5.9132 -#78 := (iff #63 #77)
5.9133 -#75 := (iff #62 #74)
5.9134 -#71 := (iff #11 #73)
5.9135 -#72 := [rewrite]: #71
5.9136 -#76 := [monotonicity #72]: #75
5.9137 -#79 := [monotonicity #76]: #78
5.9138 -#84 := [trans #79 #82]: #83
5.9139 -#87 := [quant-intro #84]: #86
5.9140 -#69 := (iff #16 #68)
5.9141 -#66 := (iff #15 #63)
5.9142 -#59 := (implies #11 #55)
5.9143 -#64 := (iff #59 #63)
5.9144 -#65 := [rewrite]: #64
5.9145 -#60 := (iff #15 #59)
5.9146 -#57 := (iff #14 #55)
5.9147 -#58 := [rewrite]: #57
5.9148 -#61 := [monotonicity #58]: #60
5.9149 -#67 := [trans #61 #65]: #66
5.9150 -#70 := [quant-intro #67]: #69
5.9151 -#89 := [trans #70 #87]: #88
5.9152 -#54 := [asserted]: #16
5.9153 -#90 := [mp #54 #89]: #85
5.9154 -#169 := [mp~ #90 #134]: #85
5.9155 -#654 := [mp #169 #653]: #649
5.9156 -#615 := (not #649)
5.9157 -#277 := (or #615 #637 #421)
5.9158 -#243 := (not #315)
5.9159 -#317 := (= #26 #28)
5.9160 -#296 := (or #317 #243)
5.9161 -#278 := (or #615 #296)
5.9162 -#621 := (iff #278 #277)
5.9163 -#280 := (or #615 #293)
5.9164 -#619 := (iff #280 #277)
5.9165 -#620 := [rewrite]: #619
5.9166 -#617 := (iff #278 #280)
5.9167 -#631 := (iff #296 #293)
5.9168 -#639 := (or #421 #637)
5.9169 -#630 := (iff #639 #293)
5.9170 -#289 := [rewrite]: #630
5.9171 -#629 := (iff #296 #639)
5.9172 -#638 := (iff #243 #637)
5.9173 -#633 := [monotonicity #636]: #638
5.9174 -#628 := (iff #317 #421)
5.9175 -#301 := [rewrite]: #628
5.9176 -#288 := [monotonicity #301 #633]: #629
5.9177 -#273 := [trans #288 #289]: #631
5.9178 -#618 := [monotonicity #273]: #617
5.9179 -#616 := [trans #618 #620]: #621
5.9180 -#279 := [quant-inst]: #278
5.9181 -#622 := [mp #279 #616]: #277
5.9182 -#595 := [unit-resolution #622 #654]: #293
5.9183 -#596 := [unit-resolution #595 #606]: #421
5.9184 -#597 := (not #421)
5.9185 -#592 := (or #597 #623)
5.9186 -#593 := [th-lemma]: #592
5.9187 -#598 := [unit-resolution #593 #596]: #623
5.9188 -[th-lemma #152 #598 #139]: false
5.9189 -unsat
5.9190 -60689c41168db239dbf5f3a98d5f2bce0fef9e02 367 0
5.9191 -#2 := false
5.9192 -#9 := 0::int
5.9193 -decl uf_2 :: (-> T1 int)
5.9194 -decl uf_3 :: T1
5.9195 -#22 := uf_3
5.9196 -#23 := (uf_2 uf_3)
5.9197 -#469 := (= #23 0::int)
5.9198 -decl uf_1 :: (-> int T1)
5.9199 -#251 := (uf_1 #23)
5.9200 -#557 := (uf_2 #251)
5.9201 -#558 := (= #557 0::int)
5.9202 -#556 := (>= #23 0::int)
5.9203 -#477 := (not #556)
5.9204 -#144 := -1::int
5.9205 -#348 := (>= #23 -1::int)
5.9206 -#628 := (not #348)
5.9207 -#21 := 1::int
5.9208 -#24 := (+ 1::int #23)
5.9209 -#25 := (uf_1 #24)
5.9210 -#26 := (uf_2 #25)
5.9211 -#635 := (* -1::int #26)
5.9212 -#632 := (+ #23 #635)
5.9213 -#636 := (= #632 -1::int)
5.9214 -#471 := (not #636)
5.9215 -#606 := (<= #632 -1::int)
5.9216 -#527 := (not #606)
5.9217 -#145 := (* -1::int #23)
5.9218 -#146 := (+ #145 #26)
5.9219 -#149 := (uf_1 #146)
5.9220 -#152 := (uf_2 #149)
5.9221 -#504 := (+ #635 #152)
5.9222 -#505 := (+ #23 #504)
5.9223 -#573 := (>= #505 0::int)
5.9224 -#502 := (= #505 0::int)
5.9225 -#595 := (<= #632 0::int)
5.9226 -#526 := [hypothesis]: #606
5.9227 -#514 := (or #527 #595)
5.9228 -#515 := [th-lemma]: #514
5.9229 -#510 := [unit-resolution #515 #526]: #595
5.9230 -#588 := (not #595)
5.9231 -#579 := (or #502 #588)
5.9232 -#10 := (:var 0 int)
5.9233 -#12 := (uf_1 #10)
5.9234 -#672 := (pattern #12)
5.9235 -#76 := (>= #10 0::int)
5.9236 -#77 := (not #76)
5.9237 -#13 := (uf_2 #12)
5.9238 -#58 := (= #10 #13)
5.9239 -#83 := (or #58 #77)
5.9240 -#673 := (forall (vars (?x2 int)) (:pat #672) #83)
5.9241 -#88 := (forall (vars (?x2 int)) #83)
5.9242 -#676 := (iff #88 #673)
5.9243 -#674 := (iff #83 #83)
5.9244 -#675 := [refl]: #674
5.9245 -#677 := [quant-intro #675]: #676
5.9246 -#179 := (~ #88 #88)
5.9247 -#191 := (~ #83 #83)
5.9248 -#192 := [refl]: #191
5.9249 -#177 := [nnf-pos #192]: #179
5.9250 -#14 := (= #13 #10)
5.9251 -#11 := (<= 0::int #10)
5.9252 -#15 := (implies #11 #14)
5.9253 -#16 := (forall (vars (?x2 int)) #15)
5.9254 -#91 := (iff #16 #88)
5.9255 -#65 := (not #11)
5.9256 -#66 := (or #65 #58)
5.9257 -#71 := (forall (vars (?x2 int)) #66)
5.9258 -#89 := (iff #71 #88)
5.9259 -#86 := (iff #66 #83)
5.9260 -#80 := (or #77 #58)
5.9261 -#84 := (iff #80 #83)
5.9262 -#85 := [rewrite]: #84
5.9263 -#81 := (iff #66 #80)
5.9264 -#78 := (iff #65 #77)
5.9265 -#74 := (iff #11 #76)
5.9266 -#75 := [rewrite]: #74
5.9267 -#79 := [monotonicity #75]: #78
5.9268 -#82 := [monotonicity #79]: #81
5.9269 -#87 := [trans #82 #85]: #86
5.9270 -#90 := [quant-intro #87]: #89
5.9271 -#72 := (iff #16 #71)
5.9272 -#69 := (iff #15 #66)
5.9273 -#62 := (implies #11 #58)
5.9274 -#67 := (iff #62 #66)
5.9275 -#68 := [rewrite]: #67
5.9276 -#63 := (iff #15 #62)
5.9277 -#60 := (iff #14 #58)
5.9278 -#61 := [rewrite]: #60
5.9279 -#64 := [monotonicity #61]: #63
5.9280 -#70 := [trans #64 #68]: #69
5.9281 -#73 := [quant-intro #70]: #72
5.9282 -#92 := [trans #73 #90]: #91
5.9283 -#57 := [asserted]: #16
5.9284 -#93 := [mp #57 #92]: #88
5.9285 -#193 := [mp~ #93 #177]: #88
5.9286 -#678 := [mp #193 #677]: #673
5.9287 -#644 := (not #673)
5.9288 -#591 := (or #644 #502 #588)
5.9289 -#499 := (>= #146 0::int)
5.9290 -#500 := (not #499)
5.9291 -#493 := (= #146 #152)
5.9292 -#501 := (or #493 #500)
5.9293 -#587 := (or #644 #501)
5.9294 -#585 := (iff #587 #591)
5.9295 -#581 := (or #644 #579)
5.9296 -#584 := (iff #581 #591)
5.9297 -#578 := [rewrite]: #584
5.9298 -#582 := (iff #587 #581)
5.9299 -#589 := (iff #501 #579)
5.9300 -#580 := (iff #500 #588)
5.9301 -#599 := (iff #499 #595)
5.9302 -#586 := [rewrite]: #599
5.9303 -#577 := [monotonicity #586]: #580
5.9304 -#503 := (iff #493 #502)
5.9305 -#598 := [rewrite]: #503
5.9306 -#590 := [monotonicity #598 #577]: #589
5.9307 -#583 := [monotonicity #590]: #582
5.9308 -#569 := [trans #583 #578]: #585
5.9309 -#592 := [quant-inst]: #587
5.9310 -#570 := [mp #592 #569]: #591
5.9311 -#516 := [unit-resolution #570 #678]: #579
5.9312 -#484 := [unit-resolution #516 #510]: #502
5.9313 -#491 := (not #502)
5.9314 -#450 := (or #491 #573)
5.9315 -#481 := [th-lemma]: #450
5.9316 -#483 := [unit-resolution #481 #484]: #573
5.9317 -#554 := (<= #152 0::int)
5.9318 -#163 := (* -1::int #152)
5.9319 -#138 := (uf_1 0::int)
5.9320 -#141 := (uf_2 #138)
5.9321 -#164 := (+ #141 #163)
5.9322 -#162 := (>= #164 0::int)
5.9323 -#30 := (- #26 #23)
5.9324 -#31 := (uf_1 #30)
5.9325 -#32 := (uf_2 #31)
5.9326 -#27 := (* 0::int #26)
5.9327 -#28 := (uf_1 #27)
5.9328 -#29 := (uf_2 #28)
5.9329 -#33 := (< #29 #32)
5.9330 -#34 := (not #33)
5.9331 -#174 := (iff #34 #162)
5.9332 -#155 := (< #141 #152)
5.9333 -#158 := (not #155)
5.9334 -#172 := (iff #158 #162)
5.9335 -#161 := (not #162)
5.9336 -#167 := (not #161)
5.9337 -#170 := (iff #167 #162)
5.9338 -#171 := [rewrite]: #170
5.9339 -#168 := (iff #158 #167)
5.9340 -#165 := (iff #155 #161)
5.9341 -#166 := [rewrite]: #165
5.9342 -#169 := [monotonicity #166]: #168
5.9343 -#173 := [trans #169 #171]: #172
5.9344 -#159 := (iff #34 #158)
5.9345 -#156 := (iff #33 #155)
5.9346 -#153 := (= #32 #152)
5.9347 -#150 := (= #31 #149)
5.9348 -#147 := (= #30 #146)
5.9349 -#148 := [rewrite]: #147
5.9350 -#151 := [monotonicity #148]: #150
5.9351 -#154 := [monotonicity #151]: #153
5.9352 -#142 := (= #29 #141)
5.9353 -#139 := (= #28 #138)
5.9354 -#136 := (= #27 0::int)
5.9355 -#137 := [rewrite]: #136
5.9356 -#140 := [monotonicity #137]: #139
5.9357 -#143 := [monotonicity #140]: #142
5.9358 -#157 := [monotonicity #143 #154]: #156
5.9359 -#160 := [monotonicity #157]: #159
5.9360 -#175 := [trans #160 #173]: #174
5.9361 -#135 := [asserted]: #34
5.9362 -#176 := [mp #135 #175]: #162
5.9363 -#648 := (<= #141 0::int)
5.9364 -#662 := (= #141 0::int)
5.9365 -#645 := (or #644 #662)
5.9366 -#445 := (>= 0::int 0::int)
5.9367 -#652 := (not #445)
5.9368 -#659 := (= 0::int #141)
5.9369 -#660 := (or #659 #652)
5.9370 -#640 := (or #644 #660)
5.9371 -#284 := (iff #640 #645)
5.9372 -#649 := (iff #645 #645)
5.9373 -#289 := [rewrite]: #649
5.9374 -#642 := (iff #660 #662)
5.9375 -#302 := (or #662 false)
5.9376 -#305 := (iff #302 #662)
5.9377 -#641 := [rewrite]: #305
5.9378 -#303 := (iff #660 #302)
5.9379 -#298 := (iff #652 false)
5.9380 -#1 := true
5.9381 -#313 := (not true)
5.9382 -#314 := (iff #313 false)
5.9383 -#655 := [rewrite]: #314
5.9384 -#318 := (iff #652 #313)
5.9385 -#663 := (iff #445 true)
5.9386 -#653 := [rewrite]: #663
5.9387 -#654 := [monotonicity #653]: #318
5.9388 -#639 := [trans #654 #655]: #298
5.9389 -#661 := (iff #659 #662)
5.9390 -#657 := [rewrite]: #661
5.9391 -#304 := [monotonicity #657 #639]: #303
5.9392 -#643 := [trans #304 #641]: #642
5.9393 -#647 := [monotonicity #643]: #284
5.9394 -#290 := [trans #647 #289]: #284
5.9395 -#646 := [quant-inst]: #640
5.9396 -#650 := [mp #646 #290]: #645
5.9397 -#485 := [unit-resolution #650 #678]: #662
5.9398 -#492 := (not #662)
5.9399 -#494 := (or #492 #648)
5.9400 -#495 := [th-lemma]: #494
5.9401 -#496 := [unit-resolution #495 #485]: #648
5.9402 -#506 := (not #648)
5.9403 -#486 := (or #554 #506 #161)
5.9404 -#507 := [th-lemma]: #486
5.9405 -#462 := [unit-resolution #507 #496 #176]: #554
5.9406 -#463 := [th-lemma #462 #526 #483]: false
5.9407 -#468 := [lemma #463]: #527
5.9408 -#472 := (or #471 #606)
5.9409 -#473 := [th-lemma]: #472
5.9410 -#474 := [unit-resolution #473 #468]: #471
5.9411 -#619 := (or #628 #636)
5.9412 -#622 := (or #644 #628 #636)
5.9413 -#634 := (>= #24 0::int)
5.9414 -#356 := (not #634)
5.9415 -#357 := (= #24 #26)
5.9416 -#631 := (or #357 #356)
5.9417 -#623 := (or #644 #631)
5.9418 -#610 := (iff #623 #622)
5.9419 -#624 := (or #644 #619)
5.9420 -#467 := (iff #624 #622)
5.9421 -#609 := [rewrite]: #467
5.9422 -#465 := (iff #623 #624)
5.9423 -#616 := (iff #631 #619)
5.9424 -#629 := (or #636 #628)
5.9425 -#620 := (iff #629 #619)
5.9426 -#621 := [rewrite]: #620
5.9427 -#626 := (iff #631 #629)
5.9428 -#343 := (iff #356 #628)
5.9429 -#349 := (iff #634 #348)
5.9430 -#627 := [rewrite]: #349
5.9431 -#625 := [monotonicity #627]: #343
5.9432 -#346 := (iff #357 #636)
5.9433 -#347 := [rewrite]: #346
5.9434 -#630 := [monotonicity #347 #625]: #626
5.9435 -#617 := [trans #630 #621]: #616
5.9436 -#466 := [monotonicity #617]: #465
5.9437 -#611 := [trans #466 #609]: #610
5.9438 -#618 := [quant-inst]: #623
5.9439 -#612 := [mp #618 #611]: #622
5.9440 -#475 := [unit-resolution #612 #678]: #619
5.9441 -#476 := [unit-resolution #475 #474]: #628
5.9442 -#478 := (or #477 #348)
5.9443 -#479 := [th-lemma]: #478
5.9444 -#464 := [unit-resolution #479 #476]: #477
5.9445 -#560 := (or #556 #558)
5.9446 -#18 := (= #13 0::int)
5.9447 -#124 := (or #18 #76)
5.9448 -#679 := (forall (vars (?x3 int)) (:pat #672) #124)
5.9449 -#129 := (forall (vars (?x3 int)) #124)
5.9450 -#682 := (iff #129 #679)
5.9451 -#680 := (iff #124 #124)
5.9452 -#681 := [refl]: #680
5.9453 -#683 := [quant-intro #681]: #682
5.9454 -#180 := (~ #129 #129)
5.9455 -#194 := (~ #124 #124)
5.9456 -#195 := [refl]: #194
5.9457 -#181 := [nnf-pos #195]: #180
5.9458 -#17 := (< #10 0::int)
5.9459 -#19 := (implies #17 #18)
5.9460 -#20 := (forall (vars (?x3 int)) #19)
5.9461 -#132 := (iff #20 #129)
5.9462 -#95 := (= 0::int #13)
5.9463 -#101 := (not #17)
5.9464 -#102 := (or #101 #95)
5.9465 -#107 := (forall (vars (?x3 int)) #102)
5.9466 -#130 := (iff #107 #129)
5.9467 -#127 := (iff #102 #124)
5.9468 -#121 := (or #76 #18)
5.9469 -#125 := (iff #121 #124)
5.9470 -#126 := [rewrite]: #125
5.9471 -#122 := (iff #102 #121)
5.9472 -#119 := (iff #95 #18)
5.9473 -#120 := [rewrite]: #119
5.9474 -#117 := (iff #101 #76)
5.9475 -#112 := (not #77)
5.9476 -#115 := (iff #112 #76)
5.9477 -#116 := [rewrite]: #115
5.9478 -#113 := (iff #101 #112)
5.9479 -#110 := (iff #17 #77)
5.9480 -#111 := [rewrite]: #110
5.9481 -#114 := [monotonicity #111]: #113
5.9482 -#118 := [trans #114 #116]: #117
5.9483 -#123 := [monotonicity #118 #120]: #122
5.9484 -#128 := [trans #123 #126]: #127
5.9485 -#131 := [quant-intro #128]: #130
5.9486 -#108 := (iff #20 #107)
5.9487 -#105 := (iff #19 #102)
5.9488 -#98 := (implies #17 #95)
5.9489 -#103 := (iff #98 #102)
5.9490 -#104 := [rewrite]: #103
5.9491 -#99 := (iff #19 #98)
5.9492 -#96 := (iff #18 #95)
5.9493 -#97 := [rewrite]: #96
5.9494 -#100 := [monotonicity #97]: #99
5.9495 -#106 := [trans #100 #104]: #105
5.9496 -#109 := [quant-intro #106]: #108
5.9497 -#133 := [trans #109 #131]: #132
5.9498 -#94 := [asserted]: #20
5.9499 -#134 := [mp #94 #133]: #129
5.9500 -#196 := [mp~ #134 #181]: #129
5.9501 -#684 := [mp #196 #683]: #679
5.9502 -#604 := (not #679)
5.9503 -#539 := (or #604 #556 #558)
5.9504 -#559 := (or #558 #556)
5.9505 -#540 := (or #604 #559)
5.9506 -#547 := (iff #540 #539)
5.9507 -#543 := (or #604 #560)
5.9508 -#546 := (iff #543 #539)
5.9509 -#541 := [rewrite]: #546
5.9510 -#544 := (iff #540 #543)
5.9511 -#550 := (iff #559 #560)
5.9512 -#561 := [rewrite]: #550
5.9513 -#545 := [monotonicity #561]: #544
5.9514 -#533 := [trans #545 #541]: #547
5.9515 -#542 := [quant-inst]: #540
5.9516 -#529 := [mp #542 #533]: #539
5.9517 -#480 := [unit-resolution #529 #684]: #560
5.9518 -#441 := [unit-resolution #480 #464]: #558
5.9519 -#449 := (= #23 #557)
5.9520 -#336 := (= uf_3 #251)
5.9521 -#4 := (:var 0 T1)
5.9522 -#5 := (uf_2 #4)
5.9523 -#664 := (pattern #5)
5.9524 -#6 := (uf_1 #5)
5.9525 -#51 := (= #4 #6)
5.9526 -#665 := (forall (vars (?x1 T1)) (:pat #664) #51)
5.9527 -#54 := (forall (vars (?x1 T1)) #51)
5.9528 -#666 := (iff #54 #665)
5.9529 -#668 := (iff #665 #665)
5.9530 -#669 := [rewrite]: #668
5.9531 -#667 := [rewrite]: #666
5.9532 -#670 := [trans #667 #669]: #666
5.9533 -#188 := (~ #54 #54)
5.9534 -#186 := (~ #51 #51)
5.9535 -#187 := [refl]: #186
5.9536 -#189 := [nnf-pos #187]: #188
5.9537 -#7 := (= #6 #4)
5.9538 -#8 := (forall (vars (?x1 T1)) #7)
5.9539 -#55 := (iff #8 #54)
5.9540 -#52 := (iff #7 #51)
5.9541 -#53 := [rewrite]: #52
5.9542 -#56 := [quant-intro #53]: #55
5.9543 -#50 := [asserted]: #8
5.9544 -#59 := [mp #50 #56]: #54
5.9545 -#190 := [mp~ #59 #189]: #54
5.9546 -#671 := [mp #190 #670]: #665
5.9547 -#337 := (not #665)
5.9548 -#338 := (or #337 #336)
5.9549 -#342 := [quant-inst]: #338
5.9550 -#442 := [unit-resolution #342 #671]: #336
5.9551 -#451 := [monotonicity #442]: #449
5.9552 -#452 := [trans #451 #441]: #469
5.9553 -#453 := (not #469)
5.9554 -#455 := (or #453 #556)
5.9555 -#456 := [th-lemma]: #455
5.9556 -[unit-resolution #456 #464 #452]: false
5.9557 -unsat
5.9558 -94b7ba760bb9dd467688fc28632e0ae8f6f51951 302 0
5.9559 -#2 := false
5.9560 -#9 := 0::int
5.9561 -decl uf_2 :: (-> T1 int)
5.9562 -decl uf_1 :: (-> int T1)
5.9563 -decl uf_3 :: T1
5.9564 -#22 := uf_3
5.9565 -#23 := (uf_2 uf_3)
5.9566 -#21 := 1::int
5.9567 -#24 := (+ 1::int #23)
5.9568 -#25 := (uf_1 #24)
5.9569 -#26 := (uf_2 #25)
5.9570 -#138 := -1::int
5.9571 -#139 := (+ -1::int #26)
5.9572 -#142 := (uf_1 #139)
5.9573 -#289 := (uf_2 #142)
5.9574 -#674 := (* -1::int #289)
5.9575 -#538 := (+ #23 #674)
5.9576 -#532 := (>= #538 0::int)
5.9577 -#536 := (= #23 #289)
5.9578 -#148 := (= uf_3 #142)
5.9579 -#167 := (<= #26 0::int)
5.9580 -#168 := (not #167)
5.9581 -#174 := (iff #148 #168)
5.9582 -#189 := (not #174)
5.9583 -#220 := (iff #189 #148)
5.9584 -#210 := (not #148)
5.9585 -#215 := (not #210)
5.9586 -#218 := (iff #215 #148)
5.9587 -#219 := [rewrite]: #218
5.9588 -#216 := (iff #189 #215)
5.9589 -#213 := (iff #174 #210)
5.9590 -#207 := (iff #148 false)
5.9591 -#211 := (iff #207 #210)
5.9592 -#212 := [rewrite]: #211
5.9593 -#208 := (iff #174 #207)
5.9594 -#205 := (iff #168 false)
5.9595 -#1 := true
5.9596 -#200 := (not true)
5.9597 -#203 := (iff #200 false)
5.9598 -#204 := [rewrite]: #203
5.9599 -#201 := (iff #168 #200)
5.9600 -#198 := (iff #167 true)
5.9601 -#179 := (or #168 #174)
5.9602 -#182 := (not #179)
5.9603 -#27 := (< 0::int #26)
5.9604 -#28 := (ite #27 true false)
5.9605 -#29 := (- #26 1::int)
5.9606 -#30 := (uf_1 #29)
5.9607 -#31 := (= #30 uf_3)
5.9608 -#32 := (iff #28 #31)
5.9609 -#33 := (or #32 #28)
5.9610 -#34 := (not #33)
5.9611 -#185 := (iff #34 #182)
5.9612 -#153 := (iff #27 #148)
5.9613 -#159 := (or #27 #153)
5.9614 -#164 := (not #159)
5.9615 -#183 := (iff #164 #182)
5.9616 -#180 := (iff #159 #179)
5.9617 -#177 := (iff #153 #174)
5.9618 -#171 := (iff #168 #148)
5.9619 -#175 := (iff #171 #174)
5.9620 -#176 := [rewrite]: #175
5.9621 -#172 := (iff #153 #171)
5.9622 -#169 := (iff #27 #168)
5.9623 -#170 := [rewrite]: #169
5.9624 -#173 := [monotonicity #170]: #172
5.9625 -#178 := [trans #173 #176]: #177
5.9626 -#181 := [monotonicity #170 #178]: #180
5.9627 -#184 := [monotonicity #181]: #183
5.9628 -#165 := (iff #34 #164)
5.9629 -#162 := (iff #33 #159)
5.9630 -#156 := (or #153 #27)
5.9631 -#160 := (iff #156 #159)
5.9632 -#161 := [rewrite]: #160
5.9633 -#157 := (iff #33 #156)
5.9634 -#136 := (iff #28 #27)
5.9635 -#137 := [rewrite]: #136
5.9636 -#154 := (iff #32 #153)
5.9637 -#151 := (iff #31 #148)
5.9638 -#145 := (= #142 uf_3)
5.9639 -#149 := (iff #145 #148)
5.9640 -#150 := [rewrite]: #149
5.9641 -#146 := (iff #31 #145)
5.9642 -#143 := (= #30 #142)
5.9643 -#140 := (= #29 #139)
5.9644 -#141 := [rewrite]: #140
5.9645 -#144 := [monotonicity #141]: #143
5.9646 -#147 := [monotonicity #144]: #146
5.9647 -#152 := [trans #147 #150]: #151
5.9648 -#155 := [monotonicity #137 #152]: #154
5.9649 -#158 := [monotonicity #155 #137]: #157
5.9650 -#163 := [trans #158 #161]: #162
5.9651 -#166 := [monotonicity #163]: #165
5.9652 -#186 := [trans #166 #184]: #185
5.9653 -#135 := [asserted]: #34
5.9654 -#187 := [mp #135 #186]: #182
5.9655 -#188 := [not-or-elim #187]: #167
5.9656 -#199 := [iff-true #188]: #198
5.9657 -#202 := [monotonicity #199]: #201
5.9658 -#206 := [trans #202 #204]: #205
5.9659 -#209 := [monotonicity #206]: #208
5.9660 -#214 := [trans #209 #212]: #213
5.9661 -#217 := [monotonicity #214]: #216
5.9662 -#221 := [trans #217 #219]: #220
5.9663 -#190 := [not-or-elim #187]: #189
5.9664 -#222 := [mp #190 #221]: #148
5.9665 -#543 := [monotonicity #222]: #536
5.9666 -#544 := (not #536)
5.9667 -#616 := (or #544 #532)
5.9668 -#618 := [th-lemma]: #616
5.9669 -#628 := [unit-resolution #618 #543]: #532
5.9670 -#354 := (* -1::int #26)
5.9671 -#484 := (+ #23 #354)
5.9672 -#683 := (<= #484 -1::int)
5.9673 -#691 := (= #484 -1::int)
5.9674 -#698 := (>= #23 -1::int)
5.9675 -#521 := (>= #289 0::int)
5.9676 -#652 := (= #289 0::int)
5.9677 -#387 := (>= #26 1::int)
5.9678 -#667 := (not #387)
5.9679 -#629 := (or #667 #168)
5.9680 -#630 := [th-lemma]: #629
5.9681 -#626 := [unit-resolution #630 #188]: #667
5.9682 -#10 := (:var 0 int)
5.9683 -#12 := (uf_1 #10)
5.9684 -#711 := (pattern #12)
5.9685 -#76 := (>= #10 0::int)
5.9686 -#13 := (uf_2 #12)
5.9687 -#18 := (= #13 0::int)
5.9688 -#124 := (or #18 #76)
5.9689 -#718 := (forall (vars (?x3 int)) (:pat #711) #124)
5.9690 -#129 := (forall (vars (?x3 int)) #124)
5.9691 -#721 := (iff #129 #718)
5.9692 -#719 := (iff #124 #124)
5.9693 -#720 := [refl]: #719
5.9694 -#722 := [quant-intro #720]: #721
5.9695 -#229 := (~ #129 #129)
5.9696 -#227 := (~ #124 #124)
5.9697 -#228 := [refl]: #227
5.9698 -#230 := [nnf-pos #228]: #229
5.9699 -#17 := (< #10 0::int)
5.9700 -#19 := (implies #17 #18)
5.9701 -#20 := (forall (vars (?x3 int)) #19)
5.9702 -#132 := (iff #20 #129)
5.9703 -#95 := (= 0::int #13)
5.9704 -#101 := (not #17)
5.9705 -#102 := (or #101 #95)
5.9706 -#107 := (forall (vars (?x3 int)) #102)
5.9707 -#130 := (iff #107 #129)
5.9708 -#127 := (iff #102 #124)
5.9709 -#121 := (or #76 #18)
5.9710 -#125 := (iff #121 #124)
5.9711 -#126 := [rewrite]: #125
5.9712 -#122 := (iff #102 #121)
5.9713 -#119 := (iff #95 #18)
5.9714 -#120 := [rewrite]: #119
5.9715 -#117 := (iff #101 #76)
5.9716 -#77 := (not #76)
5.9717 -#112 := (not #77)
5.9718 -#115 := (iff #112 #76)
5.9719 -#116 := [rewrite]: #115
5.9720 -#113 := (iff #101 #112)
5.9721 -#110 := (iff #17 #77)
5.9722 -#111 := [rewrite]: #110
5.9723 -#114 := [monotonicity #111]: #113
5.9724 -#118 := [trans #114 #116]: #117
5.9725 -#123 := [monotonicity #118 #120]: #122
5.9726 -#128 := [trans #123 #126]: #127
5.9727 -#131 := [quant-intro #128]: #130
5.9728 -#108 := (iff #20 #107)
5.9729 -#105 := (iff #19 #102)
5.9730 -#98 := (implies #17 #95)
5.9731 -#103 := (iff #98 #102)
5.9732 -#104 := [rewrite]: #103
5.9733 -#99 := (iff #19 #98)
5.9734 -#96 := (iff #18 #95)
5.9735 -#97 := [rewrite]: #96
5.9736 -#100 := [monotonicity #97]: #99
5.9737 -#106 := [trans #100 #104]: #105
5.9738 -#109 := [quant-intro #106]: #108
5.9739 -#133 := [trans #109 #131]: #132
5.9740 -#94 := [asserted]: #20
5.9741 -#134 := [mp #94 #133]: #129
5.9742 -#231 := [mp~ #134 #230]: #129
5.9743 -#723 := [mp #231 #722]: #718
5.9744 -#328 := (not #718)
5.9745 -#643 := (or #328 #387 #652)
5.9746 -#673 := (>= #139 0::int)
5.9747 -#653 := (or #652 #673)
5.9748 -#641 := (or #328 #653)
5.9749 -#537 := (iff #641 #643)
5.9750 -#485 := (or #387 #652)
5.9751 -#526 := (or #328 #485)
5.9752 -#487 := (iff #526 #643)
5.9753 -#635 := [rewrite]: #487
5.9754 -#527 := (iff #641 #526)
5.9755 -#640 := (iff #653 #485)
5.9756 -#647 := (or #652 #387)
5.9757 -#486 := (iff #647 #485)
5.9758 -#639 := [rewrite]: #486
5.9759 -#654 := (iff #653 #647)
5.9760 -#388 := (iff #673 #387)
5.9761 -#666 := [rewrite]: #388
5.9762 -#483 := [monotonicity #666]: #654
5.9763 -#642 := [trans #483 #639]: #640
5.9764 -#528 := [monotonicity #642]: #527
5.9765 -#632 := [trans #528 #635]: #537
5.9766 -#644 := [quant-inst]: #641
5.9767 -#633 := [mp #644 #632]: #643
5.9768 -#631 := [unit-resolution #633 #723 #626]: #652
5.9769 -#620 := (not #652)
5.9770 -#621 := (or #620 #521)
5.9771 -#622 := [th-lemma]: #621
5.9772 -#623 := [unit-resolution #622 #631]: #521
5.9773 -#624 := (not #532)
5.9774 -#617 := (not #521)
5.9775 -#608 := (or #698 #617 #624)
5.9776 -#609 := [th-lemma]: #608
5.9777 -#611 := [unit-resolution #609 #623 #628]: #698
5.9778 -#701 := (not #698)
5.9779 -#692 := (or #691 #701)
5.9780 -#58 := (= #10 #13)
5.9781 -#83 := (or #58 #77)
5.9782 -#712 := (forall (vars (?x2 int)) (:pat #711) #83)
5.9783 -#88 := (forall (vars (?x2 int)) #83)
5.9784 -#715 := (iff #88 #712)
5.9785 -#713 := (iff #83 #83)
5.9786 -#714 := [refl]: #713
5.9787 -#716 := [quant-intro #714]: #715
5.9788 -#191 := (~ #88 #88)
5.9789 -#195 := (~ #83 #83)
5.9790 -#193 := [refl]: #195
5.9791 -#225 := [nnf-pos #193]: #191
5.9792 -#14 := (= #13 #10)
5.9793 -#11 := (<= 0::int #10)
5.9794 -#15 := (implies #11 #14)
5.9795 -#16 := (forall (vars (?x2 int)) #15)
5.9796 -#91 := (iff #16 #88)
5.9797 -#65 := (not #11)
5.9798 -#66 := (or #65 #58)
5.9799 -#71 := (forall (vars (?x2 int)) #66)
5.9800 -#89 := (iff #71 #88)
5.9801 -#86 := (iff #66 #83)
5.9802 -#80 := (or #77 #58)
5.9803 -#84 := (iff #80 #83)
5.9804 -#85 := [rewrite]: #84
5.9805 -#81 := (iff #66 #80)
5.9806 -#78 := (iff #65 #77)
5.9807 -#74 := (iff #11 #76)
5.9808 -#75 := [rewrite]: #74
5.9809 -#79 := [monotonicity #75]: #78
5.9810 -#82 := [monotonicity #79]: #81
5.9811 -#87 := [trans #82 #85]: #86
5.9812 -#90 := [quant-intro #87]: #89
5.9813 -#72 := (iff #16 #71)
5.9814 -#69 := (iff #15 #66)
5.9815 -#62 := (implies #11 #58)
5.9816 -#67 := (iff #62 #66)
5.9817 -#68 := [rewrite]: #67
5.9818 -#63 := (iff #15 #62)
5.9819 -#60 := (iff #14 #58)
5.9820 -#61 := [rewrite]: #60
5.9821 -#64 := [monotonicity #61]: #63
5.9822 -#70 := [trans #64 #68]: #69
5.9823 -#73 := [quant-intro #70]: #72
5.9824 -#92 := [trans #73 #90]: #91
5.9825 -#57 := [asserted]: #16
5.9826 -#93 := [mp #57 #92]: #88
5.9827 -#226 := [mp~ #93 #225]: #88
5.9828 -#717 := [mp #226 #716]: #712
5.9829 -#693 := (not #712)
5.9830 -#353 := (or #693 #691 #701)
5.9831 -#380 := (>= #24 0::int)
5.9832 -#377 := (not #380)
5.9833 -#695 := (= #24 #26)
5.9834 -#697 := (or #695 #377)
5.9835 -#694 := (or #693 #697)
5.9836 -#680 := (iff #694 #353)
5.9837 -#678 := (or #693 #692)
5.9838 -#343 := (iff #678 #353)
5.9839 -#344 := [rewrite]: #343
5.9840 -#341 := (iff #694 #678)
5.9841 -#352 := (iff #697 #692)
5.9842 -#696 := (iff #377 #701)
5.9843 -#699 := (iff #380 #698)
5.9844 -#700 := [rewrite]: #699
5.9845 -#702 := [monotonicity #700]: #696
5.9846 -#365 := (iff #695 #691)
5.9847 -#366 := [rewrite]: #365
5.9848 -#357 := [monotonicity #366 #702]: #352
5.9849 -#342 := [monotonicity #357]: #341
5.9850 -#681 := [trans #342 #344]: #680
5.9851 -#337 := [quant-inst]: #694
5.9852 -#682 := [mp #337 #681]: #353
5.9853 -#612 := [unit-resolution #682 #717]: #692
5.9854 -#613 := [unit-resolution #612 #611]: #691
5.9855 -#614 := (not #691)
5.9856 -#610 := (or #614 #683)
5.9857 -#615 := [th-lemma]: #610
5.9858 -#601 := [unit-resolution #615 #613]: #683
5.9859 -[th-lemma #623 #188 #601 #628]: false
5.9860 -unsat
5.9861 -8d2fca14b1477934a0c7f4f6528bd3be029bba7b 458 0
5.9862 -#2 := false
5.9863 -#9 := 0::int
5.9864 -decl uf_2 :: (-> T1 int)
5.9865 -decl uf_1 :: (-> int T1)
5.9866 -decl uf_3 :: T1
5.9867 -#21 := uf_3
5.9868 -#22 := (uf_2 uf_3)
5.9869 -#23 := 1::int
5.9870 -#138 := (+ 1::int #22)
5.9871 -#141 := (uf_1 #138)
5.9872 -#297 := (uf_2 #141)
5.9873 -#357 := (= #297 0::int)
5.9874 -#166 := (uf_1 0::int)
5.9875 -#531 := (uf_2 #166)
5.9876 -#537 := (= #531 0::int)
5.9877 -#10 := (:var 0 int)
5.9878 -#12 := (uf_1 #10)
5.9879 -#672 := (pattern #12)
5.9880 -#78 := (>= #10 0::int)
5.9881 -#79 := (not #78)
5.9882 -#13 := (uf_2 #12)
5.9883 -#60 := (= #10 #13)
5.9884 -#85 := (or #60 #79)
5.9885 -#673 := (forall (vars (?x2 int)) (:pat #672) #85)
5.9886 -#90 := (forall (vars (?x2 int)) #85)
5.9887 -#676 := (iff #90 #673)
5.9888 -#674 := (iff #85 #85)
5.9889 -#675 := [refl]: #674
5.9890 -#677 := [quant-intro #675]: #676
5.9891 -#178 := (~ #90 #90)
5.9892 -#190 := (~ #85 #85)
5.9893 -#191 := [refl]: #190
5.9894 -#175 := [nnf-pos #191]: #178
5.9895 -#14 := (= #13 #10)
5.9896 -#11 := (<= 0::int #10)
5.9897 -#15 := (implies #11 #14)
5.9898 -#16 := (forall (vars (?x2 int)) #15)
5.9899 -#93 := (iff #16 #90)
5.9900 -#67 := (not #11)
5.9901 -#68 := (or #67 #60)
5.9902 -#73 := (forall (vars (?x2 int)) #68)
5.9903 -#91 := (iff #73 #90)
5.9904 -#88 := (iff #68 #85)
5.9905 -#82 := (or #79 #60)
5.9906 -#86 := (iff #82 #85)
5.9907 -#87 := [rewrite]: #86
5.9908 -#83 := (iff #68 #82)
5.9909 -#80 := (iff #67 #79)
5.9910 -#76 := (iff #11 #78)
5.9911 -#77 := [rewrite]: #76
5.9912 -#81 := [monotonicity #77]: #80
5.9913 -#84 := [monotonicity #81]: #83
5.9914 -#89 := [trans #84 #87]: #88
5.9915 -#92 := [quant-intro #89]: #91
5.9916 -#74 := (iff #16 #73)
5.9917 -#71 := (iff #15 #68)
5.9918 -#64 := (implies #11 #60)
5.9919 -#69 := (iff #64 #68)
5.9920 -#70 := [rewrite]: #69
5.9921 -#65 := (iff #15 #64)
5.9922 -#62 := (iff #14 #60)
5.9923 -#63 := [rewrite]: #62
5.9924 -#66 := [monotonicity #63]: #65
5.9925 -#72 := [trans #66 #70]: #71
5.9926 -#75 := [quant-intro #72]: #74
5.9927 -#94 := [trans #75 #92]: #93
5.9928 -#59 := [asserted]: #16
5.9929 -#95 := [mp #59 #94]: #90
5.9930 -#192 := [mp~ #95 #175]: #90
5.9931 -#678 := [mp #192 #677]: #673
5.9932 -#650 := (not #673)
5.9933 -#528 := (or #650 #537)
5.9934 -#529 := (>= 0::int 0::int)
5.9935 -#530 := (not #529)
5.9936 -#534 := (= 0::int #531)
5.9937 -#535 := (or #534 #530)
5.9938 -#508 := (or #650 #535)
5.9939 -#509 := (iff #508 #528)
5.9940 -#514 := (iff #528 #528)
5.9941 -#515 := [rewrite]: #514
5.9942 -#527 := (iff #535 #537)
5.9943 -#520 := (or #537 false)
5.9944 -#525 := (iff #520 #537)
5.9945 -#526 := [rewrite]: #525
5.9946 -#521 := (iff #535 #520)
5.9947 -#519 := (iff #530 false)
5.9948 -#1 := true
5.9949 -#512 := (not true)
5.9950 -#517 := (iff #512 false)
5.9951 -#518 := [rewrite]: #517
5.9952 -#513 := (iff #530 #512)
5.9953 -#538 := (iff #529 true)
5.9954 -#511 := [rewrite]: #538
5.9955 -#406 := [monotonicity #511]: #513
5.9956 -#524 := [trans #406 #518]: #519
5.9957 -#536 := (iff #534 #537)
5.9958 -#532 := [rewrite]: #536
5.9959 -#522 := [monotonicity #532 #524]: #521
5.9960 -#523 := [trans #522 #526]: #527
5.9961 -#490 := [monotonicity #523]: #509
5.9962 -#510 := [trans #490 #515]: #509
5.9963 -#454 := [quant-inst]: #508
5.9964 -#516 := [mp #454 #510]: #528
5.9965 -#394 := [unit-resolution #516 #678]: #537
5.9966 -#355 := (= #297 #531)
5.9967 -#250 := (= #141 #166)
5.9968 -#26 := 2::int
5.9969 -#144 := (* 2::int #22)
5.9970 -#147 := (uf_1 #144)
5.9971 -#150 := (uf_2 #147)
5.9972 -#30 := 3::int
5.9973 -#156 := (+ 3::int #150)
5.9974 -#161 := (uf_1 #156)
5.9975 -#336 := (= #161 #166)
5.9976 -#327 := (not #336)
5.9977 -#588 := (uf_2 #161)
5.9978 -#555 := (= #588 0::int)
5.9979 -#398 := (= #588 #531)
5.9980 -#395 := [hypothesis]: #336
5.9981 -#387 := [monotonicity #395]: #398
5.9982 -#399 := [trans #387 #394]: #555
5.9983 -#390 := (not #555)
5.9984 -#547 := (<= #588 0::int)
5.9985 -#403 := (not #547)
5.9986 -#595 := (>= #150 0::int)
5.9987 -#302 := -1::int
5.9988 -#618 := (* -1::int #150)
5.9989 -#624 := (+ #144 #618)
5.9990 -#488 := (<= #624 0::int)
5.9991 -#465 := (= #624 0::int)
5.9992 -#609 := (>= #22 0::int)
5.9993 -#442 := (= #22 0::int)
5.9994 -#660 := (uf_1 #22)
5.9995 -#495 := (uf_2 #660)
5.9996 -#496 := (= #495 0::int)
5.9997 -#612 := (not #609)
5.9998 -#451 := [hypothesis]: #612
5.9999 -#506 := (or #496 #609)
5.10000 -#18 := (= #13 0::int)
5.10001 -#126 := (or #18 #78)
5.10002 -#679 := (forall (vars (?x3 int)) (:pat #672) #126)
5.10003 -#131 := (forall (vars (?x3 int)) #126)
5.10004 -#682 := (iff #131 #679)
5.10005 -#680 := (iff #126 #126)
5.10006 -#681 := [refl]: #680
5.10007 -#683 := [quant-intro #681]: #682
5.10008 -#179 := (~ #131 #131)
5.10009 -#193 := (~ #126 #126)
5.10010 -#194 := [refl]: #193
5.10011 -#180 := [nnf-pos #194]: #179
5.10012 -#17 := (< #10 0::int)
5.10013 -#19 := (implies #17 #18)
5.10014 -#20 := (forall (vars (?x3 int)) #19)
5.10015 -#134 := (iff #20 #131)
5.10016 -#97 := (= 0::int #13)
5.10017 -#103 := (not #17)
5.10018 -#104 := (or #103 #97)
5.10019 -#109 := (forall (vars (?x3 int)) #104)
5.10020 -#132 := (iff #109 #131)
5.10021 -#129 := (iff #104 #126)
5.10022 -#123 := (or #78 #18)
5.10023 -#127 := (iff #123 #126)
5.10024 -#128 := [rewrite]: #127
5.10025 -#124 := (iff #104 #123)
5.10026 -#121 := (iff #97 #18)
5.10027 -#122 := [rewrite]: #121
5.10028 -#119 := (iff #103 #78)
5.10029 -#114 := (not #79)
5.10030 -#117 := (iff #114 #78)
5.10031 -#118 := [rewrite]: #117
5.10032 -#115 := (iff #103 #114)
5.10033 -#112 := (iff #17 #79)
5.10034 -#113 := [rewrite]: #112
5.10035 -#116 := [monotonicity #113]: #115
5.10036 -#120 := [trans #116 #118]: #119
5.10037 -#125 := [monotonicity #120 #122]: #124
5.10038 -#130 := [trans #125 #128]: #129
5.10039 -#133 := [quant-intro #130]: #132
5.10040 -#110 := (iff #20 #109)
5.10041 -#107 := (iff #19 #104)
5.10042 -#100 := (implies #17 #97)
5.10043 -#105 := (iff #100 #104)
5.10044 -#106 := [rewrite]: #105
5.10045 -#101 := (iff #19 #100)
5.10046 -#98 := (iff #18 #97)
5.10047 -#99 := [rewrite]: #98
5.10048 -#102 := [monotonicity #99]: #101
5.10049 -#108 := [trans #102 #106]: #107
5.10050 -#111 := [quant-intro #108]: #110
5.10051 -#135 := [trans #111 #133]: #134
5.10052 -#96 := [asserted]: #20
5.10053 -#136 := [mp #96 #135]: #131
5.10054 -#195 := [mp~ #136 #180]: #131
5.10055 -#684 := [mp #195 #683]: #679
5.10056 -#346 := (not #679)
5.10057 -#462 := (or #346 #496 #609)
5.10058 -#463 := (or #346 #506)
5.10059 -#469 := (iff #463 #462)
5.10060 -#470 := [rewrite]: #469
5.10061 -#468 := [quant-inst]: #463
5.10062 -#471 := [mp #468 #470]: #462
5.10063 -#452 := [unit-resolution #471 #684]: #506
5.10064 -#453 := [unit-resolution #452 #451]: #496
5.10065 -#456 := (= #22 #495)
5.10066 -#661 := (= uf_3 #660)
5.10067 -#4 := (:var 0 T1)
5.10068 -#5 := (uf_2 #4)
5.10069 -#664 := (pattern #5)
5.10070 -#6 := (uf_1 #5)
5.10071 -#53 := (= #4 #6)
5.10072 -#665 := (forall (vars (?x1 T1)) (:pat #664) #53)
5.10073 -#56 := (forall (vars (?x1 T1)) #53)
5.10074 -#666 := (iff #56 #665)
5.10075 -#668 := (iff #665 #665)
5.10076 -#669 := [rewrite]: #668
5.10077 -#667 := [rewrite]: #666
5.10078 -#670 := [trans #667 #669]: #666
5.10079 -#187 := (~ #56 #56)
5.10080 -#185 := (~ #53 #53)
5.10081 -#186 := [refl]: #185
5.10082 -#188 := [nnf-pos #186]: #187
5.10083 -#7 := (= #6 #4)
5.10084 -#8 := (forall (vars (?x1 T1)) #7)
5.10085 -#57 := (iff #8 #56)
5.10086 -#54 := (iff #7 #53)
5.10087 -#55 := [rewrite]: #54
5.10088 -#58 := [quant-intro #55]: #57
5.10089 -#52 := [asserted]: #8
5.10090 -#61 := [mp #52 #58]: #56
5.10091 -#189 := [mp~ #61 #188]: #56
5.10092 -#671 := [mp #189 #670]: #665
5.10093 -#663 := (not #665)
5.10094 -#653 := (or #663 #661)
5.10095 -#312 := [quant-inst]: #653
5.10096 -#455 := [unit-resolution #312 #671]: #661
5.10097 -#457 := [monotonicity #455]: #456
5.10098 -#458 := [trans #457 #453]: #442
5.10099 -#459 := (not #442)
5.10100 -#460 := (or #459 #609)
5.10101 -#443 := [th-lemma]: #460
5.10102 -#461 := [unit-resolution #443 #451 #458]: false
5.10103 -#431 := [lemma #461]: #609
5.10104 -#613 := (or #465 #612)
5.10105 -#615 := (or #650 #465 #612)
5.10106 -#616 := (>= #144 0::int)
5.10107 -#617 := (not #616)
5.10108 -#622 := (= #144 #150)
5.10109 -#623 := (or #622 #617)
5.10110 -#444 := (or #650 #623)
5.10111 -#602 := (iff #444 #615)
5.10112 -#447 := (or #650 #613)
5.10113 -#603 := (iff #447 #615)
5.10114 -#604 := [rewrite]: #603
5.10115 -#600 := (iff #444 #447)
5.10116 -#614 := (iff #623 #613)
5.10117 -#606 := (iff #617 #612)
5.10118 -#610 := (iff #616 #609)
5.10119 -#611 := [rewrite]: #610
5.10120 -#607 := [monotonicity #611]: #606
5.10121 -#466 := (iff #622 #465)
5.10122 -#467 := [rewrite]: #466
5.10123 -#608 := [monotonicity #467 #607]: #614
5.10124 -#601 := [monotonicity #608]: #600
5.10125 -#605 := [trans #601 #604]: #602
5.10126 -#446 := [quant-inst]: #444
5.10127 -#487 := [mp #446 #605]: #615
5.10128 -#439 := [unit-resolution #487 #678]: #613
5.10129 -#435 := [unit-resolution #439 #431]: #465
5.10130 -#440 := (not #465)
5.10131 -#419 := (or #440 #488)
5.10132 -#422 := [th-lemma]: #419
5.10133 -#426 := [unit-resolution #422 #435]: #488
5.10134 -#430 := (not #488)
5.10135 -#433 := (or #595 #612 #430)
5.10136 -#438 := [th-lemma]: #433
5.10137 -#402 := [unit-resolution #438 #431 #426]: #595
5.10138 -#590 := -3::int
5.10139 -#579 := (* -1::int #588)
5.10140 -#589 := (+ #150 #579)
5.10141 -#553 := (<= #589 -3::int)
5.10142 -#591 := (= #589 -3::int)
5.10143 -#581 := (>= #150 -3::int)
5.10144 -#644 := (>= #22 -1::int)
5.10145 -#428 := (or #612 #644)
5.10146 -#429 := [th-lemma]: #428
5.10147 -#427 := [unit-resolution #429 #431]: #644
5.10148 -#646 := (not #644)
5.10149 -#418 := (or #581 #646 #430)
5.10150 -#421 := [th-lemma]: #418
5.10151 -#423 := [unit-resolution #421 #426 #427]: #581
5.10152 -#584 := (not #581)
5.10153 -#573 := (or #584 #591)
5.10154 -#562 := (or #650 #584 #591)
5.10155 -#599 := (>= #156 0::int)
5.10156 -#586 := (not #599)
5.10157 -#580 := (= #156 #588)
5.10158 -#577 := (or #580 #586)
5.10159 -#563 := (or #650 #577)
5.10160 -#549 := (iff #563 #562)
5.10161 -#566 := (or #650 #573)
5.10162 -#568 := (iff #566 #562)
5.10163 -#548 := [rewrite]: #568
5.10164 -#567 := (iff #563 #566)
5.10165 -#571 := (iff #577 #573)
5.10166 -#569 := (or #591 #584)
5.10167 -#574 := (iff #569 #573)
5.10168 -#575 := [rewrite]: #574
5.10169 -#570 := (iff #577 #569)
5.10170 -#578 := (iff #586 #584)
5.10171 -#582 := (iff #599 #581)
5.10172 -#583 := [rewrite]: #582
5.10173 -#585 := [monotonicity #583]: #578
5.10174 -#587 := (iff #580 #591)
5.10175 -#592 := [rewrite]: #587
5.10176 -#572 := [monotonicity #592 #585]: #570
5.10177 -#576 := [trans #572 #575]: #571
5.10178 -#564 := [monotonicity #576]: #567
5.10179 -#551 := [trans #564 #548]: #549
5.10180 -#565 := [quant-inst]: #563
5.10181 -#552 := [mp #565 #551]: #562
5.10182 -#424 := [unit-resolution #552 #678]: #573
5.10183 -#420 := [unit-resolution #424 #423]: #591
5.10184 -#425 := (not #591)
5.10185 -#415 := (or #425 #553)
5.10186 -#405 := [th-lemma]: #415
5.10187 -#407 := [unit-resolution #405 #420]: #553
5.10188 -#404 := (not #553)
5.10189 -#401 := (not #595)
5.10190 -#386 := (or #403 #401 #404)
5.10191 -#388 := [th-lemma]: #386
5.10192 -#389 := [unit-resolution #388 #407 #402]: #403
5.10193 -#391 := (or #390 #547)
5.10194 -#392 := [th-lemma]: #391
5.10195 -#393 := [unit-resolution #392 #389]: #390
5.10196 -#376 := [unit-resolution #393 #399]: false
5.10197 -#378 := [lemma #376]: #327
5.10198 -#249 := (= #141 #161)
5.10199 -#334 := (not #249)
5.10200 -#396 := (= #297 #588)
5.10201 -#385 := [hypothesis]: #249
5.10202 -#370 := [monotonicity #385]: #396
5.10203 -#380 := (not #396)
5.10204 -#434 := (+ #297 #579)
5.10205 -#280 := (>= #434 0::int)
5.10206 -#414 := (not #280)
5.10207 -#303 := (* -1::int #297)
5.10208 -#304 := (+ #22 #303)
5.10209 -#356 := (>= #304 -1::int)
5.10210 -#641 := (= #304 -1::int)
5.10211 -#649 := (or #641 #646)
5.10212 -#648 := (or #650 #641 #646)
5.10213 -#317 := (>= #138 0::int)
5.10214 -#654 := (not #317)
5.10215 -#639 := (= #138 #297)
5.10216 -#301 := (or #639 #654)
5.10217 -#651 := (or #650 #301)
5.10218 -#363 := (iff #651 #648)
5.10219 -#638 := (or #650 #649)
5.10220 -#361 := (iff #638 #648)
5.10221 -#362 := [rewrite]: #361
5.10222 -#345 := (iff #651 #638)
5.10223 -#288 := (iff #301 #649)
5.10224 -#283 := (iff #654 #646)
5.10225 -#645 := (iff #317 #644)
5.10226 -#640 := [rewrite]: #645
5.10227 -#647 := [monotonicity #640]: #283
5.10228 -#642 := (iff #639 #641)
5.10229 -#643 := [rewrite]: #642
5.10230 -#289 := [monotonicity #643 #647]: #288
5.10231 -#360 := [monotonicity #289]: #345
5.10232 -#256 := [trans #360 #362]: #363
5.10233 -#637 := [quant-inst]: #651
5.10234 -#633 := [mp #637 #256]: #648
5.10235 -#408 := [unit-resolution #633 #678]: #649
5.10236 -#411 := [unit-resolution #408 #427]: #641
5.10237 -#412 := (not #641)
5.10238 -#416 := (or #412 #356)
5.10239 -#409 := [th-lemma]: #416
5.10240 -#417 := [unit-resolution #409 #411]: #356
5.10241 -#410 := [hypothesis]: #280
5.10242 -#413 := [th-lemma #423 #410 #417 #407 #426]: false
5.10243 -#400 := [lemma #413]: #414
5.10244 -#381 := (or #380 #280)
5.10245 -#382 := [th-lemma]: #381
5.10246 -#377 := [unit-resolution #382 #400]: #380
5.10247 -#371 := [unit-resolution #377 #370]: false
5.10248 -#372 := [lemma #371]: #334
5.10249 -#352 := (or #249 #250 #336)
5.10250 -#335 := (not #250)
5.10251 -#338 := (and #334 #335 #327)
5.10252 -#339 := (not #338)
5.10253 -#169 := (distinct #141 #161 #166)
5.10254 -#172 := (not #169)
5.10255 -#33 := (- #22 #22)
5.10256 -#34 := (uf_1 #33)
5.10257 -#27 := (* #22 2::int)
5.10258 -#28 := (uf_1 #27)
5.10259 -#29 := (uf_2 #28)
5.10260 -#31 := (+ #29 3::int)
5.10261 -#32 := (uf_1 #31)
5.10262 -#24 := (+ #22 1::int)
5.10263 -#25 := (uf_1 #24)
5.10264 -#35 := (distinct #25 #32 #34)
5.10265 -#36 := (not #35)
5.10266 -#173 := (iff #36 #172)
5.10267 -#170 := (iff #35 #169)
5.10268 -#167 := (= #34 #166)
5.10269 -#164 := (= #33 0::int)
5.10270 -#165 := [rewrite]: #164
5.10271 -#168 := [monotonicity #165]: #167
5.10272 -#162 := (= #32 #161)
5.10273 -#159 := (= #31 #156)
5.10274 -#153 := (+ #150 3::int)
5.10275 -#157 := (= #153 #156)
5.10276 -#158 := [rewrite]: #157
5.10277 -#154 := (= #31 #153)
5.10278 -#151 := (= #29 #150)
5.10279 -#148 := (= #28 #147)
5.10280 -#145 := (= #27 #144)
5.10281 -#146 := [rewrite]: #145
5.10282 -#149 := [monotonicity #146]: #148
5.10283 -#152 := [monotonicity #149]: #151
5.10284 -#155 := [monotonicity #152]: #154
5.10285 -#160 := [trans #155 #158]: #159
5.10286 -#163 := [monotonicity #160]: #162
5.10287 -#142 := (= #25 #141)
5.10288 -#139 := (= #24 #138)
5.10289 -#140 := [rewrite]: #139
5.10290 -#143 := [monotonicity #140]: #142
5.10291 -#171 := [monotonicity #143 #163 #168]: #170
5.10292 -#174 := [monotonicity #171]: #173
5.10293 -#137 := [asserted]: #36
5.10294 -#177 := [mp #137 #174]: #172
5.10295 -#326 := (or #169 #339)
5.10296 -#659 := [def-axiom]: #326
5.10297 -#351 := [unit-resolution #659 #177]: #339
5.10298 -#314 := (or #338 #249 #250 #336)
5.10299 -#445 := [def-axiom]: #314
5.10300 -#343 := [unit-resolution #445 #351]: #352
5.10301 -#353 := [unit-resolution #343 #372 #378]: #250
5.10302 -#321 := [monotonicity #353]: #355
5.10303 -#323 := [trans #321 #394]: #357
5.10304 -#368 := (not #357)
5.10305 -#620 := (<= #297 0::int)
5.10306 -#364 := (not #620)
5.10307 -#634 := (<= #304 -1::int)
5.10308 -#374 := (or #412 #634)
5.10309 -#373 := [th-lemma]: #374
5.10310 -#375 := [unit-resolution #373 #411]: #634
5.10311 -#365 := (not #634)
5.10312 -#366 := (or #364 #612 #365)
5.10313 -#358 := [th-lemma]: #366
5.10314 -#367 := [unit-resolution #358 #375 #431]: #364
5.10315 -#359 := (or #368 #620)
5.10316 -#369 := [th-lemma]: #359
5.10317 -#350 := [unit-resolution #369 #367]: #368
5.10318 -[unit-resolution #350 #323]: false
5.10319 -unsat
5.10320 -720080123967f7b12d5ac9ba2a5e5203400a16cd 161 0
5.10321 -#2 := false
5.10322 -#9 := 0::int
5.10323 -decl uf_3 :: int
5.10324 -#21 := uf_3
5.10325 -#130 := -1::int
5.10326 -#131 := (* -1::int uf_3)
5.10327 -#154 := (>= uf_3 0::int)
5.10328 -#161 := (ite #154 uf_3 #131)
5.10329 -#648 := (* -1::int #161)
5.10330 -#645 := (+ #131 #648)
5.10331 -#642 := (<= #645 0::int)
5.10332 -#340 := (= #131 #161)
5.10333 -#155 := (not #154)
5.10334 -#649 := (+ uf_3 #648)
5.10335 -#650 := (<= #649 0::int)
5.10336 -#254 := (= uf_3 #161)
5.10337 -#651 := [hypothesis]: #154
5.10338 -#255 := (or #155 #254)
5.10339 -#341 := [def-axiom]: #255
5.10340 -#289 := [unit-resolution #341 #651]: #254
5.10341 -#652 := (not #254)
5.10342 -#654 := (or #652 #650)
5.10343 -#294 := [th-lemma]: #654
5.10344 -#295 := [unit-resolution #294 #289]: #650
5.10345 -#273 := (>= #161 0::int)
5.10346 -#346 := (not #273)
5.10347 -decl uf_2 :: (-> T1 int)
5.10348 -decl uf_1 :: (-> int T1)
5.10349 -#166 := (uf_1 #161)
5.10350 -#169 := (uf_2 #166)
5.10351 -#172 := (= #161 #169)
5.10352 -#175 := (not #172)
5.10353 -#23 := (- uf_3)
5.10354 -#22 := (< uf_3 0::int)
5.10355 -#24 := (ite #22 #23 uf_3)
5.10356 -#25 := (uf_1 #24)
5.10357 -#26 := (uf_2 #25)
5.10358 -#27 := (= #26 #24)
5.10359 -#28 := (not #27)
5.10360 -#178 := (iff #28 #175)
5.10361 -#134 := (ite #22 #131 uf_3)
5.10362 -#137 := (uf_1 #134)
5.10363 -#140 := (uf_2 #137)
5.10364 -#146 := (= #134 #140)
5.10365 -#151 := (not #146)
5.10366 -#176 := (iff #151 #175)
5.10367 -#173 := (iff #146 #172)
5.10368 -#170 := (= #140 #169)
5.10369 -#167 := (= #137 #166)
5.10370 -#164 := (= #134 #161)
5.10371 -#158 := (ite #155 #131 uf_3)
5.10372 -#162 := (= #158 #161)
5.10373 -#163 := [rewrite]: #162
5.10374 -#159 := (= #134 #158)
5.10375 -#156 := (iff #22 #155)
5.10376 -#157 := [rewrite]: #156
5.10377 -#160 := [monotonicity #157]: #159
5.10378 -#165 := [trans #160 #163]: #164
5.10379 -#168 := [monotonicity #165]: #167
5.10380 -#171 := [monotonicity #168]: #170
5.10381 -#174 := [monotonicity #165 #171]: #173
5.10382 -#177 := [monotonicity #174]: #176
5.10383 -#152 := (iff #28 #151)
5.10384 -#149 := (iff #27 #146)
5.10385 -#143 := (= #140 #134)
5.10386 -#147 := (iff #143 #146)
5.10387 -#148 := [rewrite]: #147
5.10388 -#144 := (iff #27 #143)
5.10389 -#135 := (= #24 #134)
5.10390 -#132 := (= #23 #131)
5.10391 -#133 := [rewrite]: #132
5.10392 -#136 := [monotonicity #133]: #135
5.10393 -#141 := (= #26 #140)
5.10394 -#138 := (= #25 #137)
5.10395 -#139 := [monotonicity #136]: #138
5.10396 -#142 := [monotonicity #139]: #141
5.10397 -#145 := [monotonicity #142 #136]: #144
5.10398 -#150 := [trans #145 #148]: #149
5.10399 -#153 := [monotonicity #150]: #152
5.10400 -#179 := [trans #153 #177]: #178
5.10401 -#129 := [asserted]: #28
5.10402 -#180 := [mp #129 #179]: #175
5.10403 -#10 := (:var 0 int)
5.10404 -#12 := (uf_1 #10)
5.10405 -#677 := (pattern #12)
5.10406 -#70 := (>= #10 0::int)
5.10407 -#71 := (not #70)
5.10408 -#13 := (uf_2 #12)
5.10409 -#52 := (= #10 #13)
5.10410 -#77 := (or #52 #71)
5.10411 -#678 := (forall (vars (?x2 int)) (:pat #677) #77)
5.10412 -#82 := (forall (vars (?x2 int)) #77)
5.10413 -#681 := (iff #82 #678)
5.10414 -#679 := (iff #77 #77)
5.10415 -#680 := [refl]: #679
5.10416 -#682 := [quant-intro #680]: #681
5.10417 -#183 := (~ #82 #82)
5.10418 -#195 := (~ #77 #77)
5.10419 -#196 := [refl]: #195
5.10420 -#181 := [nnf-pos #196]: #183
5.10421 -#14 := (= #13 #10)
5.10422 -#11 := (<= 0::int #10)
5.10423 -#15 := (implies #11 #14)
5.10424 -#16 := (forall (vars (?x2 int)) #15)
5.10425 -#85 := (iff #16 #82)
5.10426 -#59 := (not #11)
5.10427 -#60 := (or #59 #52)
5.10428 -#65 := (forall (vars (?x2 int)) #60)
5.10429 -#83 := (iff #65 #82)
5.10430 -#80 := (iff #60 #77)
5.10431 -#74 := (or #71 #52)
5.10432 -#78 := (iff #74 #77)
5.10433 -#79 := [rewrite]: #78
5.10434 -#75 := (iff #60 #74)
5.10435 -#72 := (iff #59 #71)
5.10436 -#68 := (iff #11 #70)
5.10437 -#69 := [rewrite]: #68
5.10438 -#73 := [monotonicity #69]: #72
5.10439 -#76 := [monotonicity #73]: #75
5.10440 -#81 := [trans #76 #79]: #80
5.10441 -#84 := [quant-intro #81]: #83
5.10442 -#66 := (iff #16 #65)
5.10443 -#63 := (iff #15 #60)
5.10444 -#56 := (implies #11 #52)
5.10445 -#61 := (iff #56 #60)
5.10446 -#62 := [rewrite]: #61
5.10447 -#57 := (iff #15 #56)
5.10448 -#54 := (iff #14 #52)
5.10449 -#55 := [rewrite]: #54
5.10450 -#58 := [monotonicity #55]: #57
5.10451 -#64 := [trans #58 #62]: #63
5.10452 -#67 := [quant-intro #64]: #66
5.10453 -#86 := [trans #67 #84]: #85
5.10454 -#51 := [asserted]: #16
5.10455 -#87 := [mp #51 #86]: #82
5.10456 -#197 := [mp~ #87 #181]: #82
5.10457 -#683 := [mp #197 #682]: #678
5.10458 -#450 := (not #678)
5.10459 -#657 := (or #450 #172 #346)
5.10460 -#661 := (or #172 #346)
5.10461 -#331 := (or #450 #661)
5.10462 -#664 := (iff #331 #657)
5.10463 -#665 := [rewrite]: #664
5.10464 -#332 := [quant-inst]: #331
5.10465 -#666 := [mp #332 #665]: #657
5.10466 -#655 := [unit-resolution #666 #683 #180]: #346
5.10467 -#653 := [th-lemma #651 #655 #295]: false
5.10468 -#656 := [lemma #653]: #155
5.10469 -#342 := (or #154 #340)
5.10470 -#333 := [def-axiom]: #342
5.10471 -#365 := [unit-resolution #333 #656]: #340
5.10472 -#366 := (not #340)
5.10473 -#367 := (or #366 #642)
5.10474 -#368 := [th-lemma]: #367
5.10475 -#261 := [unit-resolution #368 #365]: #642
5.10476 -#647 := (<= #161 0::int)
5.10477 -#638 := (or #647 #273)
5.10478 -#639 := [th-lemma]: #638
5.10479 -#361 := [unit-resolution #639 #655]: #647
5.10480 -[th-lemma #656 #361 #261]: false
5.10481 -unsat
5.10482 -201224fffb303874a019c931bc3ddb7a48e74843 557 0
5.10483 -#2 := false
5.10484 -#9 := 0::int
5.10485 -decl uf_2 :: (-> T1 int)
5.10486 -decl uf_1 :: (-> int T1)
5.10487 -decl uf_5 :: T1
5.10488 -#36 := uf_5
5.10489 -#37 := (uf_2 uf_5)
5.10490 -#35 := 4::int
5.10491 -#38 := (* 4::int #37)
5.10492 -#39 := (uf_1 #38)
5.10493 -#40 := (uf_2 #39)
5.10494 -#527 := (= #40 0::int)
5.10495 -#976 := (not #527)
5.10496 -#502 := (<= #40 0::int)
5.10497 -#971 := (not #502)
5.10498 -#22 := 1::int
5.10499 -#186 := (+ 1::int #40)
5.10500 -#189 := (uf_1 #186)
5.10501 -#506 := (uf_2 #189)
5.10502 -#407 := (<= #506 1::int)
5.10503 -#876 := (not #407)
5.10504 -decl up_4 :: (-> T1 T1 bool)
5.10505 -#4 := (:var 0 T1)
5.10506 -#408 := (up_4 #4 #189)
5.10507 -#393 := (pattern #408)
5.10508 -#413 := (= #4 #189)
5.10509 -#414 := (not #408)
5.10510 -#26 := (uf_1 1::int)
5.10511 -#27 := (= #4 #26)
5.10512 -#392 := (or #27 #414 #413)
5.10513 -#397 := (forall (vars (?x5 T1)) (:pat #393) #392)
5.10514 -#383 := (not #397)
5.10515 -#382 := (or #383 #407)
5.10516 -#375 := (not #382)
5.10517 -decl up_3 :: (-> T1 bool)
5.10518 -#192 := (up_3 #189)
5.10519 -#404 := (not #192)
5.10520 -#841 := (or #404 #375)
5.10521 -decl ?x5!0 :: (-> T1 T1)
5.10522 -#422 := (?x5!0 #189)
5.10523 -#434 := (= #189 #422)
5.10524 -#417 := (up_4 #422 #189)
5.10525 -#418 := (not #417)
5.10526 -#415 := (= #26 #422)
5.10527 -#847 := (or #415 #418 #434)
5.10528 -#850 := (not #847)
5.10529 -#853 := (or #192 #407 #850)
5.10530 -#856 := (not #853)
5.10531 -#844 := (not #841)
5.10532 -#859 := (or #844 #856)
5.10533 -#862 := (not #859)
5.10534 -#5 := (uf_2 #4)
5.10535 -#787 := (pattern #5)
5.10536 -#21 := (up_3 #4)
5.10537 -#835 := (pattern #21)
5.10538 -#210 := (?x5!0 #4)
5.10539 -#274 := (= #4 #210)
5.10540 -#271 := (= #26 #210)
5.10541 -#232 := (up_4 #210 #4)
5.10542 -#233 := (not #232)
5.10543 -#277 := (or #233 #271 #274)
5.10544 -#280 := (not #277)
5.10545 -#163 := (<= #5 1::int)
5.10546 -#289 := (or #21 #163 #280)
5.10547 -#304 := (not #289)
5.10548 -#24 := (:var 1 T1)
5.10549 -#25 := (up_4 #4 #24)
5.10550 -#808 := (pattern #25)
5.10551 -#28 := (= #4 #24)
5.10552 -#147 := (not #25)
5.10553 -#167 := (or #147 #27 #28)
5.10554 -#809 := (forall (vars (?x5 T1)) (:pat #808) #167)
5.10555 -#814 := (not #809)
5.10556 -#817 := (or #163 #814)
5.10557 -#820 := (not #817)
5.10558 -#253 := (not #21)
5.10559 -#823 := (or #253 #820)
5.10560 -#826 := (not #823)
5.10561 -#829 := (or #826 #304)
5.10562 -#832 := (not #829)
5.10563 -#836 := (forall (vars (?x4 T1)) (:pat #835 #787) #832)
5.10564 -#170 := (forall (vars (?x5 T1)) #167)
5.10565 -#236 := (not #170)
5.10566 -#239 := (or #163 #236)
5.10567 -#240 := (not #239)
5.10568 -#215 := (or #253 #240)
5.10569 -#303 := (not #215)
5.10570 -#305 := (or #303 #304)
5.10571 -#306 := (not #305)
5.10572 -#311 := (forall (vars (?x4 T1)) #306)
5.10573 -#837 := (iff #311 #836)
5.10574 -#833 := (iff #306 #832)
5.10575 -#830 := (iff #305 #829)
5.10576 -#827 := (iff #303 #826)
5.10577 -#824 := (iff #215 #823)
5.10578 -#821 := (iff #240 #820)
5.10579 -#818 := (iff #239 #817)
5.10580 -#815 := (iff #236 #814)
5.10581 -#812 := (iff #170 #809)
5.10582 -#810 := (iff #167 #167)
5.10583 -#811 := [refl]: #810
5.10584 -#813 := [quant-intro #811]: #812
5.10585 -#816 := [monotonicity #813]: #815
5.10586 -#819 := [monotonicity #816]: #818
5.10587 -#822 := [monotonicity #819]: #821
5.10588 -#825 := [monotonicity #822]: #824
5.10589 -#828 := [monotonicity #825]: #827
5.10590 -#831 := [monotonicity #828]: #830
5.10591 -#834 := [monotonicity #831]: #833
5.10592 -#838 := [quant-intro #834]: #837
5.10593 -#164 := (not #163)
5.10594 -#173 := (and #164 #170)
5.10595 -#259 := (or #253 #173)
5.10596 -#294 := (and #259 #289)
5.10597 -#297 := (forall (vars (?x4 T1)) #294)
5.10598 -#312 := (iff #297 #311)
5.10599 -#309 := (iff #294 #306)
5.10600 -#214 := (and #215 #289)
5.10601 -#307 := (iff #214 #306)
5.10602 -#308 := [rewrite]: #307
5.10603 -#301 := (iff #294 #214)
5.10604 -#216 := (iff #259 #215)
5.10605 -#268 := (iff #173 #240)
5.10606 -#300 := [rewrite]: #268
5.10607 -#213 := [monotonicity #300]: #216
5.10608 -#302 := [monotonicity #213]: #301
5.10609 -#310 := [trans #302 #308]: #309
5.10610 -#313 := [quant-intro #310]: #312
5.10611 -#230 := (= #210 #4)
5.10612 -#231 := (= #210 #26)
5.10613 -#234 := (or #233 #231 #230)
5.10614 -#235 := (not #234)
5.10615 -#228 := (not #164)
5.10616 -#241 := (or #228 #235)
5.10617 -#258 := (or #21 #241)
5.10618 -#260 := (and #259 #258)
5.10619 -#263 := (forall (vars (?x4 T1)) #260)
5.10620 -#298 := (iff #263 #297)
5.10621 -#295 := (iff #260 #294)
5.10622 -#292 := (iff #258 #289)
5.10623 -#283 := (or #163 #280)
5.10624 -#286 := (or #21 #283)
5.10625 -#290 := (iff #286 #289)
5.10626 -#291 := [rewrite]: #290
5.10627 -#287 := (iff #258 #286)
5.10628 -#284 := (iff #241 #283)
5.10629 -#281 := (iff #235 #280)
5.10630 -#278 := (iff #234 #277)
5.10631 -#275 := (iff #230 #274)
5.10632 -#276 := [rewrite]: #275
5.10633 -#272 := (iff #231 #271)
5.10634 -#273 := [rewrite]: #272
5.10635 -#279 := [monotonicity #273 #276]: #278
5.10636 -#282 := [monotonicity #279]: #281
5.10637 -#269 := (iff #228 #163)
5.10638 -#270 := [rewrite]: #269
5.10639 -#285 := [monotonicity #270 #282]: #284
5.10640 -#288 := [monotonicity #285]: #287
5.10641 -#293 := [trans #288 #291]: #292
5.10642 -#296 := [monotonicity #293]: #295
5.10643 -#299 := [quant-intro #296]: #298
5.10644 -#176 := (iff #21 #173)
5.10645 -#179 := (forall (vars (?x4 T1)) #176)
5.10646 -#264 := (~ #179 #263)
5.10647 -#261 := (~ #176 #260)
5.10648 -#251 := (~ #173 #173)
5.10649 -#249 := (~ #170 #170)
5.10650 -#247 := (~ #167 #167)
5.10651 -#248 := [refl]: #247
5.10652 -#250 := [nnf-pos #248]: #249
5.10653 -#245 := (~ #164 #164)
5.10654 -#246 := [refl]: #245
5.10655 -#252 := [monotonicity #246 #250]: #251
5.10656 -#242 := (not #173)
5.10657 -#243 := (~ #242 #241)
5.10658 -#237 := (~ #236 #235)
5.10659 -#238 := [sk]: #237
5.10660 -#229 := (~ #228 #228)
5.10661 -#209 := [refl]: #229
5.10662 -#244 := [nnf-neg #209 #238]: #243
5.10663 -#256 := (~ #21 #21)
5.10664 -#257 := [refl]: #256
5.10665 -#254 := (~ #253 #253)
5.10666 -#255 := [refl]: #254
5.10667 -#262 := [nnf-pos #255 #257 #244 #252]: #261
5.10668 -#265 := [nnf-pos #262]: #264
5.10669 -#29 := (or #27 #28)
5.10670 -#30 := (implies #25 #29)
5.10671 -#31 := (forall (vars (?x5 T1)) #30)
5.10672 -#23 := (< 1::int #5)
5.10673 -#32 := (and #23 #31)
5.10674 -#33 := (iff #21 #32)
5.10675 -#34 := (forall (vars (?x4 T1)) #33)
5.10676 -#182 := (iff #34 #179)
5.10677 -#148 := (or #147 #29)
5.10678 -#151 := (forall (vars (?x5 T1)) #148)
5.10679 -#154 := (and #23 #151)
5.10680 -#157 := (iff #21 #154)
5.10681 -#160 := (forall (vars (?x4 T1)) #157)
5.10682 -#180 := (iff #160 #179)
5.10683 -#177 := (iff #157 #176)
5.10684 -#174 := (iff #154 #173)
5.10685 -#171 := (iff #151 #170)
5.10686 -#168 := (iff #148 #167)
5.10687 -#169 := [rewrite]: #168
5.10688 -#172 := [quant-intro #169]: #171
5.10689 -#165 := (iff #23 #164)
5.10690 -#166 := [rewrite]: #165
5.10691 -#175 := [monotonicity #166 #172]: #174
5.10692 -#178 := [monotonicity #175]: #177
5.10693 -#181 := [quant-intro #178]: #180
5.10694 -#161 := (iff #34 #160)
5.10695 -#158 := (iff #33 #157)
5.10696 -#155 := (iff #32 #154)
5.10697 -#152 := (iff #31 #151)
5.10698 -#149 := (iff #30 #148)
5.10699 -#150 := [rewrite]: #149
5.10700 -#153 := [quant-intro #150]: #152
5.10701 -#156 := [monotonicity #153]: #155
5.10702 -#159 := [monotonicity #156]: #158
5.10703 -#162 := [quant-intro #159]: #161
5.10704 -#183 := [trans #162 #181]: #182
5.10705 -#146 := [asserted]: #34
5.10706 -#184 := [mp #146 #183]: #179
5.10707 -#266 := [mp~ #184 #265]: #263
5.10708 -#267 := [mp #266 #299]: #297
5.10709 -#314 := [mp #267 #313]: #311
5.10710 -#839 := [mp #314 #838]: #836
5.10711 -#589 := (not #836)
5.10712 -#865 := (or #589 #862)
5.10713 -#416 := (or #418 #415 #434)
5.10714 -#419 := (not #416)
5.10715 -#409 := (or #192 #407 #419)
5.10716 -#410 := (not #409)
5.10717 -#389 := (or #414 #27 #413)
5.10718 -#394 := (forall (vars (?x5 T1)) (:pat #393) #389)
5.10719 -#399 := (not #394)
5.10720 -#401 := (or #407 #399)
5.10721 -#402 := (not #401)
5.10722 -#400 := (or #404 #402)
5.10723 -#405 := (not #400)
5.10724 -#388 := (or #405 #410)
5.10725 -#391 := (not #388)
5.10726 -#866 := (or #589 #391)
5.10727 -#868 := (iff #866 #865)
5.10728 -#870 := (iff #865 #865)
5.10729 -#871 := [rewrite]: #870
5.10730 -#863 := (iff #391 #862)
5.10731 -#860 := (iff #388 #859)
5.10732 -#857 := (iff #410 #856)
5.10733 -#854 := (iff #409 #853)
5.10734 -#851 := (iff #419 #850)
5.10735 -#848 := (iff #416 #847)
5.10736 -#849 := [rewrite]: #848
5.10737 -#852 := [monotonicity #849]: #851
5.10738 -#855 := [monotonicity #852]: #854
5.10739 -#858 := [monotonicity #855]: #857
5.10740 -#845 := (iff #405 #844)
5.10741 -#842 := (iff #400 #841)
5.10742 -#378 := (iff #402 #375)
5.10743 -#376 := (iff #401 #382)
5.10744 -#384 := (or #407 #383)
5.10745 -#387 := (iff #384 #382)
5.10746 -#374 := [rewrite]: #387
5.10747 -#385 := (iff #401 #384)
5.10748 -#380 := (iff #399 #383)
5.10749 -#390 := (iff #394 #397)
5.10750 -#395 := (iff #389 #392)
5.10751 -#396 := [rewrite]: #395
5.10752 -#398 := [quant-intro #396]: #390
5.10753 -#381 := [monotonicity #398]: #380
5.10754 -#386 := [monotonicity #381]: #385
5.10755 -#377 := [trans #386 #374]: #376
5.10756 -#840 := [monotonicity #377]: #378
5.10757 -#843 := [monotonicity #840]: #842
5.10758 -#846 := [monotonicity #843]: #845
5.10759 -#861 := [monotonicity #846 #858]: #860
5.10760 -#864 := [monotonicity #861]: #863
5.10761 -#869 := [monotonicity #864]: #868
5.10762 -#872 := [trans #869 #871]: #868
5.10763 -#867 := [quant-inst]: #866
5.10764 -#873 := [mp #867 #872]: #865
5.10765 -#947 := [unit-resolution #873 #839]: #862
5.10766 -#905 := (or #859 #841)
5.10767 -#906 := [def-axiom]: #905
5.10768 -#948 := [unit-resolution #906 #947]: #841
5.10769 -#951 := (or #844 #375)
5.10770 -#41 := (+ #40 1::int)
5.10771 -#42 := (uf_1 #41)
5.10772 -#43 := (up_3 #42)
5.10773 -#193 := (iff #43 #192)
5.10774 -#190 := (= #42 #189)
5.10775 -#187 := (= #41 #186)
5.10776 -#188 := [rewrite]: #187
5.10777 -#191 := [monotonicity #188]: #190
5.10778 -#194 := [monotonicity #191]: #193
5.10779 -#185 := [asserted]: #43
5.10780 -#197 := [mp #185 #194]: #192
5.10781 -#885 := (or #844 #404 #375)
5.10782 -#886 := [def-axiom]: #885
5.10783 -#952 := [unit-resolution #886 #197]: #951
5.10784 -#953 := [unit-resolution #952 #948]: #375
5.10785 -#877 := (or #382 #876)
5.10786 -#878 := [def-axiom]: #877
5.10787 -#954 := [unit-resolution #878 #953]: #876
5.10788 -#542 := -1::int
5.10789 -#508 := (* -1::int #506)
5.10790 -#493 := (+ #40 #508)
5.10791 -#438 := (>= #493 -1::int)
5.10792 -#494 := (= #493 -1::int)
5.10793 -#496 := (>= #40 -1::int)
5.10794 -#451 := (= #506 0::int)
5.10795 -#959 := (not #451)
5.10796 -#432 := (<= #506 0::int)
5.10797 -#955 := (not #432)
5.10798 -#956 := (or #955 #407)
5.10799 -#957 := [th-lemma]: #956
5.10800 -#958 := [unit-resolution #957 #954]: #955
5.10801 -#960 := (or #959 #432)
5.10802 -#961 := [th-lemma]: #960
5.10803 -#962 := [unit-resolution #961 #958]: #959
5.10804 -#453 := (or #451 #496)
5.10805 -#10 := (:var 0 int)
5.10806 -#12 := (uf_1 #10)
5.10807 -#795 := (pattern #12)
5.10808 -#87 := (>= #10 0::int)
5.10809 -#13 := (uf_2 #12)
5.10810 -#18 := (= #13 0::int)
5.10811 -#135 := (or #18 #87)
5.10812 -#802 := (forall (vars (?x3 int)) (:pat #795) #135)
5.10813 -#140 := (forall (vars (?x3 int)) #135)
5.10814 -#805 := (iff #140 #802)
5.10815 -#803 := (iff #135 #135)
5.10816 -#804 := [refl]: #803
5.10817 -#806 := [quant-intro #804]: #805
5.10818 -#207 := (~ #140 #140)
5.10819 -#225 := (~ #135 #135)
5.10820 -#226 := [refl]: #225
5.10821 -#208 := [nnf-pos #226]: #207
5.10822 -#17 := (< #10 0::int)
5.10823 -#19 := (implies #17 #18)
5.10824 -#20 := (forall (vars (?x3 int)) #19)
5.10825 -#143 := (iff #20 #140)
5.10826 -#106 := (= 0::int #13)
5.10827 -#112 := (not #17)
5.10828 -#113 := (or #112 #106)
5.10829 -#118 := (forall (vars (?x3 int)) #113)
5.10830 -#141 := (iff #118 #140)
5.10831 -#138 := (iff #113 #135)
5.10832 -#132 := (or #87 #18)
5.10833 -#136 := (iff #132 #135)
5.10834 -#137 := [rewrite]: #136
5.10835 -#133 := (iff #113 #132)
5.10836 -#130 := (iff #106 #18)
5.10837 -#131 := [rewrite]: #130
5.10838 -#128 := (iff #112 #87)
5.10839 -#88 := (not #87)
5.10840 -#123 := (not #88)
5.10841 -#126 := (iff #123 #87)
5.10842 -#127 := [rewrite]: #126
5.10843 -#124 := (iff #112 #123)
5.10844 -#121 := (iff #17 #88)
5.10845 -#122 := [rewrite]: #121
5.10846 -#125 := [monotonicity #122]: #124
5.10847 -#129 := [trans #125 #127]: #128
5.10848 -#134 := [monotonicity #129 #131]: #133
5.10849 -#139 := [trans #134 #137]: #138
5.10850 -#142 := [quant-intro #139]: #141
5.10851 -#119 := (iff #20 #118)
5.10852 -#116 := (iff #19 #113)
5.10853 -#109 := (implies #17 #106)
5.10854 -#114 := (iff #109 #113)
5.10855 -#115 := [rewrite]: #114
5.10856 -#110 := (iff #19 #109)
5.10857 -#107 := (iff #18 #106)
5.10858 -#108 := [rewrite]: #107
5.10859 -#111 := [monotonicity #108]: #110
5.10860 -#117 := [trans #111 #115]: #116
5.10861 -#120 := [quant-intro #117]: #119
5.10862 -#144 := [trans #120 #142]: #143
5.10863 -#105 := [asserted]: #20
5.10864 -#145 := [mp #105 #144]: #140
5.10865 -#227 := [mp~ #145 #208]: #140
5.10866 -#807 := [mp #227 #806]: #802
5.10867 -#514 := (not #802)
5.10868 -#445 := (or #514 #451 #496)
5.10869 -#504 := (>= #186 0::int)
5.10870 -#452 := (or #451 #504)
5.10871 -#456 := (or #514 #452)
5.10872 -#429 := (iff #456 #445)
5.10873 -#441 := (or #514 #453)
5.10874 -#423 := (iff #441 #445)
5.10875 -#428 := [rewrite]: #423
5.10876 -#442 := (iff #456 #441)
5.10877 -#454 := (iff #452 #453)
5.10878 -#498 := (iff #504 #496)
5.10879 -#487 := [rewrite]: #498
5.10880 -#455 := [monotonicity #487]: #454
5.10881 -#421 := [monotonicity #455]: #442
5.10882 -#430 := [trans #421 #428]: #429
5.10883 -#439 := [quant-inst]: #456
5.10884 -#431 := [mp #439 #430]: #445
5.10885 -#963 := [unit-resolution #431 #807]: #453
5.10886 -#964 := [unit-resolution #963 #962]: #496
5.10887 -#488 := (not #496)
5.10888 -#490 := (or #494 #488)
5.10889 -#69 := (= #10 #13)
5.10890 -#94 := (or #69 #88)
5.10891 -#796 := (forall (vars (?x2 int)) (:pat #795) #94)
5.10892 -#99 := (forall (vars (?x2 int)) #94)
5.10893 -#799 := (iff #99 #796)
5.10894 -#797 := (iff #94 #94)
5.10895 -#798 := [refl]: #797
5.10896 -#800 := [quant-intro #798]: #799
5.10897 -#206 := (~ #99 #99)
5.10898 -#222 := (~ #94 #94)
5.10899 -#223 := [refl]: #222
5.10900 -#196 := [nnf-pos #223]: #206
5.10901 -#14 := (= #13 #10)
5.10902 -#11 := (<= 0::int #10)
5.10903 -#15 := (implies #11 #14)
5.10904 -#16 := (forall (vars (?x2 int)) #15)
5.10905 -#102 := (iff #16 #99)
5.10906 -#76 := (not #11)
5.10907 -#77 := (or #76 #69)
5.10908 -#82 := (forall (vars (?x2 int)) #77)
5.10909 -#100 := (iff #82 #99)
5.10910 -#97 := (iff #77 #94)
5.10911 -#91 := (or #88 #69)
5.10912 -#95 := (iff #91 #94)
5.10913 -#96 := [rewrite]: #95
5.10914 -#92 := (iff #77 #91)
5.10915 -#89 := (iff #76 #88)
5.10916 -#85 := (iff #11 #87)
5.10917 -#86 := [rewrite]: #85
5.10918 -#90 := [monotonicity #86]: #89
5.10919 -#93 := [monotonicity #90]: #92
5.10920 -#98 := [trans #93 #96]: #97
5.10921 -#101 := [quant-intro #98]: #100
5.10922 -#83 := (iff #16 #82)
5.10923 -#80 := (iff #15 #77)
5.10924 -#73 := (implies #11 #69)
5.10925 -#78 := (iff #73 #77)
5.10926 -#79 := [rewrite]: #78
5.10927 -#74 := (iff #15 #73)
5.10928 -#71 := (iff #14 #69)
5.10929 -#72 := [rewrite]: #71
5.10930 -#75 := [monotonicity #72]: #74
5.10931 -#81 := [trans #75 #79]: #80
5.10932 -#84 := [quant-intro #81]: #83
5.10933 -#103 := [trans #84 #101]: #102
5.10934 -#68 := [asserted]: #16
5.10935 -#104 := [mp #68 #103]: #99
5.10936 -#224 := [mp~ #104 #196]: #99
5.10937 -#801 := [mp #224 #800]: #796
5.10938 -#530 := (not #796)
5.10939 -#492 := (or #530 #494 #488)
5.10940 -#505 := (not #504)
5.10941 -#507 := (= #186 #506)
5.10942 -#500 := (or #507 #505)
5.10943 -#473 := (or #530 #500)
5.10944 -#478 := (iff #473 #492)
5.10945 -#475 := (or #530 #490)
5.10946 -#477 := (iff #475 #492)
5.10947 -#467 := [rewrite]: #477
5.10948 -#466 := (iff #473 #475)
5.10949 -#491 := (iff #500 #490)
5.10950 -#489 := (iff #505 #488)
5.10951 -#481 := [monotonicity #487]: #489
5.10952 -#495 := (iff #507 #494)
5.10953 -#497 := [rewrite]: #495
5.10954 -#482 := [monotonicity #497 #481]: #491
5.10955 -#476 := [monotonicity #482]: #466
5.10956 -#444 := [trans #476 #467]: #478
5.10957 -#474 := [quant-inst]: #473
5.10958 -#446 := [mp #474 #444]: #492
5.10959 -#965 := [unit-resolution #446 #801]: #490
5.10960 -#966 := [unit-resolution #965 #964]: #494
5.10961 -#967 := (not #494)
5.10962 -#968 := (or #967 #438)
5.10963 -#969 := [th-lemma]: #968
5.10964 -#970 := [unit-resolution #969 #966]: #438
5.10965 -#972 := (not #438)
5.10966 -#973 := (or #971 #407 #972)
5.10967 -#974 := [th-lemma]: #973
5.10968 -#975 := [unit-resolution #974 #970 #954]: #971
5.10969 -#977 := (or #976 #502)
5.10970 -#978 := [th-lemma]: #977
5.10971 -#979 := [unit-resolution #978 #975]: #976
5.10972 -#553 := (>= #37 0::int)
5.10973 -#546 := (not #553)
5.10974 -#545 := (* -1::int #40)
5.10975 -#549 := (+ #38 #545)
5.10976 -#551 := (= #549 0::int)
5.10977 -#984 := (not #551)
5.10978 -#524 := (>= #549 0::int)
5.10979 -#980 := (not #524)
5.10980 -#201 := (>= #37 1::int)
5.10981 -#202 := (not #201)
5.10982 -#44 := (<= 1::int #37)
5.10983 -#45 := (not #44)
5.10984 -#203 := (iff #45 #202)
5.10985 -#199 := (iff #44 #201)
5.10986 -#200 := [rewrite]: #199
5.10987 -#204 := [monotonicity #200]: #203
5.10988 -#195 := [asserted]: #45
5.10989 -#205 := [mp #195 #204]: #202
5.10990 -#981 := (or #980 #201 #407 #972)
5.10991 -#982 := [th-lemma]: #981
5.10992 -#983 := [unit-resolution #982 #205 #970 #954]: #980
5.10993 -#985 := (or #984 #524)
5.10994 -#986 := [th-lemma]: #985
5.10995 -#987 := [unit-resolution #986 #983]: #984
5.10996 -#548 := (or #551 #546)
5.10997 -#531 := (or #530 #551 #546)
5.10998 -#403 := (>= #38 0::int)
5.10999 -#562 := (not #403)
5.11000 -#558 := (= #38 #40)
5.11001 -#563 := (or #558 #562)
5.11002 -#534 := (or #530 #563)
5.11003 -#537 := (iff #534 #531)
5.11004 -#539 := (or #530 #548)
5.11005 -#533 := (iff #539 #531)
5.11006 -#536 := [rewrite]: #533
5.11007 -#532 := (iff #534 #539)
5.11008 -#538 := (iff #563 #548)
5.11009 -#547 := (iff #562 #546)
5.11010 -#541 := (iff #403 #553)
5.11011 -#544 := [rewrite]: #541
5.11012 -#543 := [monotonicity #544]: #547
5.11013 -#552 := (iff #558 #551)
5.11014 -#550 := [rewrite]: #552
5.11015 -#528 := [monotonicity #550 #543]: #538
5.11016 -#540 := [monotonicity #528]: #532
5.11017 -#523 := [trans #540 #536]: #537
5.11018 -#535 := [quant-inst]: #534
5.11019 -#525 := [mp #535 #523]: #531
5.11020 -#988 := [unit-resolution #525 #801]: #548
5.11021 -#989 := [unit-resolution #988 #987]: #546
5.11022 -#511 := (or #527 #553)
5.11023 -#515 := (or #514 #527 #553)
5.11024 -#509 := (or #527 #403)
5.11025 -#516 := (or #514 #509)
5.11026 -#522 := (iff #516 #515)
5.11027 -#518 := (or #514 #511)
5.11028 -#521 := (iff #518 #515)
5.11029 -#510 := [rewrite]: #521
5.11030 -#519 := (iff #516 #518)
5.11031 -#512 := (iff #509 #511)
5.11032 -#513 := [monotonicity #544]: #512
5.11033 -#520 := [monotonicity #513]: #519
5.11034 -#499 := [trans #520 #510]: #522
5.11035 -#517 := [quant-inst]: #516
5.11036 -#501 := [mp #517 #499]: #515
5.11037 -#990 := [unit-resolution #501 #807]: #511
5.11038 -[unit-resolution #990 #989 #979]: false
5.11039 -unsat
5.11040 -22877b17eafaba69b1f8a961a616fea28ae70d56 1 0
5.11041 -unsat
5.11042 -b5839159097bbd4e601a5681d1ca3493ec994a7c 1 0
5.11043 -unsat
5.11044 -90e1074350b5dcaae149781bcaa5d643b2ca9f48 1 0
5.11045 -unsat
5.11046 -08c7117fe974f5767051ed5aa61a27ce3084eb1d 1 0
5.11047 -unsat
5.11048 -858012417c9d327d8997f2a5dcb3da095ec65d34 1 0
5.11049 -unsat
5.11050 -84b2eee4890eaadb3638c7e522fb3237b3d476b0 1 0
5.11051 -unsat
5.11052 -8867717d9736308a2c27df0665a6e391b0562076 1 0
5.11053 -unsat
5.11054 -cd79c9a0488ab597d08dd9a0d6ac0f3647003bd6 1 0
5.11055 -unsat
5.11056 -395dd6c10b2a432137f9e3401cba8ec4dd64911b 1 0
5.11057 -unsat
5.11058 -17e3cc9534e04d86f095ec1a92c77d46d7dbb8e5 1 0
5.11059 -unsat
5.11060 -e046ea79beacf4bc3567b3b7f755232369d0c185 1 0
5.11061 -unsat
5.11062 -8ce4235464829d4be72e682f0c72bc5e3c6902d0 1 0
5.11063 -unsat
5.11064 -656a40b977d7716264443900d6bdb4d3d117d52f 1 0
5.11065 -unsat
5.11066 -ec27a57e58719625ff71dd4d68ed53a3851efb5c 1 0
5.11067 -unsat
5.11068 -2c3c366b8488ca0991cc767c94cdb78b18db9d5f 1 0
5.11069 -unsat
5.11070 -5894f6f19250b12885e38f54eae81f143b58fa01 1 0
5.11071 -unsat
5.11072 -e150815d9eb1ec168805b5501d7f4b2e378dd883 1 0
5.11073 -unsat
5.11074 -396d6254e993f414335de9378150e486d3cfcd4e 1 0
5.11075 -unsat
5.11076 -96014c61f582a811aff25ad7fa62b575b830fa8b 1 0
5.11077 -unsat
5.11078 -10580b87c0d062c9854e79d16047a53d045ccfac 1 0
5.11079 -unsat
5.11080 -87b5f388df1f43cc02ac0fa0d6944eb8cd8f8f50 1 0
5.11081 -unsat
5.11082 -92a5e2bb68f74b9e7dd3a9ef79ea641e9700d563 1 0
5.11083 -unsat
5.11084 -152e0f0f0a04b399b057beae92ae0455408b224f 1 0
5.11085 -unsat
5.11086 -41925af4711748a6e411453f2465920a1c6ffb8e 1 0
5.11087 -unsat
5.11088 -757462716f4a2619a1410bdca3faa2d058042c10 1 0
5.11089 -unsat
5.11090 -abdeeb4668a63f19473d6da94232379344d99fea 43 0
5.11091 -#2 := false
5.11092 -#6 := 0::int
5.11093 -decl uf_1 :: (-> bv[2] int)
5.11094 -#4 := bv[0:2]
5.11095 -#5 := (uf_1 bv[0:2])
5.11096 -#225 := (<= #5 0::int)
5.11097 -#309 := (not #225)
5.11098 -#20 := (:var 0 bv[2])
5.11099 -#21 := (uf_1 #20)
5.11100 -#638 := (pattern #21)
5.11101 -#54 := (<= #21 0::int)
5.11102 -#55 := (not #54)
5.11103 -#639 := (forall (vars (?x1 bv[2])) (:pat #638) #55)
5.11104 -#58 := (forall (vars (?x1 bv[2])) #55)
5.11105 -#642 := (iff #58 #639)
5.11106 -#640 := (iff #55 #55)
5.11107 -#641 := [refl]: #640
5.11108 -#643 := [quant-intro #641]: #642
5.11109 -#113 := (~ #58 #58)
5.11110 -#115 := (~ #55 #55)
5.11111 -#116 := [refl]: #115
5.11112 -#114 := [nnf-pos #116]: #113
5.11113 -#22 := (< 0::int #21)
5.11114 -#23 := (forall (vars (?x1 bv[2])) #22)
5.11115 -#59 := (iff #23 #58)
5.11116 -#56 := (iff #22 #55)
5.11117 -#57 := [rewrite]: #56
5.11118 -#60 := [quant-intro #57]: #59
5.11119 -#51 := [asserted]: #23
5.11120 -#61 := [mp #51 #60]: #58
5.11121 -#111 := [mp~ #61 #114]: #58
5.11122 -#644 := [mp #111 #643]: #639
5.11123 -#302 := (not #639)
5.11124 -#313 := (or #302 #309)
5.11125 -#314 := [quant-inst]: #313
5.11126 -#635 := [unit-resolution #314 #644]: #309
5.11127 -#7 := (= #5 0::int)
5.11128 -#47 := [asserted]: #7
5.11129 -#637 := (not #7)
5.11130 -#627 := (or #637 #225)
5.11131 -#287 := [th-lemma]: #627
5.11132 -[unit-resolution #287 #47 #635]: false
5.11133 -unsat
5.11134 -585c02dc1784e4298147af8e1f7a14d1e20f4938 1 0
5.11135 -unsat
5.11136 -af0e29f90d51c2b97a1ecaa16facf1cd8b6c5ba3 50 0
5.11137 -#2 := false
5.11138 -decl uf_6 :: T2
5.11139 -#23 := uf_6
5.11140 -decl uf_4 :: T2
5.11141 -#19 := uf_4
5.11142 -#25 := (= uf_4 uf_6)
5.11143 -decl uf_2 :: (-> T1 T2)
5.11144 -decl uf_1 :: (-> T2 T3 T1)
5.11145 -decl uf_5 :: T3
5.11146 -#20 := uf_5
5.11147 -#21 := (uf_1 uf_4 uf_5)
5.11148 -#22 := (uf_2 #21)
5.11149 -#24 := (= #22 uf_6)
5.11150 -#65 := [asserted]: #24
5.11151 -#143 := (= uf_4 #22)
5.11152 -#11 := (:var 0 T3)
5.11153 -#10 := (:var 1 T2)
5.11154 -#12 := (uf_1 #10 #11)
5.11155 -#567 := (pattern #12)
5.11156 -#16 := (uf_2 #12)
5.11157 -#58 := (= #10 #16)
5.11158 -#574 := (forall (vars (?x4 T2) (?x5 T3)) (:pat #567) #58)
5.11159 -#62 := (forall (vars (?x4 T2) (?x5 T3)) #58)
5.11160 -#577 := (iff #62 #574)
5.11161 -#575 := (iff #58 #58)
5.11162 -#576 := [refl]: #575
5.11163 -#578 := [quant-intro #576]: #577
5.11164 -#71 := (~ #62 #62)
5.11165 -#87 := (~ #58 #58)
5.11166 -#88 := [refl]: #87
5.11167 -#72 := [nnf-pos #88]: #71
5.11168 -#17 := (= #16 #10)
5.11169 -#18 := (forall (vars (?x4 T2) (?x5 T3)) #17)
5.11170 -#63 := (iff #18 #62)
5.11171 -#60 := (iff #17 #58)
5.11172 -#61 := [rewrite]: #60
5.11173 -#64 := [quant-intro #61]: #63
5.11174 -#57 := [asserted]: #18
5.11175 -#67 := [mp #57 #64]: #62
5.11176 -#89 := [mp~ #67 #72]: #62
5.11177 -#579 := [mp #89 #578]: #574
5.11178 -#214 := (not #574)
5.11179 -#551 := (or #214 #143)
5.11180 -#553 := [quant-inst]: #551
5.11181 -#233 := [unit-resolution #553 #579]: #143
5.11182 -#235 := [trans #233 #65]: #25
5.11183 -#26 := (not #25)
5.11184 -#66 := [asserted]: #26
5.11185 -[unit-resolution #66 #235]: false
5.11186 -unsat
5.11187 -dda7f93ea68b6650d60fb96e3a60e68637d12660 105 0
5.11188 -#2 := false
5.11189 -decl uf_6 :: (-> T4 T2)
5.11190 -decl uf_10 :: T4
5.11191 -#39 := uf_10
5.11192 -#44 := (uf_6 uf_10)
5.11193 -decl uf_2 :: (-> T1 T2)
5.11194 -decl uf_7 :: T1
5.11195 -#34 := uf_7
5.11196 -#43 := (uf_2 uf_7)
5.11197 -#45 := (= #43 #44)
5.11198 -decl uf_4 :: (-> T3 T2 T4)
5.11199 -decl uf_8 :: T2
5.11200 -#35 := uf_8
5.11201 -decl uf_9 :: T3
5.11202 -#36 := uf_9
5.11203 -#40 := (uf_4 uf_9 uf_8)
5.11204 -#204 := (uf_6 #40)
5.11205 -#598 := (= #204 #44)
5.11206 -#595 := (= #44 #204)
5.11207 -#41 := (= uf_10 #40)
5.11208 -decl uf_1 :: (-> T2 T3 T1)
5.11209 -#37 := (uf_1 uf_8 uf_9)
5.11210 -#38 := (= uf_7 #37)
5.11211 -#42 := (and #38 #41)
5.11212 -#109 := [asserted]: #42
5.11213 -#114 := [and-elim #109]: #41
5.11214 -#256 := [monotonicity #114]: #595
5.11215 -#599 := [symm #256]: #598
5.11216 -#596 := (= #43 #204)
5.11217 -#269 := (= uf_8 #204)
5.11218 -#23 := (:var 0 T2)
5.11219 -#22 := (:var 1 T3)
5.11220 -#24 := (uf_4 #22 #23)
5.11221 -#643 := (pattern #24)
5.11222 -#25 := (uf_6 #24)
5.11223 -#86 := (= #23 #25)
5.11224 -#644 := (forall (vars (?x5 T3) (?x6 T2)) (:pat #643) #86)
5.11225 -#90 := (forall (vars (?x5 T3) (?x6 T2)) #86)
5.11226 -#647 := (iff #90 #644)
5.11227 -#645 := (iff #86 #86)
5.11228 -#646 := [refl]: #645
5.11229 -#648 := [quant-intro #646]: #647
5.11230 -#119 := (~ #90 #90)
5.11231 -#144 := (~ #86 #86)
5.11232 -#145 := [refl]: #144
5.11233 -#120 := [nnf-pos #145]: #119
5.11234 -#26 := (= #25 #23)
5.11235 -#27 := (forall (vars (?x5 T3) (?x6 T2)) #26)
5.11236 -#91 := (iff #27 #90)
5.11237 -#88 := (iff #26 #86)
5.11238 -#89 := [rewrite]: #88
5.11239 -#92 := [quant-intro #89]: #91
5.11240 -#85 := [asserted]: #27
5.11241 -#95 := [mp #85 #92]: #90
5.11242 -#146 := [mp~ #95 #120]: #90
5.11243 -#649 := [mp #146 #648]: #644
5.11244 -#613 := (not #644)
5.11245 -#619 := (or #613 #269)
5.11246 -#609 := [quant-inst]: #619
5.11247 -#267 := [unit-resolution #609 #649]: #269
5.11248 -#600 := (= #43 uf_8)
5.11249 -#289 := (uf_2 #37)
5.11250 -#259 := (= #289 uf_8)
5.11251 -#296 := (= uf_8 #289)
5.11252 -#17 := (:var 0 T3)
5.11253 -#16 := (:var 1 T2)
5.11254 -#18 := (uf_1 #16 #17)
5.11255 -#636 := (pattern #18)
5.11256 -#28 := (uf_2 #18)
5.11257 -#94 := (= #16 #28)
5.11258 -#650 := (forall (vars (?x7 T2) (?x8 T3)) (:pat #636) #94)
5.11259 -#98 := (forall (vars (?x7 T2) (?x8 T3)) #94)
5.11260 -#653 := (iff #98 #650)
5.11261 -#651 := (iff #94 #94)
5.11262 -#652 := [refl]: #651
5.11263 -#654 := [quant-intro #652]: #653
5.11264 -#121 := (~ #98 #98)
5.11265 -#147 := (~ #94 #94)
5.11266 -#148 := [refl]: #147
5.11267 -#122 := [nnf-pos #148]: #121
5.11268 -#29 := (= #28 #16)
5.11269 -#30 := (forall (vars (?x7 T2) (?x8 T3)) #29)
5.11270 -#99 := (iff #30 #98)
5.11271 -#96 := (iff #29 #94)
5.11272 -#97 := [rewrite]: #96
5.11273 -#100 := [quant-intro #97]: #99
5.11274 -#93 := [asserted]: #30
5.11275 -#103 := [mp #93 #100]: #98
5.11276 -#149 := [mp~ #103 #122]: #98
5.11277 -#655 := [mp #149 #654]: #650
5.11278 -#615 := (not #650)
5.11279 -#616 := (or #615 #296)
5.11280 -#617 := [quant-inst]: #616
5.11281 -#618 := [unit-resolution #617 #655]: #296
5.11282 -#597 := [symm #618]: #259
5.11283 -#611 := (= #43 #289)
5.11284 -#113 := [and-elim #109]: #38
5.11285 -#252 := [monotonicity #113]: #611
5.11286 -#601 := [trans #252 #597]: #600
5.11287 -#602 := [trans #601 #267]: #596
5.11288 -#238 := [trans #602 #599]: #45
5.11289 -#46 := (not #45)
5.11290 -#110 := [asserted]: #46
5.11291 -[unit-resolution #110 #238]: false
5.11292 -unsat
5.11293 -bab035487a4c595c2090c8097591bd8874c90db9 181 0
5.11294 -#2 := false
5.11295 -decl uf_1 :: (-> T1 T2 T3)
5.11296 -decl uf_3 :: T2
5.11297 -#22 := uf_3
5.11298 -decl uf_6 :: T1
5.11299 -#30 := uf_6
5.11300 -#36 := (uf_1 uf_6 uf_3)
5.11301 -decl uf_2 :: (-> T1 T2 T3 T1)
5.11302 -decl uf_8 :: T3
5.11303 -#33 := uf_8
5.11304 -decl uf_5 :: T2
5.11305 -#26 := uf_5
5.11306 -decl uf_7 :: T3
5.11307 -#31 := uf_7
5.11308 -decl uf_4 :: T2
5.11309 -#23 := uf_4
5.11310 -#32 := (uf_2 uf_6 uf_4 uf_7)
5.11311 -#34 := (uf_2 #32 uf_5 uf_8)
5.11312 -#35 := (uf_1 #34 uf_3)
5.11313 -#37 := (= #35 #36)
5.11314 -#223 := (uf_1 #32 uf_4)
5.11315 -#214 := (uf_2 uf_6 uf_4 #223)
5.11316 -#552 := (uf_1 #214 uf_3)
5.11317 -#555 := (= #552 #36)
5.11318 -#560 := (= #36 #552)
5.11319 -#556 := (= #223 #552)
5.11320 -#24 := (= uf_3 uf_4)
5.11321 -#561 := (ite #24 #556 #560)
5.11322 -#8 := (:var 0 T2)
5.11323 -#6 := (:var 1 T3)
5.11324 -#5 := (:var 2 T2)
5.11325 -#4 := (:var 3 T1)
5.11326 -#7 := (uf_2 #4 #5 #6)
5.11327 -#9 := (uf_1 #7 #8)
5.11328 -#575 := (pattern #9)
5.11329 -#11 := (uf_1 #4 #8)
5.11330 -#100 := (= #9 #11)
5.11331 -#99 := (= #6 #9)
5.11332 -#55 := (= #5 #8)
5.11333 -#83 := (ite #55 #99 #100)
5.11334 -#576 := (forall (vars (?x1 T1) (?x2 T2) (?x3 T3) (?x4 T2)) (:pat #575) #83)
5.11335 -#90 := (forall (vars (?x1 T1) (?x2 T2) (?x3 T3) (?x4 T2)) #83)
5.11336 -#579 := (iff #90 #576)
5.11337 -#577 := (iff #83 #83)
5.11338 -#578 := [refl]: #577
5.11339 -#580 := [quant-intro #578]: #579
5.11340 -#58 := (ite #55 #6 #11)
5.11341 -#61 := (= #9 #58)
5.11342 -#64 := (forall (vars (?x1 T1) (?x2 T2) (?x3 T3) (?x4 T2)) #61)
5.11343 -#87 := (iff #64 #90)
5.11344 -#84 := (iff #61 #83)
5.11345 -#89 := [rewrite]: #84
5.11346 -#88 := [quant-intro #89]: #87
5.11347 -#93 := (~ #64 #64)
5.11348 -#91 := (~ #61 #61)
5.11349 -#92 := [refl]: #91
5.11350 -#94 := [nnf-pos #92]: #93
5.11351 -#10 := (= #8 #5)
5.11352 -#12 := (ite #10 #6 #11)
5.11353 -#13 := (= #9 #12)
5.11354 -#14 := (forall (vars (?x1 T1) (?x2 T2) (?x3 T3) (?x4 T2)) #13)
5.11355 -#65 := (iff #14 #64)
5.11356 -#62 := (iff #13 #61)
5.11357 -#59 := (= #12 #58)
5.11358 -#56 := (iff #10 #55)
5.11359 -#57 := [rewrite]: #56
5.11360 -#60 := [monotonicity #57]: #59
5.11361 -#63 := [monotonicity #60]: #62
5.11362 -#66 := [quant-intro #63]: #65
5.11363 -#54 := [asserted]: #14
5.11364 -#69 := [mp #54 #66]: #64
5.11365 -#95 := [mp~ #69 #94]: #64
5.11366 -#85 := [mp #95 #88]: #90
5.11367 -#581 := [mp #85 #580]: #576
5.11368 -#250 := (not #576)
5.11369 -#548 := (or #250 #561)
5.11370 -#551 := (= uf_4 uf_3)
5.11371 -#557 := (ite #551 #556 #555)
5.11372 -#549 := (or #250 #557)
5.11373 -#271 := (iff #549 #548)
5.11374 -#273 := (iff #548 #548)
5.11375 -#259 := [rewrite]: #273
5.11376 -#559 := (iff #557 #561)
5.11377 -#198 := (iff #555 #560)
5.11378 -#199 := [rewrite]: #198
5.11379 -#193 := (iff #551 #24)
5.11380 -#558 := [rewrite]: #193
5.11381 -#562 := [monotonicity #558 #199]: #559
5.11382 -#272 := [monotonicity #562]: #271
5.11383 -#274 := [trans #272 #259]: #271
5.11384 -#255 := [quant-inst]: #549
5.11385 -#165 := [mp #255 #274]: #548
5.11386 -#510 := [unit-resolution #165 #581]: #561
5.11387 -#544 := (not #561)
5.11388 -#497 := (or #544 #560)
5.11389 -#25 := (not #24)
5.11390 -#27 := (= uf_3 uf_5)
5.11391 -#28 := (not #27)
5.11392 -#29 := (and #25 #28)
5.11393 -#75 := [asserted]: #29
5.11394 -#79 := [and-elim #75]: #25
5.11395 -#268 := (or #544 #24 #560)
5.11396 -#542 := [def-axiom]: #268
5.11397 -#499 := [unit-resolution #542 #79]: #497
5.11398 -#491 := [unit-resolution #499 #510]: #560
5.11399 -#493 := [symm #491]: #555
5.11400 -#494 := (= #35 #552)
5.11401 -#157 := (uf_1 #32 uf_3)
5.11402 -#503 := (= #157 #552)
5.11403 -#502 := (= #552 #157)
5.11404 -#509 := (= #214 #32)
5.11405 -#415 := (= #223 uf_7)
5.11406 -#566 := (= uf_7 #223)
5.11407 -#17 := (:var 0 T3)
5.11408 -#16 := (:var 1 T2)
5.11409 -#15 := (:var 2 T1)
5.11410 -#18 := (uf_2 #15 #16 #17)
5.11411 -#582 := (pattern #18)
5.11412 -#19 := (uf_1 #18 #16)
5.11413 -#68 := (= #17 #19)
5.11414 -#584 := (forall (vars (?x5 T1) (?x6 T2) (?x7 T3)) (:pat #582) #68)
5.11415 -#72 := (forall (vars (?x5 T1) (?x6 T2) (?x7 T3)) #68)
5.11416 -#583 := (iff #72 #584)
5.11417 -#586 := (iff #584 #584)
5.11418 -#587 := [rewrite]: #586
5.11419 -#585 := [rewrite]: #583
5.11420 -#588 := [trans #585 #587]: #583
5.11421 -#82 := (~ #72 #72)
5.11422 -#96 := (~ #68 #68)
5.11423 -#97 := [refl]: #96
5.11424 -#78 := [nnf-pos #97]: #82
5.11425 -#20 := (= #19 #17)
5.11426 -#21 := (forall (vars (?x5 T1) (?x6 T2) (?x7 T3)) #20)
5.11427 -#73 := (iff #21 #72)
5.11428 -#70 := (iff #20 #68)
5.11429 -#71 := [rewrite]: #70
5.11430 -#74 := [quant-intro #71]: #73
5.11431 -#67 := [asserted]: #21
5.11432 -#77 := [mp #67 #74]: #72
5.11433 -#98 := [mp~ #77 #78]: #72
5.11434 -#589 := [mp #98 #588]: #584
5.11435 -#211 := (not #584)
5.11436 -#212 := (or #211 #566)
5.11437 -#213 := [quant-inst]: #212
5.11438 -#414 := [unit-resolution #213 #589]: #566
5.11439 -#416 := [symm #414]: #415
5.11440 -#506 := [monotonicity #416]: #509
5.11441 -#498 := [monotonicity #506]: #502
5.11442 -#492 := [symm #498]: #503
5.11443 -#244 := (= #35 #157)
5.11444 -#158 := (= uf_8 #35)
5.11445 -#248 := (ite #27 #158 #244)
5.11446 -#247 := (or #250 #248)
5.11447 -#245 := (= uf_5 uf_3)
5.11448 -#159 := (ite #245 #158 #244)
5.11449 -#251 := (or #250 #159)
5.11450 -#567 := (iff #251 #247)
5.11451 -#224 := (iff #247 #247)
5.11452 -#356 := [rewrite]: #224
5.11453 -#249 := (iff #159 #248)
5.11454 -#246 := (iff #245 #27)
5.11455 -#237 := [rewrite]: #246
5.11456 -#177 := [monotonicity #237]: #249
5.11457 -#569 := [monotonicity #177]: #567
5.11458 -#563 := [trans #569 #356]: #567
5.11459 -#230 := [quant-inst]: #251
5.11460 -#235 := [mp #230 #563]: #247
5.11461 -#488 := [unit-resolution #235 #581]: #248
5.11462 -#236 := (not #248)
5.11463 -#490 := (or #236 #244)
5.11464 -#80 := [and-elim #75]: #28
5.11465 -#572 := (or #236 #27 #244)
5.11466 -#573 := [def-axiom]: #572
5.11467 -#500 := [unit-resolution #573 #80]: #490
5.11468 -#501 := [unit-resolution #500 #488]: #244
5.11469 -#495 := [trans #501 #492]: #494
5.11470 -#489 := [trans #495 #493]: #37
5.11471 -#38 := (not #37)
5.11472 -#76 := [asserted]: #38
5.11473 -[unit-resolution #76 #489]: false
5.11474 -unsat
5.11475 -4e1c8dc2fbb6a09931090ee5acf8d0e6f34352b4 62 0
5.11476 -#2 := false
5.11477 -decl up_4 :: (-> T1 T2 bool)
5.11478 -decl uf_3 :: T2
5.11479 -#5 := uf_3
5.11480 -decl uf_2 :: T1
5.11481 -#4 := uf_2
5.11482 -#7 := (up_4 uf_2 uf_3)
5.11483 -#60 := (not #7)
5.11484 -decl up_1 :: (-> T1 T2 bool)
5.11485 -#6 := (up_1 uf_2 uf_3)
5.11486 -#33 := (iff #6 #7)
5.11487 -#49 := (or #6 #7 #33)
5.11488 -#52 := (not #49)
5.11489 -#1 := true
5.11490 -#11 := (iff #7 true)
5.11491 -#10 := (iff #6 true)
5.11492 -#12 := (or #10 #11)
5.11493 -#8 := (and #7 true)
5.11494 -#9 := (iff #6 #8)
5.11495 -#13 := (or #9 #12)
5.11496 -#14 := (not #13)
5.11497 -#55 := (iff #14 #52)
5.11498 -#40 := (or #6 #7)
5.11499 -#43 := (or #33 #40)
5.11500 -#46 := (not #43)
5.11501 -#53 := (iff #46 #52)
5.11502 -#50 := (iff #43 #49)
5.11503 -#51 := [rewrite]: #50
5.11504 -#54 := [monotonicity #51]: #53
5.11505 -#47 := (iff #14 #46)
5.11506 -#44 := (iff #13 #43)
5.11507 -#41 := (iff #12 #40)
5.11508 -#38 := (iff #11 #7)
5.11509 -#39 := [rewrite]: #38
5.11510 -#36 := (iff #10 #6)
5.11511 -#37 := [rewrite]: #36
5.11512 -#42 := [monotonicity #37 #39]: #41
5.11513 -#34 := (iff #9 #33)
5.11514 -#31 := (iff #8 #7)
5.11515 -#32 := [rewrite]: #31
5.11516 -#35 := [monotonicity #32]: #34
5.11517 -#45 := [monotonicity #35 #42]: #44
5.11518 -#48 := [monotonicity #45]: #47
5.11519 -#56 := [trans #48 #54]: #55
5.11520 -#30 := [asserted]: #14
5.11521 -#57 := [mp #30 #56]: #52
5.11522 -#61 := [not-or-elim #57]: #60
5.11523 -#58 := (not #6)
5.11524 -#59 := [not-or-elim #57]: #58
5.11525 -#72 := (or #7 #6)
5.11526 -#66 := (iff #7 #58)
5.11527 -#62 := (not #33)
5.11528 -#64 := (iff #62 #66)
5.11529 -#67 := [rewrite]: #64
5.11530 -#63 := [not-or-elim #57]: #62
5.11531 -#68 := [mp #63 #67]: #66
5.11532 -#69 := (not #66)
5.11533 -#70 := (or #7 #6 #69)
5.11534 -#71 := [def-axiom]: #70
5.11535 -#73 := [unit-resolution #71 #68]: #72
5.11536 -[unit-resolution #73 #59 #61]: false
5.11537 -unsat
5.11538 -87c5323638926f09820cf502a43fcd61cba03c0c 115 0
5.11539 -#2 := false
5.11540 -decl up_2 :: (-> T2 bool)
5.11541 -decl uf_3 :: T2
5.11542 -#10 := uf_3
5.11543 -#17 := (up_2 uf_3)
5.11544 -#78 := (not #17)
5.11545 -decl uf_1 :: (-> T1 T1)
5.11546 -decl uf_4 :: T1
5.11547 -#14 := uf_4
5.11548 -#15 := (uf_1 uf_4)
5.11549 -#46 := (= uf_4 #15)
5.11550 -#79 := (not #46)
5.11551 -#145 := [hypothesis]: #79
5.11552 -#4 := (:var 0 T1)
5.11553 -#5 := (uf_1 #4)
5.11554 -#563 := (pattern #5)
5.11555 -#37 := (= #4 #5)
5.11556 -#564 := (forall (vars (?x1 T1)) (:pat #563) #37)
5.11557 -#40 := (forall (vars (?x1 T1)) #37)
5.11558 -#567 := (iff #40 #564)
5.11559 -#565 := (iff #37 #37)
5.11560 -#566 := [refl]: #565
5.11561 -#568 := [quant-intro #566]: #567
5.11562 -#72 := (~ #40 #40)
5.11563 -#70 := (~ #37 #37)
5.11564 -#71 := [refl]: #70
5.11565 -#73 := [nnf-pos #71]: #72
5.11566 -#6 := (= #5 #4)
5.11567 -#7 := (forall (vars (?x1 T1)) #6)
5.11568 -#41 := (iff #7 #40)
5.11569 -#38 := (iff #6 #37)
5.11570 -#39 := [rewrite]: #38
5.11571 -#42 := [quant-intro #39]: #41
5.11572 -#36 := [asserted]: #7
5.11573 -#45 := [mp #36 #42]: #40
5.11574 -#74 := [mp~ #45 #73]: #40
5.11575 -#569 := [mp #74 #568]: #564
5.11576 -#146 := (not #564)
5.11577 -#233 := (or #146 #46)
5.11578 -#147 := [quant-inst]: #233
5.11579 -#232 := [unit-resolution #147 #569 #145]: false
5.11580 -#234 := [lemma #232]: #46
5.11581 -#66 := (or #78 #79)
5.11582 -#54 := (and #17 #46)
5.11583 -#59 := (not #54)
5.11584 -#85 := (iff #59 #66)
5.11585 -#67 := (not #66)
5.11586 -#80 := (not #67)
5.11587 -#83 := (iff #80 #66)
5.11588 -#84 := [rewrite]: #83
5.11589 -#81 := (iff #59 #80)
5.11590 -#68 := (iff #54 #67)
5.11591 -#69 := [rewrite]: #68
5.11592 -#82 := [monotonicity #69]: #81
5.11593 -#86 := [trans #82 #84]: #85
5.11594 -#1 := true
5.11595 -#18 := (iff #17 true)
5.11596 -#16 := (= #15 uf_4)
5.11597 -#19 := (and #16 #18)
5.11598 -#20 := (not #19)
5.11599 -#60 := (iff #20 #59)
5.11600 -#57 := (iff #19 #54)
5.11601 -#51 := (and #46 #17)
5.11602 -#55 := (iff #51 #54)
5.11603 -#56 := [rewrite]: #55
5.11604 -#52 := (iff #19 #51)
5.11605 -#49 := (iff #18 #17)
5.11606 -#50 := [rewrite]: #49
5.11607 -#47 := (iff #16 #46)
5.11608 -#48 := [rewrite]: #47
5.11609 -#53 := [monotonicity #48 #50]: #52
5.11610 -#58 := [trans #53 #56]: #57
5.11611 -#61 := [monotonicity #58]: #60
5.11612 -#44 := [asserted]: #20
5.11613 -#64 := [mp #44 #61]: #59
5.11614 -#87 := [mp #64 #86]: #66
5.11615 -#561 := [unit-resolution #87 #234]: #78
5.11616 -#8 := (:var 0 T2)
5.11617 -#9 := (up_2 #8)
5.11618 -#570 := (pattern #9)
5.11619 -#11 := (= #8 uf_3)
5.11620 -#12 := (iff #9 #11)
5.11621 -#571 := (forall (vars (?x2 T2)) (:pat #570) #12)
5.11622 -#13 := (forall (vars (?x2 T2)) #12)
5.11623 -#574 := (iff #13 #571)
5.11624 -#572 := (iff #12 #12)
5.11625 -#573 := [refl]: #572
5.11626 -#575 := [quant-intro #573]: #574
5.11627 -#65 := (~ #13 #13)
5.11628 -#75 := (~ #12 #12)
5.11629 -#76 := [refl]: #75
5.11630 -#62 := [nnf-pos #76]: #65
5.11631 -#43 := [asserted]: #13
5.11632 -#77 := [mp~ #43 #62]: #13
5.11633 -#576 := [mp #77 #575]: #571
5.11634 -#555 := (not #571)
5.11635 -#557 := (or #555 #17)
5.11636 -#225 := (= uf_3 uf_3)
5.11637 -#236 := (iff #17 #225)
5.11638 -#212 := (or #555 #236)
5.11639 -#551 := (iff #212 #557)
5.11640 -#224 := (iff #557 #557)
5.11641 -#558 := [rewrite]: #224
5.11642 -#239 := (iff #236 #17)
5.11643 -#238 := (iff #236 #18)
5.11644 -#237 := (iff #225 true)
5.11645 -#165 := [rewrite]: #237
5.11646 -#235 := [monotonicity #165]: #238
5.11647 -#218 := [trans #235 #50]: #239
5.11648 -#223 := [monotonicity #218]: #551
5.11649 -#559 := [trans #223 #558]: #551
5.11650 -#344 := [quant-inst]: #212
5.11651 -#560 := [mp #344 #559]: #557
5.11652 -[unit-resolution #560 #576 #561]: false
5.11653 -unsat
5.11654 -352491b756faec7ffa24a6d9cce95d2879223e60 464 0
5.11655 -#2 := false
5.11656 -decl uf_2 :: (-> T2 T3 T3)
5.11657 -decl uf_4 :: T3
5.11658 -#15 := uf_4
5.11659 -decl uf_6 :: (-> int T2)
5.11660 -#48 := 2::int
5.11661 -#49 := (uf_6 2::int)
5.11662 -#50 := (uf_2 #49 uf_4)
5.11663 -#23 := 1::int
5.11664 -#44 := (uf_6 1::int)
5.11665 -#51 := (uf_2 #44 #50)
5.11666 -decl uf_1 :: (-> T1 T3 T3)
5.11667 -#45 := (uf_2 #44 uf_4)
5.11668 -#31 := 0::int
5.11669 -#43 := (uf_6 0::int)
5.11670 -#46 := (uf_2 #43 #45)
5.11671 -decl uf_5 :: T1
5.11672 -#19 := uf_5
5.11673 -#47 := (uf_1 uf_5 #46)
5.11674 -#52 := (= #47 #51)
5.11675 -#266 := (uf_1 uf_5 #45)
5.11676 -decl uf_3 :: (-> T1 T2 T2)
5.11677 -#351 := (uf_3 uf_5 #43)
5.11678 -#267 := (uf_2 #351 #266)
5.11679 -#791 := (= #267 #51)
5.11680 -#789 := (= #51 #267)
5.11681 -#752 := (= #50 #266)
5.11682 -#521 := (uf_1 uf_5 uf_4)
5.11683 -#522 := (uf_3 uf_5 #44)
5.11684 -#615 := (uf_2 #522 #521)
5.11685 -#750 := (= #615 #266)
5.11686 -#612 := (= #266 #615)
5.11687 -#6 := (:var 0 T3)
5.11688 -#4 := (:var 2 T1)
5.11689 -#10 := (uf_1 #4 #6)
5.11690 -#5 := (:var 1 T2)
5.11691 -#9 := (uf_3 #4 #5)
5.11692 -#11 := (uf_2 #9 #10)
5.11693 -#682 := (pattern #11)
5.11694 -#7 := (uf_2 #5 #6)
5.11695 -#8 := (uf_1 #4 #7)
5.11696 -#681 := (pattern #8)
5.11697 -#12 := (= #8 #11)
5.11698 -#683 := (forall (vars (?x1 T1) (?x2 T2) (?x3 T3)) (:pat #681 #682) #12)
5.11699 -#13 := (forall (vars (?x1 T1) (?x2 T2) (?x3 T3)) #12)
5.11700 -#686 := (iff #13 #683)
5.11701 -#684 := (iff #12 #12)
5.11702 -#685 := [refl]: #684
5.11703 -#687 := [quant-intro #685]: #686
5.11704 -#195 := (~ #13 #13)
5.11705 -#193 := (~ #12 #12)
5.11706 -#194 := [refl]: #193
5.11707 -#196 := [nnf-pos #194]: #195
5.11708 -#69 := [asserted]: #13
5.11709 -#197 := [mp~ #69 #196]: #13
5.11710 -#688 := [mp #197 #687]: #683
5.11711 -#355 := (not #683)
5.11712 -#605 := (or #355 #612)
5.11713 -#597 := [quant-inst]: #605
5.11714 -#274 := [unit-resolution #597 #688]: #612
5.11715 -#751 := [symm #274]: #750
5.11716 -#748 := (= #50 #615)
5.11717 -#579 := (= uf_4 #521)
5.11718 -#14 := (:var 0 T1)
5.11719 -#16 := (uf_1 #14 uf_4)
5.11720 -#689 := (pattern #16)
5.11721 -#71 := (= uf_4 #16)
5.11722 -#690 := (forall (vars (?x4 T1)) (:pat #689) #71)
5.11723 -#74 := (forall (vars (?x4 T1)) #71)
5.11724 -#693 := (iff #74 #690)
5.11725 -#691 := (iff #71 #71)
5.11726 -#692 := [refl]: #691
5.11727 -#694 := [quant-intro #692]: #693
5.11728 -#180 := (~ #74 #74)
5.11729 -#198 := (~ #71 #71)
5.11730 -#199 := [refl]: #198
5.11731 -#178 := [nnf-pos #199]: #180
5.11732 -#17 := (= #16 uf_4)
5.11733 -#18 := (forall (vars (?x4 T1)) #17)
5.11734 -#75 := (iff #18 #74)
5.11735 -#72 := (iff #17 #71)
5.11736 -#73 := [rewrite]: #72
5.11737 -#76 := [quant-intro #73]: #75
5.11738 -#70 := [asserted]: #18
5.11739 -#79 := [mp #70 #76]: #74
5.11740 -#200 := [mp~ #79 #178]: #74
5.11741 -#695 := [mp #200 #694]: #690
5.11742 -#583 := (not #690)
5.11743 -#584 := (or #583 #579)
5.11744 -#581 := [quant-inst]: #584
5.11745 -#275 := [unit-resolution #581 #695]: #579
5.11746 -#746 := (= #49 #522)
5.11747 -decl uf_7 :: (-> T2 int)
5.11748 -#668 := (uf_7 #44)
5.11749 -#596 := (+ 1::int #668)
5.11750 -#606 := (uf_6 #596)
5.11751 -#742 := (= #606 #522)
5.11752 -#609 := (= #522 #606)
5.11753 -#20 := (:var 0 T2)
5.11754 -#22 := (uf_7 #20)
5.11755 -#697 := (pattern #22)
5.11756 -#21 := (uf_3 uf_5 #20)
5.11757 -#696 := (pattern #21)
5.11758 -#78 := (+ 1::int #22)
5.11759 -#82 := (uf_6 #78)
5.11760 -#85 := (= #21 #82)
5.11761 -#698 := (forall (vars (?x5 T2)) (:pat #696 #697) #85)
5.11762 -#88 := (forall (vars (?x5 T2)) #85)
5.11763 -#701 := (iff #88 #698)
5.11764 -#699 := (iff #85 #85)
5.11765 -#700 := [refl]: #699
5.11766 -#702 := [quant-intro #700]: #701
5.11767 -#181 := (~ #88 #88)
5.11768 -#201 := (~ #85 #85)
5.11769 -#202 := [refl]: #201
5.11770 -#182 := [nnf-pos #202]: #181
5.11771 -#24 := (+ #22 1::int)
5.11772 -#25 := (uf_6 #24)
5.11773 -#26 := (= #21 #25)
5.11774 -#27 := (forall (vars (?x5 T2)) #26)
5.11775 -#89 := (iff #27 #88)
5.11776 -#86 := (iff #26 #85)
5.11777 -#83 := (= #25 #82)
5.11778 -#80 := (= #24 #78)
5.11779 -#81 := [rewrite]: #80
5.11780 -#84 := [monotonicity #81]: #83
5.11781 -#87 := [monotonicity #84]: #86
5.11782 -#90 := [quant-intro #87]: #89
5.11783 -#77 := [asserted]: #27
5.11784 -#93 := [mp #77 #90]: #88
5.11785 -#203 := [mp~ #93 #182]: #88
5.11786 -#703 := [mp #203 #702]: #698
5.11787 -#607 := (not #698)
5.11788 -#600 := (or #607 #609)
5.11789 -#601 := [quant-inst]: #600
5.11790 -#278 := [unit-resolution #601 #703]: #609
5.11791 -#743 := [symm #278]: #742
5.11792 -#744 := (= #49 #606)
5.11793 -#526 := (uf_7 #606)
5.11794 -#325 := (uf_6 #526)
5.11795 -#327 := (= #325 #606)
5.11796 -#28 := (uf_6 #22)
5.11797 -#92 := (= #20 #28)
5.11798 -#704 := (forall (vars (?x6 T2)) (:pat #697) #92)
5.11799 -#96 := (forall (vars (?x6 T2)) #92)
5.11800 -#705 := (iff #96 #704)
5.11801 -#707 := (iff #704 #704)
5.11802 -#708 := [rewrite]: #707
5.11803 -#706 := [rewrite]: #705
5.11804 -#709 := [trans #706 #708]: #705
5.11805 -#183 := (~ #96 #96)
5.11806 -#204 := (~ #92 #92)
5.11807 -#205 := [refl]: #204
5.11808 -#184 := [nnf-pos #205]: #183
5.11809 -#29 := (= #28 #20)
5.11810 -#30 := (forall (vars (?x6 T2)) #29)
5.11811 -#97 := (iff #30 #96)
5.11812 -#94 := (iff #29 #92)
5.11813 -#95 := [rewrite]: #94
5.11814 -#98 := [quant-intro #95]: #97
5.11815 -#91 := [asserted]: #30
5.11816 -#101 := [mp #91 #98]: #96
5.11817 -#206 := [mp~ #101 #184]: #96
5.11818 -#710 := [mp #206 #709]: #704
5.11819 -#368 := (not #704)
5.11820 -#309 := (or #368 #327)
5.11821 -#326 := (= #606 #325)
5.11822 -#311 := (or #368 #326)
5.11823 -#310 := (iff #311 #309)
5.11824 -#301 := (iff #309 #309)
5.11825 -#303 := [rewrite]: #301
5.11826 -#316 := (iff #326 #327)
5.11827 -#328 := [rewrite]: #316
5.11828 -#313 := [monotonicity #328]: #310
5.11829 -#304 := [trans #313 #303]: #310
5.11830 -#312 := [quant-inst]: #311
5.11831 -#307 := [mp #312 #304]: #309
5.11832 -#279 := [unit-resolution #307 #710]: #327
5.11833 -#740 := (= #49 #325)
5.11834 -#738 := (= 2::int #526)
5.11835 -#736 := (= #526 2::int)
5.11836 -#568 := -1::int
5.11837 -#533 := (* -1::int #668)
5.11838 -#501 := (+ #526 #533)
5.11839 -#481 := (<= #501 1::int)
5.11840 -#527 := (= #501 1::int)
5.11841 -#467 := (>= #668 -1::int)
5.11842 -#592 := (>= #668 1::int)
5.11843 -#378 := (= #668 1::int)
5.11844 -#32 := (:var 0 int)
5.11845 -#34 := (uf_6 #32)
5.11846 -#711 := (pattern #34)
5.11847 -#118 := (>= #32 0::int)
5.11848 -#119 := (not #118)
5.11849 -#35 := (uf_7 #34)
5.11850 -#100 := (= #32 #35)
5.11851 -#125 := (or #100 #119)
5.11852 -#712 := (forall (vars (?x7 int)) (:pat #711) #125)
5.11853 -#130 := (forall (vars (?x7 int)) #125)
5.11854 -#715 := (iff #130 #712)
5.11855 -#713 := (iff #125 #125)
5.11856 -#714 := [refl]: #713
5.11857 -#716 := [quant-intro #714]: #715
5.11858 -#185 := (~ #130 #130)
5.11859 -#207 := (~ #125 #125)
5.11860 -#208 := [refl]: #207
5.11861 -#186 := [nnf-pos #208]: #185
5.11862 -#36 := (= #35 #32)
5.11863 -#33 := (<= 0::int #32)
5.11864 -#37 := (implies #33 #36)
5.11865 -#38 := (forall (vars (?x7 int)) #37)
5.11866 -#133 := (iff #38 #130)
5.11867 -#107 := (not #33)
5.11868 -#108 := (or #107 #100)
5.11869 -#113 := (forall (vars (?x7 int)) #108)
5.11870 -#131 := (iff #113 #130)
5.11871 -#128 := (iff #108 #125)
5.11872 -#122 := (or #119 #100)
5.11873 -#126 := (iff #122 #125)
5.11874 -#127 := [rewrite]: #126
5.11875 -#123 := (iff #108 #122)
5.11876 -#120 := (iff #107 #119)
5.11877 -#116 := (iff #33 #118)
5.11878 -#117 := [rewrite]: #116
5.11879 -#121 := [monotonicity #117]: #120
5.11880 -#124 := [monotonicity #121]: #123
5.11881 -#129 := [trans #124 #127]: #128
5.11882 -#132 := [quant-intro #129]: #131
5.11883 -#114 := (iff #38 #113)
5.11884 -#111 := (iff #37 #108)
5.11885 -#104 := (implies #33 #100)
5.11886 -#109 := (iff #104 #108)
5.11887 -#110 := [rewrite]: #109
5.11888 -#105 := (iff #37 #104)
5.11889 -#102 := (iff #36 #100)
5.11890 -#103 := [rewrite]: #102
5.11891 -#106 := [monotonicity #103]: #105
5.11892 -#112 := [trans #106 #110]: #111
5.11893 -#115 := [quant-intro #112]: #114
5.11894 -#134 := [trans #115 #132]: #133
5.11895 -#99 := [asserted]: #38
5.11896 -#135 := [mp #99 #134]: #130
5.11897 -#209 := [mp~ #135 #186]: #130
5.11898 -#717 := [mp #209 #716]: #712
5.11899 -#314 := (not #712)
5.11900 -#365 := (or #314 #378)
5.11901 -#667 := (>= 1::int 0::int)
5.11902 -#665 := (not #667)
5.11903 -#654 := (= 1::int #668)
5.11904 -#655 := (or #654 #665)
5.11905 -#366 := (or #314 #655)
5.11906 -#645 := (iff #366 #365)
5.11907 -#642 := (iff #365 #365)
5.11908 -#646 := [rewrite]: #642
5.11909 -#363 := (iff #655 #378)
5.11910 -#374 := (or #378 false)
5.11911 -#649 := (iff #374 #378)
5.11912 -#653 := [rewrite]: #649
5.11913 -#648 := (iff #655 #374)
5.11914 -#651 := (iff #665 false)
5.11915 -#1 := true
5.11916 -#342 := (not true)
5.11917 -#677 := (iff #342 false)
5.11918 -#678 := [rewrite]: #677
5.11919 -#273 := (iff #665 #342)
5.11920 -#379 := (iff #667 true)
5.11921 -#380 := [rewrite]: #379
5.11922 -#650 := [monotonicity #380]: #273
5.11923 -#373 := [trans #650 #678]: #651
5.11924 -#362 := (iff #654 #378)
5.11925 -#377 := [rewrite]: #362
5.11926 -#652 := [monotonicity #377 #373]: #648
5.11927 -#364 := [trans #652 #653]: #363
5.11928 -#359 := [monotonicity #364]: #645
5.11929 -#643 := [trans #359 #646]: #645
5.11930 -#644 := [quant-inst]: #366
5.11931 -#647 := [mp #644 #643]: #365
5.11932 -#280 := [unit-resolution #647 #717]: #378
5.11933 -#276 := (not #378)
5.11934 -#281 := (or #276 #592)
5.11935 -#268 := [th-lemma]: #281
5.11936 -#270 := [unit-resolution #268 #280]: #592
5.11937 -#271 := (not #592)
5.11938 -#269 := (or #271 #467)
5.11939 -#272 := [th-lemma]: #269
5.11940 -#724 := [unit-resolution #272 #270]: #467
5.11941 -#502 := (not #467)
5.11942 -#486 := (or #314 #502 #527)
5.11943 -#525 := (>= #596 0::int)
5.11944 -#471 := (not #525)
5.11945 -#507 := (= #596 #526)
5.11946 -#531 := (or #507 #471)
5.11947 -#487 := (or #314 #531)
5.11948 -#494 := (iff #487 #486)
5.11949 -#503 := (or #502 #527)
5.11950 -#489 := (or #314 #503)
5.11951 -#492 := (iff #489 #486)
5.11952 -#493 := [rewrite]: #492
5.11953 -#490 := (iff #487 #489)
5.11954 -#480 := (iff #531 #503)
5.11955 -#512 := (or #527 #502)
5.11956 -#524 := (iff #512 #503)
5.11957 -#479 := [rewrite]: #524
5.11958 -#513 := (iff #531 #512)
5.11959 -#509 := (iff #471 #502)
5.11960 -#498 := (iff #525 #467)
5.11961 -#500 := [rewrite]: #498
5.11962 -#511 := [monotonicity #500]: #509
5.11963 -#532 := (iff #507 #527)
5.11964 -#508 := [rewrite]: #532
5.11965 -#523 := [monotonicity #508 #511]: #513
5.11966 -#485 := [trans #523 #479]: #480
5.11967 -#491 := [monotonicity #485]: #490
5.11968 -#495 := [trans #491 #493]: #494
5.11969 -#488 := [quant-inst]: #487
5.11970 -#496 := [mp #488 #495]: #486
5.11971 -#725 := [unit-resolution #496 #717 #724]: #527
5.11972 -#726 := (not #527)
5.11973 -#727 := (or #726 #481)
5.11974 -#728 := [th-lemma]: #727
5.11975 -#729 := [unit-resolution #728 #725]: #481
5.11976 -#497 := (>= #501 1::int)
5.11977 -#730 := (or #726 #497)
5.11978 -#731 := [th-lemma]: #730
5.11979 -#732 := [unit-resolution #731 #725]: #497
5.11980 -#591 := (<= #668 1::int)
5.11981 -#733 := (or #276 #591)
5.11982 -#734 := [th-lemma]: #733
5.11983 -#735 := [unit-resolution #734 #280]: #591
5.11984 -#737 := [th-lemma #270 #735 #732 #729]: #736
5.11985 -#739 := [symm #737]: #738
5.11986 -#741 := [monotonicity #739]: #740
5.11987 -#745 := [trans #741 #279]: #744
5.11988 -#747 := [trans #745 #743]: #746
5.11989 -#749 := [monotonicity #747 #275]: #748
5.11990 -#753 := [trans #749 #751]: #752
5.11991 -#786 := (= #44 #351)
5.11992 -#354 := (uf_7 #43)
5.11993 -#616 := (+ 1::int #354)
5.11994 -#603 := (uf_6 #616)
5.11995 -#782 := (= #603 #351)
5.11996 -#594 := (= #351 #603)
5.11997 -#608 := (or #607 #594)
5.11998 -#604 := [quant-inst]: #608
5.11999 -#754 := [unit-resolution #604 #703]: #594
5.12000 -#783 := [symm #754]: #782
5.12001 -#784 := (= #44 #603)
5.12002 -#585 := (uf_7 #603)
5.12003 -#384 := (uf_6 #585)
5.12004 -#376 := (= #384 #603)
5.12005 -#369 := (or #368 #376)
5.12006 -#385 := (= #603 #384)
5.12007 -#360 := (or #368 #385)
5.12008 -#371 := (iff #360 #369)
5.12009 -#372 := (iff #369 #369)
5.12010 -#338 := [rewrite]: #372
5.12011 -#386 := (iff #385 #376)
5.12012 -#367 := [rewrite]: #386
5.12013 -#361 := [monotonicity #367]: #371
5.12014 -#340 := [trans #361 #338]: #371
5.12015 -#370 := [quant-inst]: #360
5.12016 -#341 := [mp #370 #340]: #369
5.12017 -#755 := [unit-resolution #341 #710]: #376
5.12018 -#780 := (= #44 #384)
5.12019 -#778 := (= 1::int #585)
5.12020 -#776 := (= #585 1::int)
5.12021 -#569 := (* -1::int #585)
5.12022 -#570 := (+ #354 #569)
5.12023 -#552 := (<= #570 -1::int)
5.12024 -#571 := (= #570 -1::int)
5.12025 -#574 := (>= #354 -1::int)
5.12026 -#587 := (>= #354 0::int)
5.12027 -#331 := (= #354 0::int)
5.12028 -#656 := (or #314 #331)
5.12029 -#353 := (>= 0::int 0::int)
5.12030 -#344 := (not #353)
5.12031 -#358 := (= 0::int #354)
5.12032 -#337 := (or #358 #344)
5.12033 -#318 := (or #314 #337)
5.12034 -#320 := (iff #318 #656)
5.12035 -#658 := (iff #656 #656)
5.12036 -#659 := [rewrite]: #658
5.12037 -#330 := (iff #337 #331)
5.12038 -#680 := (or #331 false)
5.12039 -#334 := (iff #680 #331)
5.12040 -#671 := [rewrite]: #334
5.12041 -#670 := (iff #337 #680)
5.12042 -#679 := (iff #344 false)
5.12043 -#343 := (iff #344 #342)
5.12044 -#462 := (iff #353 true)
5.12045 -#669 := [rewrite]: #462
5.12046 -#676 := [monotonicity #669]: #343
5.12047 -#674 := [trans #676 #678]: #679
5.12048 -#673 := (iff #358 #331)
5.12049 -#675 := [rewrite]: #673
5.12050 -#329 := [monotonicity #675 #674]: #670
5.12051 -#672 := [trans #329 #671]: #330
5.12052 -#321 := [monotonicity #672]: #320
5.12053 -#660 := [trans #321 #659]: #320
5.12054 -#319 := [quant-inst]: #318
5.12055 -#661 := [mp #319 #660]: #656
5.12056 -#756 := [unit-resolution #661 #717]: #331
5.12057 -#757 := (not #331)
5.12058 -#758 := (or #757 #587)
5.12059 -#759 := [th-lemma]: #758
5.12060 -#760 := [unit-resolution #759 #756]: #587
5.12061 -#761 := (not #587)
5.12062 -#762 := (or #761 #574)
5.12063 -#763 := [th-lemma]: #762
5.12064 -#764 := [unit-resolution #763 #760]: #574
5.12065 -#577 := (not #574)
5.12066 -#560 := (or #314 #571 #577)
5.12067 -#580 := (>= #616 0::int)
5.12068 -#582 := (not #580)
5.12069 -#565 := (= #616 #585)
5.12070 -#566 := (or #565 #582)
5.12071 -#561 := (or #314 #566)
5.12072 -#547 := (iff #561 #560)
5.12073 -#556 := (or #571 #577)
5.12074 -#563 := (or #314 #556)
5.12075 -#550 := (iff #563 #560)
5.12076 -#546 := [rewrite]: #550
5.12077 -#558 := (iff #561 #563)
5.12078 -#557 := (iff #566 #556)
5.12079 -#567 := (iff #582 #577)
5.12080 -#575 := (iff #580 #574)
5.12081 -#576 := [rewrite]: #575
5.12082 -#578 := [monotonicity #576]: #567
5.12083 -#572 := (iff #565 #571)
5.12084 -#573 := [rewrite]: #572
5.12085 -#559 := [monotonicity #573 #578]: #557
5.12086 -#564 := [monotonicity #559]: #558
5.12087 -#548 := [trans #564 #546]: #547
5.12088 -#562 := [quant-inst]: #561
5.12089 -#551 := [mp #562 #548]: #560
5.12090 -#765 := [unit-resolution #551 #717 #764]: #571
5.12091 -#766 := (not #571)
5.12092 -#767 := (or #766 #552)
5.12093 -#768 := [th-lemma]: #767
5.12094 -#769 := [unit-resolution #768 #765]: #552
5.12095 -#553 := (>= #570 -1::int)
5.12096 -#770 := (or #766 #553)
5.12097 -#771 := [th-lemma]: #770
5.12098 -#772 := [unit-resolution #771 #765]: #553
5.12099 -#586 := (<= #354 0::int)
5.12100 -#773 := (or #757 #586)
5.12101 -#774 := [th-lemma]: #773
5.12102 -#775 := [unit-resolution #774 #756]: #586
5.12103 -#777 := [th-lemma #760 #775 #772 #769]: #776
5.12104 -#779 := [symm #777]: #778
5.12105 -#781 := [monotonicity #779]: #780
5.12106 -#785 := [trans #781 #755]: #784
5.12107 -#787 := [trans #785 #783]: #786
5.12108 -#790 := [monotonicity #787 #753]: #789
5.12109 -#792 := [symm #790]: #791
5.12110 -#352 := (= #47 #267)
5.12111 -#356 := (or #355 #352)
5.12112 -#357 := [quant-inst]: #356
5.12113 -#788 := [unit-resolution #357 #688]: #352
5.12114 -#793 := [trans #788 #792]: #52
5.12115 -#53 := (not #52)
5.12116 -#177 := [asserted]: #53
5.12117 -[unit-resolution #177 #793]: false
5.12118 -unsat
5.12119 -ca467a37d809de06757809cab1cd30e08586674f 21 0
5.12120 -#2 := false
5.12121 -decl up_1 :: (-> T1 bool)
5.12122 -#4 := (:var 0 T1)
5.12123 -#5 := (up_1 #4)
5.12124 -#6 := (forall (vars (?x1 T1)) #5)
5.12125 -#7 := (not #6)
5.12126 -#8 := (or #6 #7)
5.12127 -#9 := (not #8)
5.12128 -#33 := (iff #9 false)
5.12129 -#1 := true
5.12130 -#28 := (not true)
5.12131 -#31 := (iff #28 false)
5.12132 -#32 := [rewrite]: #31
5.12133 -#29 := (iff #9 #28)
5.12134 -#26 := (iff #8 true)
5.12135 -#27 := [rewrite]: #26
5.12136 -#30 := [monotonicity #27]: #29
5.12137 -#34 := [trans #30 #32]: #33
5.12138 -#25 := [asserted]: #9
5.12139 -[mp #25 #34]: false
5.12140 -unsat
5.12141 -c5b3c6b4f593e27f97db06f2c64fc61d8f9bebaa 366 0
5.12142 -#2 := false
5.12143 -decl uf_1 :: (-> int T1)
5.12144 -#37 := 6::int
5.12145 -#38 := (uf_1 6::int)
5.12146 -decl uf_3 :: (-> T1 T1)
5.12147 -decl uf_2 :: (-> T1 int)
5.12148 -#30 := 4::int
5.12149 -#31 := (uf_1 4::int)
5.12150 -#32 := (uf_3 #31)
5.12151 -#33 := (uf_2 #32)
5.12152 -#34 := (* 4::int #33)
5.12153 -#35 := (uf_1 #34)
5.12154 -#36 := (uf_3 #35)
5.12155 -#39 := (= #36 #38)
5.12156 -#476 := (uf_3 #38)
5.12157 -#403 := (= #476 #38)
5.12158 -#531 := (= #38 #476)
5.12159 -#620 := (uf_2 #38)
5.12160 -#142 := -10::int
5.12161 -#513 := (+ -10::int #620)
5.12162 -#472 := (uf_1 #513)
5.12163 -#503 := (uf_3 #472)
5.12164 -#505 := (= #476 #503)
5.12165 -#22 := 10::int
5.12166 -#507 := (>= #620 10::int)
5.12167 -#514 := (ite #507 #505 #531)
5.12168 -#4 := (:var 0 T1)
5.12169 -#21 := (uf_3 #4)
5.12170 -#707 := (pattern #21)
5.12171 -#5 := (uf_2 #4)
5.12172 -#686 := (pattern #5)
5.12173 -#209 := (= #4 #21)
5.12174 -#143 := (+ -10::int #5)
5.12175 -#146 := (uf_1 #143)
5.12176 -#149 := (uf_3 #146)
5.12177 -#208 := (= #21 #149)
5.12178 -#163 := (>= #5 10::int)
5.12179 -#190 := (ite #163 #208 #209)
5.12180 -#708 := (forall (vars (?x4 T1)) (:pat #686 #707) #190)
5.12181 -#193 := (forall (vars (?x4 T1)) #190)
5.12182 -#711 := (iff #193 #708)
5.12183 -#709 := (iff #190 #190)
5.12184 -#710 := [refl]: #709
5.12185 -#712 := [quant-intro #710]: #711
5.12186 -#168 := (ite #163 #149 #4)
5.12187 -#173 := (= #21 #168)
5.12188 -#176 := (forall (vars (?x4 T1)) #173)
5.12189 -#210 := (iff #176 #193)
5.12190 -#191 := (iff #173 #190)
5.12191 -#192 := [rewrite]: #191
5.12192 -#211 := [quant-intro #192]: #210
5.12193 -#188 := (~ #176 #176)
5.12194 -#205 := (~ #173 #173)
5.12195 -#206 := [refl]: #205
5.12196 -#189 := [nnf-pos #206]: #188
5.12197 -#24 := (- #5 10::int)
5.12198 -#25 := (uf_1 #24)
5.12199 -#26 := (uf_3 #25)
5.12200 -#23 := (< #5 10::int)
5.12201 -#27 := (ite #23 #4 #26)
5.12202 -#28 := (= #21 #27)
5.12203 -#29 := (forall (vars (?x4 T1)) #28)
5.12204 -#179 := (iff #29 #176)
5.12205 -#152 := (ite #23 #4 #149)
5.12206 -#155 := (= #21 #152)
5.12207 -#158 := (forall (vars (?x4 T1)) #155)
5.12208 -#177 := (iff #158 #176)
5.12209 -#174 := (iff #155 #173)
5.12210 -#171 := (= #152 #168)
5.12211 -#161 := (not #163)
5.12212 -#165 := (ite #161 #4 #149)
5.12213 -#169 := (= #165 #168)
5.12214 -#170 := [rewrite]: #169
5.12215 -#166 := (= #152 #165)
5.12216 -#162 := (iff #23 #161)
5.12217 -#164 := [rewrite]: #162
5.12218 -#167 := [monotonicity #164]: #166
5.12219 -#172 := [trans #167 #170]: #171
5.12220 -#175 := [monotonicity #172]: #174
5.12221 -#178 := [quant-intro #175]: #177
5.12222 -#159 := (iff #29 #158)
5.12223 -#156 := (iff #28 #155)
5.12224 -#153 := (= #27 #152)
5.12225 -#150 := (= #26 #149)
5.12226 -#147 := (= #25 #146)
5.12227 -#144 := (= #24 #143)
5.12228 -#145 := [rewrite]: #144
5.12229 -#148 := [monotonicity #145]: #147
5.12230 -#151 := [monotonicity #148]: #150
5.12231 -#154 := [monotonicity #151]: #153
5.12232 -#157 := [monotonicity #154]: #156
5.12233 -#160 := [quant-intro #157]: #159
5.12234 -#180 := [trans #160 #178]: #179
5.12235 -#141 := [asserted]: #29
5.12236 -#181 := [mp #141 #180]: #176
5.12237 -#207 := [mp~ #181 #189]: #176
5.12238 -#212 := [mp #207 #211]: #193
5.12239 -#713 := [mp #212 #712]: #708
5.12240 -#336 := (not #708)
5.12241 -#518 := (or #336 #514)
5.12242 -#528 := [quant-inst]: #518
5.12243 -#477 := [unit-resolution #528 #713]: #514
5.12244 -#529 := (not #507)
5.12245 -#498 := (<= #620 6::int)
5.12246 -#610 := (= #620 6::int)
5.12247 -#10 := (:var 0 int)
5.12248 -#12 := (uf_1 #10)
5.12249 -#694 := (pattern #12)
5.12250 -#9 := 0::int
5.12251 -#82 := (>= #10 0::int)
5.12252 -#83 := (not #82)
5.12253 -#13 := (uf_2 #12)
5.12254 -#64 := (= #10 #13)
5.12255 -#89 := (or #64 #83)
5.12256 -#695 := (forall (vars (?x2 int)) (:pat #694) #89)
5.12257 -#94 := (forall (vars (?x2 int)) #89)
5.12258 -#698 := (iff #94 #695)
5.12259 -#696 := (iff #89 #89)
5.12260 -#697 := [refl]: #696
5.12261 -#699 := [quant-intro #697]: #698
5.12262 -#185 := (~ #94 #94)
5.12263 -#199 := (~ #89 #89)
5.12264 -#200 := [refl]: #199
5.12265 -#183 := [nnf-pos #200]: #185
5.12266 -#14 := (= #13 #10)
5.12267 -#11 := (<= 0::int #10)
5.12268 -#15 := (implies #11 #14)
5.12269 -#16 := (forall (vars (?x2 int)) #15)
5.12270 -#97 := (iff #16 #94)
5.12271 -#71 := (not #11)
5.12272 -#72 := (or #71 #64)
5.12273 -#77 := (forall (vars (?x2 int)) #72)
5.12274 -#95 := (iff #77 #94)
5.12275 -#92 := (iff #72 #89)
5.12276 -#86 := (or #83 #64)
5.12277 -#90 := (iff #86 #89)
5.12278 -#91 := [rewrite]: #90
5.12279 -#87 := (iff #72 #86)
5.12280 -#84 := (iff #71 #83)
5.12281 -#80 := (iff #11 #82)
5.12282 -#81 := [rewrite]: #80
5.12283 -#85 := [monotonicity #81]: #84
5.12284 -#88 := [monotonicity #85]: #87
5.12285 -#93 := [trans #88 #91]: #92
5.12286 -#96 := [quant-intro #93]: #95
5.12287 -#78 := (iff #16 #77)
5.12288 -#75 := (iff #15 #72)
5.12289 -#68 := (implies #11 #64)
5.12290 -#73 := (iff #68 #72)
5.12291 -#74 := [rewrite]: #73
5.12292 -#69 := (iff #15 #68)
5.12293 -#66 := (iff #14 #64)
5.12294 -#67 := [rewrite]: #66
5.12295 -#70 := [monotonicity #67]: #69
5.12296 -#76 := [trans #70 #74]: #75
5.12297 -#79 := [quant-intro #76]: #78
5.12298 -#98 := [trans #79 #96]: #97
5.12299 -#63 := [asserted]: #16
5.12300 -#99 := [mp #63 #98]: #94
5.12301 -#201 := [mp~ #99 #183]: #94
5.12302 -#700 := [mp #201 #699]: #695
5.12303 -#673 := (not #695)
5.12304 -#591 := (or #673 #610)
5.12305 -#526 := (>= 6::int 0::int)
5.12306 -#527 := (not #526)
5.12307 -#617 := (= 6::int #620)
5.12308 -#621 := (or #617 #527)
5.12309 -#592 := (or #673 #621)
5.12310 -#595 := (iff #592 #591)
5.12311 -#597 := (iff #591 #591)
5.12312 -#593 := [rewrite]: #597
5.12313 -#600 := (iff #621 #610)
5.12314 -#614 := (or #610 false)
5.12315 -#605 := (iff #614 #610)
5.12316 -#606 := [rewrite]: #605
5.12317 -#603 := (iff #621 #614)
5.12318 -#613 := (iff #527 false)
5.12319 -#1 := true
5.12320 -#663 := (not true)
5.12321 -#666 := (iff #663 false)
5.12322 -#667 := [rewrite]: #666
5.12323 -#611 := (iff #527 #663)
5.12324 -#599 := (iff #526 true)
5.12325 -#601 := [rewrite]: #599
5.12326 -#612 := [monotonicity #601]: #611
5.12327 -#609 := [trans #612 #667]: #613
5.12328 -#608 := (iff #617 #610)
5.12329 -#602 := [rewrite]: #608
5.12330 -#604 := [monotonicity #602 #609]: #603
5.12331 -#607 := [trans #604 #606]: #600
5.12332 -#596 := [monotonicity #607]: #595
5.12333 -#598 := [trans #596 #593]: #595
5.12334 -#594 := [quant-inst]: #592
5.12335 -#584 := [mp #594 #598]: #591
5.12336 -#478 := [unit-resolution #584 #700]: #610
5.12337 -#453 := (not #610)
5.12338 -#454 := (or #453 #498)
5.12339 -#455 := [th-lemma]: #454
5.12340 -#456 := [unit-resolution #455 #478]: #498
5.12341 -#458 := (not #498)
5.12342 -#459 := (or #458 #529)
5.12343 -#460 := [th-lemma]: #459
5.12344 -#302 := [unit-resolution #460 #456]: #529
5.12345 -#508 := (not #514)
5.12346 -#490 := (or #508 #507 #531)
5.12347 -#491 := [def-axiom]: #490
5.12348 -#461 := [unit-resolution #491 #302 #477]: #531
5.12349 -#404 := [symm #461]: #403
5.12350 -#405 := (= #36 #476)
5.12351 -#649 := (uf_2 #35)
5.12352 -#582 := (+ -10::int #649)
5.12353 -#553 := (uf_1 #582)
5.12354 -#556 := (uf_3 #553)
5.12355 -#401 := (= #556 #476)
5.12356 -#417 := (= #553 #38)
5.12357 -#415 := (= #582 6::int)
5.12358 -#335 := (uf_2 #31)
5.12359 -#647 := -1::int
5.12360 -#502 := (* -1::int #335)
5.12361 -#463 := (+ #33 #502)
5.12362 -#464 := (<= #463 0::int)
5.12363 -#486 := (= #33 #335)
5.12364 -#445 := (= #32 #31)
5.12365 -#574 := (= #31 #32)
5.12366 -#575 := (+ -10::int #335)
5.12367 -#576 := (uf_1 #575)
5.12368 -#577 := (uf_3 #576)
5.12369 -#578 := (= #32 #577)
5.12370 -#579 := (>= #335 10::int)
5.12371 -#580 := (ite #579 #578 #574)
5.12372 -#572 := (or #336 #580)
5.12373 -#583 := [quant-inst]: #572
5.12374 -#457 := [unit-resolution #583 #713]: #580
5.12375 -#562 := (not #579)
5.12376 -#554 := (<= #335 4::int)
5.12377 -#324 := (= #335 4::int)
5.12378 -#659 := (or #673 #324)
5.12379 -#678 := (>= 4::int 0::int)
5.12380 -#680 := (not #678)
5.12381 -#677 := (= 4::int #335)
5.12382 -#319 := (or #677 #680)
5.12383 -#660 := (or #673 #319)
5.12384 -#382 := (iff #660 #659)
5.12385 -#384 := (iff #659 #659)
5.12386 -#385 := [rewrite]: #384
5.12387 -#672 := (iff #319 #324)
5.12388 -#305 := (or #324 false)
5.12389 -#310 := (iff #305 #324)
5.12390 -#311 := [rewrite]: #310
5.12391 -#669 := (iff #319 #305)
5.12392 -#662 := (iff #680 false)
5.12393 -#664 := (iff #680 #663)
5.12394 -#325 := (iff #678 true)
5.12395 -#326 := [rewrite]: #325
5.12396 -#665 := [monotonicity #326]: #664
5.12397 -#668 := [trans #665 #667]: #662
5.12398 -#661 := (iff #677 #324)
5.12399 -#323 := [rewrite]: #661
5.12400 -#671 := [monotonicity #323 #668]: #669
5.12401 -#670 := [trans #671 #311]: #672
5.12402 -#383 := [monotonicity #670]: #382
5.12403 -#277 := [trans #383 #385]: #382
5.12404 -#367 := [quant-inst]: #660
5.12405 -#655 := [mp #367 #277]: #659
5.12406 -#462 := [unit-resolution #655 #700]: #324
5.12407 -#441 := (not #324)
5.12408 -#444 := (or #441 #554)
5.12409 -#448 := [th-lemma]: #444
5.12410 -#450 := [unit-resolution #448 #462]: #554
5.12411 -#451 := (not #554)
5.12412 -#449 := (or #451 #562)
5.12413 -#452 := [th-lemma]: #449
5.12414 -#440 := [unit-resolution #452 #450]: #562
5.12415 -#561 := (not #580)
5.12416 -#566 := (or #561 #579 #574)
5.12417 -#567 := [def-axiom]: #566
5.12418 -#443 := [unit-resolution #567 #440 #457]: #574
5.12419 -#446 := [symm #443]: #445
5.12420 -#442 := [monotonicity #446]: #486
5.12421 -#447 := (not #486)
5.12422 -#437 := (or #447 #464)
5.12423 -#427 := [th-lemma]: #437
5.12424 -#429 := [unit-resolution #427 #442]: #464
5.12425 -#471 := (>= #463 0::int)
5.12426 -#430 := (or #447 #471)
5.12427 -#433 := [th-lemma]: #430
5.12428 -#434 := [unit-resolution #433 #442]: #471
5.12429 -#560 := (>= #335 4::int)
5.12430 -#438 := (or #441 #560)
5.12431 -#431 := [th-lemma]: #438
5.12432 -#439 := [unit-resolution #431 #462]: #560
5.12433 -#651 := (* -1::int #649)
5.12434 -#648 := (+ #34 #651)
5.12435 -#625 := (<= #648 0::int)
5.12436 -#652 := (= #648 0::int)
5.12437 -#643 := (>= #33 0::int)
5.12438 -#435 := (not #471)
5.12439 -#432 := (not #560)
5.12440 -#436 := (or #643 #432 #435)
5.12441 -#422 := [th-lemma]: #436
5.12442 -#424 := [unit-resolution #422 #439 #434]: #643
5.12443 -#644 := (not #643)
5.12444 -#489 := (or #644 #652)
5.12445 -#628 := (or #673 #644 #652)
5.12446 -#370 := (>= #34 0::int)
5.12447 -#371 := (not #370)
5.12448 -#650 := (= #34 #649)
5.12449 -#364 := (or #650 #371)
5.12450 -#629 := (or #673 #364)
5.12451 -#469 := (iff #629 #628)
5.12452 -#636 := (or #673 #489)
5.12453 -#466 := (iff #636 #628)
5.12454 -#468 := [rewrite]: #466
5.12455 -#630 := (iff #629 #636)
5.12456 -#633 := (iff #364 #489)
5.12457 -#646 := (or #652 #644)
5.12458 -#631 := (iff #646 #489)
5.12459 -#632 := [rewrite]: #631
5.12460 -#487 := (iff #364 #646)
5.12461 -#645 := (iff #371 #644)
5.12462 -#638 := (iff #370 #643)
5.12463 -#639 := [rewrite]: #638
5.12464 -#640 := [monotonicity #639]: #645
5.12465 -#641 := (iff #650 #652)
5.12466 -#642 := [rewrite]: #641
5.12467 -#488 := [monotonicity #642 #640]: #487
5.12468 -#634 := [trans #488 #632]: #633
5.12469 -#637 := [monotonicity #634]: #630
5.12470 -#622 := [trans #637 #468]: #469
5.12471 -#635 := [quant-inst]: #629
5.12472 -#623 := [mp #635 #622]: #628
5.12473 -#425 := [unit-resolution #623 #700]: #489
5.12474 -#423 := [unit-resolution #425 #424]: #652
5.12475 -#426 := (not #652)
5.12476 -#408 := (or #426 #625)
5.12477 -#410 := [th-lemma]: #408
5.12478 -#411 := [unit-resolution #410 #423]: #625
5.12479 -#626 := (>= #648 0::int)
5.12480 -#412 := (or #426 #626)
5.12481 -#413 := [th-lemma]: #412
5.12482 -#414 := [unit-resolution #413 #423]: #626
5.12483 -#416 := [th-lemma #414 #411 #439 #450 #434 #429]: #415
5.12484 -#418 := [monotonicity #416]: #417
5.12485 -#402 := [monotonicity #418]: #401
5.12486 -#557 := (= #36 #556)
5.12487 -#581 := (= #35 #36)
5.12488 -#558 := (>= #649 10::int)
5.12489 -#559 := (ite #558 #557 #581)
5.12490 -#533 := (or #336 #559)
5.12491 -#534 := [quant-inst]: #533
5.12492 -#419 := [unit-resolution #534 #713]: #559
5.12493 -#420 := (not #625)
5.12494 -#409 := (or #558 #420 #432 #435)
5.12495 -#421 := [th-lemma]: #409
5.12496 -#398 := [unit-resolution #421 #411 #439 #434]: #558
5.12497 -#428 := (not #558)
5.12498 -#535 := (not #559)
5.12499 -#539 := (or #535 #428 #557)
5.12500 -#540 := [def-axiom]: #539
5.12501 -#400 := [unit-resolution #540 #398 #419]: #557
5.12502 -#406 := [trans #400 #402]: #405
5.12503 -#399 := [trans #406 #404]: #39
5.12504 -#40 := (not #39)
5.12505 -#182 := [asserted]: #40
5.12506 -[unit-resolution #182 #399]: false
5.12507 -unsat
5.12508 -9d577a545efebaa46a634487a3e922a7cddbb866 408 0
5.12509 -#2 := false
5.12510 -#22 := 0::int
5.12511 -#8 := 2::int
5.12512 -decl uf_6 :: (-> T3 T4 int)
5.12513 -decl uf_9 :: T4
5.12514 -#50 := uf_9
5.12515 -decl uf_8 :: T3
5.12516 -#49 := uf_8
5.12517 -#51 := (uf_6 uf_8 uf_9)
5.12518 -#624 := (mod #51 2::int)
5.12519 -#172 := -1::int
5.12520 -#640 := (* -1::int #624)
5.12521 -decl uf_7 :: (-> T2 T4 T4)
5.12522 -decl uf_5 :: T2
5.12523 -#13 := uf_5
5.12524 -#54 := (uf_7 uf_5 uf_9)
5.12525 -#55 := (uf_6 uf_8 #54)
5.12526 -#56 := (mod #55 2::int)
5.12527 -#620 := (+ #56 #640)
5.12528 -#608 := (>= #620 0::int)
5.12529 -#566 := (= #620 0::int)
5.12530 -#35 := (:var 0 T4)
5.12531 -#38 := (uf_7 uf_5 #35)
5.12532 -#34 := (:var 1 T3)
5.12533 -#39 := (uf_6 #34 #38)
5.12534 -#811 := (pattern #39)
5.12535 -#40 := (mod #39 2::int)
5.12536 -#173 := (* -1::int #40)
5.12537 -#36 := (uf_6 #34 #35)
5.12538 -#37 := (mod #36 2::int)
5.12539 -#174 := (+ #37 #173)
5.12540 -#175 := (= #174 0::int)
5.12541 -#812 := (forall (vars (?x6 T3) (?x7 T4)) (:pat #811) #175)
5.12542 -#178 := (forall (vars (?x6 T3) (?x7 T4)) #175)
5.12543 -#815 := (iff #178 #812)
5.12544 -#813 := (iff #175 #175)
5.12545 -#814 := [refl]: #813
5.12546 -#816 := [quant-intro #814]: #815
5.12547 -#277 := (~ #178 #178)
5.12548 -#302 := (~ #175 #175)
5.12549 -#303 := [refl]: #302
5.12550 -#278 := [nnf-pos #303]: #277
5.12551 -#41 := (= #37 #40)
5.12552 -#42 := (forall (vars (?x6 T3) (?x7 T4)) #41)
5.12553 -#179 := (iff #42 #178)
5.12554 -#176 := (iff #41 #175)
5.12555 -#177 := [rewrite]: #176
5.12556 -#180 := [quant-intro #177]: #179
5.12557 -#169 := [asserted]: #42
5.12558 -#181 := [mp #169 #180]: #178
5.12559 -#304 := [mp~ #181 #278]: #178
5.12560 -#817 := [mp #304 #816]: #812
5.12561 -#622 := (not #812)
5.12562 -#628 := (or #622 #566)
5.12563 -#756 := (* -1::int #56)
5.12564 -#625 := (+ #624 #756)
5.12565 -#632 := (= #625 0::int)
5.12566 -#596 := (or #622 #632)
5.12567 -#562 := (iff #596 #628)
5.12568 -#595 := (iff #628 #628)
5.12569 -#597 := [rewrite]: #595
5.12570 -#626 := (iff #632 #566)
5.12571 -#633 := (+ #756 #624)
5.12572 -#638 := (= #633 0::int)
5.12573 -#621 := (iff #638 #566)
5.12574 -#602 := [rewrite]: #621
5.12575 -#639 := (iff #632 #638)
5.12576 -#634 := (= #625 #633)
5.12577 -#637 := [rewrite]: #634
5.12578 -#635 := [monotonicity #637]: #639
5.12579 -#627 := [trans #635 #602]: #626
5.12580 -#593 := [monotonicity #627]: #562
5.12581 -#604 := [trans #593 #597]: #562
5.12582 -#603 := [quant-inst]: #596
5.12583 -#606 := [mp #603 #604]: #628
5.12584 -#528 := [unit-resolution #606 #817]: #566
5.12585 -#521 := (not #566)
5.12586 -#464 := (or #521 #608)
5.12587 -#456 := [th-lemma]: #464
5.12588 -#465 := [unit-resolution #456 #528]: #608
5.12589 -decl uf_10 :: int
5.12590 -#52 := uf_10
5.12591 -#57 := (mod uf_10 2::int)
5.12592 -#243 := (* -1::int #57)
5.12593 -#244 := (+ #56 #243)
5.12594 -#447 := (>= #244 0::int)
5.12595 -#387 := (not #447)
5.12596 -#245 := (= #244 0::int)
5.12597 -#248 := (not #245)
5.12598 -#218 := (* -1::int #55)
5.12599 -#219 := (+ uf_10 #218)
5.12600 -#222 := (div #219 2::int)
5.12601 -#251 := (* -1::int #222)
5.12602 -decl uf_2 :: T2
5.12603 -#4 := uf_2
5.12604 -#59 := (uf_7 uf_2 uf_9)
5.12605 -#60 := (uf_6 uf_8 #59)
5.12606 -#252 := (+ #60 #251)
5.12607 -#253 := (= #252 0::int)
5.12608 -#448 := (<= #252 0::int)
5.12609 -#605 := (+ uf_10 #55)
5.12610 -#613 := (mod #605 2::int)
5.12611 -#672 := (>= #613 2::int)
5.12612 -#662 := (not #672)
5.12613 -#1 := true
5.12614 -#81 := [true-axiom]: true
5.12615 -#520 := (or false #662)
5.12616 -#523 := [th-lemma]: #520
5.12617 -#524 := [unit-resolution #523 #81]: #662
5.12618 -#701 := (* -1::int #613)
5.12619 -#204 := -2::int
5.12620 -#691 := (* -2::int #222)
5.12621 -#702 := (+ #691 #701)
5.12622 -#703 := (+ #218 #702)
5.12623 -#699 := (+ uf_10 #703)
5.12624 -#694 := (<= #699 0::int)
5.12625 -#692 := (= #699 0::int)
5.12626 -#545 := (or false #692)
5.12627 -#546 := [th-lemma]: #545
5.12628 -#548 := [unit-resolution #546 #81]: #692
5.12629 -#549 := (not #692)
5.12630 -#497 := (or #549 #694)
5.12631 -#482 := [th-lemma]: #497
5.12632 -#483 := [unit-resolution #482 #548]: #694
5.12633 -#536 := (not #448)
5.12634 -#395 := [hypothesis]: #536
5.12635 -#555 := (* -1::int uf_10)
5.12636 -#573 := (+ #51 #555)
5.12637 -#543 := (<= #573 0::int)
5.12638 -#53 := (= #51 uf_10)
5.12639 -#256 := (not #253)
5.12640 -#259 := (or #248 #256)
5.12641 -#502 := 1::int
5.12642 -#731 := (div uf_10 2::int)
5.12643 -#515 := (* -1::int #731)
5.12644 -#513 := (+ #640 #515)
5.12645 -#618 := (div #51 2::int)
5.12646 -#514 := (* -1::int #618)
5.12647 -#516 := (+ #514 #513)
5.12648 -#498 := (+ #243 #516)
5.12649 -#500 := (+ #56 #498)
5.12650 -#501 := (+ uf_10 #500)
5.12651 -#503 := (>= #501 1::int)
5.12652 -#486 := (not #503)
5.12653 -#361 := (<= #244 0::int)
5.12654 -#453 := (not #259)
5.12655 -#517 := [hypothesis]: #453
5.12656 -#440 := (or #259 #245)
5.12657 -#451 := [def-axiom]: #440
5.12658 -#519 := [unit-resolution #451 #517]: #245
5.12659 -#478 := (or #248 #361)
5.12660 -#470 := [th-lemma]: #478
5.12661 -#479 := [unit-resolution #470 #519]: #361
5.12662 -#449 := (>= #252 0::int)
5.12663 -#452 := (or #259 #253)
5.12664 -#380 := [def-axiom]: #452
5.12665 -#480 := [unit-resolution #380 #517]: #253
5.12666 -#471 := (or #256 #449)
5.12667 -#481 := [th-lemma]: #471
5.12668 -#462 := [unit-resolution #481 #480]: #449
5.12669 -#487 := (not #361)
5.12670 -#485 := (not #449)
5.12671 -#476 := (or #486 #485 #487)
5.12672 -#607 := (<= #620 0::int)
5.12673 -#529 := (or #521 #607)
5.12674 -#522 := [th-lemma]: #529
5.12675 -#525 := [unit-resolution #522 #528]: #607
5.12676 -#723 := (* -2::int #731)
5.12677 -#724 := (+ #243 #723)
5.12678 -#718 := (+ uf_10 #724)
5.12679 -#720 := (<= #718 0::int)
5.12680 -#722 := (= #718 0::int)
5.12681 -#526 := (or false #722)
5.12682 -#512 := [th-lemma]: #526
5.12683 -#504 := [unit-resolution #512 #81]: #722
5.12684 -#505 := (not #722)
5.12685 -#506 := (or #505 #720)
5.12686 -#507 := [th-lemma]: #506
5.12687 -#508 := [unit-resolution #507 #504]: #720
5.12688 -#509 := [hypothesis]: #361
5.12689 -#583 := (* -2::int #618)
5.12690 -#584 := (+ #583 #640)
5.12691 -#585 := (+ #51 #584)
5.12692 -#587 := (<= #585 0::int)
5.12693 -#582 := (= #585 0::int)
5.12694 -#510 := (or false #582)
5.12695 -#499 := [th-lemma]: #510
5.12696 -#511 := [unit-resolution #499 #81]: #582
5.12697 -#488 := (not #582)
5.12698 -#490 := (or #488 #587)
5.12699 -#491 := [th-lemma]: #490
5.12700 -#492 := [unit-resolution #491 #511]: #587
5.12701 -#493 := [hypothesis]: #503
5.12702 -#649 := (* -2::int #60)
5.12703 -#644 := (+ #218 #649)
5.12704 -#650 := (+ #51 #644)
5.12705 -#636 := (>= #650 0::int)
5.12706 -#623 := (= #650 0::int)
5.12707 -#43 := (uf_7 uf_2 #35)
5.12708 -#44 := (uf_6 #34 #43)
5.12709 -#818 := (pattern #44)
5.12710 -#205 := (* -2::int #44)
5.12711 -#203 := (* -1::int #39)
5.12712 -#206 := (+ #203 #205)
5.12713 -#207 := (+ #36 #206)
5.12714 -#208 := (= #207 0::int)
5.12715 -#819 := (forall (vars (?x8 T3) (?x9 T4)) (:pat #811 #818) #208)
5.12716 -#211 := (forall (vars (?x8 T3) (?x9 T4)) #208)
5.12717 -#822 := (iff #211 #819)
5.12718 -#820 := (iff #208 #208)
5.12719 -#821 := [refl]: #820
5.12720 -#823 := [quant-intro #821]: #822
5.12721 -#279 := (~ #211 #211)
5.12722 -#305 := (~ #208 #208)
5.12723 -#306 := [refl]: #305
5.12724 -#280 := [nnf-pos #306]: #279
5.12725 -#45 := (* #44 2::int)
5.12726 -#46 := (+ #45 #39)
5.12727 -#47 := (= #46 #36)
5.12728 -#48 := (forall (vars (?x8 T3) (?x9 T4)) #47)
5.12729 -#214 := (iff #48 #211)
5.12730 -#171 := (* 2::int #44)
5.12731 -#187 := (+ #39 #171)
5.12732 -#195 := (= #36 #187)
5.12733 -#200 := (forall (vars (?x8 T3) (?x9 T4)) #195)
5.12734 -#212 := (iff #200 #211)
5.12735 -#209 := (iff #195 #208)
5.12736 -#210 := [rewrite]: #209
5.12737 -#213 := [quant-intro #210]: #212
5.12738 -#201 := (iff #48 #200)
5.12739 -#198 := (iff #47 #195)
5.12740 -#192 := (= #187 #36)
5.12741 -#196 := (iff #192 #195)
5.12742 -#197 := [rewrite]: #196
5.12743 -#193 := (iff #47 #192)
5.12744 -#190 := (= #46 #187)
5.12745 -#184 := (+ #171 #39)
5.12746 -#188 := (= #184 #187)
5.12747 -#189 := [rewrite]: #188
5.12748 -#185 := (= #46 #184)
5.12749 -#182 := (= #45 #171)
5.12750 -#183 := [rewrite]: #182
5.12751 -#186 := [monotonicity #183]: #185
5.12752 -#191 := [trans #186 #189]: #190
5.12753 -#194 := [monotonicity #191]: #193
5.12754 -#199 := [trans #194 #197]: #198
5.12755 -#202 := [quant-intro #199]: #201
5.12756 -#215 := [trans #202 #213]: #214
5.12757 -#170 := [asserted]: #48
5.12758 -#216 := [mp #170 #215]: #211
5.12759 -#307 := [mp~ #216 #280]: #211
5.12760 -#824 := [mp #307 #823]: #819
5.12761 -#518 := (not #819)
5.12762 -#629 := (or #518 #623)
5.12763 -#630 := [quant-inst]: #629
5.12764 -#531 := [unit-resolution #630 #824]: #623
5.12765 -#534 := (not #623)
5.12766 -#494 := (or #534 #636)
5.12767 -#495 := [th-lemma]: #494
5.12768 -#496 := [unit-resolution #495 #531]: #636
5.12769 -#489 := [hypothesis]: #449
5.12770 -#484 := [th-lemma #483 #489 #496 #493 #492 #509 #508 #525 #524]: false
5.12771 -#477 := [lemma #484]: #476
5.12772 -#463 := [unit-resolution #477 #462 #479]: #486
5.12773 -#727 := (>= #718 0::int)
5.12774 -#466 := (or #505 #727)
5.12775 -#457 := [th-lemma]: #466
5.12776 -#467 := [unit-resolution #457 #504]: #727
5.12777 -#434 := (or #248 #447)
5.12778 -#436 := [th-lemma]: #434
5.12779 -#437 := [unit-resolution #436 #519]: #447
5.12780 -#544 := (>= #573 0::int)
5.12781 -#445 := (not #544)
5.12782 -#428 := (or #256 #448)
5.12783 -#441 := [th-lemma]: #428
5.12784 -#442 := [unit-resolution #441 #480]: #448
5.12785 -#532 := (or #543 #536)
5.12786 -#695 := (>= #699 0::int)
5.12787 -#550 := (or #549 #695)
5.12788 -#393 := [th-lemma]: #550
5.12789 -#551 := [unit-resolution #393 #548]: #695
5.12790 -#547 := (not #543)
5.12791 -#552 := [hypothesis]: #547
5.12792 -#631 := (<= #650 0::int)
5.12793 -#538 := (or #534 #631)
5.12794 -#540 := [th-lemma]: #538
5.12795 -#541 := [unit-resolution #540 #531]: #631
5.12796 -#539 := [hypothesis]: #448
5.12797 -#666 := (>= #613 0::int)
5.12798 -#542 := (or false #666)
5.12799 -#530 := [th-lemma]: #542
5.12800 -#533 := [unit-resolution #530 #81]: #666
5.12801 -#535 := [th-lemma #533 #539 #541 #552 #551]: false
5.12802 -#537 := [lemma #535]: #532
5.12803 -#443 := [unit-resolution #537 #442]: #543
5.12804 -#429 := (or #547 #445)
5.12805 -#764 := (not #53)
5.12806 -#771 := (or #764 #259)
5.12807 -#262 := (iff #53 #259)
5.12808 -#61 := (- uf_10 #55)
5.12809 -#62 := (div #61 2::int)
5.12810 -#63 := (= #60 #62)
5.12811 -#64 := (not #63)
5.12812 -#58 := (= #56 #57)
5.12813 -#65 := (implies #58 #64)
5.12814 -#66 := (iff #53 #65)
5.12815 -#265 := (iff #66 #262)
5.12816 -#225 := (= #60 #222)
5.12817 -#228 := (not #225)
5.12818 -#234 := (not #58)
5.12819 -#235 := (or #234 #228)
5.12820 -#240 := (iff #53 #235)
5.12821 -#263 := (iff #240 #262)
5.12822 -#260 := (iff #235 #259)
5.12823 -#257 := (iff #228 #256)
5.12824 -#254 := (iff #225 #253)
5.12825 -#255 := [rewrite]: #254
5.12826 -#258 := [monotonicity #255]: #257
5.12827 -#249 := (iff #234 #248)
5.12828 -#246 := (iff #58 #245)
5.12829 -#247 := [rewrite]: #246
5.12830 -#250 := [monotonicity #247]: #249
5.12831 -#261 := [monotonicity #250 #258]: #260
5.12832 -#264 := [monotonicity #261]: #263
5.12833 -#241 := (iff #66 #240)
5.12834 -#238 := (iff #65 #235)
5.12835 -#231 := (implies #58 #228)
5.12836 -#236 := (iff #231 #235)
5.12837 -#237 := [rewrite]: #236
5.12838 -#232 := (iff #65 #231)
5.12839 -#229 := (iff #64 #228)
5.12840 -#226 := (iff #63 #225)
5.12841 -#223 := (= #62 #222)
5.12842 -#220 := (= #61 #219)
5.12843 -#221 := [rewrite]: #220
5.12844 -#224 := [monotonicity #221]: #223
5.12845 -#227 := [monotonicity #224]: #226
5.12846 -#230 := [monotonicity #227]: #229
5.12847 -#233 := [monotonicity #230]: #232
5.12848 -#239 := [trans #233 #237]: #238
5.12849 -#242 := [monotonicity #239]: #241
5.12850 -#266 := [trans #242 #264]: #265
5.12851 -#217 := [asserted]: #66
5.12852 -#267 := [mp #217 #266]: #262
5.12853 -#433 := (not #262)
5.12854 -#438 := (or #764 #259 #433)
5.12855 -#439 := [def-axiom]: #438
5.12856 -#772 := [unit-resolution #439 #267]: #771
5.12857 -#444 := [unit-resolution #772 #517]: #764
5.12858 -#435 := (or #53 #547 #445)
5.12859 -#446 := [th-lemma]: #435
5.12860 -#431 := [unit-resolution #446 #444]: #429
5.12861 -#432 := [unit-resolution #431 #443]: #445
5.12862 -#588 := (>= #585 0::int)
5.12863 -#411 := (or #488 #588)
5.12864 -#413 := [th-lemma]: #411
5.12865 -#418 := [unit-resolution #413 #511]: #588
5.12866 -#419 := [th-lemma #418 #432 #437 #467 #465 #463]: false
5.12867 -#420 := [lemma #419]: #259
5.12868 -#427 := (or #53 #453)
5.12869 -#768 := (or #53 #453 #433)
5.12870 -#770 := [def-axiom]: #768
5.12871 -#557 := [unit-resolution #770 #267]: #427
5.12872 -#406 := [unit-resolution #557 #420]: #53
5.12873 -#377 := (or #764 #543)
5.12874 -#381 := [th-lemma]: #377
5.12875 -#382 := [unit-resolution #381 #406]: #543
5.12876 -#385 := [th-lemma #496 #382 #395 #483 #524]: false
5.12877 -#386 := [lemma #385]: #448
5.12878 -#390 := (or #253 #536)
5.12879 -#408 := [hypothesis]: #485
5.12880 -#409 := (or #764 #544)
5.12881 -#397 := [th-lemma]: #409
5.12882 -#399 := [unit-resolution #397 #406]: #544
5.12883 -#400 := [th-lemma #399 #408 #533 #551 #541]: false
5.12884 -#403 := [lemma #400]: #449
5.12885 -#392 := (or #253 #536 #485)
5.12886 -#394 := [th-lemma]: #392
5.12887 -#657 := [unit-resolution #394 #403]: #390
5.12888 -#658 := [unit-resolution #657 #386]: #253
5.12889 -#450 := (or #453 #248 #256)
5.12890 -#454 := [def-axiom]: #450
5.12891 -#762 := [unit-resolution #454 #420]: #259
5.12892 -#664 := [unit-resolution #762 #658]: #248
5.12893 -#372 := (or #245 #387)
5.12894 -#560 := (+ #57 #640)
5.12895 -#610 := (>= #560 0::int)
5.12896 -#742 := (= #57 #624)
5.12897 -#424 := (= #624 #57)
5.12898 -#405 := [monotonicity #406]: #424
5.12899 -#407 := [symm #405]: #742
5.12900 -#705 := (not #742)
5.12901 -#706 := (or #705 #610)
5.12902 -#568 := [th-lemma]: #706
5.12903 -#569 := [unit-resolution #568 #407]: #610
5.12904 -#398 := [hypothesis]: #487
5.12905 -#404 := [th-lemma #525 #398 #569]: false
5.12906 -#378 := [lemma #404]: #361
5.12907 -#379 := (or #245 #487 #387)
5.12908 -#388 := [th-lemma]: #379
5.12909 -#369 := [unit-resolution #388 #378]: #372
5.12910 -#370 := [unit-resolution #369 #664]: #387
5.12911 -#708 := (<= #560 0::int)
5.12912 -#373 := (or #705 #708)
5.12913 -#374 := [th-lemma]: #373
5.12914 -#375 := [unit-resolution #374 #407]: #708
5.12915 -[th-lemma #375 #370 #465]: false
5.12916 -unsat
5.12917 -af6e260cca3c1cafcab25bb9a90bb548b2b7ec6b 50 0
5.12918 -#2 := false
5.12919 -decl up_35 :: (-> int bool)
5.12920 -#112 := 1::int
5.12921 -#113 := (up_35 1::int)
5.12922 -#114 := (not #113)
5.12923 -#297 := [asserted]: #114
5.12924 -#103 := (:var 0 int)
5.12925 -#104 := (up_35 #103)
5.12926 -#910 := (pattern #104)
5.12927 -#911 := (forall (vars (?x12 int)) (:pat #910) #104)
5.12928 -#294 := (forall (vars (?x12 int)) #104)
5.12929 -#914 := (iff #294 #911)
5.12930 -#912 := (iff #104 #104)
5.12931 -#913 := [refl]: #912
5.12932 -#915 := [quant-intro #913]: #914
5.12933 -#320 := (~ #294 #294)
5.12934 -#361 := (~ #104 #104)
5.12935 -#362 := [refl]: #361
5.12936 -#321 := [nnf-pos #362]: #320
5.12937 -decl up_32 :: (-> T13 bool)
5.12938 -decl uf_36 :: (-> int T13 T13)
5.12939 -decl uf_37 :: T13
5.12940 -#105 := uf_37
5.12941 -#106 := (uf_36 #103 uf_37)
5.12942 -#107 := (up_32 #106)
5.12943 -#108 := (not #107)
5.12944 -#109 := (or #107 #108)
5.12945 -#110 := (and #104 #109)
5.12946 -#111 := (forall (vars (?x12 int)) #110)
5.12947 -#295 := (iff #111 #294)
5.12948 -#292 := (iff #110 #104)
5.12949 -#1 := true
5.12950 -#287 := (and #104 true)
5.12951 -#290 := (iff #287 #104)
5.12952 -#291 := [rewrite]: #290
5.12953 -#288 := (iff #110 #287)
5.12954 -#284 := (iff #109 true)
5.12955 -#286 := [rewrite]: #284
5.12956 -#289 := [monotonicity #286]: #288
5.12957 -#293 := [trans #289 #291]: #292
5.12958 -#296 := [quant-intro #293]: #295
5.12959 -#283 := [asserted]: #111
5.12960 -#299 := [mp #283 #296]: #294
5.12961 -#363 := [mp~ #299 #321]: #294
5.12962 -#916 := [mp #363 #915]: #911
5.12963 -#418 := (not #911)
5.12964 -#503 := (or #418 #113)
5.12965 -#504 := [quant-inst]: #503
5.12966 -[unit-resolution #504 #916 #297]: false
5.12967 -unsat
5.12968 -679f514494fa97481f8fb2124de829ed6e4d2b68 506 0
5.12969 -#2 := false
5.12970 -decl uf_17 :: (-> T8 T3)
5.12971 -decl uf_18 :: (-> T1 T8)
5.12972 -decl uf_19 :: T1
5.12973 -#104 := uf_19
5.12974 -#105 := (uf_18 uf_19)
5.12975 -#106 := (uf_17 #105)
5.12976 -decl uf_15 :: (-> T7 T3)
5.12977 -decl uf_16 :: (-> int T7)
5.12978 -#101 := 3::int
5.12979 -#102 := (uf_16 3::int)
5.12980 -#103 := (uf_15 #102)
5.12981 -#107 := (= #103 #106)
5.12982 -decl uf_13 :: (-> T2 T3)
5.12983 -decl uf_2 :: (-> T1 T2 T2)
5.12984 -decl uf_7 :: T2
5.12985 -#29 := uf_7
5.12986 -#513 := (uf_2 uf_19 uf_7)
5.12987 -#644 := (uf_13 #513)
5.12988 -#564 := (= #644 #106)
5.12989 -#858 := (= #106 #644)
5.12990 -#79 := (:var 0 T1)
5.12991 -#82 := (uf_2 #79 uf_7)
5.12992 -#930 := (pattern #82)
5.12993 -#80 := (uf_18 #79)
5.12994 -#929 := (pattern #80)
5.12995 -#83 := (uf_13 #82)
5.12996 -#81 := (uf_17 #80)
5.12997 -#84 := (= #81 #83)
5.12998 -#931 := (forall (vars (?x16 T1)) (:pat #929 #930) #84)
5.12999 -#85 := (forall (vars (?x16 T1)) #84)
5.13000 -#934 := (iff #85 #931)
5.13001 -#932 := (iff #84 #84)
5.13002 -#933 := [refl]: #932
5.13003 -#935 := [quant-intro #933]: #934
5.13004 -#347 := (~ #85 #85)
5.13005 -#384 := (~ #84 #84)
5.13006 -#385 := [refl]: #384
5.13007 -#348 := [nnf-pos #385]: #347
5.13008 -#238 := [asserted]: #85
5.13009 -#386 := [mp~ #238 #348]: #85
5.13010 -#936 := [mp #386 #935]: #931
5.13011 -#861 := (not #931)
5.13012 -#856 := (or #861 #858)
5.13013 -#862 := [quant-inst]: #856
5.13014 -#579 := [unit-resolution #862 #936]: #858
5.13015 -#565 := [symm #579]: #564
5.13016 -#553 := (= #103 #644)
5.13017 -decl uf_1 :: (-> T2 T3)
5.13018 -#834 := (uf_1 #513)
5.13019 -#831 := (= #834 #644)
5.13020 -#835 := (= #644 #834)
5.13021 -#5 := (:var 0 T2)
5.13022 -#66 := (uf_13 #5)
5.13023 -#906 := (pattern #66)
5.13024 -#8 := (uf_1 #5)
5.13025 -#905 := (pattern #8)
5.13026 -#222 := (= #8 #66)
5.13027 -#907 := (forall (vars (?x13 T2)) (:pat #905 #906) #222)
5.13028 -#226 := (forall (vars (?x13 T2)) #222)
5.13029 -#910 := (iff #226 #907)
5.13030 -#908 := (iff #222 #222)
5.13031 -#909 := [refl]: #908
5.13032 -#911 := [quant-intro #909]: #910
5.13033 -#341 := (~ #226 #226)
5.13034 -#375 := (~ #222 #222)
5.13035 -#376 := [refl]: #375
5.13036 -#342 := [nnf-pos #376]: #341
5.13037 -#67 := (= #66 #8)
5.13038 -#68 := (forall (vars (?x13 T2)) #67)
5.13039 -#227 := (iff #68 #226)
5.13040 -#224 := (iff #67 #222)
5.13041 -#225 := [rewrite]: #224
5.13042 -#228 := [quant-intro #225]: #227
5.13043 -#221 := [asserted]: #68
5.13044 -#231 := [mp #221 #228]: #226
5.13045 -#377 := [mp~ #231 #342]: #226
5.13046 -#912 := [mp #377 #911]: #907
5.13047 -#526 := (not #907)
5.13048 -#547 := (or #526 #835)
5.13049 -#548 := (or #526 #831)
5.13050 -#827 := (iff #548 #547)
5.13051 -#824 := (iff #547 #547)
5.13052 -#828 := [rewrite]: #824
5.13053 -#545 := (iff #831 #835)
5.13054 -#546 := [rewrite]: #545
5.13055 -#541 := [monotonicity #546]: #827
5.13056 -#825 := [trans #541 #828]: #827
5.13057 -#826 := [quant-inst]: #548
5.13058 -#829 := [mp #826 #825]: #547
5.13059 -#578 := [unit-resolution #829 #912]: #835
5.13060 -#563 := [symm #578]: #831
5.13061 -#542 := (= #103 #834)
5.13062 -decl uf_3 :: (-> int T3)
5.13063 -decl uf_4 :: (-> T3 int)
5.13064 -#30 := (uf_1 uf_7)
5.13065 -#698 := (uf_4 #30)
5.13066 -#11 := 1::int
5.13067 -#127 := (uf_3 1::int)
5.13068 -#130 := (uf_4 #127)
5.13069 -#701 := (+ #130 #698)
5.13070 -#704 := (uf_3 #701)
5.13071 -#779 := (= #704 #834)
5.13072 -#4 := (:var 1 T1)
5.13073 -#6 := (uf_2 #4 #5)
5.13074 -#863 := (pattern #6)
5.13075 -#9 := (uf_4 #8)
5.13076 -#133 := (+ #9 #130)
5.13077 -#136 := (uf_3 #133)
5.13078 -#7 := (uf_1 #6)
5.13079 -#139 := (= #7 #136)
5.13080 -#864 := (forall (vars (?x1 T1) (?x2 T2)) (:pat #863) #139)
5.13081 -#142 := (forall (vars (?x1 T1) (?x2 T2)) #139)
5.13082 -#867 := (iff #142 #864)
5.13083 -#865 := (iff #139 #139)
5.13084 -#866 := [refl]: #865
5.13085 -#868 := [quant-intro #866]: #867
5.13086 -#361 := (~ #142 #142)
5.13087 -#359 := (~ #139 #139)
5.13088 -#360 := [refl]: #359
5.13089 -#362 := [nnf-pos #360]: #361
5.13090 -#10 := 0::int
5.13091 -#12 := (+ 0::int 1::int)
5.13092 -#13 := (uf_3 #12)
5.13093 -#14 := (uf_4 #13)
5.13094 -#15 := (+ #9 #14)
5.13095 -#16 := (uf_3 #15)
5.13096 -#17 := (= #7 #16)
5.13097 -#18 := (forall (vars (?x1 T1) (?x2 T2)) #17)
5.13098 -#143 := (iff #18 #142)
5.13099 -#140 := (iff #17 #139)
5.13100 -#137 := (= #16 #136)
5.13101 -#134 := (= #15 #133)
5.13102 -#131 := (= #14 #130)
5.13103 -#128 := (= #13 #127)
5.13104 -#125 := (= #12 1::int)
5.13105 -#126 := [rewrite]: #125
5.13106 -#129 := [monotonicity #126]: #128
5.13107 -#132 := [monotonicity #129]: #131
5.13108 -#135 := [monotonicity #132]: #134
5.13109 -#138 := [monotonicity #135]: #137
5.13110 -#141 := [monotonicity #138]: #140
5.13111 -#144 := [quant-intro #141]: #143
5.13112 -#124 := [asserted]: #18
5.13113 -#147 := [mp #124 #144]: #142
5.13114 -#363 := [mp~ #147 #362]: #142
5.13115 -#869 := [mp #363 #868]: #864
5.13116 -#790 := (not #864)
5.13117 -#786 := (or #790 #779)
5.13118 -#699 := (+ #698 #130)
5.13119 -#692 := (uf_3 #699)
5.13120 -#700 := (= #834 #692)
5.13121 -#791 := (or #790 #700)
5.13122 -#781 := (iff #791 #786)
5.13123 -#783 := (iff #786 #786)
5.13124 -#777 := [rewrite]: #783
5.13125 -#788 := (iff #700 #779)
5.13126 -#798 := (= #834 #704)
5.13127 -#776 := (iff #798 #779)
5.13128 -#778 := [rewrite]: #776
5.13129 -#785 := (iff #700 #798)
5.13130 -#797 := (= #692 #704)
5.13131 -#702 := (= #699 #701)
5.13132 -#703 := [rewrite]: #702
5.13133 -#794 := [monotonicity #703]: #797
5.13134 -#787 := [monotonicity #794]: #785
5.13135 -#789 := [trans #787 #778]: #788
5.13136 -#782 := [monotonicity #789]: #781
5.13137 -#784 := [trans #782 #777]: #781
5.13138 -#780 := [quant-inst]: #791
5.13139 -#768 := [mp #780 #784]: #786
5.13140 -#577 := [unit-resolution #768 #869]: #779
5.13141 -#550 := (= #103 #704)
5.13142 -#572 := (= #127 #704)
5.13143 -#582 := (= #704 #127)
5.13144 -#598 := (= #701 1::int)
5.13145 -#774 := (<= #698 0::int)
5.13146 -#773 := (= #698 0::int)
5.13147 -#31 := (uf_3 0::int)
5.13148 -#852 := (uf_4 #31)
5.13149 -#854 := (= #852 0::int)
5.13150 -#72 := (:var 0 int)
5.13151 -#92 := (uf_3 #72)
5.13152 -#945 := (pattern #92)
5.13153 -#266 := (>= #72 0::int)
5.13154 -#267 := (not #266)
5.13155 -#93 := (uf_4 #92)
5.13156 -#248 := (= #72 #93)
5.13157 -#273 := (or #248 #267)
5.13158 -#946 := (forall (vars (?x18 int)) (:pat #945) #273)
5.13159 -#278 := (forall (vars (?x18 int)) #273)
5.13160 -#949 := (iff #278 #946)
5.13161 -#947 := (iff #273 #273)
5.13162 -#948 := [refl]: #947
5.13163 -#950 := [quant-intro #948]: #949
5.13164 -#351 := (~ #278 #278)
5.13165 -#390 := (~ #273 #273)
5.13166 -#391 := [refl]: #390
5.13167 -#352 := [nnf-pos #391]: #351
5.13168 -#94 := (= #93 #72)
5.13169 -#91 := (<= 0::int #72)
5.13170 -#95 := (implies #91 #94)
5.13171 -#96 := (forall (vars (?x18 int)) #95)
5.13172 -#281 := (iff #96 #278)
5.13173 -#255 := (not #91)
5.13174 -#256 := (or #255 #248)
5.13175 -#261 := (forall (vars (?x18 int)) #256)
5.13176 -#279 := (iff #261 #278)
5.13177 -#276 := (iff #256 #273)
5.13178 -#270 := (or #267 #248)
5.13179 -#274 := (iff #270 #273)
5.13180 -#275 := [rewrite]: #274
5.13181 -#271 := (iff #256 #270)
5.13182 -#268 := (iff #255 #267)
5.13183 -#264 := (iff #91 #266)
5.13184 -#265 := [rewrite]: #264
5.13185 -#269 := [monotonicity #265]: #268
5.13186 -#272 := [monotonicity #269]: #271
5.13187 -#277 := [trans #272 #275]: #276
5.13188 -#280 := [quant-intro #277]: #279
5.13189 -#262 := (iff #96 #261)
5.13190 -#259 := (iff #95 #256)
5.13191 -#252 := (implies #91 #248)
5.13192 -#257 := (iff #252 #256)
5.13193 -#258 := [rewrite]: #257
5.13194 -#253 := (iff #95 #252)
5.13195 -#250 := (iff #94 #248)
5.13196 -#251 := [rewrite]: #250
5.13197 -#254 := [monotonicity #251]: #253
5.13198 -#260 := [trans #254 #258]: #259
5.13199 -#263 := [quant-intro #260]: #262
5.13200 -#282 := [trans #263 #280]: #281
5.13201 -#247 := [asserted]: #96
5.13202 -#283 := [mp #247 #282]: #278
5.13203 -#392 := [mp~ #283 #352]: #278
5.13204 -#951 := [mp #392 #950]: #946
5.13205 -#487 := (not #946)
5.13206 -#488 := (or #487 #854)
5.13207 -#859 := (>= 0::int 0::int)
5.13208 -#860 := (not #859)
5.13209 -#511 := (= 0::int #852)
5.13210 -#516 := (or #511 #860)
5.13211 -#849 := (or #487 #516)
5.13212 -#850 := (iff #849 #488)
5.13213 -#837 := (iff #488 #488)
5.13214 -#544 := [rewrite]: #837
5.13215 -#846 := (iff #516 #854)
5.13216 -#843 := (or #854 false)
5.13217 -#845 := (iff #843 #854)
5.13218 -#482 := [rewrite]: #845
5.13219 -#844 := (iff #516 #843)
5.13220 -#841 := (iff #860 false)
5.13221 -#1 := true
5.13222 -#500 := (not true)
5.13223 -#503 := (iff #500 false)
5.13224 -#840 := [rewrite]: #503
5.13225 -#501 := (iff #860 #500)
5.13226 -#496 := (iff #859 true)
5.13227 -#838 := [rewrite]: #496
5.13228 -#502 := [monotonicity #838]: #501
5.13229 -#842 := [trans #502 #840]: #841
5.13230 -#853 := (iff #511 #854)
5.13231 -#512 := [rewrite]: #853
5.13232 -#839 := [monotonicity #512 #842]: #844
5.13233 -#848 := [trans #839 #482]: #846
5.13234 -#836 := [monotonicity #848]: #850
5.13235 -#559 := [trans #836 #544]: #850
5.13236 -#847 := [quant-inst]: #849
5.13237 -#560 := [mp #847 #559]: #488
5.13238 -#622 := [unit-resolution #560 #951]: #854
5.13239 -#589 := (= #698 #852)
5.13240 -#32 := (= #30 #31)
5.13241 -#159 := [asserted]: #32
5.13242 -#590 := [monotonicity #159]: #589
5.13243 -#591 := [trans #590 #622]: #773
5.13244 -#592 := (not #773)
5.13245 -#593 := (or #592 #774)
5.13246 -#594 := [th-lemma]: #593
5.13247 -#595 := [unit-resolution #594 #591]: #774
5.13248 -#770 := (>= #698 0::int)
5.13249 -#596 := (or #592 #770)
5.13250 -#597 := [th-lemma]: #596
5.13251 -#586 := [unit-resolution #597 #591]: #770
5.13252 -#680 := (<= #130 1::int)
5.13253 -#605 := (= #130 1::int)
5.13254 -#708 := (or #487 #605)
5.13255 -#746 := (>= 1::int 0::int)
5.13256 -#732 := (not #746)
5.13257 -#710 := (= 1::int #130)
5.13258 -#711 := (or #710 #732)
5.13259 -#689 := (or #487 #711)
5.13260 -#714 := (iff #689 #708)
5.13261 -#715 := (iff #708 #708)
5.13262 -#683 := [rewrite]: #715
5.13263 -#707 := (iff #711 #605)
5.13264 -#724 := (or #605 false)
5.13265 -#722 := (iff #724 #605)
5.13266 -#727 := [rewrite]: #722
5.13267 -#725 := (iff #711 #724)
5.13268 -#720 := (iff #732 false)
5.13269 -#723 := (iff #732 #500)
5.13270 -#717 := (iff #746 true)
5.13271 -#718 := [rewrite]: #717
5.13272 -#719 := [monotonicity #718]: #723
5.13273 -#721 := [trans #719 #840]: #720
5.13274 -#712 := (iff #710 #605)
5.13275 -#716 := [rewrite]: #712
5.13276 -#726 := [monotonicity #716 #721]: #725
5.13277 -#653 := [trans #726 #727]: #707
5.13278 -#709 := [monotonicity #653]: #714
5.13279 -#690 := [trans #709 #683]: #714
5.13280 -#713 := [quant-inst]: #689
5.13281 -#649 := [mp #713 #690]: #708
5.13282 -#616 := [unit-resolution #649 #951]: #605
5.13283 -#609 := (not #605)
5.13284 -#612 := (or #609 #680)
5.13285 -#613 := [th-lemma]: #612
5.13286 -#599 := [unit-resolution #613 #616]: #680
5.13287 -#682 := (>= #130 1::int)
5.13288 -#601 := (or #609 #682)
5.13289 -#602 := [th-lemma]: #601
5.13290 -#600 := [unit-resolution #602 #616]: #682
5.13291 -#575 := [th-lemma #600 #599 #586 #595]: #598
5.13292 -#583 := [monotonicity #575]: #582
5.13293 -#574 := [symm #583]: #572
5.13294 -#568 := (= #103 #127)
5.13295 -decl uf_5 :: (-> T4 T3)
5.13296 -decl uf_8 :: T4
5.13297 -#33 := uf_8
5.13298 -#34 := (uf_5 uf_8)
5.13299 -#810 := (uf_4 #34)
5.13300 -#812 := (+ #130 #810)
5.13301 -#814 := (uf_3 #812)
5.13302 -#571 := (= #814 #127)
5.13303 -#576 := (= #127 #814)
5.13304 -#587 := (= 1::int #812)
5.13305 -#603 := (= #812 1::int)
5.13306 -#771 := (<= #810 0::int)
5.13307 -#769 := (= #810 0::int)
5.13308 -#619 := (= #810 #852)
5.13309 -#35 := (= #34 #31)
5.13310 -#162 := (= #31 #34)
5.13311 -#163 := (iff #35 #162)
5.13312 -#164 := [rewrite]: #163
5.13313 -#160 := [asserted]: #35
5.13314 -#167 := [mp #160 #164]: #162
5.13315 -#623 := [symm #167]: #35
5.13316 -#624 := [monotonicity #623]: #619
5.13317 -#614 := [trans #624 #622]: #769
5.13318 -#604 := (not #769)
5.13319 -#606 := (or #604 #771)
5.13320 -#607 := [th-lemma]: #606
5.13321 -#610 := [unit-resolution #607 #614]: #771
5.13322 -#772 := (>= #810 0::int)
5.13323 -#611 := (or #604 #772)
5.13324 -#615 := [th-lemma]: #611
5.13325 -#608 := [unit-resolution #615 #614]: #772
5.13326 -#585 := [th-lemma #600 #599 #608 #610]: #603
5.13327 -#588 := [symm #585]: #587
5.13328 -#584 := [monotonicity #588]: #576
5.13329 -#573 := [symm #584]: #571
5.13330 -#567 := (= #103 #814)
5.13331 -decl uf_6 :: (-> int T4 T4)
5.13332 -#539 := (uf_6 3::int uf_8)
5.13333 -#818 := (uf_5 #539)
5.13334 -#646 := (= #818 #814)
5.13335 -#802 := (= #814 #818)
5.13336 -#20 := (:var 0 T4)
5.13337 -#19 := (:var 1 int)
5.13338 -#21 := (uf_6 #19 #20)
5.13339 -#870 := (pattern #21)
5.13340 -#23 := (uf_5 #20)
5.13341 -#24 := (uf_4 #23)
5.13342 -#146 := (+ #24 #130)
5.13343 -#150 := (uf_3 #146)
5.13344 -#22 := (uf_5 #21)
5.13345 -#153 := (= #22 #150)
5.13346 -#871 := (forall (vars (?x3 int) (?x4 T4)) (:pat #870) #153)
5.13347 -#156 := (forall (vars (?x3 int) (?x4 T4)) #153)
5.13348 -#874 := (iff #156 #871)
5.13349 -#872 := (iff #153 #153)
5.13350 -#873 := [refl]: #872
5.13351 -#875 := [quant-intro #873]: #874
5.13352 -#328 := (~ #156 #156)
5.13353 -#364 := (~ #153 #153)
5.13354 -#365 := [refl]: #364
5.13355 -#326 := [nnf-pos #365]: #328
5.13356 -#25 := (+ #24 #14)
5.13357 -#26 := (uf_3 #25)
5.13358 -#27 := (= #22 #26)
5.13359 -#28 := (forall (vars (?x3 int) (?x4 T4)) #27)
5.13360 -#157 := (iff #28 #156)
5.13361 -#154 := (iff #27 #153)
5.13362 -#151 := (= #26 #150)
5.13363 -#148 := (= #25 #146)
5.13364 -#149 := [monotonicity #132]: #148
5.13365 -#152 := [monotonicity #149]: #151
5.13366 -#155 := [monotonicity #152]: #154
5.13367 -#158 := [quant-intro #155]: #157
5.13368 -#145 := [asserted]: #28
5.13369 -#161 := [mp #145 #158]: #156
5.13370 -#366 := [mp~ #161 #326]: #156
5.13371 -#876 := [mp #366 #875]: #871
5.13372 -#687 := (not #871)
5.13373 -#688 := (or #687 #802)
5.13374 -#811 := (+ #810 #130)
5.13375 -#805 := (uf_3 #811)
5.13376 -#806 := (= #818 #805)
5.13377 -#647 := (or #687 #806)
5.13378 -#697 := (iff #647 #688)
5.13379 -#793 := (iff #688 #688)
5.13380 -#796 := [rewrite]: #793
5.13381 -#804 := (iff #806 #802)
5.13382 -#803 := (iff #646 #802)
5.13383 -#801 := [rewrite]: #803
5.13384 -#799 := (iff #806 #646)
5.13385 -#643 := (= #805 #814)
5.13386 -#813 := (= #811 #812)
5.13387 -#807 := [rewrite]: #813
5.13388 -#645 := [monotonicity #807]: #643
5.13389 -#800 := [monotonicity #645]: #799
5.13390 -#686 := [trans #800 #801]: #804
5.13391 -#792 := [monotonicity #686]: #697
5.13392 -#681 := [trans #792 #796]: #697
5.13393 -#795 := [quant-inst]: #647
5.13394 -#696 := [mp #795 #681]: #688
5.13395 -#626 := [unit-resolution #696 #876]: #802
5.13396 -#570 := [symm #626]: #646
5.13397 -#557 := (= #103 #818)
5.13398 -decl uf_14 :: (-> T4 T3)
5.13399 -#536 := (uf_14 #539)
5.13400 -#820 := (= #536 #818)
5.13401 -#69 := (uf_14 #20)
5.13402 -#914 := (pattern #69)
5.13403 -#913 := (pattern #23)
5.13404 -#230 := (= #23 #69)
5.13405 -#915 := (forall (vars (?x14 T4)) (:pat #913 #914) #230)
5.13406 -#234 := (forall (vars (?x14 T4)) #230)
5.13407 -#918 := (iff #234 #915)
5.13408 -#916 := (iff #230 #230)
5.13409 -#917 := [refl]: #916
5.13410 -#919 := [quant-intro #917]: #918
5.13411 -#343 := (~ #234 #234)
5.13412 -#378 := (~ #230 #230)
5.13413 -#379 := [refl]: #378
5.13414 -#344 := [nnf-pos #379]: #343
5.13415 -#70 := (= #69 #23)
5.13416 -#71 := (forall (vars (?x14 T4)) #70)
5.13417 -#235 := (iff #71 #234)
5.13418 -#232 := (iff #70 #230)
5.13419 -#233 := [rewrite]: #232
5.13420 -#236 := [quant-intro #233]: #235
5.13421 -#229 := [asserted]: #71
5.13422 -#239 := [mp #229 #236]: #234
5.13423 -#380 := [mp~ #239 #344]: #234
5.13424 -#920 := [mp #380 #919]: #915
5.13425 -#540 := (not #915)
5.13426 -#821 := (or #540 #820)
5.13427 -#819 := (= #818 #536)
5.13428 -#822 := (or #540 #819)
5.13429 -#823 := (iff #822 #821)
5.13430 -#665 := (iff #821 #821)
5.13431 -#666 := [rewrite]: #665
5.13432 -#815 := (iff #819 #820)
5.13433 -#816 := [rewrite]: #815
5.13434 -#664 := [monotonicity #816]: #823
5.13435 -#808 := [trans #664 #666]: #823
5.13436 -#817 := [quant-inst]: #822
5.13437 -#809 := [mp #817 #808]: #821
5.13438 -#628 := [unit-resolution #809 #920]: #820
5.13439 -#857 := (= #103 #536)
5.13440 -#75 := (uf_6 #72 uf_8)
5.13441 -#922 := (pattern #75)
5.13442 -#73 := (uf_16 #72)
5.13443 -#921 := (pattern #73)
5.13444 -#76 := (uf_14 #75)
5.13445 -#74 := (uf_15 #73)
5.13446 -#77 := (= #74 #76)
5.13447 -#923 := (forall (vars (?x15 int)) (:pat #921 #922) #77)
5.13448 -#78 := (forall (vars (?x15 int)) #77)
5.13449 -#926 := (iff #78 #923)
5.13450 -#924 := (iff #77 #77)
5.13451 -#925 := [refl]: #924
5.13452 -#927 := [quant-intro #925]: #926
5.13453 -#345 := (~ #78 #78)
5.13454 -#381 := (~ #77 #77)
5.13455 -#382 := [refl]: #381
5.13456 -#346 := [nnf-pos #382]: #345
5.13457 -#237 := [asserted]: #78
5.13458 -#383 := [mp~ #237 #346]: #78
5.13459 -#928 := [mp #383 #927]: #923
5.13460 -#851 := (not #923)
5.13461 -#524 := (or #851 #857)
5.13462 -#525 := [quant-inst]: #524
5.13463 -#580 := [unit-resolution #525 #928]: #857
5.13464 -#566 := [trans #580 #628]: #557
5.13465 -#558 := [trans #566 #570]: #567
5.13466 -#549 := [trans #558 #573]: #568
5.13467 -#551 := [trans #549 #574]: #550
5.13468 -#552 := [trans #551 #577]: #542
5.13469 -#543 := [trans #552 #563]: #553
5.13470 -#554 := [trans #543 #565]: #107
5.13471 -#108 := (not #107)
5.13472 -#325 := [asserted]: #108
5.13473 -[unit-resolution #325 #554]: false
5.13474 -unsat
6.1 --- a/src/HOL/SMT/Examples/SMT_Examples.thy Wed May 12 23:54:01 2010 +0200
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,587 +0,0 @@
6.4 -(* Title: HOL/SMT/SMT_Examples.thy
6.5 - Author: Sascha Boehme, TU Muenchen
6.6 -*)
6.7 -
6.8 -header {* Examples for the 'smt' tactic. *}
6.9 -
6.10 -theory SMT_Examples
6.11 -imports SMT
6.12 -begin
6.13 -
6.14 -declare [[smt_solver=z3, z3_proofs=true]]
6.15 -
6.16 -declare [[smt_certificates="$ISABELLE_SMT/Examples/SMT_Examples.certs"]]
6.17 -
6.18 -text {*
6.19 -To avoid re-generation of certificates,
6.20 -the following option is set to "false":
6.21 -*}
6.22 -
6.23 -declare [[smt_fixed=true]]
6.24 -
6.25 -
6.26 -
6.27 -section {* Propositional and first-order logic *}
6.28 -
6.29 -lemma "True" by smt
6.30 -
6.31 -lemma "p \<or> \<not>p" by smt
6.32 -
6.33 -lemma "(p \<and> True) = p" by smt
6.34 -
6.35 -lemma "(p \<or> q) \<and> \<not>p \<Longrightarrow> q" by smt
6.36 -
6.37 -lemma "(a \<and> b) \<or> (c \<and> d) \<Longrightarrow> (a \<and> b) \<or> (c \<and> d)"
6.38 - using [[z3_proofs=false]] (* no Z3 proof *)
6.39 - by smt
6.40 -
6.41 -lemma "(p1 \<and> p2) \<or> p3 \<longrightarrow> (p1 \<longrightarrow> (p3 \<and> p2) \<or> (p1 \<and> p3)) \<or> p1" by smt
6.42 -
6.43 -lemma "P=P=P=P=P=P=P=P=P=P" by smt
6.44 -
6.45 -lemma
6.46 - assumes "a | b | c | d"
6.47 - and "e | f | (a & d)"
6.48 - and "~(a | (c & ~c)) | b"
6.49 - and "~(b & (x | ~x)) | c"
6.50 - and "~(d | False) | c"
6.51 - and "~(c | (~p & (p | (q & ~q))))"
6.52 - shows False
6.53 - using assms by smt
6.54 -
6.55 -axiomatization symm_f :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" where
6.56 - symm_f: "symm_f x y = symm_f y x"
6.57 -lemma "a = a \<and> symm_f a b = symm_f b a" by (smt symm_f)
6.58 -
6.59 -(*
6.60 -Taken from ~~/src/HOL/ex/SAT_Examples.thy.
6.61 -Translated from TPTP problem library: PUZ015-2.006.dimacs
6.62 -*)
6.63 -lemma
6.64 - assumes "~x0"
6.65 - and "~x30"
6.66 - and "~x29"
6.67 - and "~x59"
6.68 - and "x1 | x31 | x0"
6.69 - and "x2 | x32 | x1"
6.70 - and "x3 | x33 | x2"
6.71 - and "x4 | x34 | x3"
6.72 - and "x35 | x4"
6.73 - and "x5 | x36 | x30"
6.74 - and "x6 | x37 | x5 | x31"
6.75 - and "x7 | x38 | x6 | x32"
6.76 - and "x8 | x39 | x7 | x33"
6.77 - and "x9 | x40 | x8 | x34"
6.78 - and "x41 | x9 | x35"
6.79 - and "x10 | x42 | x36"
6.80 - and "x11 | x43 | x10 | x37"
6.81 - and "x12 | x44 | x11 | x38"
6.82 - and "x13 | x45 | x12 | x39"
6.83 - and "x14 | x46 | x13 | x40"
6.84 - and "x47 | x14 | x41"
6.85 - and "x15 | x48 | x42"
6.86 - and "x16 | x49 | x15 | x43"
6.87 - and "x17 | x50 | x16 | x44"
6.88 - and "x18 | x51 | x17 | x45"
6.89 - and "x19 | x52 | x18 | x46"
6.90 - and "x53 | x19 | x47"
6.91 - and "x20 | x54 | x48"
6.92 - and "x21 | x55 | x20 | x49"
6.93 - and "x22 | x56 | x21 | x50"
6.94 - and "x23 | x57 | x22 | x51"
6.95 - and "x24 | x58 | x23 | x52"
6.96 - and "x59 | x24 | x53"
6.97 - and "x25 | x54"
6.98 - and "x26 | x25 | x55"
6.99 - and "x27 | x26 | x56"
6.100 - and "x28 | x27 | x57"
6.101 - and "x29 | x28 | x58"
6.102 - and "~x1 | ~x31"
6.103 - and "~x1 | ~x0"
6.104 - and "~x31 | ~x0"
6.105 - and "~x2 | ~x32"
6.106 - and "~x2 | ~x1"
6.107 - and "~x32 | ~x1"
6.108 - and "~x3 | ~x33"
6.109 - and "~x3 | ~x2"
6.110 - and "~x33 | ~x2"
6.111 - and "~x4 | ~x34"
6.112 - and "~x4 | ~x3"
6.113 - and "~x34 | ~x3"
6.114 - and "~x35 | ~x4"
6.115 - and "~x5 | ~x36"
6.116 - and "~x5 | ~x30"
6.117 - and "~x36 | ~x30"
6.118 - and "~x6 | ~x37"
6.119 - and "~x6 | ~x5"
6.120 - and "~x6 | ~x31"
6.121 - and "~x37 | ~x5"
6.122 - and "~x37 | ~x31"
6.123 - and "~x5 | ~x31"
6.124 - and "~x7 | ~x38"
6.125 - and "~x7 | ~x6"
6.126 - and "~x7 | ~x32"
6.127 - and "~x38 | ~x6"
6.128 - and "~x38 | ~x32"
6.129 - and "~x6 | ~x32"
6.130 - and "~x8 | ~x39"
6.131 - and "~x8 | ~x7"
6.132 - and "~x8 | ~x33"
6.133 - and "~x39 | ~x7"
6.134 - and "~x39 | ~x33"
6.135 - and "~x7 | ~x33"
6.136 - and "~x9 | ~x40"
6.137 - and "~x9 | ~x8"
6.138 - and "~x9 | ~x34"
6.139 - and "~x40 | ~x8"
6.140 - and "~x40 | ~x34"
6.141 - and "~x8 | ~x34"
6.142 - and "~x41 | ~x9"
6.143 - and "~x41 | ~x35"
6.144 - and "~x9 | ~x35"
6.145 - and "~x10 | ~x42"
6.146 - and "~x10 | ~x36"
6.147 - and "~x42 | ~x36"
6.148 - and "~x11 | ~x43"
6.149 - and "~x11 | ~x10"
6.150 - and "~x11 | ~x37"
6.151 - and "~x43 | ~x10"
6.152 - and "~x43 | ~x37"
6.153 - and "~x10 | ~x37"
6.154 - and "~x12 | ~x44"
6.155 - and "~x12 | ~x11"
6.156 - and "~x12 | ~x38"
6.157 - and "~x44 | ~x11"
6.158 - and "~x44 | ~x38"
6.159 - and "~x11 | ~x38"
6.160 - and "~x13 | ~x45"
6.161 - and "~x13 | ~x12"
6.162 - and "~x13 | ~x39"
6.163 - and "~x45 | ~x12"
6.164 - and "~x45 | ~x39"
6.165 - and "~x12 | ~x39"
6.166 - and "~x14 | ~x46"
6.167 - and "~x14 | ~x13"
6.168 - and "~x14 | ~x40"
6.169 - and "~x46 | ~x13"
6.170 - and "~x46 | ~x40"
6.171 - and "~x13 | ~x40"
6.172 - and "~x47 | ~x14"
6.173 - and "~x47 | ~x41"
6.174 - and "~x14 | ~x41"
6.175 - and "~x15 | ~x48"
6.176 - and "~x15 | ~x42"
6.177 - and "~x48 | ~x42"
6.178 - and "~x16 | ~x49"
6.179 - and "~x16 | ~x15"
6.180 - and "~x16 | ~x43"
6.181 - and "~x49 | ~x15"
6.182 - and "~x49 | ~x43"
6.183 - and "~x15 | ~x43"
6.184 - and "~x17 | ~x50"
6.185 - and "~x17 | ~x16"
6.186 - and "~x17 | ~x44"
6.187 - and "~x50 | ~x16"
6.188 - and "~x50 | ~x44"
6.189 - and "~x16 | ~x44"
6.190 - and "~x18 | ~x51"
6.191 - and "~x18 | ~x17"
6.192 - and "~x18 | ~x45"
6.193 - and "~x51 | ~x17"
6.194 - and "~x51 | ~x45"
6.195 - and "~x17 | ~x45"
6.196 - and "~x19 | ~x52"
6.197 - and "~x19 | ~x18"
6.198 - and "~x19 | ~x46"
6.199 - and "~x52 | ~x18"
6.200 - and "~x52 | ~x46"
6.201 - and "~x18 | ~x46"
6.202 - and "~x53 | ~x19"
6.203 - and "~x53 | ~x47"
6.204 - and "~x19 | ~x47"
6.205 - and "~x20 | ~x54"
6.206 - and "~x20 | ~x48"
6.207 - and "~x54 | ~x48"
6.208 - and "~x21 | ~x55"
6.209 - and "~x21 | ~x20"
6.210 - and "~x21 | ~x49"
6.211 - and "~x55 | ~x20"
6.212 - and "~x55 | ~x49"
6.213 - and "~x20 | ~x49"
6.214 - and "~x22 | ~x56"
6.215 - and "~x22 | ~x21"
6.216 - and "~x22 | ~x50"
6.217 - and "~x56 | ~x21"
6.218 - and "~x56 | ~x50"
6.219 - and "~x21 | ~x50"
6.220 - and "~x23 | ~x57"
6.221 - and "~x23 | ~x22"
6.222 - and "~x23 | ~x51"
6.223 - and "~x57 | ~x22"
6.224 - and "~x57 | ~x51"
6.225 - and "~x22 | ~x51"
6.226 - and "~x24 | ~x58"
6.227 - and "~x24 | ~x23"
6.228 - and "~x24 | ~x52"
6.229 - and "~x58 | ~x23"
6.230 - and "~x58 | ~x52"
6.231 - and "~x23 | ~x52"
6.232 - and "~x59 | ~x24"
6.233 - and "~x59 | ~x53"
6.234 - and "~x24 | ~x53"
6.235 - and "~x25 | ~x54"
6.236 - and "~x26 | ~x25"
6.237 - and "~x26 | ~x55"
6.238 - and "~x25 | ~x55"
6.239 - and "~x27 | ~x26"
6.240 - and "~x27 | ~x56"
6.241 - and "~x26 | ~x56"
6.242 - and "~x28 | ~x27"
6.243 - and "~x28 | ~x57"
6.244 - and "~x27 | ~x57"
6.245 - and "~x29 | ~x28"
6.246 - and "~x29 | ~x58"
6.247 - and "~x28 | ~x58"
6.248 - shows False
6.249 - using assms by smt
6.250 -
6.251 -lemma "\<forall>x::int. P x \<longrightarrow> (\<forall>y::int. P x \<or> P y)"
6.252 - by smt
6.253 -
6.254 -lemma
6.255 - assumes "(\<forall>x y. P x y = x)"
6.256 - shows "(\<exists>y. P x y) = P x c"
6.257 - using assms by smt
6.258 -
6.259 -lemma
6.260 - assumes "(\<forall>x y. P x y = x)"
6.261 - and "(\<forall>x. \<exists>y. P x y) = (\<forall>x. P x c)"
6.262 - shows "(EX y. P x y) = P x c"
6.263 - using assms by smt
6.264 -
6.265 -lemma
6.266 - assumes "if P x then \<not>(\<exists>y. P y) else (\<forall>y. \<not>P y)"
6.267 - shows "P x \<longrightarrow> P y"
6.268 - using assms by smt
6.269 -
6.270 -
6.271 -section {* Arithmetic *}
6.272 -
6.273 -subsection {* Linear arithmetic over integers and reals *}
6.274 -
6.275 -lemma "(3::int) = 3" by smt
6.276 -
6.277 -lemma "(3::real) = 3" by smt
6.278 -
6.279 -lemma "(3 :: int) + 1 = 4" by smt
6.280 -
6.281 -lemma "x + (y + z) = y + (z + (x::int))" by smt
6.282 -
6.283 -lemma "max (3::int) 8 > 5" by smt
6.284 -
6.285 -lemma "abs (x :: real) + abs y \<ge> abs (x + y)" by smt
6.286 -
6.287 -lemma "P ((2::int) < 3) = P True" by smt
6.288 -
6.289 -lemma "x + 3 \<ge> 4 \<or> x < (1::int)" by smt
6.290 -
6.291 -lemma
6.292 - assumes "x \<ge> (3::int)" and "y = x + 4"
6.293 - shows "y - x > 0"
6.294 - using assms by smt
6.295 -
6.296 -lemma "let x = (2 :: int) in x + x \<noteq> 5" by smt
6.297 -
6.298 -lemma
6.299 - fixes x :: real
6.300 - assumes "3 * x + 7 * a < 4" and "3 < 2 * x"
6.301 - shows "a < 0"
6.302 - using assms by smt
6.303 -
6.304 -lemma "(0 \<le> y + -1 * x \<or> \<not> 0 \<le> x \<or> 0 \<le> (x::int)) = (\<not> False)" by smt
6.305 -
6.306 -lemma "distinct [x < (3::int), 3 \<le> x]" by smt
6.307 -
6.308 -lemma
6.309 - assumes "a > (0::int)"
6.310 - shows "distinct [a, a * 2, a - a]"
6.311 - using assms by smt
6.312 -
6.313 -lemma "
6.314 - (n < m & m < n') | (n < m & m = n') | (n < n' & n' < m) |
6.315 - (n = n' & n' < m) | (n = m & m < n') |
6.316 - (n' < m & m < n) | (n' < m & m = n) |
6.317 - (n' < n & n < m) | (n' = n & n < m) | (n' = m & m < n) |
6.318 - (m < n & n < n') | (m < n & n' = n) | (m < n' & n' < n) |
6.319 - (m = n & n < n') | (m = n' & n' < n) |
6.320 - (n' = m & m = (n::int))"
6.321 - by smt
6.322 -
6.323 -text{*
6.324 -The following example was taken from HOL/ex/PresburgerEx.thy, where it says:
6.325 -
6.326 - This following theorem proves that all solutions to the
6.327 - recurrence relation $x_{i+2} = |x_{i+1}| - x_i$ are periodic with
6.328 - period 9. The example was brought to our attention by John
6.329 - Harrison. It does does not require Presburger arithmetic but merely
6.330 - quantifier-free linear arithmetic and holds for the rationals as well.
6.331 -
6.332 - Warning: it takes (in 2006) over 4.2 minutes!
6.333 -
6.334 -There, it is proved by "arith". SMT is able to prove this within a fraction
6.335 -of one second. With proof reconstruction, it takes about 13 seconds on a Core2
6.336 -processor.
6.337 -*}
6.338 -
6.339 -lemma "\<lbrakk> x3 = abs x2 - x1; x4 = abs x3 - x2; x5 = abs x4 - x3;
6.340 - x6 = abs x5 - x4; x7 = abs x6 - x5; x8 = abs x7 - x6;
6.341 - x9 = abs x8 - x7; x10 = abs x9 - x8; x11 = abs x10 - x9 \<rbrakk>
6.342 - \<Longrightarrow> x1 = x10 & x2 = (x11::int)"
6.343 - by smt
6.344 -
6.345 -
6.346 -lemma "let P = 2 * x + 1 > x + (x::real) in P \<or> False \<or> P" by smt
6.347 -
6.348 -lemma "x + (let y = x mod 2 in 2 * y + 1) \<ge> x + (1::int)" by smt
6.349 -
6.350 -lemma "x + (let y = x mod 2 in y + y) < x + (3::int)" by smt
6.351 -
6.352 -lemma
6.353 - assumes "x \<noteq> (0::real)"
6.354 - shows "x + x \<noteq> (let P = (abs x > 1) in if P \<or> \<not>P then 4 else 2) * x"
6.355 - using assms by smt
6.356 -
6.357 -lemma
6.358 - assumes "(n + m) mod 2 = 0" and "n mod 4 = 3"
6.359 - shows "n mod 2 = 1 & m mod 2 = (1::int)"
6.360 - using assms by smt
6.361 -
6.362 -
6.363 -subsection {* Linear arithmetic with quantifiers *}
6.364 -
6.365 -lemma "~ (\<exists>x::int. False)" by smt
6.366 -
6.367 -lemma "~ (\<exists>x::real. False)" by smt
6.368 -
6.369 -lemma "\<exists>x::int. 0 < x"
6.370 - using [[z3_proofs=false]] (* no Z3 proof *)
6.371 - by smt
6.372 -
6.373 -lemma "\<exists>x::real. 0 < x"
6.374 - using [[z3_proofs=false]] (* no Z3 proof *)
6.375 - by smt
6.376 -
6.377 -lemma "\<forall>x::int. \<exists>y. y > x"
6.378 - using [[z3_proofs=false]] (* no Z3 proof *)
6.379 - by smt
6.380 -
6.381 -lemma "\<forall>x y::int. (x = 0 \<and> y = 1) \<longrightarrow> x \<noteq> y" by smt
6.382 -
6.383 -lemma "\<exists>x::int. \<forall>y. x < y \<longrightarrow> y < 0 \<or> y >= 0" by smt
6.384 -
6.385 -lemma "\<forall>x y::int. x < y \<longrightarrow> (2 * x + 1) < (2 * y)" by smt
6.386 -
6.387 -lemma "\<forall>x y::int. (2 * x + 1) \<noteq> (2 * y)" by smt
6.388 -
6.389 -lemma "\<forall>x y::int. x + y > 2 \<or> x + y = 2 \<or> x + y < 2" by smt
6.390 -
6.391 -lemma "\<forall>x::int. if x > 0 then x + 1 > 0 else 1 > x" by smt
6.392 -
6.393 -lemma "if (ALL x::int. x < 0 \<or> x > 0) then False else True" by smt
6.394 -
6.395 -lemma "(if (ALL x::int. x < 0 \<or> x > 0) then -1 else 3) > (0::int)" by smt
6.396 -
6.397 -lemma "~ (\<exists>x y z::int. 4 * x + -6 * y = (1::int))" by smt
6.398 -
6.399 -lemma "\<exists>x::int. \<forall>x y. 0 < x \<and> 0 < y \<longrightarrow> (0::int) < x + y" by smt
6.400 -
6.401 -lemma "\<exists>u::int. \<forall>(x::int) y::real. 0 < x \<and> 0 < y \<longrightarrow> -1 < x" by smt
6.402 -
6.403 -lemma "\<exists>x::int. (\<forall>y. y \<ge> x \<longrightarrow> y > 0) \<longrightarrow> x > 0" by smt
6.404 -
6.405 -lemma "\<forall>x::int. trigger [pat x] (x < a \<longrightarrow> 2 * x < 2 * a)" by smt
6.406 -
6.407 -
6.408 -subsection {* Non-linear arithmetic over integers and reals *}
6.409 -
6.410 -lemma "a > (0::int) \<Longrightarrow> a*b > 0 \<Longrightarrow> b > 0"
6.411 - using [[z3_proofs=false]] -- {* Isabelle's arithmetic decision procedures
6.412 - are too weak to automatically prove @{thm zero_less_mult_pos}. *}
6.413 - by smt
6.414 -
6.415 -lemma "(a::int) * (x + 1 + y) = a * x + a * (y + 1)" by smt
6.416 -
6.417 -lemma "((x::real) * (1 + y) - x * (1 - y)) = (2 * x * y)" by smt
6.418 -
6.419 -lemma
6.420 - "(U::int) + (1 + p) * (b + e) + p * d =
6.421 - U + (2 * (1 + p) * (b + e) + (1 + p) * d + d * p) - (1 + p) * (b + d + e)"
6.422 - by smt
6.423 -
6.424 -
6.425 -subsection {* Linear arithmetic for natural numbers *}
6.426 -
6.427 -lemma "2 * (x::nat) ~= 1" by smt
6.428 -
6.429 -lemma "a < 3 \<Longrightarrow> (7::nat) > 2 * a" by smt
6.430 -
6.431 -lemma "let x = (1::nat) + y in x - y > 0 * x" by smt
6.432 -
6.433 -lemma
6.434 - "let x = (1::nat) + y in
6.435 - let P = (if x > 0 then True else False) in
6.436 - False \<or> P = (x - 1 = y) \<or> (\<not>P \<longrightarrow> False)"
6.437 - by smt
6.438 -
6.439 -lemma "distinct [a + (1::nat), a * 2 + 3, a - a]" by smt
6.440 -
6.441 -lemma "int (nat \<bar>x::int\<bar>) = \<bar>x\<bar>" by smt
6.442 -
6.443 -definition prime_nat :: "nat \<Rightarrow> bool" where
6.444 - "prime_nat p = (1 < p \<and> (\<forall>m. m dvd p --> m = 1 \<or> m = p))"
6.445 -lemma "prime_nat (4*m + 1) \<Longrightarrow> m \<ge> (1::nat)" by (smt prime_nat_def)
6.446 -
6.447 -
6.448 -section {* Bitvectors *}
6.449 -
6.450 -locale z3_bv_test
6.451 -begin
6.452 -
6.453 -text {*
6.454 -The following examples only work for Z3, and only without proof reconstruction.
6.455 -*}
6.456 -
6.457 -declare [[smt_solver=z3, z3_proofs=false]]
6.458 -
6.459 -
6.460 -subsection {* Bitvector arithmetic *}
6.461 -
6.462 -lemma "(27 :: 4 word) = -5" by smt
6.463 -
6.464 -lemma "(27 :: 4 word) = 11" by smt
6.465 -
6.466 -lemma "23 < (27::8 word)" by smt
6.467 -
6.468 -lemma "27 + 11 = (6::5 word)" by smt
6.469 -
6.470 -lemma "7 * 3 = (21::8 word)" by smt
6.471 -
6.472 -lemma "11 - 27 = (-16::8 word)" by smt
6.473 -
6.474 -lemma "- -11 = (11::5 word)" by smt
6.475 -
6.476 -lemma "-40 + 1 = (-39::7 word)" by smt
6.477 -
6.478 -lemma "a + 2 * b + c - b = (b + c) + (a :: 32 word)" by smt
6.479 -
6.480 -lemma "x = (5 :: 4 word) \<Longrightarrow> 4 * x = 4" by smt
6.481 -
6.482 -
6.483 -subsection {* Bit-level logic *}
6.484 -
6.485 -lemma "0b110 AND 0b101 = (0b100 :: 32 word)" by smt
6.486 -
6.487 -lemma "0b110 OR 0b011 = (0b111 :: 8 word)" by smt
6.488 -
6.489 -lemma "0xF0 XOR 0xFF = (0x0F :: 8 word)" by smt
6.490 -
6.491 -lemma "NOT (0xF0 :: 16 word) = 0xFF0F" by smt
6.492 -
6.493 -lemma "word_cat (27::4 word) (27::8 word) = (2843::12 word)" by smt
6.494 -
6.495 -lemma "word_cat (0b0011::4 word) (0b1111::6word) = (0b0011001111 :: 10 word)"
6.496 - by smt
6.497 -
6.498 -lemma "slice 1 (0b10110 :: 4 word) = (0b11 :: 2 word)" by smt
6.499 -
6.500 -lemma "ucast (0b1010 :: 4 word) = (0b1010 :: 10 word)" by smt
6.501 -
6.502 -lemma "scast (0b1010 :: 4 word) = (0b111010 :: 6 word)" by smt
6.503 -
6.504 -lemma "bv_lshr 0b10011 2 = (0b100::8 word)" by smt
6.505 -
6.506 -lemma "bv_ashr 0b10011 2 = (0b100::8 word)" by smt
6.507 -
6.508 -lemma "word_rotr 2 0b0110 = (0b1001::4 word)" by smt
6.509 -
6.510 -lemma "word_rotl 1 0b1110 = (0b1101::4 word)" by smt
6.511 -
6.512 -lemma "(x AND 0xff00) OR (x AND 0x00ff) = (x::16 word)" by smt
6.513 -
6.514 -lemma "w < 256 \<Longrightarrow> (w :: 16 word) AND 0x00FF = w" by smt
6.515 -
6.516 -end
6.517 -
6.518 -lemma
6.519 - assumes "bv2int 0 = 0"
6.520 - and "bv2int 1 = 1"
6.521 - and "bv2int 2 = 2"
6.522 - and "bv2int 3 = 3"
6.523 - and "\<forall>x::2 word. bv2int x > 0"
6.524 - shows "\<forall>i::int. i < 0 \<longrightarrow> (\<forall>x::2 word. bv2int x > i)"
6.525 - using assms
6.526 - using [[smt_solver=z3]]
6.527 - by smt
6.528 -
6.529 -lemma "P (0 \<le> (a :: 4 word)) = P True"
6.530 - using [[smt_solver=z3, z3_proofs=false]]
6.531 - by smt
6.532 -
6.533 -
6.534 -section {* Pairs *}
6.535 -
6.536 -lemma "fst (x, y) = a \<Longrightarrow> x = a" by smt
6.537 -
6.538 -lemma "p1 = (x, y) \<and> p2 = (y, x) \<Longrightarrow> fst p1 = snd p2" by smt
6.539 -
6.540 -
6.541 -section {* Higher-order problems and recursion *}
6.542 -
6.543 -lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> (f (i1 := v1, i2 := v2)) i = f i" by smt
6.544 -
6.545 -lemma "(f g (x::'a::type) = (g x \<and> True)) \<or> (f g x = True) \<or> (g x = True)"
6.546 - by smt
6.547 -
6.548 -lemma "id 3 = 3 \<and> id True = True" by (smt id_def)
6.549 -
6.550 -lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> ((f (i1 := v1)) (i2 := v2)) i = f i" by smt
6.551 -
6.552 -lemma "map (\<lambda>i::nat. i + 1) [0, 1] = [1, 2]" by (smt map.simps)
6.553 -
6.554 -lemma "(ALL x. P x) | ~ All P" by smt
6.555 -
6.556 -fun dec_10 :: "nat \<Rightarrow> nat" where
6.557 - "dec_10 n = (if n < 10 then n else dec_10 (n - 10))"
6.558 -lemma "dec_10 (4 * dec_10 4) = 6" by (smt dec_10.simps)
6.559 -
6.560 -axiomatization
6.561 - eval_dioph :: "int list \<Rightarrow> nat list \<Rightarrow> int"
6.562 - where
6.563 - eval_dioph_mod:
6.564 - "eval_dioph ks xs mod int n = eval_dioph ks (map (\<lambda>x. x mod n) xs) mod int n"
6.565 - and
6.566 - eval_dioph_div_mult:
6.567 - "eval_dioph ks (map (\<lambda>x. x div n) xs) * int n +
6.568 - eval_dioph ks (map (\<lambda>x. x mod n) xs) = eval_dioph ks xs"
6.569 -lemma
6.570 - "(eval_dioph ks xs = l) =
6.571 - (eval_dioph ks (map (\<lambda>x. x mod 2) xs) mod 2 = l mod 2 \<and>
6.572 - eval_dioph ks (map (\<lambda>x. x div 2) xs) =
6.573 - (l - eval_dioph ks (map (\<lambda>x. x mod 2) xs)) div 2)"
6.574 - by (smt eval_dioph_mod[where n=2] eval_dioph_div_mult[where n=2])
6.575 -
6.576 -
6.577 -section {* Monomorphization examples *}
6.578 -
6.579 -definition P :: "'a \<Rightarrow> bool" where "P x = True"
6.580 -lemma poly_P: "P x \<and> (P [x] \<or> \<not>P[x])" by (simp add: P_def)
6.581 -lemma "P (1::int)" by (smt poly_P)
6.582 -
6.583 -consts g :: "'a \<Rightarrow> nat"
6.584 -axioms
6.585 - g1: "g (Some x) = g [x]"
6.586 - g2: "g None = g []"
6.587 - g3: "g xs = length xs"
6.588 -lemma "g (Some (3::int)) = g (Some True)" by (smt g1 g2 g3 list.size)
6.589 -
6.590 -end
7.1 --- a/src/HOL/SMT/ROOT.ML Wed May 12 23:54:01 2010 +0200
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,1 +0,0 @@
7.4 -use_thys ["SMT"];
8.1 --- a/src/HOL/SMT/SMT.thy Wed May 12 23:54:01 2010 +0200
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,79 +0,0 @@
8.4 -(* Title: HOL/SMT/SMT.thy
8.5 - Author: Sascha Boehme, TU Muenchen
8.6 -*)
8.7 -
8.8 -header {* Bindings to several SMT solvers *}
8.9 -
8.10 -theory SMT
8.11 -imports SMT_Base Z3
8.12 -uses
8.13 - "Tools/cvc3_solver.ML"
8.14 - "Tools/yices_solver.ML"
8.15 -begin
8.16 -
8.17 -setup {* CVC3_Solver.setup #> Yices_Solver.setup *}
8.18 -
8.19 -
8.20 -
8.21 -section {* Setup *}
8.22 -
8.23 -text {*
8.24 -Without further ado, the SMT solvers CVC3 and Z3 are provided
8.25 -remotely via an SMT server. For faster responses, the solver
8.26 -environment variables CVC3_SOLVER, YICES_SOLVER, and Z3_SOLVER
8.27 -need to point to the respective SMT solver executable.
8.28 -*}
8.29 -
8.30 -
8.31 -
8.32 -section {* Available configuration options *}
8.33 -
8.34 -text {* Choose the SMT solver to be applied (one of cvc3, yices, or z3): *}
8.35 -
8.36 -declare [[ smt_solver = z3 ]]
8.37 -
8.38 -text {* Restrict the runtime of an SMT solver (in seconds): *}
8.39 -
8.40 -declare [[ smt_timeout = 20 ]]
8.41 -
8.42 -
8.43 -subsection {* Z3-specific options *}
8.44 -
8.45 -text {* Pass extra command-line arguments to Z3 to control its behaviour: *}
8.46 -
8.47 -declare [[ z3_options = "" ]]
8.48 -
8.49 -text {* Enable proof reconstruction for Z3: *}
8.50 -
8.51 -declare [[ z3_proofs = false ]]
8.52 -
8.53 -text {* Enable or disable tracing of the theorems used for proving a
8.54 -proposition: *}
8.55 -
8.56 -declare [[ z3_trace_assms = false ]]
8.57 -
8.58 -
8.59 -subsection {* Certificates *}
8.60 -
8.61 -text {* To avoid invocation of an SMT solver for the same problem
8.62 -again and again, cache certificates in a file (the filename must
8.63 -be given by an absolute path, an empty string disables the usage
8.64 -of certificates): *}
8.65 -
8.66 -declare [[ smt_certificates = "" ]]
8.67 -
8.68 -text {* Allows or disallows the addition of new certificates to
8.69 -the current certificates file (when set to @{text false}, only
8.70 -existing certificates are used and no SMT solver is invoked): *}
8.71 -
8.72 -declare [[ smt_fixed = false ]]
8.73 -
8.74 -
8.75 -subsection {* Special configuration options *}
8.76 -
8.77 -text {* Trace the problem file, the result of the SMT solver and
8.78 -further information: *}
8.79 -
8.80 -declare [[ smt_trace = false ]]
8.81 -
8.82 -end
9.1 --- a/src/HOL/SMT/SMT_Base.thy Wed May 12 23:54:01 2010 +0200
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,130 +0,0 @@
9.4 -(* Title: HOL/SMT/SMT_Base.thy
9.5 - Author: Sascha Boehme, TU Muenchen
9.6 -*)
9.7 -
9.8 -header {* SMT-specific definitions and basic tools *}
9.9 -
9.10 -theory SMT_Base
9.11 -imports Real "~~/src/HOL/Word/Word"
9.12 -uses
9.13 - "~~/src/Tools/cache_io.ML"
9.14 - ("Tools/smt_additional_facts.ML")
9.15 - ("Tools/smt_monomorph.ML")
9.16 - ("Tools/smt_normalize.ML")
9.17 - ("Tools/smt_translate.ML")
9.18 - ("Tools/smt_solver.ML")
9.19 - ("Tools/smtlib_interface.ML")
9.20 -begin
9.21 -
9.22 -section {* Triggers for quantifier instantiation *}
9.23 -
9.24 -text {*
9.25 -Some SMT solvers support triggers for quantifier instantiation. Each trigger
9.26 -consists of one ore more patterns. A pattern may either be a list of positive
9.27 -subterms (the first being tagged by "pat" and the consecutive subterms tagged
9.28 -by "andpat"), or a list of negative subterms (the first being tagged by "nopat"
9.29 -and the consecutive subterms tagged by "andpat").
9.30 -*}
9.31 -
9.32 -datatype pattern = Pattern
9.33 -
9.34 -definition pat :: "'a \<Rightarrow> pattern"
9.35 -where "pat _ = Pattern"
9.36 -
9.37 -definition nopat :: "'a \<Rightarrow> pattern"
9.38 -where "nopat _ = Pattern"
9.39 -
9.40 -definition andpat :: "pattern \<Rightarrow> 'a \<Rightarrow> pattern" (infixl "andpat" 60)
9.41 -where "_ andpat _ = Pattern"
9.42 -
9.43 -definition trigger :: "pattern list \<Rightarrow> bool \<Rightarrow> bool"
9.44 -where "trigger _ P = P"
9.45 -
9.46 -
9.47 -
9.48 -section {* Arithmetic *}
9.49 -
9.50 -text {*
9.51 -The sign of @{term "op mod :: int \<Rightarrow> int \<Rightarrow> int"} follows the sign of the
9.52 -divisor. In contrast to that, the sign of the following operation is that of
9.53 -the dividend.
9.54 -*}
9.55 -
9.56 -definition rem :: "int \<Rightarrow> int \<Rightarrow> int" (infixl "rem" 70)
9.57 -where "a rem b =
9.58 - (if (a \<ge> 0 \<and> b < 0) \<or> (a < 0 \<and> b \<ge> 0) then - (a mod b) else a mod b)"
9.59 -
9.60 -
9.61 -
9.62 -section {* Bitvectors *}
9.63 -
9.64 -text {*
9.65 -The following definitions provide additional functions not found in HOL-Word.
9.66 -*}
9.67 -
9.68 -definition sdiv :: "'a::len word \<Rightarrow> 'a word \<Rightarrow> 'a word" (infix "sdiv" 70)
9.69 -where "w1 sdiv w2 = word_of_int (sint w1 div sint w2)"
9.70 -
9.71 -definition smod :: "'a::len word \<Rightarrow> 'a word \<Rightarrow> 'a word" (infix "smod" 70)
9.72 - (* sign follows divisor *)
9.73 -where "w1 smod w2 = word_of_int (sint w1 mod sint w2)"
9.74 -
9.75 -definition srem :: "'a::len word \<Rightarrow> 'a word \<Rightarrow> 'a word" (infix "srem" 70)
9.76 - (* sign follows dividend *)
9.77 -where "w1 srem w2 = word_of_int (sint w1 rem sint w2)"
9.78 -
9.79 -definition bv_shl :: "'a::len0 word \<Rightarrow> 'a word \<Rightarrow> 'a word"
9.80 -where "bv_shl w1 w2 = (w1 << unat w2)"
9.81 -
9.82 -definition bv_lshr :: "'a::len0 word \<Rightarrow> 'a word \<Rightarrow> 'a word"
9.83 -where "bv_lshr w1 w2 = (w1 >> unat w2)"
9.84 -
9.85 -definition bv_ashr :: "'a::len word \<Rightarrow> 'a word \<Rightarrow> 'a word"
9.86 -where "bv_ashr w1 w2 = (w1 >>> unat w2)"
9.87 -
9.88 -
9.89 -
9.90 -section {* Higher-Order Encoding *}
9.91 -
9.92 -definition "apply" where "apply f x = f x"
9.93 -
9.94 -definition array_ext where "array_ext a b = (SOME x. a = b \<or> a x \<noteq> b x)"
9.95 -
9.96 -lemma fun_upd_eq: "(f = f (x := y)) = (f x = y)"
9.97 -proof
9.98 - assume "f = f(x:=y)"
9.99 - hence "f x = (f(x:=y)) x" by simp
9.100 - thus "f x = y" by simp
9.101 -qed (auto simp add: ext)
9.102 -
9.103 -lemmas array_rules =
9.104 - ext fun_upd_apply fun_upd_same fun_upd_other fun_upd_upd fun_upd_eq apply_def
9.105 -
9.106 -
9.107 -
9.108 -section {* First-order logic *}
9.109 -
9.110 -text {*
9.111 -Some SMT solver formats require a strict separation between formulas and terms.
9.112 -During normalization, all uninterpreted constants are treated as function
9.113 -symbols, and atoms (with uninterpreted head symbol) are turned into terms by
9.114 -equating them with true using the following term-level equation symbol:
9.115 -*}
9.116 -
9.117 -definition term_eq :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infix "term'_eq" 50)
9.118 - where "(x term_eq y) = (x = y)"
9.119 -
9.120 -
9.121 -
9.122 -section {* Setup *}
9.123 -
9.124 -use "Tools/smt_additional_facts.ML"
9.125 -use "Tools/smt_monomorph.ML"
9.126 -use "Tools/smt_normalize.ML"
9.127 -use "Tools/smt_translate.ML"
9.128 -use "Tools/smt_solver.ML"
9.129 -use "Tools/smtlib_interface.ML"
9.130 -
9.131 -setup {* SMT_Solver.setup *}
9.132 -
9.133 -end
10.1 --- a/src/HOL/SMT/Tools/cvc3_solver.ML Wed May 12 23:54:01 2010 +0200
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,48 +0,0 @@
10.4 -(* Title: HOL/SMT/Tools/cvc3_solver.ML
10.5 - Author: Sascha Boehme, TU Muenchen
10.6 -
10.7 -Interface of the SMT solver CVC3.
10.8 -*)
10.9 -
10.10 -signature CVC3_SOLVER =
10.11 -sig
10.12 - val setup: theory -> theory
10.13 -end
10.14 -
10.15 -structure CVC3_Solver: CVC3_SOLVER =
10.16 -struct
10.17 -
10.18 -val solver_name = "cvc3"
10.19 -val env_var = "CVC3_SOLVER"
10.20 -
10.21 -val options = ["-lang", "smtlib", "-output-lang", "presentation"]
10.22 -
10.23 -val is_sat = String.isPrefix "Satisfiable."
10.24 -val is_unsat = String.isPrefix "Unsatisfiable."
10.25 -val is_unknown = String.isPrefix "Unknown."
10.26 -
10.27 -fun raise_cex real = raise SMT_Solver.SMT_COUNTEREXAMPLE (real, [])
10.28 -
10.29 -fun core_oracle (output, _) =
10.30 - let
10.31 - val empty_line = (fn "" => true | _ => false)
10.32 - val split_first = (fn [] => ("", []) | l :: ls => (l, ls))
10.33 - val (l, _) = split_first (dropwhile empty_line output)
10.34 - in
10.35 - if is_unsat l then @{cprop False}
10.36 - else if is_sat l then raise_cex true
10.37 - else if is_unknown l then raise_cex false
10.38 - else raise SMT_Solver.SMT (solver_name ^ " failed")
10.39 - end
10.40 -
10.41 -fun smtlib_solver oracle _ = {
10.42 - command = {env_var=env_var, remote_name=SOME solver_name},
10.43 - arguments = options,
10.44 - interface = SMTLIB_Interface.interface,
10.45 - reconstruct = pair o oracle }
10.46 -
10.47 -val setup =
10.48 - Thm.add_oracle (Binding.name solver_name, core_oracle) #-> (fn (_, oracle) =>
10.49 - SMT_Solver.add_solver (solver_name, smtlib_solver oracle))
10.50 -
10.51 -end
11.1 --- a/src/HOL/SMT/Tools/smt_additional_facts.ML Wed May 12 23:54:01 2010 +0200
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,45 +0,0 @@
11.4 -(* Title: HOL/SMT/Tools/smt_additional_facts.ML
11.5 - Author: Sascha Boehme, TU Muenchen
11.6 -
11.7 -Include additional facts.
11.8 -*)
11.9 -
11.10 -signature SMT_ADDITIONAL_FACTS =
11.11 -sig
11.12 - val add_facts: thm list -> thm list
11.13 -end
11.14 -
11.15 -structure SMT_Additional_Facts: SMT_ADDITIONAL_FACTS =
11.16 -struct
11.17 -
11.18 -infix 2 ??
11.19 -fun (ex ?? f) thms = if exists (ex o Thm.prop_of) thms then f thms else thms
11.20 -
11.21 -
11.22 -
11.23 -(* pairs *)
11.24 -
11.25 -val pair_rules = [@{thm fst_conv}, @{thm snd_conv}, @{thm pair_collapse}]
11.26 -
11.27 -val pair_type = (fn Type (@{type_name "*"}, _) => true | _ => false)
11.28 -val exists_pair_type = Term.exists_type (Term.exists_subtype pair_type)
11.29 -
11.30 -val add_pair_rules = exists_pair_type ?? append pair_rules
11.31 -
11.32 -
11.33 -
11.34 -(* function update *)
11.35 -
11.36 -val fun_upd_rules = [@{thm fun_upd_same}, @{thm fun_upd_apply}]
11.37 -
11.38 -val is_fun_upd = (fn Const (@{const_name fun_upd}, _) => true | _ => false)
11.39 -val exists_fun_upd = Term.exists_subterm is_fun_upd
11.40 -
11.41 -val add_fun_upd_rules = exists_fun_upd ?? append fun_upd_rules
11.42 -
11.43 -
11.44 -(* include additional facts *)
11.45 -
11.46 -val add_facts = add_pair_rules #> add_fun_upd_rules
11.47 -
11.48 -end
12.1 --- a/src/HOL/SMT/Tools/smt_monomorph.ML Wed May 12 23:54:01 2010 +0200
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,201 +0,0 @@
12.4 -(* Title: HOL/SMT/Tools/smt_monomorph.ML
12.5 - Author: Sascha Boehme, TU Muenchen
12.6 -
12.7 -Monomorphization of theorems, i.e., computation of all (necessary) instances.
12.8 -*)
12.9 -
12.10 -signature SMT_MONOMORPH =
12.11 -sig
12.12 - val monomorph: thm list -> Proof.context -> thm list * Proof.context
12.13 -end
12.14 -
12.15 -structure SMT_Monomorph: SMT_MONOMORPH =
12.16 -struct
12.17 -
12.18 -val typ_has_tvars = Term.exists_subtype (fn TVar _ => true | _ => false)
12.19 -
12.20 -val ignored = member (op =) [
12.21 - @{const_name All}, @{const_name Ex}, @{const_name Let}, @{const_name If},
12.22 - @{const_name "op ="}, @{const_name zero_class.zero},
12.23 - @{const_name one_class.one}, @{const_name number_of}]
12.24 -
12.25 -fun is_const f (n, T) = not (ignored n) andalso f T
12.26 -fun add_const_if f g (Const c) = if is_const f c then g c else I
12.27 - | add_const_if _ _ _ = I
12.28 -
12.29 -fun collect_consts_if f g thm =
12.30 - Term.fold_aterms (add_const_if f g) (Thm.prop_of thm)
12.31 -
12.32 -fun add_consts f =
12.33 - collect_consts_if f (fn (n, T) => Symtab.map_entry n (insert (op =) T))
12.34 -
12.35 -val insert_const = OrdList.insert (prod_ord fast_string_ord Term_Ord.typ_ord)
12.36 -fun tvar_consts_of thm = collect_consts_if typ_has_tvars insert_const thm []
12.37 -
12.38 -
12.39 -fun incr_indexes thms =
12.40 - let fun inc thm idx = (Thm.incr_indexes idx thm, Thm.maxidx_of thm + idx + 1)
12.41 - in fst (fold_map inc thms 0) end
12.42 -
12.43 -
12.44 -(* Compute all substitutions from the types "Ts" to all relevant
12.45 - types in "grounds", with respect to the given substitution. *)
12.46 -fun new_substitutions thy grounds (n, T) subst =
12.47 - if not (typ_has_tvars T) then [subst]
12.48 - else
12.49 - Symtab.lookup_list grounds n
12.50 - |> map_filter (try (fn U => Sign.typ_match thy (T, U) subst))
12.51 - |> cons subst
12.52 -
12.53 -
12.54 -(* Instantiate a set of constants with a substitution. Also collect
12.55 - all new ground instances for the next round of specialization. *)
12.56 -fun apply_subst grounds consts subst =
12.57 - let
12.58 - fun is_new_ground (n, T) = not (typ_has_tvars T) andalso
12.59 - not (member (op =) (Symtab.lookup_list grounds n) T)
12.60 -
12.61 - fun apply_const (n, T) new_grounds =
12.62 - let val c = (n, Envir.subst_type subst T)
12.63 - in
12.64 - new_grounds
12.65 - |> is_new_ground c ? Symtab.insert_list (op =) c
12.66 - |> pair c
12.67 - end
12.68 - in fold_map apply_const consts #>> pair subst end
12.69 -
12.70 -
12.71 -(* Compute new substitutions for the theorem "thm", based on
12.72 - previously found substitutions.
12.73 - Also collect new grounds, i.e., instantiated constants
12.74 - (without schematic types) which do not occur in any of the
12.75 - previous rounds. Note that thus no schematic type variables are
12.76 - shared among theorems. *)
12.77 -fun specialize thy all_grounds new_grounds (thm, scs) =
12.78 - let
12.79 - fun spec (subst, consts) next_grounds =
12.80 - [subst]
12.81 - |> fold (maps o new_substitutions thy new_grounds) consts
12.82 - |> rpair next_grounds
12.83 - |-> fold_map (apply_subst all_grounds consts)
12.84 - in
12.85 - fold_map spec scs #>> (fn scss =>
12.86 - (thm, fold (fold (insert (eq_snd (op =)))) scss []))
12.87 - end
12.88 -
12.89 -
12.90 -(* Compute all necessary substitutions.
12.91 - Instead of operating on the propositions of the theorems, the
12.92 - computation uses only the constants occurring with schematic type
12.93 - variables in the propositions. To ease comparisons, such sets of
12.94 - costants are always kept in their initial order. *)
12.95 -fun incremental_monomorph thy limit all_grounds new_grounds ths =
12.96 - let
12.97 - val all_grounds' = Symtab.merge_list (op =) (all_grounds, new_grounds)
12.98 - val spec = specialize thy all_grounds' new_grounds
12.99 - val (ths', new_grounds') = fold_map spec ths Symtab.empty
12.100 - in
12.101 - if Symtab.is_empty new_grounds' then ths'
12.102 - else if limit > 0
12.103 - then incremental_monomorph thy (limit-1) all_grounds' new_grounds' ths'
12.104 - else (warning "SMT: monomorphization limit reached"; ths')
12.105 - end
12.106 -
12.107 -
12.108 -fun filter_most_specific thy =
12.109 - let
12.110 - fun typ_match (_, T) (_, U) = Sign.typ_match thy (T, U)
12.111 -
12.112 - fun is_trivial subst = Vartab.is_empty subst orelse
12.113 - forall (fn (v, (S, T)) => TVar (v, S) = T) (Vartab.dest subst)
12.114 -
12.115 - fun match general specific =
12.116 - (case try (fold2 typ_match general specific) Vartab.empty of
12.117 - NONE => false
12.118 - | SOME subst => not (is_trivial subst))
12.119 -
12.120 - fun most_specific _ [] = []
12.121 - | most_specific css ((ss, cs) :: scs) =
12.122 - let val substs = most_specific (cs :: css) scs
12.123 - in
12.124 - if exists (match cs) css orelse exists (match cs o snd) scs
12.125 - then substs else ss :: substs
12.126 - end
12.127 -
12.128 - in most_specific [] end
12.129 -
12.130 -
12.131 -fun instantiate thy Tenv =
12.132 - let
12.133 - fun replace (v, (_, T)) (U as TVar (u, _)) = if u = v then T else U
12.134 - | replace _ T = T
12.135 -
12.136 - fun complete (vT as (v, _)) subst =
12.137 - subst
12.138 - |> not (Vartab.defined subst v) ? Vartab.update vT
12.139 - |> Vartab.map (apsnd (Term.map_atyps (replace vT)))
12.140 -
12.141 - fun cert (ix, (S, T)) = pairself (Thm.ctyp_of thy) (TVar (ix, S), T)
12.142 -
12.143 - fun inst thm subst =
12.144 - let val cTs = Vartab.fold (cons o cert) (fold complete Tenv subst) []
12.145 - in Thm.instantiate (cTs, []) thm end
12.146 -
12.147 - in uncurry (map o inst) end
12.148 -
12.149 -
12.150 -fun mono_all ctxt _ [] monos = (monos, ctxt)
12.151 - | mono_all ctxt limit polys monos =
12.152 - let
12.153 - fun invent_types thm ctxt =
12.154 - let val (vs, Ss) = split_list (Term.add_tvars (Thm.prop_of thm) [])
12.155 - in
12.156 - ctxt
12.157 - |> Variable.invent_types Ss
12.158 - |>> map2 (fn v => fn (n, S) => (v, (S, TFree (n, S)))) vs
12.159 - end
12.160 - val (Tenvs, ctxt') = fold_map invent_types polys ctxt
12.161 -
12.162 - val thy = ProofContext.theory_of ctxt'
12.163 -
12.164 - val ths = polys
12.165 - |> map (fn thm => (thm, [(Vartab.empty, tvar_consts_of thm)]))
12.166 -
12.167 - (* all constant names occurring with schematic types *)
12.168 - val ns = fold (fold (fold (insert (op =) o fst) o snd) o snd) ths []
12.169 -
12.170 - (* all known instances with non-schematic types *)
12.171 - val grounds =
12.172 - Symtab.make (map (rpair []) ns)
12.173 - |> fold (add_consts (K true)) monos
12.174 - |> fold (add_consts (not o typ_has_tvars)) polys
12.175 - in
12.176 - polys
12.177 - |> map (fn thm => (thm, [(Vartab.empty, tvar_consts_of thm)]))
12.178 - |> incremental_monomorph thy limit Symtab.empty grounds
12.179 - |> map (apsnd (filter_most_specific thy))
12.180 - |> flat o map2 (instantiate thy) Tenvs
12.181 - |> append monos
12.182 - |> rpair ctxt'
12.183 - end
12.184 -
12.185 -
12.186 -val monomorph_limit = 10
12.187 -
12.188 -
12.189 -(* Instantiate all polymorphic constants (i.e., constants occurring
12.190 - both with ground types and type variables) with all (necessary)
12.191 - ground types; thereby create copies of theorems containing those
12.192 - constants.
12.193 - To prevent non-termination, there is an upper limit for the
12.194 - number of recursions involved in the fixpoint construction.
12.195 - The initial set of theorems must not contain any schematic term
12.196 - variables, and the final list of theorems does not contain any
12.197 - schematic type variables anymore. *)
12.198 -fun monomorph thms ctxt =
12.199 - thms
12.200 - |> List.partition (Term.exists_type typ_has_tvars o Thm.prop_of)
12.201 - |>> incr_indexes
12.202 - |-> mono_all ctxt monomorph_limit
12.203 -
12.204 -end
13.1 --- a/src/HOL/SMT/Tools/smt_normalize.ML Wed May 12 23:54:01 2010 +0200
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,470 +0,0 @@
13.4 -(* Title: HOL/SMT/Tools/smt_normalize.ML
13.5 - Author: Sascha Boehme, TU Muenchen
13.6 -
13.7 -Normalization steps on theorems required by SMT solvers:
13.8 - * unfold trivial let expressions,
13.9 - * simplify trivial distincts (those with less than three elements),
13.10 - * rewrite bool case expressions as if expressions,
13.11 - * normalize numerals (e.g. replace negative numerals by negated positive
13.12 - numerals),
13.13 - * embed natural numbers into integers,
13.14 - * add extra rules specifying types and constants which occur frequently,
13.15 - * fully translate into object logic, add universal closure,
13.16 - * lift lambda terms,
13.17 - * make applications explicit for functions with varying number of arguments.
13.18 -*)
13.19 -
13.20 -signature SMT_NORMALIZE =
13.21 -sig
13.22 - val normalize: thm list -> Proof.context -> thm list * Proof.context
13.23 -end
13.24 -
13.25 -structure SMT_Normalize: SMT_NORMALIZE =
13.26 -struct
13.27 -
13.28 -infix 2 ??
13.29 -fun (test ?? f) x = if test x then f x else x
13.30 -
13.31 -fun if_conv c cv1 cv2 ct = (if c (Thm.term_of ct) then cv1 else cv2) ct
13.32 -fun if_true_conv c cv = if_conv c cv Conv.all_conv
13.33 -
13.34 -
13.35 -
13.36 -(* simplification of trivial distincts (distinct should have at least
13.37 - three elements in the argument list) *)
13.38 -
13.39 -local
13.40 - fun is_trivial_distinct (Const (@{const_name distinct}, _) $ t) =
13.41 - length (HOLogic.dest_list t) <= 2
13.42 - | is_trivial_distinct _ = false
13.43 -
13.44 - val thms = @{lemma
13.45 - "distinct [] == True"
13.46 - "distinct [x] == True"
13.47 - "distinct [x, y] == (x ~= y)"
13.48 - by simp_all}
13.49 - fun distinct_conv _ =
13.50 - if_true_conv is_trivial_distinct (More_Conv.rewrs_conv thms)
13.51 -in
13.52 -fun trivial_distinct ctxt =
13.53 - map ((Term.exists_subterm is_trivial_distinct o Thm.prop_of) ??
13.54 - Conv.fconv_rule (More_Conv.top_conv distinct_conv ctxt))
13.55 -end
13.56 -
13.57 -
13.58 -
13.59 -(* rewrite bool case expressions as if expressions *)
13.60 -
13.61 -local
13.62 - val is_bool_case = (fn
13.63 - Const (@{const_name "bool.bool_case"}, _) $ _ $ _ $ _ => true
13.64 - | _ => false)
13.65 -
13.66 - val thms = @{lemma
13.67 - "(case P of True => x | False => y) == (if P then x else y)"
13.68 - "(case P of False => y | True => x) == (if P then x else y)"
13.69 - by (rule eq_reflection, simp)+}
13.70 - val unfold_conv = if_true_conv is_bool_case (More_Conv.rewrs_conv thms)
13.71 -in
13.72 -fun rewrite_bool_cases ctxt =
13.73 - map ((Term.exists_subterm is_bool_case o Thm.prop_of) ??
13.74 - Conv.fconv_rule (More_Conv.top_conv (K unfold_conv) ctxt))
13.75 -end
13.76 -
13.77 -
13.78 -
13.79 -(* normalization of numerals: rewriting of negative integer numerals into
13.80 - positive numerals, Numeral0 into 0, Numeral1 into 1 *)
13.81 -
13.82 -local
13.83 - fun is_number_sort ctxt T =
13.84 - Sign.of_sort (ProofContext.theory_of ctxt) (T, @{sort number_ring})
13.85 -
13.86 - fun is_strange_number ctxt (t as Const (@{const_name number_of}, _) $ _) =
13.87 - (case try HOLogic.dest_number t of
13.88 - SOME (T, i) => is_number_sort ctxt T andalso i < 2
13.89 - | NONE => false)
13.90 - | is_strange_number _ _ = false
13.91 -
13.92 - val pos_numeral_ss = HOL_ss
13.93 - addsimps [@{thm Int.number_of_minus}, @{thm Int.number_of_Min}]
13.94 - addsimps [@{thm Int.number_of_Pls}, @{thm Int.numeral_1_eq_1}]
13.95 - addsimps @{thms Int.pred_bin_simps}
13.96 - addsimps @{thms Int.normalize_bin_simps}
13.97 - addsimps @{lemma
13.98 - "Int.Min = - Int.Bit1 Int.Pls"
13.99 - "Int.Bit0 (- Int.Pls) = - Int.Pls"
13.100 - "Int.Bit0 (- k) = - Int.Bit0 k"
13.101 - "Int.Bit1 (- k) = - Int.Bit1 (Int.pred k)"
13.102 - by simp_all (simp add: pred_def)}
13.103 -
13.104 - fun pos_conv ctxt = if_conv (is_strange_number ctxt)
13.105 - (Simplifier.rewrite (Simplifier.context ctxt pos_numeral_ss))
13.106 - Conv.no_conv
13.107 -in
13.108 -fun normalize_numerals ctxt =
13.109 - map ((Term.exists_subterm (is_strange_number ctxt) o Thm.prop_of) ??
13.110 - Conv.fconv_rule (More_Conv.top_sweep_conv pos_conv ctxt))
13.111 -end
13.112 -
13.113 -
13.114 -
13.115 -(* embedding of standard natural number operations into integer operations *)
13.116 -
13.117 -local
13.118 - val nat_embedding = @{lemma
13.119 - "nat (int n) = n"
13.120 - "i >= 0 --> int (nat i) = i"
13.121 - "i < 0 --> int (nat i) = 0"
13.122 - by simp_all}
13.123 -
13.124 - val nat_rewriting = @{lemma
13.125 - "0 = nat 0"
13.126 - "1 = nat 1"
13.127 - "number_of i = nat (number_of i)"
13.128 - "int (nat 0) = 0"
13.129 - "int (nat 1) = 1"
13.130 - "a < b = (int a < int b)"
13.131 - "a <= b = (int a <= int b)"
13.132 - "Suc a = nat (int a + 1)"
13.133 - "a + b = nat (int a + int b)"
13.134 - "a - b = nat (int a - int b)"
13.135 - "a * b = nat (int a * int b)"
13.136 - "a div b = nat (int a div int b)"
13.137 - "a mod b = nat (int a mod int b)"
13.138 - "min a b = nat (min (int a) (int b))"
13.139 - "max a b = nat (max (int a) (int b))"
13.140 - "int (nat (int a + int b)) = int a + int b"
13.141 - "int (nat (int a * int b)) = int a * int b"
13.142 - "int (nat (int a div int b)) = int a div int b"
13.143 - "int (nat (int a mod int b)) = int a mod int b"
13.144 - "int (nat (min (int a) (int b))) = min (int a) (int b)"
13.145 - "int (nat (max (int a) (int b))) = max (int a) (int b)"
13.146 - by (simp add: nat_mult_distrib nat_div_distrib nat_mod_distrib
13.147 - int_mult[symmetric] zdiv_int[symmetric] zmod_int[symmetric])+}
13.148 -
13.149 - fun on_positive num f x =
13.150 - (case try HOLogic.dest_number (Thm.term_of num) of
13.151 - SOME (_, i) => if i >= 0 then SOME (f x) else NONE
13.152 - | NONE => NONE)
13.153 -
13.154 - val cancel_int_nat_ss = HOL_ss
13.155 - addsimps [@{thm Nat_Numeral.nat_number_of}]
13.156 - addsimps [@{thm Nat_Numeral.int_nat_number_of}]
13.157 - addsimps @{thms neg_simps}
13.158 -
13.159 - fun cancel_int_nat_simproc _ ss ct =
13.160 - let
13.161 - val num = Thm.dest_arg (Thm.dest_arg ct)
13.162 - val goal = Thm.mk_binop @{cterm "op == :: int => _"} ct num
13.163 - val simpset = Simplifier.inherit_context ss cancel_int_nat_ss
13.164 - fun tac _ = Simplifier.simp_tac simpset 1
13.165 - in on_positive num (Goal.prove_internal [] goal) tac end
13.166 -
13.167 - val nat_ss = HOL_ss
13.168 - addsimps nat_rewriting
13.169 - addsimprocs [Simplifier.make_simproc {
13.170 - name = "cancel_int_nat_num", lhss = [@{cpat "int (nat _)"}],
13.171 - proc = cancel_int_nat_simproc, identifier = [] }]
13.172 -
13.173 - fun conv ctxt = Simplifier.rewrite (Simplifier.context ctxt nat_ss)
13.174 -
13.175 - val uses_nat_type = Term.exists_type (Term.exists_subtype (equal @{typ nat}))
13.176 - val uses_nat_int =
13.177 - Term.exists_subterm (member (op aconv) [@{term int}, @{term nat}])
13.178 -in
13.179 -fun nat_as_int ctxt =
13.180 - map ((uses_nat_type o Thm.prop_of) ?? Conv.fconv_rule (conv ctxt)) #>
13.181 - exists (uses_nat_int o Thm.prop_of) ?? append nat_embedding
13.182 -end
13.183 -
13.184 -
13.185 -
13.186 -(* unfold definitions of specific constants *)
13.187 -
13.188 -local
13.189 - fun mk_entry (t as Const (n, _)) thm = ((n, t), thm)
13.190 - | mk_entry t _ = raise TERM ("mk_entry", [t])
13.191 - fun prepare_def thm =
13.192 - (case Thm.prop_of thm of
13.193 - Const (@{const_name "=="}, _) $ t $ _ => mk_entry (Term.head_of t) thm
13.194 - | t => raise TERM ("prepare_def", [t]))
13.195 -
13.196 - val defs = map prepare_def [
13.197 - @{thm abs_if[where 'a = int, THEN eq_reflection]},
13.198 - @{thm abs_if[where 'a = real, THEN eq_reflection]},
13.199 - @{thm min_def[where 'a = int, THEN eq_reflection]},
13.200 - @{thm min_def[where 'a = real, THEN eq_reflection]},
13.201 - @{thm max_def[where 'a = int, THEN eq_reflection]},
13.202 - @{thm max_def[where 'a = real, THEN eq_reflection]},
13.203 - @{thm Ex1_def}, @{thm Ball_def}, @{thm Bex_def}]
13.204 -
13.205 - fun matches thy ((t as Const (n, _)), (m, p)) =
13.206 - n = m andalso Pattern.matches thy (p, t)
13.207 - | matches _ _ = false
13.208 -
13.209 - fun lookup_def thy = AList.lookup (matches thy) defs
13.210 - fun lookup_def_head thy = lookup_def thy o Term.head_of
13.211 -
13.212 - fun occurs_def thy = Term.exists_subterm (is_some o lookup_def thy)
13.213 -
13.214 - fun unfold_def_conv ctxt ct =
13.215 - (case lookup_def_head (ProofContext.theory_of ctxt) (Thm.term_of ct) of
13.216 - SOME thm => Conv.rewr_conv thm
13.217 - | NONE => Conv.all_conv) ct
13.218 -in
13.219 -fun unfold_defs ctxt =
13.220 - (occurs_def (ProofContext.theory_of ctxt) o Thm.prop_of) ??
13.221 - Conv.fconv_rule (More_Conv.top_conv unfold_def_conv ctxt)
13.222 -end
13.223 -
13.224 -
13.225 -
13.226 -(* further normalizations: beta/eta, universal closure, atomize *)
13.227 -
13.228 -local
13.229 - val all1 = @{lemma "All P == ALL x. P x" by (rule reflexive)}
13.230 - val all2 = @{lemma "All == (%P. ALL x. P x)" by (rule reflexive)}
13.231 - val ex1 = @{lemma "Ex P == EX x. P x" by (rule reflexive)}
13.232 - val ex2 = @{lemma "Ex == (%P. EX x. P x)" by (rule reflexive)}
13.233 - val let1 = @{lemma "Let c P == let x = c in P x" by (rule reflexive)}
13.234 - val let2 = @{lemma "Let c == (%P. let x = c in P x)" by (rule reflexive)}
13.235 - val let3 = @{lemma "Let == (%c P. let x = c in P x)" by (rule reflexive)}
13.236 -
13.237 - fun all_abs_conv cv ctxt =
13.238 - Conv.abs_conv (all_abs_conv cv o snd) ctxt else_conv cv ctxt
13.239 - fun keep_conv ctxt = More_Conv.binder_conv norm_conv ctxt
13.240 - and unfold_conv rule ctxt =
13.241 - Conv.rewr_conv rule then_conv all_abs_conv keep_conv ctxt
13.242 - and unfold_let_conv rule ctxt =
13.243 - Conv.rewr_conv rule then_conv
13.244 - all_abs_conv (fn cx => Conv.combination_conv
13.245 - (Conv.arg_conv (norm_conv cx)) (Conv.abs_conv (norm_conv o snd) cx)) ctxt
13.246 - and norm_conv ctxt ct =
13.247 - (case Thm.term_of ct of
13.248 - Const (@{const_name All}, _) $ Abs _ => keep_conv
13.249 - | Const (@{const_name All}, _) $ _ => unfold_conv all1
13.250 - | Const (@{const_name All}, _) => unfold_conv all2
13.251 - | Const (@{const_name Ex}, _) $ Abs _ => keep_conv
13.252 - | Const (@{const_name Ex}, _) $ _ => unfold_conv ex1
13.253 - | Const (@{const_name Ex}, _) => unfold_conv ex2
13.254 - | Const (@{const_name Let}, _) $ _ $ Abs _ => keep_conv
13.255 - | Const (@{const_name Let}, _) $ _ $ _ => unfold_let_conv let1
13.256 - | Const (@{const_name Let}, _) $ _ => unfold_let_conv let2
13.257 - | Const (@{const_name Let}, _) => unfold_let_conv let3
13.258 - | Abs _ => Conv.abs_conv (norm_conv o snd)
13.259 - | _ $ _ => Conv.comb_conv o norm_conv
13.260 - | _ => K Conv.all_conv) ctxt ct
13.261 -
13.262 - fun is_normed t =
13.263 - (case t of
13.264 - Const (@{const_name All}, _) $ Abs (_, _, u) => is_normed u
13.265 - | Const (@{const_name All}, _) $ _ => false
13.266 - | Const (@{const_name All}, _) => false
13.267 - | Const (@{const_name Ex}, _) $ Abs (_, _, u) => is_normed u
13.268 - | Const (@{const_name Ex}, _) $ _ => false
13.269 - | Const (@{const_name Ex}, _) => false
13.270 - | Const (@{const_name Let}, _) $ u1 $ Abs (_, _, u2) =>
13.271 - is_normed u1 andalso is_normed u2
13.272 - | Const (@{const_name Let}, _) $ _ $ _ => false
13.273 - | Const (@{const_name Let}, _) $ _ => false
13.274 - | Const (@{const_name Let}, _) => false
13.275 - | Abs (_, _, u) => is_normed u
13.276 - | u1 $ u2 => is_normed u1 andalso is_normed u2
13.277 - | _ => true)
13.278 -in
13.279 -fun norm_binder_conv ctxt = if_conv is_normed Conv.all_conv (norm_conv ctxt)
13.280 -end
13.281 -
13.282 -fun norm_def ctxt thm =
13.283 - (case Thm.prop_of thm of
13.284 - @{term Trueprop} $ (Const (@{const_name "op ="}, _) $ _ $ Abs _) =>
13.285 - norm_def ctxt (thm RS @{thm fun_cong})
13.286 - | Const (@{const_name "=="}, _) $ _ $ Abs _ =>
13.287 - norm_def ctxt (thm RS @{thm meta_eq_to_obj_eq})
13.288 - | _ => thm)
13.289 -
13.290 -fun atomize_conv ctxt ct =
13.291 - (case Thm.term_of ct of
13.292 - @{term "op ==>"} $ _ $ _ =>
13.293 - Conv.binop_conv (atomize_conv ctxt) then_conv
13.294 - Conv.rewr_conv @{thm atomize_imp}
13.295 - | Const (@{const_name "=="}, _) $ _ $ _ =>
13.296 - Conv.binop_conv (atomize_conv ctxt) then_conv
13.297 - Conv.rewr_conv @{thm atomize_eq}
13.298 - | Const (@{const_name all}, _) $ Abs _ =>
13.299 - More_Conv.binder_conv atomize_conv ctxt then_conv
13.300 - Conv.rewr_conv @{thm atomize_all}
13.301 - | _ => Conv.all_conv) ct
13.302 -
13.303 -fun normalize_rule ctxt =
13.304 - Conv.fconv_rule (
13.305 - (* reduce lambda abstractions, except at known binders: *)
13.306 - Thm.beta_conversion true then_conv
13.307 - Thm.eta_conversion then_conv
13.308 - norm_binder_conv ctxt) #>
13.309 - norm_def ctxt #>
13.310 - Drule.forall_intr_vars #>
13.311 - Conv.fconv_rule (atomize_conv ctxt)
13.312 -
13.313 -
13.314 -
13.315 -(* lift lambda terms into additional rules *)
13.316 -
13.317 -local
13.318 - val meta_eq = @{cpat "op =="}
13.319 - val meta_eqT = hd (Thm.dest_ctyp (Thm.ctyp_of_term meta_eq))
13.320 - fun inst_meta cT = Thm.instantiate_cterm ([(meta_eqT, cT)], []) meta_eq
13.321 - fun mk_meta_eq ct cu = Thm.mk_binop (inst_meta (Thm.ctyp_of_term ct)) ct cu
13.322 -
13.323 - fun cert ctxt = Thm.cterm_of (ProofContext.theory_of ctxt)
13.324 -
13.325 - fun used_vars cvs ct =
13.326 - let
13.327 - val lookup = AList.lookup (op aconv) (map (` Thm.term_of) cvs)
13.328 - val add = (fn SOME ct => insert (op aconvc) ct | _ => I)
13.329 - in Term.fold_aterms (add o lookup) (Thm.term_of ct) [] end
13.330 -
13.331 - fun apply cv thm =
13.332 - let val thm' = Thm.combination thm (Thm.reflexive cv)
13.333 - in Thm.transitive thm' (Thm.beta_conversion false (Thm.rhs_of thm')) end
13.334 - fun apply_def cvs eq = Thm.symmetric (fold apply cvs eq)
13.335 -
13.336 - fun replace_lambda cvs ct (cx as (ctxt, defs)) =
13.337 - let
13.338 - val cvs' = used_vars cvs ct
13.339 - val ct' = fold_rev Thm.cabs cvs' ct
13.340 - in
13.341 - (case Termtab.lookup defs (Thm.term_of ct') of
13.342 - SOME eq => (apply_def cvs' eq, cx)
13.343 - | NONE =>
13.344 - let
13.345 - val {T, ...} = Thm.rep_cterm ct' and n = Name.uu
13.346 - val (n', ctxt') = yield_singleton Variable.variant_fixes n ctxt
13.347 - val cu = mk_meta_eq (cert ctxt (Free (n', T))) ct'
13.348 - val (eq, ctxt'') = yield_singleton Assumption.add_assumes cu ctxt'
13.349 - val defs' = Termtab.update (Thm.term_of ct', eq) defs
13.350 - in (apply_def cvs' eq, (ctxt'', defs')) end)
13.351 - end
13.352 -
13.353 - fun none ct cx = (Thm.reflexive ct, cx)
13.354 - fun in_comb f g ct cx =
13.355 - let val (cu1, cu2) = Thm.dest_comb ct
13.356 - in cx |> f cu1 ||>> g cu2 |>> uncurry Thm.combination end
13.357 - fun in_arg f = in_comb none f
13.358 - fun in_abs f cvs ct (ctxt, defs) =
13.359 - let
13.360 - val (n, ctxt') = yield_singleton Variable.variant_fixes Name.uu ctxt
13.361 - val (cv, cu) = Thm.dest_abs (SOME n) ct
13.362 - in (ctxt', defs) |> f (cv :: cvs) cu |>> Thm.abstract_rule n cv end
13.363 -
13.364 - fun traverse cvs ct =
13.365 - (case Thm.term_of ct of
13.366 - Const (@{const_name All}, _) $ Abs _ => in_arg (in_abs traverse cvs)
13.367 - | Const (@{const_name Ex}, _) $ Abs _ => in_arg (in_abs traverse cvs)
13.368 - | Const (@{const_name Let}, _) $ _ $ Abs _ =>
13.369 - in_comb (in_arg (traverse cvs)) (in_abs traverse cvs)
13.370 - | Abs _ => at_lambda cvs
13.371 - | _ $ _ => in_comb (traverse cvs) (traverse cvs)
13.372 - | _ => none) ct
13.373 -
13.374 - and at_lambda cvs ct =
13.375 - in_abs traverse cvs ct #-> (fn thm =>
13.376 - replace_lambda cvs (Thm.rhs_of thm) #>> Thm.transitive thm)
13.377 -
13.378 - fun has_free_lambdas t =
13.379 - (case t of
13.380 - Const (@{const_name All}, _) $ Abs (_, _, u) => has_free_lambdas u
13.381 - | Const (@{const_name Ex}, _) $ Abs (_, _, u) => has_free_lambdas u
13.382 - | Const (@{const_name Let}, _) $ u1 $ Abs (_, _, u2) =>
13.383 - has_free_lambdas u1 orelse has_free_lambdas u2
13.384 - | Abs _ => true
13.385 - | u1 $ u2 => has_free_lambdas u1 orelse has_free_lambdas u2
13.386 - | _ => false)
13.387 -
13.388 - fun lift_lm f thm cx =
13.389 - if not (has_free_lambdas (Thm.prop_of thm)) then (thm, cx)
13.390 - else cx |> f (Thm.cprop_of thm) |>> (fn thm' => Thm.equal_elim thm' thm)
13.391 -in
13.392 -fun lift_lambdas thms ctxt =
13.393 - let
13.394 - val cx = (ctxt, Termtab.empty)
13.395 - val (thms', (ctxt', defs)) = fold_map (lift_lm (traverse [])) thms cx
13.396 - val eqs = Termtab.fold (cons o normalize_rule ctxt' o snd) defs []
13.397 - in (eqs @ thms', ctxt') end
13.398 -end
13.399 -
13.400 -
13.401 -
13.402 -(* make application explicit for functions with varying number of arguments *)
13.403 -
13.404 -local
13.405 - val const = prefix "c" and free = prefix "f"
13.406 - fun min i (e as (_, j)) = if i <> j then (true, Int.min (i, j)) else e
13.407 - fun add t i = Symtab.map_default (t, (false, i)) (min i)
13.408 - fun traverse t =
13.409 - (case Term.strip_comb t of
13.410 - (Const (n, _), ts) => add (const n) (length ts) #> fold traverse ts
13.411 - | (Free (n, _), ts) => add (free n) (length ts) #> fold traverse ts
13.412 - | (Abs (_, _, u), ts) => fold traverse (u :: ts)
13.413 - | (_, ts) => fold traverse ts)
13.414 - val prune = (fn (n, (true, i)) => Symtab.update (n, i) | _ => I)
13.415 - fun prune_tab tab = Symtab.fold prune tab Symtab.empty
13.416 -
13.417 - fun binop_conv cv1 cv2 = Conv.combination_conv (Conv.arg_conv cv1) cv2
13.418 - fun nary_conv conv1 conv2 ct =
13.419 - (Conv.combination_conv (nary_conv conv1 conv2) conv2 else_conv conv1) ct
13.420 - fun abs_conv conv tb = Conv.abs_conv (fn (cv, cx) =>
13.421 - let val n = fst (Term.dest_Free (Thm.term_of cv))
13.422 - in conv (Symtab.update (free n, 0) tb) cx end)
13.423 - val apply_rule = @{lemma "f x == apply f x" by (simp add: apply_def)}
13.424 -in
13.425 -fun explicit_application ctxt thms =
13.426 - let
13.427 - fun sub_conv tb ctxt ct =
13.428 - (case Term.strip_comb (Thm.term_of ct) of
13.429 - (Const (n, _), ts) => app_conv tb (const n) (length ts) ctxt
13.430 - | (Free (n, _), ts) => app_conv tb (free n) (length ts) ctxt
13.431 - | (Abs _, _) => nary_conv (abs_conv sub_conv tb ctxt) (sub_conv tb ctxt)
13.432 - | (_, _) => nary_conv Conv.all_conv (sub_conv tb ctxt)) ct
13.433 - and app_conv tb n i ctxt =
13.434 - (case Symtab.lookup tb n of
13.435 - NONE => nary_conv Conv.all_conv (sub_conv tb ctxt)
13.436 - | SOME j => apply_conv tb ctxt (i - j))
13.437 - and apply_conv tb ctxt i ct = (
13.438 - if i = 0 then nary_conv Conv.all_conv (sub_conv tb ctxt)
13.439 - else
13.440 - Conv.rewr_conv apply_rule then_conv
13.441 - binop_conv (apply_conv tb ctxt (i-1)) (sub_conv tb ctxt)) ct
13.442 -
13.443 - fun needs_exp_app tab = Term.exists_subterm (fn
13.444 - Bound _ $ _ => true
13.445 - | Const (n, _) => Symtab.defined tab (const n)
13.446 - | Free (n, _) => Symtab.defined tab (free n)
13.447 - | _ => false)
13.448 -
13.449 - fun rewrite tab ctxt thm =
13.450 - if not (needs_exp_app tab (Thm.prop_of thm)) then thm
13.451 - else Conv.fconv_rule (sub_conv tab ctxt) thm
13.452 -
13.453 - val tab = prune_tab (fold (traverse o Thm.prop_of) thms Symtab.empty)
13.454 - in map (rewrite tab ctxt) thms end
13.455 -end
13.456 -
13.457 -
13.458 -
13.459 -(* combined normalization *)
13.460 -
13.461 -fun normalize thms ctxt =
13.462 - thms
13.463 - |> trivial_distinct ctxt
13.464 - |> rewrite_bool_cases ctxt
13.465 - |> normalize_numerals ctxt
13.466 - |> nat_as_int ctxt
13.467 - |> map (unfold_defs ctxt #> normalize_rule ctxt)
13.468 - |> rpair ctxt
13.469 - |-> SMT_Monomorph.monomorph
13.470 - |-> lift_lambdas
13.471 - |-> (fn thms' => `(fn ctxt' => explicit_application ctxt' thms'))
13.472 -
13.473 -end
14.1 --- a/src/HOL/SMT/Tools/smt_solver.ML Wed May 12 23:54:01 2010 +0200
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,342 +0,0 @@
14.4 -(* Title: HOL/SMT/Tools/smt_solver.ML
14.5 - Author: Sascha Boehme, TU Muenchen
14.6 -
14.7 -SMT solvers registry and SMT tactic.
14.8 -*)
14.9 -
14.10 -signature SMT_SOLVER =
14.11 -sig
14.12 - exception SMT of string
14.13 - exception SMT_COUNTEREXAMPLE of bool * term list
14.14 -
14.15 - type solver_config = {
14.16 - command: {env_var: string, remote_name: string option},
14.17 - arguments: string list,
14.18 - interface: string list -> SMT_Translate.config,
14.19 - reconstruct: (string list * SMT_Translate.recon) -> Proof.context ->
14.20 - thm * Proof.context }
14.21 -
14.22 - (*options*)
14.23 - val timeout: int Config.T
14.24 - val with_timeout: Proof.context -> ('a -> 'b) -> 'a -> 'b
14.25 - val trace: bool Config.T
14.26 - val trace_msg: Proof.context -> ('a -> string) -> 'a -> unit
14.27 -
14.28 - (*certificates*)
14.29 - val fixed_certificates: bool Config.T
14.30 - val select_certificates: string -> Context.generic -> Context.generic
14.31 -
14.32 - (*solvers*)
14.33 - type solver = Proof.context -> thm list -> thm
14.34 - type solver_info = Context.generic -> Pretty.T list
14.35 - val add_solver: string * (Proof.context -> solver_config) -> theory ->
14.36 - theory
14.37 - val all_solver_names_of: theory -> string list
14.38 - val add_solver_info: string * solver_info -> theory -> theory
14.39 - val solver_name_of: Context.generic -> string
14.40 - val select_solver: string -> Context.generic -> Context.generic
14.41 - val solver_of: Context.generic -> solver
14.42 -
14.43 - (*tactic*)
14.44 - val smt_tac': bool -> Proof.context -> thm list -> int -> Tactical.tactic
14.45 - val smt_tac: Proof.context -> thm list -> int -> Tactical.tactic
14.46 -
14.47 - (*setup*)
14.48 - val setup: theory -> theory
14.49 - val print_setup: Context.generic -> unit
14.50 -end
14.51 -
14.52 -structure SMT_Solver: SMT_SOLVER =
14.53 -struct
14.54 -
14.55 -exception SMT of string
14.56 -exception SMT_COUNTEREXAMPLE of bool * term list
14.57 -
14.58 -
14.59 -type solver_config = {
14.60 - command: {env_var: string, remote_name: string option},
14.61 - arguments: string list,
14.62 - interface: string list -> SMT_Translate.config,
14.63 - reconstruct: (string list * SMT_Translate.recon) -> Proof.context ->
14.64 - thm * Proof.context }
14.65 -
14.66 -
14.67 -
14.68 -(* SMT options *)
14.69 -
14.70 -val (timeout, setup_timeout) = Attrib.config_int "smt_timeout" (K 30)
14.71 -
14.72 -fun with_timeout ctxt f x =
14.73 - TimeLimit.timeLimit (Time.fromSeconds (Config.get ctxt timeout)) f x
14.74 - handle TimeLimit.TimeOut => raise SMT "timeout"
14.75 -
14.76 -val (trace, setup_trace) = Attrib.config_bool "smt_trace" (K false)
14.77 -
14.78 -fun trace_msg ctxt f x =
14.79 - if Config.get ctxt trace then tracing (f x) else ()
14.80 -
14.81 -
14.82 -
14.83 -(* SMT certificates *)
14.84 -
14.85 -val (fixed_certificates, setup_fixed_certificates) =
14.86 - Attrib.config_bool "smt_fixed" (K false)
14.87 -
14.88 -structure Certificates = Generic_Data
14.89 -(
14.90 - type T = Cache_IO.cache option
14.91 - val empty = NONE
14.92 - val extend = I
14.93 - fun merge (s, _) = s
14.94 -)
14.95 -
14.96 -fun select_certificates name = Certificates.put (
14.97 - if name = "" then NONE
14.98 - else SOME (Cache_IO.make (Path.explode name)))
14.99 -
14.100 -
14.101 -
14.102 -(* interface to external solvers *)
14.103 -
14.104 -local
14.105 -
14.106 -fun choose {env_var, remote_name} =
14.107 - let
14.108 - val local_solver = getenv env_var
14.109 - val remote_solver = the_default "" remote_name
14.110 - val remote_url = getenv "REMOTE_SMT_URL"
14.111 - in
14.112 - if local_solver <> ""
14.113 - then
14.114 - (tracing ("Invoking local SMT solver " ^ quote local_solver ^ " ...");
14.115 - [local_solver])
14.116 - else if remote_solver <> ""
14.117 - then
14.118 - (tracing ("Invoking remote SMT solver " ^ quote remote_solver ^ " at " ^
14.119 - quote remote_url ^ " ...");
14.120 - [getenv "REMOTE_SMT", remote_solver])
14.121 - else error ("Undefined Isabelle environment variable: " ^ quote env_var)
14.122 - end
14.123 -
14.124 -fun make_cmd solver args problem_path proof_path = space_implode " " (
14.125 - map File.shell_quote (solver @ args) @
14.126 - [File.shell_path problem_path, "2>&1", ">", File.shell_path proof_path])
14.127 -
14.128 -fun run ctxt cmd args input =
14.129 - (case Certificates.get (Context.Proof ctxt) of
14.130 - NONE => Cache_IO.run (make_cmd (choose cmd) args) input
14.131 - | SOME certs =>
14.132 - (case Cache_IO.lookup certs input of
14.133 - (NONE, key) =>
14.134 - if Config.get ctxt fixed_certificates
14.135 - then error ("Bad certificates cache: missing certificate")
14.136 - else Cache_IO.run_and_cache certs key (make_cmd (choose cmd) args)
14.137 - input
14.138 - | (SOME output, _) =>
14.139 - (tracing ("Using cached certificate from " ^
14.140 - File.shell_path (Cache_IO.cache_path_of certs) ^ " ...");
14.141 - output)))
14.142 -
14.143 -in
14.144 -
14.145 -fun run_solver ctxt cmd args input =
14.146 - let
14.147 - fun pretty tag ls = Pretty.string_of (Pretty.big_list tag
14.148 - (map Pretty.str ls))
14.149 -
14.150 - val _ = trace_msg ctxt (pretty "SMT problem:" o split_lines) input
14.151 -
14.152 - val (res, err) = with_timeout ctxt (run ctxt cmd args) input
14.153 - val _ = trace_msg ctxt (pretty "SMT solver:") err
14.154 -
14.155 - val ls = rev (dropwhile (equal "") (rev res))
14.156 - val _ = trace_msg ctxt (pretty "SMT result:") ls
14.157 - in ls end
14.158 -
14.159 -end
14.160 -
14.161 -fun trace_recon_data ctxt {typs, terms, ...} =
14.162 - let
14.163 - fun pretty_eq n p = Pretty.block [Pretty.str n, Pretty.str " = ", p]
14.164 - fun pretty_typ (n, T) = pretty_eq n (Syntax.pretty_typ ctxt T)
14.165 - fun pretty_term (n, t) = pretty_eq n (Syntax.pretty_term ctxt t)
14.166 - in
14.167 - trace_msg ctxt (fn () => Pretty.string_of (Pretty.big_list "SMT names:" [
14.168 - Pretty.big_list "sorts:" (map pretty_typ (Symtab.dest typs)),
14.169 - Pretty.big_list "functions:" (map pretty_term (Symtab.dest terms))])) ()
14.170 - end
14.171 -
14.172 -fun invoke translate_config command arguments thms ctxt =
14.173 - thms
14.174 - |> SMT_Translate.translate translate_config ctxt
14.175 - ||> tap (trace_recon_data ctxt)
14.176 - |>> run_solver ctxt command arguments
14.177 - |> rpair ctxt
14.178 -
14.179 -fun discharge_definitions thm =
14.180 - if Thm.nprems_of thm = 0 then thm
14.181 - else discharge_definitions (@{thm reflexive} RS thm)
14.182 -
14.183 -fun gen_solver name solver ctxt prems =
14.184 - let
14.185 - val {command, arguments, interface, reconstruct} = solver ctxt
14.186 - val comments = ("solver: " ^ name) ::
14.187 - ("timeout: " ^ string_of_int (Config.get ctxt timeout)) ::
14.188 - "arguments:" :: arguments
14.189 - in
14.190 - SMT_Additional_Facts.add_facts prems
14.191 - |> rpair ctxt
14.192 - |-> SMT_Normalize.normalize
14.193 - |-> invoke (interface comments) command arguments
14.194 - |-> reconstruct
14.195 - |-> (fn thm => fn ctxt' => thm
14.196 - |> singleton (ProofContext.export ctxt' ctxt)
14.197 - |> discharge_definitions)
14.198 - end
14.199 -
14.200 -
14.201 -
14.202 -(* solver store *)
14.203 -
14.204 -type solver = Proof.context -> thm list -> thm
14.205 -type solver_info = Context.generic -> Pretty.T list
14.206 -
14.207 -structure Solvers = Theory_Data
14.208 -(
14.209 - type T = ((Proof.context -> solver_config) * solver_info) Symtab.table
14.210 - val empty = Symtab.empty
14.211 - val extend = I
14.212 - fun merge data = Symtab.merge (K true) data
14.213 - handle Symtab.DUP name => error ("Duplicate SMT solver: " ^ quote name)
14.214 -)
14.215 -
14.216 -val no_solver = "(none)"
14.217 -val add_solver = Solvers.map o Symtab.update_new o apsnd (rpair (K []))
14.218 -val all_solver_names_of = Symtab.keys o Solvers.get
14.219 -val lookup_solver = Symtab.lookup o Solvers.get
14.220 -fun add_solver_info (n, i) = Solvers.map (Symtab.map_entry n (apsnd (K i)))
14.221 -
14.222 -
14.223 -
14.224 -(* selected solver *)
14.225 -
14.226 -structure Selected_Solver = Generic_Data
14.227 -(
14.228 - type T = string
14.229 - val empty = no_solver
14.230 - val extend = I
14.231 - fun merge (s, _) = s
14.232 -)
14.233 -
14.234 -val solver_name_of = Selected_Solver.get
14.235 -
14.236 -fun select_solver name context =
14.237 - if is_none (lookup_solver (Context.theory_of context) name)
14.238 - then error ("SMT solver not registered: " ^ quote name)
14.239 - else Selected_Solver.map (K name) context
14.240 -
14.241 -fun raw_solver_of context name =
14.242 - (case lookup_solver (Context.theory_of context) name of
14.243 - NONE => error "No SMT solver selected"
14.244 - | SOME (s, _) => s)
14.245 -
14.246 -fun solver_of context =
14.247 - let val name = solver_name_of context
14.248 - in gen_solver name (raw_solver_of context name) end
14.249 -
14.250 -
14.251 -
14.252 -(* SMT tactic *)
14.253 -
14.254 -local
14.255 - fun pretty_cex ctxt (real, ex) =
14.256 - let
14.257 - val msg = if real then "SMT: counterexample found"
14.258 - else "SMT: potential counterexample found"
14.259 - in
14.260 - if null ex then msg ^ "."
14.261 - else Pretty.string_of (Pretty.big_list (msg ^ ":")
14.262 - (map (Syntax.pretty_term ctxt) ex))
14.263 - end
14.264 -
14.265 - fun fail_tac f msg st = (f msg; Tactical.no_tac st)
14.266 -
14.267 - fun SAFE pass_exns tac ctxt i st =
14.268 - if pass_exns then tac ctxt i st
14.269 - else (tac ctxt i st
14.270 - handle SMT msg => fail_tac (trace_msg ctxt (prefix "SMT: ")) msg st
14.271 - | SMT_COUNTEREXAMPLE ce => fail_tac tracing (pretty_cex ctxt ce) st)
14.272 -
14.273 - fun smt_solver rules ctxt = solver_of (Context.Proof ctxt) ctxt rules
14.274 -
14.275 - val has_topsort = Term.exists_type (Term.exists_subtype (fn
14.276 - TFree (_, []) => true
14.277 - | TVar (_, []) => true
14.278 - | _ => false))
14.279 -in
14.280 -fun smt_tac' pass_exns ctxt rules =
14.281 - Tactic.rtac @{thm ccontr} THEN'
14.282 - SUBPROOF (fn {context, prems, ...} =>
14.283 - let val thms = rules @ prems
14.284 - in
14.285 - if exists (has_topsort o Thm.prop_of) thms
14.286 - then fail_tac (trace_msg context I)
14.287 - "SMT: proof state contains the universal sort {}"
14.288 - else SAFE pass_exns (Tactic.rtac o smt_solver thms) context 1
14.289 - end) ctxt
14.290 -
14.291 -val smt_tac = smt_tac' false
14.292 -end
14.293 -
14.294 -val smt_method =
14.295 - Scan.optional Attrib.thms [] >>
14.296 - (fn thms => fn ctxt => METHOD (fn facts =>
14.297 - HEADGOAL (smt_tac ctxt (thms @ facts))))
14.298 -
14.299 -
14.300 -
14.301 -(* setup *)
14.302 -
14.303 -val setup =
14.304 - Attrib.setup (Binding.name "smt_solver")
14.305 - (Scan.lift (OuterParse.$$$ "=" |-- Args.name) >>
14.306 - (Thm.declaration_attribute o K o select_solver))
14.307 - "SMT solver configuration" #>
14.308 - setup_timeout #>
14.309 - setup_trace #>
14.310 - setup_fixed_certificates #>
14.311 - Attrib.setup (Binding.name "smt_certificates")
14.312 - (Scan.lift (OuterParse.$$$ "=" |-- Args.name) >>
14.313 - (Thm.declaration_attribute o K o select_certificates))
14.314 - "SMT certificates" #>
14.315 - Method.setup (Binding.name "smt") smt_method
14.316 - "Applies an SMT solver to the current goal."
14.317 -
14.318 -
14.319 -fun print_setup gen =
14.320 - let
14.321 - val t = string_of_int (Config.get_generic gen timeout)
14.322 - val names = sort_strings (all_solver_names_of (Context.theory_of gen))
14.323 - val ns = if null names then [no_solver] else names
14.324 - val take_info = (fn (_, []) => NONE | info => SOME info)
14.325 - val infos =
14.326 - Context.theory_of gen
14.327 - |> Symtab.dest o Solvers.get
14.328 - |> map_filter (fn (n, (_, info)) => take_info (n, info gen))
14.329 - |> sort (prod_ord string_ord (K EQUAL))
14.330 - |> map (fn (n, ps) => Pretty.big_list (n ^ ":") ps)
14.331 - in
14.332 - Pretty.writeln (Pretty.big_list "SMT setup:" [
14.333 - Pretty.str ("Current SMT solver: " ^ solver_name_of gen),
14.334 - Pretty.str_list "Available SMT solvers: " "" ns,
14.335 - Pretty.str ("Current timeout: " ^ t ^ " seconds"),
14.336 - Pretty.big_list "Solver-specific settings:" infos])
14.337 - end
14.338 -
14.339 -val _ = OuterSyntax.improper_command "smt_status"
14.340 - "Show the available SMT solvers and the currently selected solver."
14.341 - OuterKeyword.diag
14.342 - (Scan.succeed (Toplevel.no_timing o Toplevel.keep (fn state =>
14.343 - print_setup (Context.Proof (Toplevel.context_of state)))))
14.344 -
14.345 -end
15.1 --- a/src/HOL/SMT/Tools/smt_translate.ML Wed May 12 23:54:01 2010 +0200
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,343 +0,0 @@
15.4 -(* Title: HOL/SMT/Tools/smt_translate.ML
15.5 - Author: Sascha Boehme, TU Muenchen
15.6 -
15.7 -Translate theorems into an SMT intermediate format and serialize them.
15.8 -*)
15.9 -
15.10 -signature SMT_TRANSLATE =
15.11 -sig
15.12 - (* intermediate term structure *)
15.13 - datatype squant = SForall | SExists
15.14 - datatype 'a spattern = SPat of 'a list | SNoPat of 'a list
15.15 - datatype sterm =
15.16 - SVar of int |
15.17 - SApp of string * sterm list |
15.18 - SLet of string * sterm * sterm |
15.19 - SQua of squant * string list * sterm spattern list * sterm
15.20 -
15.21 - (* configuration options *)
15.22 - type prefixes = {sort_prefix: string, func_prefix: string}
15.23 - type strict = {
15.24 - is_builtin_conn: string * typ -> bool,
15.25 - is_builtin_pred: string * typ -> bool,
15.26 - is_builtin_distinct: bool}
15.27 - type builtins = {
15.28 - builtin_typ: typ -> string option,
15.29 - builtin_num: typ -> int -> string option,
15.30 - builtin_fun: string * typ -> term list -> (string * term list) option }
15.31 - datatype smt_theory = Integer | Real | Bitvector
15.32 - type sign = {
15.33 - theories: smt_theory list,
15.34 - sorts: string list,
15.35 - funcs: (string * (string list * string)) list }
15.36 - type config = {
15.37 - prefixes: prefixes,
15.38 - strict: strict option,
15.39 - builtins: builtins,
15.40 - serialize: sign -> sterm list -> string }
15.41 - type recon = {
15.42 - typs: typ Symtab.table,
15.43 - terms: term Symtab.table,
15.44 - unfolds: thm list,
15.45 - assms: thm list option }
15.46 -
15.47 - val translate: config -> Proof.context -> thm list -> string * recon
15.48 -end
15.49 -
15.50 -structure SMT_Translate: SMT_TRANSLATE =
15.51 -struct
15.52 -
15.53 -(* intermediate term structure *)
15.54 -
15.55 -datatype squant = SForall | SExists
15.56 -
15.57 -datatype 'a spattern = SPat of 'a list | SNoPat of 'a list
15.58 -
15.59 -datatype sterm =
15.60 - SVar of int |
15.61 - SApp of string * sterm list |
15.62 - SLet of string * sterm * sterm |
15.63 - SQua of squant * string list * sterm spattern list * sterm
15.64 -
15.65 -
15.66 -
15.67 -(* configuration options *)
15.68 -
15.69 -type prefixes = {sort_prefix: string, func_prefix: string}
15.70 -
15.71 -type strict = {
15.72 - is_builtin_conn: string * typ -> bool,
15.73 - is_builtin_pred: string * typ -> bool,
15.74 - is_builtin_distinct: bool}
15.75 -
15.76 -type builtins = {
15.77 - builtin_typ: typ -> string option,
15.78 - builtin_num: typ -> int -> string option,
15.79 - builtin_fun: string * typ -> term list -> (string * term list) option }
15.80 -
15.81 -datatype smt_theory = Integer | Real | Bitvector
15.82 -
15.83 -type sign = {
15.84 - theories: smt_theory list,
15.85 - sorts: string list,
15.86 - funcs: (string * (string list * string)) list }
15.87 -
15.88 -type config = {
15.89 - prefixes: prefixes,
15.90 - strict: strict option,
15.91 - builtins: builtins,
15.92 - serialize: sign -> sterm list -> string }
15.93 -
15.94 -type recon = {
15.95 - typs: typ Symtab.table,
15.96 - terms: term Symtab.table,
15.97 - unfolds: thm list,
15.98 - assms: thm list option }
15.99 -
15.100 -
15.101 -
15.102 -(* utility functions *)
15.103 -
15.104 -val dest_funT =
15.105 - let
15.106 - fun dest Ts 0 T = (rev Ts, T)
15.107 - | dest Ts i (Type ("fun", [T, U])) = dest (T::Ts) (i-1) U
15.108 - | dest _ _ T = raise TYPE ("dest_funT", [T], [])
15.109 - in dest [] end
15.110 -
15.111 -val quantifier = (fn
15.112 - @{const_name All} => SOME SForall
15.113 - | @{const_name Ex} => SOME SExists
15.114 - | _ => NONE)
15.115 -
15.116 -fun group_quant qname Ts (t as Const (q, _) $ Abs (_, T, u)) =
15.117 - if q = qname then group_quant qname (T :: Ts) u else (Ts, t)
15.118 - | group_quant _ Ts t = (Ts, t)
15.119 -
15.120 -fun dest_pat ts (Const (@{const_name pat}, _) $ t) = SPat (rev (t :: ts))
15.121 - | dest_pat ts (Const (@{const_name nopat}, _) $ t) = SNoPat (rev (t :: ts))
15.122 - | dest_pat ts (Const (@{const_name andpat}, _) $ p $ t) = dest_pat (t::ts) p
15.123 - | dest_pat _ t = raise TERM ("dest_pat", [t])
15.124 -
15.125 -fun dest_trigger (@{term trigger} $ tl $ t) =
15.126 - (map (dest_pat []) (HOLogic.dest_list tl), t)
15.127 - | dest_trigger t = ([], t)
15.128 -
15.129 -fun dest_quant qn T t = quantifier qn |> Option.map (fn q =>
15.130 - let
15.131 - val (Ts, u) = group_quant qn [T] t
15.132 - val (ps, b) = dest_trigger u
15.133 - in (q, rev Ts, ps, b) end)
15.134 -
15.135 -fun fold_map_pat f (SPat ts) = fold_map f ts #>> SPat
15.136 - | fold_map_pat f (SNoPat ts) = fold_map f ts #>> SNoPat
15.137 -
15.138 -fun prop_of thm = HOLogic.dest_Trueprop (Thm.prop_of thm)
15.139 -
15.140 -
15.141 -
15.142 -(* enforce a strict separation between formulas and terms *)
15.143 -
15.144 -val term_eq_rewr = @{lemma "x term_eq y == x = y" by (simp add: term_eq_def)}
15.145 -
15.146 -val term_bool = @{lemma "~(True term_eq False)" by (simp add: term_eq_def)}
15.147 -val term_bool' = Simplifier.rewrite_rule [term_eq_rewr] term_bool
15.148 -
15.149 -
15.150 -val needs_rewrite = Thm.prop_of #> Term.exists_subterm (fn
15.151 - Const (@{const_name Let}, _) => true
15.152 - | @{term "op = :: bool => _"} $ _ $ @{term True} => true
15.153 - | Const (@{const_name If}, _) $ _ $ @{term True} $ @{term False} => true
15.154 - | _ => false)
15.155 -
15.156 -val rewrite_rules = [
15.157 - Let_def,
15.158 - @{lemma "P = True == P" by (rule eq_reflection) simp},
15.159 - @{lemma "if P then True else False == P" by (rule eq_reflection) simp}]
15.160 -
15.161 -fun rewrite ctxt = Simplifier.full_rewrite
15.162 - (Simplifier.context ctxt empty_ss addsimps rewrite_rules)
15.163 -
15.164 -fun normalize ctxt thm =
15.165 - if needs_rewrite thm then Conv.fconv_rule (rewrite ctxt) thm else thm
15.166 -
15.167 -val unfold_rules = term_eq_rewr :: rewrite_rules
15.168 -
15.169 -
15.170 -val revert_types =
15.171 - let
15.172 - fun revert @{typ prop} = @{typ bool}
15.173 - | revert (Type (n, Ts)) = Type (n, map revert Ts)
15.174 - | revert T = T
15.175 - in Term.map_types revert end
15.176 -
15.177 -
15.178 -fun strictify {is_builtin_conn, is_builtin_pred, is_builtin_distinct} ctxt =
15.179 - let
15.180 -
15.181 - fun is_builtin_conn' (@{const_name True}, _) = false
15.182 - | is_builtin_conn' (@{const_name False}, _) = false
15.183 - | is_builtin_conn' c = is_builtin_conn c
15.184 -
15.185 - val propT = @{typ prop} and boolT = @{typ bool}
15.186 - val as_propT = (fn @{typ bool} => propT | T => T)
15.187 - fun mapTs f g = Term.strip_type #> (fn (Ts, T) => map f Ts ---> g T)
15.188 - fun conn (n, T) = (n, mapTs as_propT as_propT T)
15.189 - fun pred (n, T) = (n, mapTs I as_propT T)
15.190 -
15.191 - val term_eq = @{term "op = :: bool => _"} |> Term.dest_Const |> pred
15.192 - fun as_term t = Const term_eq $ t $ @{term True}
15.193 -
15.194 - val if_term = Const (@{const_name If}, [propT, boolT, boolT] ---> boolT)
15.195 - fun wrap_in_if t = if_term $ t $ @{term True} $ @{term False}
15.196 -
15.197 - fun in_list T f t = HOLogic.mk_list T (map f (HOLogic.dest_list t))
15.198 -
15.199 - fun in_term t =
15.200 - (case Term.strip_comb t of
15.201 - (c as Const (@{const_name If}, _), [t1, t2, t3]) =>
15.202 - c $ in_form t1 $ in_term t2 $ in_term t3
15.203 - | (h as Const c, ts) =>
15.204 - if is_builtin_conn' (conn c) orelse is_builtin_pred (pred c)
15.205 - then wrap_in_if (in_form t)
15.206 - else Term.list_comb (h, map in_term ts)
15.207 - | (h as Free _, ts) => Term.list_comb (h, map in_term ts)
15.208 - | _ => t)
15.209 -
15.210 - and in_pat ((c as Const (@{const_name pat}, _)) $ t) = c $ in_term t
15.211 - | in_pat ((c as Const (@{const_name nopat}, _)) $ t) = c $ in_term t
15.212 - | in_pat ((c as Const (@{const_name andpat}, _)) $ p $ t) =
15.213 - c $ in_pat p $ in_term t
15.214 - | in_pat t = raise TERM ("in_pat", [t])
15.215 -
15.216 - and in_pats p = in_list @{typ pattern} in_pat p
15.217 -
15.218 - and in_trig ((c as @{term trigger}) $ p $ t) = c $ in_pats p $ in_form t
15.219 - | in_trig t = in_form t
15.220 -
15.221 - and in_form t =
15.222 - (case Term.strip_comb t of
15.223 - (q as Const (qn, _), [Abs (n, T, t')]) =>
15.224 - if is_some (quantifier qn) then q $ Abs (n, T, in_trig t')
15.225 - else as_term (in_term t)
15.226 - | (Const (c as (@{const_name distinct}, T)), [t']) =>
15.227 - if is_builtin_distinct then Const (pred c) $ in_list T in_term t'
15.228 - else as_term (in_term t)
15.229 - | (Const c, ts) =>
15.230 - if is_builtin_conn (conn c)
15.231 - then Term.list_comb (Const (conn c), map in_form ts)
15.232 - else if is_builtin_pred (pred c)
15.233 - then Term.list_comb (Const (pred c), map in_term ts)
15.234 - else as_term (in_term t)
15.235 - | _ => as_term (in_term t))
15.236 - in
15.237 - map (normalize ctxt) #> (fn thms => ((unfold_rules, term_bool' :: thms),
15.238 - map (in_form o prop_of) (term_bool :: thms)))
15.239 - end
15.240 -
15.241 -
15.242 -
15.243 -(* translation from Isabelle terms into SMT intermediate terms *)
15.244 -
15.245 -val empty_context = (1, Typtab.empty, 1, Termtab.empty, [])
15.246 -
15.247 -fun make_sign (_, typs, _, terms, thys) = {
15.248 - theories = thys,
15.249 - sorts = Typtab.fold (cons o snd) typs [],
15.250 - funcs = Termtab.fold (cons o snd) terms [] }
15.251 -
15.252 -fun make_recon (unfolds, assms) (_, typs, _, terms, _) = {
15.253 - typs = Symtab.make (map swap (Typtab.dest typs)),
15.254 - terms = Symtab.make (map (fn (t, (n, _)) => (n, t)) (Termtab.dest terms)),
15.255 - unfolds = unfolds,
15.256 - assms = SOME assms }
15.257 -
15.258 -fun string_of_index pre i = pre ^ string_of_int i
15.259 -
15.260 -fun add_theory T (Tidx, typs, idx, terms, thys) =
15.261 - let
15.262 - fun add @{typ int} = insert (op =) Integer
15.263 - | add @{typ real} = insert (op =) Real
15.264 - | add (Type (@{type_name word}, _)) = insert (op =) Bitvector
15.265 - | add (Type (_, Ts)) = fold add Ts
15.266 - | add _ = I
15.267 - in (Tidx, typs, idx, terms, add T thys) end
15.268 -
15.269 -fun fresh_typ sort_prefix T (cx as (Tidx, typs, idx, terms, thys)) =
15.270 - (case Typtab.lookup typs T of
15.271 - SOME s => (s, cx)
15.272 - | NONE =>
15.273 - let
15.274 - val s = string_of_index sort_prefix Tidx
15.275 - val typs' = Typtab.update (T, s) typs
15.276 - in (s, (Tidx+1, typs', idx, terms, thys)) end)
15.277 -
15.278 -fun fresh_fun func_prefix t ss (cx as (Tidx, typs, idx, terms, thys)) =
15.279 - (case Termtab.lookup terms t of
15.280 - SOME (f, _) => (f, cx)
15.281 - | NONE =>
15.282 - let
15.283 - val f = string_of_index func_prefix idx
15.284 - val terms' = Termtab.update (revert_types t, (f, ss)) terms
15.285 - in (f, (Tidx, typs, idx+1, terms', thys)) end)
15.286 -
15.287 -fun relaxed thms = (([], thms), map prop_of thms)
15.288 -
15.289 -fun with_context f (ths, ts) =
15.290 - let val (us, context) = fold_map f ts empty_context
15.291 - in ((make_sign context, us), make_recon ths context) end
15.292 -
15.293 -
15.294 -fun translate {prefixes, strict, builtins, serialize} ctxt =
15.295 - let
15.296 - val {sort_prefix, func_prefix} = prefixes
15.297 - val {builtin_typ, builtin_num, builtin_fun} = builtins
15.298 -
15.299 - fun transT T = add_theory T #>
15.300 - (case builtin_typ T of
15.301 - SOME n => pair n
15.302 - | NONE => fresh_typ sort_prefix T)
15.303 -
15.304 - fun app n ts = SApp (n, ts)
15.305 -
15.306 - fun trans t =
15.307 - (case Term.strip_comb t of
15.308 - (Const (qn, _), [Abs (_, T, t1)]) =>
15.309 - (case dest_quant qn T t1 of
15.310 - SOME (q, Ts, ps, b) =>
15.311 - fold_map transT Ts ##>> fold_map (fold_map_pat trans) ps ##>>
15.312 - trans b #>> (fn ((Ts', ps'), b') => SQua (q, Ts', ps', b'))
15.313 - | NONE => raise TERM ("intermediate", [t]))
15.314 - | (Const (@{const_name Let}, _), [t1, Abs (_, T, t2)]) =>
15.315 - transT T ##>> trans t1 ##>> trans t2 #>>
15.316 - (fn ((U, u1), u2) => SLet (U, u1, u2))
15.317 - | (h as Const (c as (@{const_name distinct}, T)), [t1]) =>
15.318 - (case builtin_fun c (HOLogic.dest_list t1) of
15.319 - SOME (n, ts) => add_theory T #> fold_map trans ts #>> app n
15.320 - | NONE => transs h T [t1])
15.321 - | (h as Const (c as (_, T)), ts) =>
15.322 - (case try HOLogic.dest_number t of
15.323 - SOME (T, i) =>
15.324 - (case builtin_num T i of
15.325 - SOME n => add_theory T #> pair (SApp (n, []))
15.326 - | NONE => transs t T [])
15.327 - | NONE =>
15.328 - (case builtin_fun c ts of
15.329 - SOME (n, ts') => add_theory T #> fold_map trans ts' #>> app n
15.330 - | NONE => transs h T ts))
15.331 - | (h as Free (_, T), ts) => transs h T ts
15.332 - | (Bound i, []) => pair (SVar i)
15.333 - | _ => raise TERM ("intermediate", [t]))
15.334 -
15.335 - and transs t T ts =
15.336 - let val (Us, U) = dest_funT (length ts) T
15.337 - in
15.338 - fold_map transT Us ##>> transT U #-> (fn Up =>
15.339 - fresh_fun func_prefix t Up ##>> fold_map trans ts #>> SApp)
15.340 - end
15.341 - in
15.342 - (if is_some strict then strictify (the strict) ctxt else relaxed) #>
15.343 - with_context trans #>> uncurry serialize
15.344 - end
15.345 -
15.346 -end
16.1 --- a/src/HOL/SMT/Tools/smtlib_interface.ML Wed May 12 23:54:01 2010 +0200
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,214 +0,0 @@
16.4 -(* Title: HOL/SMT/Tools/smtlib_interface.ML
16.5 - Author: Sascha Boehme, TU Muenchen
16.6 -
16.7 -Interface to SMT solvers based on the SMT-LIB format.
16.8 -*)
16.9 -
16.10 -signature SMTLIB_INTERFACE =
16.11 -sig
16.12 - val interface: string list -> SMT_Translate.config
16.13 -end
16.14 -
16.15 -structure SMTLIB_Interface: SMTLIB_INTERFACE =
16.16 -struct
16.17 -
16.18 -structure T = SMT_Translate
16.19 -
16.20 -fun dest_binT T =
16.21 - (case T of
16.22 - Type (@{type_name "Numeral_Type.num0"}, _) => 0
16.23 - | Type (@{type_name "Numeral_Type.num1"}, _) => 1
16.24 - | Type (@{type_name "Numeral_Type.bit0"}, [T]) => 2 * dest_binT T
16.25 - | Type (@{type_name "Numeral_Type.bit1"}, [T]) => 1 + 2 * dest_binT T
16.26 - | _ => raise TYPE ("dest_binT", [T], []))
16.27 -
16.28 -fun dest_wordT (Type (@{type_name word}, [T])) = dest_binT T
16.29 - | dest_wordT T = raise TYPE ("dest_wordT", [T], [])
16.30 -
16.31 -
16.32 -
16.33 -(* builtins *)
16.34 -
16.35 -fun index1 n i = n ^ "[" ^ string_of_int i ^ "]"
16.36 -fun index2 n i j = n ^ "[" ^ string_of_int i ^ ":" ^ string_of_int j ^ "]"
16.37 -
16.38 -fun builtin_typ @{typ int} = SOME "Int"
16.39 - | builtin_typ @{typ real} = SOME "Real"
16.40 - | builtin_typ (Type (@{type_name word}, [T])) =
16.41 - Option.map (index1 "BitVec") (try dest_binT T)
16.42 - | builtin_typ _ = NONE
16.43 -
16.44 -fun builtin_num @{typ int} i = SOME (string_of_int i)
16.45 - | builtin_num @{typ real} i = SOME (string_of_int i ^ ".0")
16.46 - | builtin_num (Type (@{type_name word}, [T])) i =
16.47 - Option.map (index1 ("bv" ^ string_of_int i)) (try dest_binT T)
16.48 - | builtin_num _ _ = NONE
16.49 -
16.50 -val is_propT = (fn @{typ prop} => true | _ => false)
16.51 -fun is_connT T = Term.strip_type T |> (fn (Us, U) => forall is_propT (U :: Us))
16.52 -fun is_predT T = is_propT (Term.body_type T)
16.53 -
16.54 -fun just c ts = SOME (c, ts)
16.55 -
16.56 -val is_arith_type = member (op =) [@{typ int}, @{typ real}] o Term.domain_type
16.57 -
16.58 -fun fixed_bvT (Ts, T) x =
16.59 - if forall (can dest_wordT) (T :: Ts) then SOME x else NONE
16.60 -
16.61 -fun if_fixed_bvT' T = fixed_bvT ([], Term.domain_type T)
16.62 -fun if_fixed_bvT T = curry (fixed_bvT ([], Term.domain_type T))
16.63 -fun if_full_fixed_bvT T = curry (fixed_bvT (Term.strip_type T))
16.64 -
16.65 -fun dest_word_funT (Type ("fun", [T, U])) = (dest_wordT T, dest_wordT U)
16.66 - | dest_word_funT T = raise TYPE ("dest_word_funT", [T], [])
16.67 -fun dest_nat (@{term nat} $ n :: ts) = (snd (HOLogic.dest_number n), ts)
16.68 - | dest_nat ts = raise TERM ("dest_nat", ts)
16.69 -fun dest_nat_word_funT (T, ts) =
16.70 - (dest_word_funT (Term.range_type T), dest_nat ts)
16.71 -
16.72 -fun bv_extend n T ts =
16.73 - (case try dest_word_funT T of
16.74 - SOME (i, j) => if j-i >= 0 then SOME (index1 n (j-i), ts) else NONE
16.75 - | _ => NONE)
16.76 -
16.77 -fun bv_rotate n T ts =
16.78 - try dest_nat ts
16.79 - |> Option.map (fn (i, ts') => (index1 n i, ts'))
16.80 -
16.81 -fun bv_extract n T ts =
16.82 - try dest_nat_word_funT (T, ts)
16.83 - |> Option.map (fn ((_, i), (lb, ts')) => (index2 n (i + lb - 1) lb, ts'))
16.84 -
16.85 -
16.86 -fun conn @{const_name True} = SOME "true"
16.87 - | conn @{const_name False} = SOME "false"
16.88 - | conn @{const_name Not} = SOME "not"
16.89 - | conn @{const_name "op &"} = SOME "and"
16.90 - | conn @{const_name "op |"} = SOME "or"
16.91 - | conn @{const_name "op -->"} = SOME "implies"
16.92 - | conn @{const_name "op ="} = SOME "iff"
16.93 - | conn @{const_name If} = SOME "if_then_else"
16.94 - | conn _ = NONE
16.95 -
16.96 -fun pred @{const_name distinct} _ = SOME "distinct"
16.97 - | pred @{const_name "op ="} _ = SOME "="
16.98 - | pred @{const_name term_eq} _ = SOME "="
16.99 - | pred @{const_name less} T =
16.100 - if is_arith_type T then SOME "<"
16.101 - else if_fixed_bvT' T "bvult"
16.102 - | pred @{const_name less_eq} T =
16.103 - if is_arith_type T then SOME "<="
16.104 - else if_fixed_bvT' T "bvule"
16.105 - | pred @{const_name word_sless} T = if_fixed_bvT' T "bvslt"
16.106 - | pred @{const_name word_sle} T = if_fixed_bvT' T "bvsle"
16.107 - | pred _ _ = NONE
16.108 -
16.109 -fun func @{const_name If} _ = just "ite"
16.110 - | func @{const_name uminus} T =
16.111 - if is_arith_type T then just "~"
16.112 - else if_fixed_bvT T "bvneg"
16.113 - | func @{const_name plus} T =
16.114 - if is_arith_type T then just "+"
16.115 - else if_fixed_bvT T "bvadd"
16.116 - | func @{const_name minus} T =
16.117 - if is_arith_type T then just "-"
16.118 - else if_fixed_bvT T "bvsub"
16.119 - | func @{const_name times} T =
16.120 - if is_arith_type T then just "*"
16.121 - else if_fixed_bvT T "bvmul"
16.122 - | func @{const_name bitNOT} T = if_fixed_bvT T "bvnot"
16.123 - | func @{const_name bitAND} T = if_fixed_bvT T "bvand"
16.124 - | func @{const_name bitOR} T = if_fixed_bvT T "bvor"
16.125 - | func @{const_name bitXOR} T = if_fixed_bvT T "bvxor"
16.126 - | func @{const_name div} T = if_fixed_bvT T "bvudiv"
16.127 - | func @{const_name mod} T = if_fixed_bvT T "bvurem"
16.128 - | func @{const_name sdiv} T = if_fixed_bvT T "bvsdiv"
16.129 - | func @{const_name smod} T = if_fixed_bvT T "bvsmod"
16.130 - | func @{const_name srem} T = if_fixed_bvT T "bvsrem"
16.131 - | func @{const_name word_cat} T = if_full_fixed_bvT T "concat"
16.132 - | func @{const_name bv_shl} T = if_full_fixed_bvT T "bvshl"
16.133 - | func @{const_name bv_lshr} T = if_full_fixed_bvT T "bvlshr"
16.134 - | func @{const_name bv_ashr} T = if_full_fixed_bvT T "bvashr"
16.135 - | func @{const_name slice} T = bv_extract "extract" T
16.136 - | func @{const_name ucast} T = bv_extend "zero_extend" T
16.137 - | func @{const_name scast} T = bv_extend "sign_extend" T
16.138 - | func @{const_name word_rotl} T = bv_rotate "rotate_left" T
16.139 - | func @{const_name word_rotr} T = bv_rotate "rotate_right" T
16.140 - | func _ _ = K NONE
16.141 -
16.142 -fun is_builtin_conn (n, T) = is_connT T andalso is_some (conn n)
16.143 -fun is_builtin_pred (n, T) = is_predT T andalso is_some (pred n T)
16.144 -
16.145 -fun builtin_fun (n, T) ts =
16.146 - if is_connT T then conn n |> Option.map (rpair ts)
16.147 - else if is_predT T then pred n T |> Option.map (rpair ts)
16.148 - else func n T ts
16.149 -
16.150 -
16.151 -
16.152 -(* serialization *)
16.153 -
16.154 -val add = Buffer.add
16.155 -fun sep f = add " " #> f
16.156 -fun enclose l r f = sep (add l #> f #> add r)
16.157 -val par = enclose "(" ")"
16.158 -fun app n f = (fn [] => sep (add n) | xs => par (add n #> fold f xs))
16.159 -fun line f = f #> add "\n"
16.160 -
16.161 -fun var i = add "?v" #> add (string_of_int i)
16.162 -
16.163 -fun sterm l (T.SVar i) = sep (var (l - i - 1))
16.164 - | sterm l (T.SApp (n, ts)) = app n (sterm l) ts
16.165 - | sterm _ (T.SLet _) = raise Fail "SMT-LIB: unsupported let expression"
16.166 - | sterm l (T.SQua (q, ss, ps, t)) =
16.167 - let
16.168 - val quant = add o (fn T.SForall => "forall" | T.SExists => "exists")
16.169 - val vs = map_index (apfst (Integer.add l)) ss
16.170 - fun var_decl (i, s) = par (var i #> sep (add s))
16.171 - val sub = sterm (l + length ss)
16.172 - fun pat kind ts = sep (add kind #> enclose "{" " }" (fold sub ts))
16.173 - fun pats (T.SPat ts) = pat ":pat" ts
16.174 - | pats (T.SNoPat ts) = pat ":nopat" ts
16.175 - in par (quant q #> fold var_decl vs #> sub t #> fold pats ps) end
16.176 -
16.177 -fun choose_logic theories =
16.178 - if member (op =) theories T.Bitvector then "QF_AUFBV"
16.179 - else if member (op =) theories T.Real then "AUFLIRA"
16.180 - else "AUFLIA"
16.181 -
16.182 -fun serialize comments {theories, sorts, funcs} ts =
16.183 - Buffer.empty
16.184 - |> line (add "(benchmark Isabelle")
16.185 - |> line (add ":status unknown")
16.186 - |> line (add ":logic " #> add (choose_logic theories))
16.187 - |> length sorts > 0 ?
16.188 - line (add ":extrasorts" #> par (fold (sep o add) sorts))
16.189 - |> length funcs > 0 ? (
16.190 - line (add ":extrafuns" #> add " (") #>
16.191 - fold (fn (f, (ss, s)) =>
16.192 - line (sep (app f (sep o add) (ss @ [s])))) funcs #>
16.193 - line (add ")"))
16.194 - |> fold (fn t => line (add ":assumption" #> sterm 0 t)) ts
16.195 - |> line (add ":formula true)")
16.196 - |> fold (fn str => line (add "; " #> add str)) comments
16.197 - |> Buffer.content
16.198 -
16.199 -
16.200 -
16.201 -(* interface *)
16.202 -
16.203 -fun interface comments = {
16.204 - prefixes = {
16.205 - sort_prefix = "S",
16.206 - func_prefix = "f"},
16.207 - strict = SOME {
16.208 - is_builtin_conn = is_builtin_conn,
16.209 - is_builtin_pred = is_builtin_pred,
16.210 - is_builtin_distinct = true},
16.211 - builtins = {
16.212 - builtin_typ = builtin_typ,
16.213 - builtin_num = builtin_num,
16.214 - builtin_fun = builtin_fun},
16.215 - serialize = serialize comments}
16.216 -
16.217 -end
17.1 --- a/src/HOL/SMT/Tools/yices_solver.ML Wed May 12 23:54:01 2010 +0200
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,44 +0,0 @@
17.4 -(* Title: HOL/SMT/Tools/yices_solver.ML
17.5 - Author: Sascha Boehme, TU Muenchen
17.6 -
17.7 -Interface of the SMT solver Yices.
17.8 -*)
17.9 -
17.10 -signature YICES_SOLVER =
17.11 -sig
17.12 - val setup: theory -> theory
17.13 -end
17.14 -
17.15 -structure Yices_Solver: YICES_SOLVER =
17.16 -struct
17.17 -
17.18 -val solver_name = "yices"
17.19 -val env_var = "YICES_SOLVER"
17.20 -
17.21 -val options = ["--smtlib"]
17.22 -
17.23 -fun raise_cex real = raise SMT_Solver.SMT_COUNTEREXAMPLE (real, [])
17.24 -
17.25 -fun core_oracle (output, _) =
17.26 - let
17.27 - val empty_line = (fn "" => true | _ => false)
17.28 - val split_first = (fn [] => ("", []) | l :: ls => (l, ls))
17.29 - val (l, _) = split_first (dropwhile empty_line output)
17.30 - in
17.31 - if String.isPrefix "unsat" l then @{cprop False}
17.32 - else if String.isPrefix "sat" l then raise_cex true
17.33 - else if String.isPrefix "unknown" l then raise_cex false
17.34 - else raise SMT_Solver.SMT (solver_name ^ " failed")
17.35 - end
17.36 -
17.37 -fun smtlib_solver oracle _ = {
17.38 - command = {env_var=env_var, remote_name=NONE},
17.39 - arguments = options,
17.40 - interface = SMTLIB_Interface.interface,
17.41 - reconstruct = pair o oracle }
17.42 -
17.43 -val setup =
17.44 - Thm.add_oracle (Binding.name solver_name, core_oracle) #-> (fn (_, oracle) =>
17.45 - SMT_Solver.add_solver (solver_name, smtlib_solver oracle))
17.46 -
17.47 -end
18.1 --- a/src/HOL/SMT/Tools/z3_interface.ML Wed May 12 23:54:01 2010 +0200
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,35 +0,0 @@
18.4 -(* Title: HOL/SMT/Tools/z3_interface.ML
18.5 - Author: Sascha Boehme, TU Muenchen
18.6 -
18.7 -Interface to Z3 based on a relaxed version of SMT-LIB.
18.8 -*)
18.9 -
18.10 -signature Z3_INTERFACE =
18.11 -sig
18.12 - val interface: string list -> SMT_Translate.config
18.13 -end
18.14 -
18.15 -structure Z3_Interface: Z3_INTERFACE =
18.16 -struct
18.17 -
18.18 -fun z3_builtin_fun bf c ts =
18.19 - (case Const c of
18.20 - @{term "op / :: real => _"} => SOME ("/", ts)
18.21 - | _ => bf c ts)
18.22 -
18.23 -fun interface comments =
18.24 - let
18.25 - val {prefixes, strict, builtins, serialize} =
18.26 - SMTLIB_Interface.interface comments
18.27 - val {builtin_typ, builtin_num, builtin_fun} = builtins
18.28 - in
18.29 - {prefixes = prefixes,
18.30 - strict = strict,
18.31 - builtins = {
18.32 - builtin_typ = builtin_typ,
18.33 - builtin_num = builtin_num,
18.34 - builtin_fun = z3_builtin_fun builtin_fun},
18.35 - serialize = serialize}
18.36 - end
18.37 -
18.38 -end
19.1 --- a/src/HOL/SMT/Tools/z3_model.ML Wed May 12 23:54:01 2010 +0200
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,146 +0,0 @@
19.4 -(* Title: HOL/SMT/Tools/z3_model.ML
19.5 - Author: Sascha Boehme and Philipp Meyer, TU Muenchen
19.6 -
19.7 -Parser for counterexamples generated by Z3.
19.8 -*)
19.9 -
19.10 -signature Z3_MODEL =
19.11 -sig
19.12 - val parse_counterex: SMT_Translate.recon -> string list -> term list
19.13 -end
19.14 -
19.15 -structure Z3_Model: Z3_MODEL =
19.16 -struct
19.17 -
19.18 -(* counterexample expressions *)
19.19 -
19.20 -datatype expr = True | False | Number of int * int option | Value of int |
19.21 - Array of array
19.22 -and array = Fresh of expr | Store of (array * expr) * expr
19.23 -
19.24 -
19.25 -(* parsing *)
19.26 -
19.27 -val space = Scan.many Symbol.is_ascii_blank
19.28 -fun in_parens p = Scan.$$ "(" |-- p --| Scan.$$ ")"
19.29 -fun in_braces p = (space -- Scan.$$ "{") |-- p --| (space -- Scan.$$ "}")
19.30 -
19.31 -val digit = (fn
19.32 - "0" => SOME 0 | "1" => SOME 1 | "2" => SOME 2 | "3" => SOME 3 |
19.33 - "4" => SOME 4 | "5" => SOME 5 | "6" => SOME 6 | "7" => SOME 7 |
19.34 - "8" => SOME 8 | "9" => SOME 9 | _ => NONE)
19.35 -
19.36 -val nat_num = Scan.repeat1 (Scan.some digit) >>
19.37 - (fn ds => fold (fn d => fn i => i * 10 + d) ds 0)
19.38 -val int_num = Scan.optional ($$ "-" >> K (fn i => ~i)) I :|--
19.39 - (fn sign => nat_num >> sign)
19.40 -
19.41 -val is_char = Symbol.is_ascii_letter orf Symbol.is_ascii_digit orf
19.42 - member (op =) (explode "_+*-/%~=<>$&|?!.@^#")
19.43 -val name = Scan.many1 is_char >> implode
19.44 -
19.45 -fun array_expr st = st |>
19.46 - in_parens (space |-- (
19.47 - Scan.this_string "const" |-- expr >> Fresh ||
19.48 - Scan.this_string "store" -- space |-- array_expr -- expr -- expr >> Store))
19.49 -
19.50 -and expr st = st |> (space |-- (
19.51 - Scan.this_string "true" >> K True ||
19.52 - Scan.this_string "false" >> K False ||
19.53 - int_num -- Scan.option (Scan.$$ "/" |-- int_num) >> Number ||
19.54 - Scan.this_string "val!" |-- nat_num >> Value ||
19.55 - array_expr >> Array))
19.56 -
19.57 -val mapping = space -- Scan.this_string "->"
19.58 -val value = mapping |-- expr
19.59 -
19.60 -val args_case = Scan.repeat expr -- value
19.61 -val else_case = space -- Scan.this_string "else" |-- value >>
19.62 - pair ([] : expr list)
19.63 -
19.64 -val func =
19.65 - let fun cases st = (else_case >> single || args_case ::: cases) st
19.66 - in in_braces cases end
19.67 -
19.68 -val cex = space |-- Scan.repeat (space |-- name --| mapping --
19.69 - (func || expr >> (single o pair [])))
19.70 -
19.71 -fun read_cex ls =
19.72 - explode (cat_lines ls)
19.73 - |> try (fst o Scan.finite Symbol.stopper cex)
19.74 - |> the_default []
19.75 -
19.76 -
19.77 -(* translation into terms *)
19.78 -
19.79 -fun lookup_term tab (name, e) = Option.map (rpair e) (Symtab.lookup tab name)
19.80 -
19.81 -fun with_name_context tab f xs =
19.82 - let
19.83 - val ns = Symtab.fold (Term.add_free_names o snd) tab []
19.84 - val nctxt = Name.make_context ns
19.85 - in fst (fold_map f xs (Inttab.empty, nctxt)) end
19.86 -
19.87 -fun fresh_term T (tab, nctxt) =
19.88 - let val (n, nctxt') = yield_singleton Name.variants "" nctxt
19.89 - in (Free (n, T), (tab, nctxt')) end
19.90 -
19.91 -fun term_of_value T i (cx as (tab, _)) =
19.92 - (case Inttab.lookup tab i of
19.93 - SOME t => (t, cx)
19.94 - | NONE =>
19.95 - let val (t, (tab', nctxt')) = fresh_term T cx
19.96 - in (t, (Inttab.update (i, t) tab', nctxt')) end)
19.97 -
19.98 -fun trans_expr _ True = pair @{term True}
19.99 - | trans_expr _ False = pair @{term False}
19.100 - | trans_expr T (Number (i, NONE)) = pair (HOLogic.mk_number T i)
19.101 - | trans_expr T (Number (i, SOME j)) =
19.102 - pair (Const (@{const_name divide}, [T, T] ---> T) $
19.103 - HOLogic.mk_number T i $ HOLogic.mk_number T j)
19.104 - | trans_expr T (Value i) = term_of_value T i
19.105 - | trans_expr T (Array a) = trans_array T a
19.106 -
19.107 -and trans_array T a =
19.108 - let val dT = Term.domain_type T and rT = Term.range_type T
19.109 - in
19.110 - (case a of
19.111 - Fresh e => trans_expr rT e #>> (fn t => Abs ("x", dT, t))
19.112 - | Store ((a', e1), e2) =>
19.113 - trans_array T a' ##>> trans_expr dT e1 ##>> trans_expr rT e2 #>>
19.114 - (fn ((m, k), v) =>
19.115 - Const (@{const_name fun_upd}, [T, dT, rT] ---> T) $ m $ k $ v))
19.116 - end
19.117 -
19.118 -fun trans_pat i T f x =
19.119 - f (Term.domain_type T) ##>> trans (i-1) (Term.range_type T) x #>>
19.120 - (fn (u, (us, t)) => (u :: us, t))
19.121 -
19.122 -and trans i T ([], v) =
19.123 - if i > 0 then trans_pat i T fresh_term ([], v)
19.124 - else trans_expr T v #>> pair []
19.125 - | trans i T (p :: ps, v) = trans_pat i T (fn U => trans_expr U p) (ps, v)
19.126 -
19.127 -fun mk_eq' t us u = HOLogic.mk_eq (Term.list_comb (t, us), u)
19.128 -fun mk_eq (Const (@{const_name apply}, _)) (u' :: us', u) = mk_eq' u' us' u
19.129 - | mk_eq t (us, u) = mk_eq' t us u
19.130 -
19.131 -fun translate (t, cs) =
19.132 - let val T = Term.fastype_of t
19.133 - in
19.134 - (case (can HOLogic.dest_number t, cs) of
19.135 - (true, [c]) => trans 0 T c #>> (fn (_, u) => [mk_eq u ([], t)])
19.136 - | (_, (es, _) :: _) => fold_map (trans (length es) T) cs #>> map (mk_eq t)
19.137 - | _ => raise TERM ("translate: no cases", [t]))
19.138 - end
19.139 -
19.140 -
19.141 -(* overall procedure *)
19.142 -
19.143 -fun parse_counterex ({terms, ...} : SMT_Translate.recon) ls =
19.144 - read_cex ls
19.145 - |> map_filter (lookup_term terms)
19.146 - |> with_name_context terms translate
19.147 - |> flat
19.148 -
19.149 -end
20.1 --- a/src/HOL/SMT/Tools/z3_proof_literals.ML Wed May 12 23:54:01 2010 +0200
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,346 +0,0 @@
20.4 -(* Title: HOL/SMT/Tools/z3_proof_literals.ML
20.5 - Author: Sascha Boehme, TU Muenchen
20.6 -
20.7 -Proof tools related to conjunctions and disjunctions.
20.8 -*)
20.9 -
20.10 -signature Z3_PROOF_LITERALS =
20.11 -sig
20.12 - (* literal table *)
20.13 - type littab = thm Termtab.table
20.14 - val make_littab: thm list -> littab
20.15 - val insert_lit: thm -> littab -> littab
20.16 - val delete_lit: thm -> littab -> littab
20.17 - val lookup_lit: littab -> term -> thm option
20.18 - val get_first_lit: (term -> bool) -> littab -> thm option
20.19 -
20.20 - (* rules *)
20.21 - val true_thm: thm
20.22 - val rewrite_true: thm
20.23 -
20.24 - (* properties *)
20.25 - val is_conj: term -> bool
20.26 - val is_disj: term -> bool
20.27 - val exists_lit: bool -> (term -> bool) -> term -> bool
20.28 -
20.29 - (* proof tools *)
20.30 - val explode: bool -> bool -> bool -> term list -> thm -> thm list
20.31 - val join: bool -> littab -> term -> thm
20.32 - val prove_conj_disj_eq: cterm -> thm
20.33 -end
20.34 -
20.35 -structure Z3_Proof_Literals: Z3_PROOF_LITERALS =
20.36 -struct
20.37 -
20.38 -structure T = Z3_Proof_Tools
20.39 -
20.40 -
20.41 -
20.42 -(** literal table **)
20.43 -
20.44 -type littab = thm Termtab.table
20.45 -
20.46 -fun make_littab thms = fold (Termtab.update o `T.prop_of) thms Termtab.empty
20.47 -
20.48 -fun insert_lit thm = Termtab.update (`T.prop_of thm)
20.49 -fun delete_lit thm = Termtab.delete (T.prop_of thm)
20.50 -fun lookup_lit lits = Termtab.lookup lits
20.51 -fun get_first_lit f =
20.52 - Termtab.get_first (fn (t, thm) => if f t then SOME thm else NONE)
20.53 -
20.54 -
20.55 -
20.56 -(** rules **)
20.57 -
20.58 -val true_thm = @{lemma "~False" by simp}
20.59 -val rewrite_true = @{lemma "True == ~ False" by simp}
20.60 -
20.61 -
20.62 -
20.63 -(** properties and term operations **)
20.64 -
20.65 -val is_neg = (fn @{term Not} $ _ => true | _ => false)
20.66 -fun is_neg' f = (fn @{term Not} $ t => f t | _ => false)
20.67 -val is_dneg = is_neg' is_neg
20.68 -val is_conj = (fn @{term "op &"} $ _ $ _ => true | _ => false)
20.69 -val is_disj = (fn @{term "op |"} $ _ $ _ => true | _ => false)
20.70 -
20.71 -fun dest_disj_term' f = (fn
20.72 - @{term Not} $ (@{term "op |"} $ t $ u) => SOME (f t, f u)
20.73 - | _ => NONE)
20.74 -
20.75 -val dest_conj_term = (fn @{term "op &"} $ t $ u => SOME (t, u) | _ => NONE)
20.76 -val dest_disj_term =
20.77 - dest_disj_term' (fn @{term Not} $ t => t | t => @{term Not} $ t)
20.78 -
20.79 -fun exists_lit is_conj P =
20.80 - let
20.81 - val dest = if is_conj then dest_conj_term else dest_disj_term
20.82 - fun exists t = P t orelse
20.83 - (case dest t of
20.84 - SOME (t1, t2) => exists t1 orelse exists t2
20.85 - | NONE => false)
20.86 - in exists end
20.87 -
20.88 -
20.89 -
20.90 -(** proof tools **)
20.91 -
20.92 -(* explosion of conjunctions and disjunctions *)
20.93 -
20.94 -local
20.95 - fun destc ct = Thm.dest_binop (Thm.dest_arg ct)
20.96 - val dest_conj1 = T.precompose2 destc @{thm conjunct1}
20.97 - val dest_conj2 = T.precompose2 destc @{thm conjunct2}
20.98 - fun dest_conj_rules t =
20.99 - dest_conj_term t |> Option.map (K (dest_conj1, dest_conj2))
20.100 -
20.101 - fun destd f ct = f (Thm.dest_binop (Thm.dest_arg (Thm.dest_arg ct)))
20.102 - val dn1 = apfst Thm.dest_arg and dn2 = apsnd Thm.dest_arg
20.103 - val dest_disj1 = T.precompose2 (destd I) @{lemma "~(P | Q) ==> ~P" by fast}
20.104 - val dest_disj2 = T.precompose2 (destd dn1) @{lemma "~(~P | Q) ==> P" by fast}
20.105 - val dest_disj3 = T.precompose2 (destd I) @{lemma "~(P | Q) ==> ~Q" by fast}
20.106 - val dest_disj4 = T.precompose2 (destd dn2) @{lemma "~(P | ~Q) ==> Q" by fast}
20.107 -
20.108 - fun dest_disj_rules t =
20.109 - (case dest_disj_term' is_neg t of
20.110 - SOME (true, true) => SOME (dest_disj2, dest_disj4)
20.111 - | SOME (true, false) => SOME (dest_disj2, dest_disj3)
20.112 - | SOME (false, true) => SOME (dest_disj1, dest_disj4)
20.113 - | SOME (false, false) => SOME (dest_disj1, dest_disj3)
20.114 - | NONE => NONE)
20.115 -
20.116 - fun destn ct = [Thm.dest_arg (Thm.dest_arg (Thm.dest_arg ct))]
20.117 - val dneg_rule = T.precompose destn @{thm notnotD}
20.118 -in
20.119 -
20.120 -(* explode a term into literals and collect all rules to be able to deduce
20.121 - particular literals afterwards *)
20.122 -fun explode_term is_conj =
20.123 - let
20.124 - val dest = if is_conj then dest_conj_term else dest_disj_term
20.125 - val dest_rules = if is_conj then dest_conj_rules else dest_disj_rules
20.126 -
20.127 - fun add (t, rs) = Termtab.map_default (t, rs)
20.128 - (fn rs' => if length rs' < length rs then rs' else rs)
20.129 -
20.130 - fun explode1 rules t =
20.131 - (case dest t of
20.132 - SOME (t1, t2) =>
20.133 - let val (rule1, rule2) = the (dest_rules t)
20.134 - in
20.135 - explode1 (rule1 :: rules) t1 #>
20.136 - explode1 (rule2 :: rules) t2 #>
20.137 - add (t, rev rules)
20.138 - end
20.139 - | NONE => add (t, rev rules))
20.140 -
20.141 - fun explode0 (@{term Not} $ (@{term Not} $ t)) =
20.142 - Termtab.make [(t, [dneg_rule])]
20.143 - | explode0 t = explode1 [] t Termtab.empty
20.144 -
20.145 - in explode0 end
20.146 -
20.147 -(* extract a literal by applying previously collected rules *)
20.148 -fun extract_lit thm rules = fold T.compose rules thm
20.149 -
20.150 -
20.151 -(* explode a theorem into its literals *)
20.152 -fun explode is_conj full keep_intermediate stop_lits =
20.153 - let
20.154 - val dest_rules = if is_conj then dest_conj_rules else dest_disj_rules
20.155 - val tab = fold (Termtab.update o rpair ()) stop_lits Termtab.empty
20.156 -
20.157 - fun explode1 thm =
20.158 - if Termtab.defined tab (T.prop_of thm) then cons thm
20.159 - else
20.160 - (case dest_rules (T.prop_of thm) of
20.161 - SOME (rule1, rule2) =>
20.162 - explode2 rule1 thm #>
20.163 - explode2 rule2 thm #>
20.164 - keep_intermediate ? cons thm
20.165 - | NONE => cons thm)
20.166 -
20.167 - and explode2 dest_rule thm =
20.168 - if full orelse exists_lit is_conj (Termtab.defined tab) (T.prop_of thm)
20.169 - then explode1 (T.compose dest_rule thm)
20.170 - else cons (T.compose dest_rule thm)
20.171 -
20.172 - fun explode0 thm =
20.173 - if not is_conj andalso is_dneg (T.prop_of thm)
20.174 - then [T.compose dneg_rule thm]
20.175 - else explode1 thm []
20.176 -
20.177 - in explode0 end
20.178 -
20.179 -end
20.180 -
20.181 -
20.182 -
20.183 -(* joining of literals to conjunctions or disjunctions *)
20.184 -
20.185 -local
20.186 - fun on_cprem i f thm = f (Thm.cprem_of thm i)
20.187 - fun on_cprop f thm = f (Thm.cprop_of thm)
20.188 - fun precomp2 f g thm = (on_cprem 1 f thm, on_cprem 2 g thm, f, g, thm)
20.189 - fun comp2 (cv1, cv2, f, g, rule) thm1 thm2 =
20.190 - Thm.instantiate ([], [(cv1, on_cprop f thm1), (cv2, on_cprop g thm2)]) rule
20.191 - |> T.discharge thm1 |> T.discharge thm2
20.192 -
20.193 - fun d1 ct = Thm.dest_arg ct and d2 ct = Thm.dest_arg (Thm.dest_arg ct)
20.194 -
20.195 - val conj_rule = precomp2 d1 d1 @{thm conjI}
20.196 - fun comp_conj ((_, thm1), (_, thm2)) = comp2 conj_rule thm1 thm2
20.197 -
20.198 - val disj1 = precomp2 d2 d2 @{lemma "~P ==> ~Q ==> ~(P | Q)" by fast}
20.199 - val disj2 = precomp2 d2 d1 @{lemma "~P ==> Q ==> ~(P | ~Q)" by fast}
20.200 - val disj3 = precomp2 d1 d2 @{lemma "P ==> ~Q ==> ~(~P | Q)" by fast}
20.201 - val disj4 = precomp2 d1 d1 @{lemma "P ==> Q ==> ~(~P | ~Q)" by fast}
20.202 -
20.203 - fun comp_disj ((false, thm1), (false, thm2)) = comp2 disj1 thm1 thm2
20.204 - | comp_disj ((false, thm1), (true, thm2)) = comp2 disj2 thm1 thm2
20.205 - | comp_disj ((true, thm1), (false, thm2)) = comp2 disj3 thm1 thm2
20.206 - | comp_disj ((true, thm1), (true, thm2)) = comp2 disj4 thm1 thm2
20.207 -
20.208 - fun dest_conj (@{term "op &"} $ t $ u) = ((false, t), (false, u))
20.209 - | dest_conj t = raise TERM ("dest_conj", [t])
20.210 -
20.211 - val neg = (fn @{term Not} $ t => (true, t) | t => (false, @{term Not} $ t))
20.212 - fun dest_disj (@{term Not} $ (@{term "op |"} $ t $ u)) = (neg t, neg u)
20.213 - | dest_disj t = raise TERM ("dest_disj", [t])
20.214 -
20.215 - val dnegE = T.precompose (single o d2 o d1) @{thm notnotD}
20.216 - val dnegI = T.precompose (single o d1) @{lemma "P ==> ~~P" by fast}
20.217 - fun as_dneg f t = f (@{term Not} $ (@{term Not} $ t))
20.218 -
20.219 - fun dni f = apsnd f o Thm.dest_binop o f o d1
20.220 - val negIffE = T.precompose2 (dni d1) @{lemma "~(P = (~Q)) ==> Q = P" by fast}
20.221 - val negIffI = T.precompose2 (dni I) @{lemma "P = Q ==> ~(Q = (~P))" by fast}
20.222 - val iff_const = @{term "op = :: bool => _"}
20.223 - fun as_negIff f (@{term "op = :: bool => _"} $ t $ u) =
20.224 - f (@{term Not} $ (iff_const $ u $ (@{term Not} $ t)))
20.225 - | as_negIff _ _ = NONE
20.226 -in
20.227 -
20.228 -fun join is_conj littab t =
20.229 - let
20.230 - val comp = if is_conj then comp_conj else comp_disj
20.231 - val dest = if is_conj then dest_conj else dest_disj
20.232 -
20.233 - val lookup = lookup_lit littab
20.234 -
20.235 - fun lookup_rule t =
20.236 - (case t of
20.237 - @{term Not} $ (@{term Not} $ t) => (T.compose dnegI, lookup t)
20.238 - | @{term Not} $ (@{term "op = :: bool => _"} $ t $ (@{term Not} $ u)) =>
20.239 - (T.compose negIffI, lookup (iff_const $ u $ t))
20.240 - | @{term Not} $ ((eq as Const (@{const_name "op ="}, _)) $ t $ u) =>
20.241 - let fun rewr lit = lit COMP @{thm not_sym}
20.242 - in (rewr, lookup (@{term Not} $ (eq $ u $ t))) end
20.243 - | _ =>
20.244 - (case as_dneg lookup t of
20.245 - NONE => (T.compose negIffE, as_negIff lookup t)
20.246 - | x => (T.compose dnegE, x)))
20.247 -
20.248 - fun join1 (s, t) =
20.249 - (case lookup t of
20.250 - SOME lit => (s, lit)
20.251 - | NONE =>
20.252 - (case lookup_rule t of
20.253 - (rewrite, SOME lit) => (s, rewrite lit)
20.254 - | (_, NONE) => (s, comp (pairself join1 (dest t)))))
20.255 -
20.256 - in snd (join1 (if is_conj then (false, t) else (true, t))) end
20.257 -
20.258 -end
20.259 -
20.260 -
20.261 -
20.262 -(* proving equality of conjunctions or disjunctions *)
20.263 -
20.264 -fun iff_intro thm1 thm2 = thm2 COMP (thm1 COMP @{thm iffI})
20.265 -
20.266 -local
20.267 - val cp1 = @{lemma "(~P) = (~Q) ==> P = Q" by simp}
20.268 - val cp2 = @{lemma "(~P) = Q ==> P = (~Q)" by fastsimp}
20.269 - val cp3 = @{lemma "P = (~Q) ==> (~P) = Q" by simp}
20.270 - val neg = Thm.capply @{cterm Not}
20.271 -in
20.272 -fun contrapos1 prove (ct, cu) = prove (neg ct, neg cu) COMP cp1
20.273 -fun contrapos2 prove (ct, cu) = prove (neg ct, Thm.dest_arg cu) COMP cp2
20.274 -fun contrapos3 prove (ct, cu) = prove (Thm.dest_arg ct, neg cu) COMP cp3
20.275 -end
20.276 -
20.277 -
20.278 -local
20.279 - val contra_rule = @{lemma "P ==> ~P ==> False" by (rule notE)}
20.280 - fun contra_left conj thm =
20.281 - let
20.282 - val rules = explode_term conj (T.prop_of thm)
20.283 - fun contra_lits (t, rs) =
20.284 - (case t of
20.285 - @{term Not} $ u => Termtab.lookup rules u |> Option.map (pair rs)
20.286 - | _ => NONE)
20.287 - in
20.288 - (case Termtab.lookup rules @{term False} of
20.289 - SOME rs => extract_lit thm rs
20.290 - | NONE =>
20.291 - the (Termtab.get_first contra_lits rules)
20.292 - |> pairself (extract_lit thm)
20.293 - |> (fn (nlit, plit) => nlit COMP (plit COMP contra_rule)))
20.294 - end
20.295 -
20.296 - val falseE_v = Thm.dest_arg (Thm.dest_arg (Thm.cprop_of @{thm FalseE}))
20.297 - fun contra_right ct = Thm.instantiate ([], [(falseE_v, ct)]) @{thm FalseE}
20.298 -in
20.299 -fun contradict conj ct =
20.300 - iff_intro (T.under_assumption (contra_left conj) ct) (contra_right ct)
20.301 -end
20.302 -
20.303 -
20.304 -local
20.305 - fun prove_eq l r (cl, cr) =
20.306 - let
20.307 - fun explode' is_conj = explode is_conj true (l <> r) []
20.308 - fun make_tab is_conj thm = make_littab (true_thm :: explode' is_conj thm)
20.309 - fun prove is_conj ct tab = join is_conj tab (Thm.term_of ct)
20.310 -
20.311 - val thm1 = T.under_assumption (prove r cr o make_tab l) cl
20.312 - val thm2 = T.under_assumption (prove l cl o make_tab r) cr
20.313 - in iff_intro thm1 thm2 end
20.314 -
20.315 - datatype conj_disj = CONJ | DISJ | NCON | NDIS
20.316 - fun kind_of t =
20.317 - if is_conj t then SOME CONJ
20.318 - else if is_disj t then SOME DISJ
20.319 - else if is_neg' is_conj t then SOME NCON
20.320 - else if is_neg' is_disj t then SOME NDIS
20.321 - else NONE
20.322 -in
20.323 -
20.324 -fun prove_conj_disj_eq ct =
20.325 - let val cp as (cl, cr) = Thm.dest_binop (Thm.dest_arg ct)
20.326 - in
20.327 - (case (kind_of (Thm.term_of cl), Thm.term_of cr) of
20.328 - (SOME CONJ, @{term False}) => contradict true cl
20.329 - | (SOME DISJ, @{term "~False"}) => contrapos2 (contradict false o fst) cp
20.330 - | (kl, _) =>
20.331 - (case (kl, kind_of (Thm.term_of cr)) of
20.332 - (SOME CONJ, SOME CONJ) => prove_eq true true cp
20.333 - | (SOME CONJ, SOME NDIS) => prove_eq true false cp
20.334 - | (SOME CONJ, _) => prove_eq true true cp
20.335 - | (SOME DISJ, SOME DISJ) => contrapos1 (prove_eq false false) cp
20.336 - | (SOME DISJ, SOME NCON) => contrapos2 (prove_eq false true) cp
20.337 - | (SOME DISJ, _) => contrapos1 (prove_eq false false) cp
20.338 - | (SOME NCON, SOME NCON) => contrapos1 (prove_eq true true) cp
20.339 - | (SOME NCON, SOME DISJ) => contrapos3 (prove_eq true false) cp
20.340 - | (SOME NCON, NONE) => contrapos3 (prove_eq true false) cp
20.341 - | (SOME NDIS, SOME NDIS) => prove_eq false false cp
20.342 - | (SOME NDIS, SOME CONJ) => prove_eq false true cp
20.343 - | (SOME NDIS, NONE) => prove_eq false true cp
20.344 - | _ => raise CTERM ("prove_conj_disj_eq", [ct])))
20.345 - end
20.346 -
20.347 -end
20.348 -
20.349 -end
21.1 --- a/src/HOL/SMT/Tools/z3_proof_parser.ML Wed May 12 23:54:01 2010 +0200
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,499 +0,0 @@
21.4 -(* Title: HOL/SMT/Tools/z3_proof_parser.ML
21.5 - Author: Sascha Boehme, TU Muenchen
21.6 -
21.7 -Parser for Z3 proofs.
21.8 -*)
21.9 -
21.10 -signature Z3_PROOF_PARSER =
21.11 -sig
21.12 - (* proof rules *)
21.13 - datatype rule = TrueAxiom | Asserted | Goal | ModusPonens | Reflexivity |
21.14 - Symmetry | Transitivity | TransitivityStar | Monotonicity | QuantIntro |
21.15 - Distributivity | AndElim | NotOrElim | Rewrite | RewriteStar | PullQuant |
21.16 - PullQuantStar | PushQuant | ElimUnusedVars | DestEqRes | QuantInst |
21.17 - Hypothesis | Lemma | UnitResolution | IffTrue | IffFalse | Commutativity |
21.18 - DefAxiom | IntroDef | ApplyDef | IffOeq | NnfPos | NnfNeg | NnfStar |
21.19 - CnfStar | Skolemize | ModusPonensOeq | ThLemma
21.20 - val string_of_rule: rule -> string
21.21 -
21.22 - (* proof parser *)
21.23 - datatype proof_step = Proof_Step of {
21.24 - rule: rule,
21.25 - prems: int list,
21.26 - prop: cterm }
21.27 - val parse: Proof.context -> typ Symtab.table -> term Symtab.table ->
21.28 - string list ->
21.29 - int * (proof_step Inttab.table * string list * Proof.context)
21.30 -end
21.31 -
21.32 -structure Z3_Proof_Parser: Z3_PROOF_PARSER =
21.33 -struct
21.34 -
21.35 -(** proof rules **)
21.36 -
21.37 -datatype rule = TrueAxiom | Asserted | Goal | ModusPonens | Reflexivity |
21.38 - Symmetry | Transitivity | TransitivityStar | Monotonicity | QuantIntro |
21.39 - Distributivity | AndElim | NotOrElim | Rewrite | RewriteStar | PullQuant |
21.40 - PullQuantStar | PushQuant | ElimUnusedVars | DestEqRes | QuantInst |
21.41 - Hypothesis | Lemma | UnitResolution | IffTrue | IffFalse | Commutativity |
21.42 - DefAxiom | IntroDef | ApplyDef | IffOeq | NnfPos | NnfNeg | NnfStar |
21.43 - CnfStar | Skolemize | ModusPonensOeq | ThLemma
21.44 -
21.45 -val rule_names = Symtab.make [
21.46 - ("true-axiom", TrueAxiom),
21.47 - ("asserted", Asserted),
21.48 - ("goal", Goal),
21.49 - ("mp", ModusPonens),
21.50 - ("refl", Reflexivity),
21.51 - ("symm", Symmetry),
21.52 - ("trans", Transitivity),
21.53 - ("trans*", TransitivityStar),
21.54 - ("monotonicity", Monotonicity),
21.55 - ("quant-intro", QuantIntro),
21.56 - ("distributivity", Distributivity),
21.57 - ("and-elim", AndElim),
21.58 - ("not-or-elim", NotOrElim),
21.59 - ("rewrite", Rewrite),
21.60 - ("rewrite*", RewriteStar),
21.61 - ("pull-quant", PullQuant),
21.62 - ("pull-quant*", PullQuantStar),
21.63 - ("push-quant", PushQuant),
21.64 - ("elim-unused", ElimUnusedVars),
21.65 - ("der", DestEqRes),
21.66 - ("quant-inst", QuantInst),
21.67 - ("hypothesis", Hypothesis),
21.68 - ("lemma", Lemma),
21.69 - ("unit-resolution", UnitResolution),
21.70 - ("iff-true", IffTrue),
21.71 - ("iff-false", IffFalse),
21.72 - ("commutativity", Commutativity),
21.73 - ("def-axiom", DefAxiom),
21.74 - ("intro-def", IntroDef),
21.75 - ("apply-def", ApplyDef),
21.76 - ("iff~", IffOeq),
21.77 - ("nnf-pos", NnfPos),
21.78 - ("nnf-neg", NnfNeg),
21.79 - ("nnf*", NnfStar),
21.80 - ("cnf*", CnfStar),
21.81 - ("sk", Skolemize),
21.82 - ("mp~", ModusPonensOeq),
21.83 - ("th-lemma", ThLemma)]
21.84 -
21.85 -fun string_of_rule r =
21.86 - let fun eq_rule (s, r') = if r = r' then SOME s else NONE
21.87 - in the (Symtab.get_first eq_rule rule_names) end
21.88 -
21.89 -
21.90 -
21.91 -(** certified terms and variables **)
21.92 -
21.93 -val (var_prefix, decl_prefix) = ("v", "sk") (* must be distinct *)
21.94 -
21.95 -fun instTs cUs (cTs, ct) = Thm.instantiate_cterm (cTs ~~ cUs, []) ct
21.96 -fun instT cU (cT, ct) = instTs [cU] ([cT], ct)
21.97 -fun mk_inst_pair destT cpat = (destT (Thm.ctyp_of_term cpat), cpat)
21.98 -val destT1 = hd o Thm.dest_ctyp
21.99 -val destT2 = hd o tl o Thm.dest_ctyp
21.100 -
21.101 -fun ctyp_of (ct, _) = Thm.ctyp_of_term ct
21.102 -fun instT' t = instT (ctyp_of t)
21.103 -
21.104 -fun certify ctxt = Thm.cterm_of (ProofContext.theory_of ctxt)
21.105 -
21.106 -val maxidx_of = #maxidx o Thm.rep_cterm
21.107 -
21.108 -fun mk_inst ctxt vars =
21.109 - let
21.110 - val max = fold (Integer.max o fst) vars 0
21.111 - val ns = fst (Variable.variant_fixes (replicate (max + 1) var_prefix) ctxt)
21.112 - fun mk (i, v) = (v, certify ctxt (Free (nth ns i, #T (Thm.rep_cterm v))))
21.113 - in map mk vars end
21.114 -
21.115 -fun close ctxt (ct, vars) =
21.116 - let
21.117 - val inst = mk_inst ctxt vars
21.118 - val mk_prop = Thm.capply @{cterm Trueprop}
21.119 - val names = fold (Term.add_free_names o Thm.term_of o snd) inst []
21.120 - in (mk_prop (Thm.instantiate_cterm ([], inst) ct), names) end
21.121 -
21.122 -
21.123 -fun mk_bound thy (i, T) =
21.124 - let val ct = Thm.cterm_of thy (Var ((Name.uu, 0), T))
21.125 - in (ct, [(i, ct)]) end
21.126 -
21.127 -local
21.128 - fun mk_quant thy q T (ct, vars) =
21.129 - let
21.130 - val cv =
21.131 - (case AList.lookup (op =) vars 0 of
21.132 - SOME cv => cv
21.133 - | _ => Thm.cterm_of thy (Var ((Name.uu, maxidx_of ct + 1), T)))
21.134 - val cq = instT (Thm.ctyp_of_term cv) q
21.135 - fun dec (i, v) = if i = 0 then NONE else SOME (i-1, v)
21.136 - in (Thm.capply cq (Thm.cabs cv ct), map_filter dec vars) end
21.137 -
21.138 - val forall = mk_inst_pair (destT1 o destT1) @{cpat All}
21.139 - val exists = mk_inst_pair (destT1 o destT1) @{cpat Ex}
21.140 -in
21.141 -fun mk_forall thy = fold_rev (mk_quant thy forall)
21.142 -fun mk_exists thy = fold_rev (mk_quant thy exists)
21.143 -end
21.144 -
21.145 -
21.146 -local
21.147 - fun equal_var cv (_, cu) = (cv aconvc cu)
21.148 -
21.149 - fun apply (ct2, vars2) (ct1, vars1) =
21.150 - let
21.151 - val incr = Thm.incr_indexes_cterm (maxidx_of ct1 + maxidx_of ct2 + 2)
21.152 -
21.153 - fun part (v as (i, cv)) =
21.154 - (case AList.lookup (op =) vars1 i of
21.155 - SOME cu => apfst (if cu aconvc cv then I else cons (cv, cu))
21.156 - | NONE =>
21.157 - if not (exists (equal_var cv) vars1) then apsnd (cons v)
21.158 - else
21.159 - let val cv' = incr cv
21.160 - in apfst (cons (cv, cv')) #> apsnd (cons (i, cv')) end)
21.161 -
21.162 - val (ct2', vars2') =
21.163 - if null vars1 then (ct2, vars2)
21.164 - else fold part vars2 ([], [])
21.165 - |>> (fn inst => Thm.instantiate_cterm ([], inst) ct2)
21.166 -
21.167 - in (Thm.capply ct1 ct2', vars1 @ vars2') end
21.168 -in
21.169 -fun mk_fun ct ts = fold apply ts (ct, [])
21.170 -fun mk_binop f t u = mk_fun f [t, u]
21.171 -fun mk_nary _ e [] = e
21.172 - | mk_nary ct _ es = uncurry (fold_rev (mk_binop ct)) (split_last es)
21.173 -end
21.174 -
21.175 -
21.176 -val mk_true = mk_fun @{cterm "~False"} []
21.177 -val mk_false = mk_fun @{cterm "False"} []
21.178 -fun mk_not t = mk_fun @{cterm Not} [t]
21.179 -val mk_imp = mk_binop @{cterm "op -->"}
21.180 -val mk_iff = mk_binop @{cterm "op = :: bool => _"}
21.181 -
21.182 -val eq = mk_inst_pair destT1 @{cpat "op ="}
21.183 -fun mk_eq t u = mk_binop (instT' t eq) t u
21.184 -
21.185 -val if_term = mk_inst_pair (destT1 o destT2) @{cpat If}
21.186 -fun mk_if c t u = mk_fun (instT' t if_term) [c, t, u]
21.187 -
21.188 -val nil_term = mk_inst_pair destT1 @{cpat Nil}
21.189 -val cons_term = mk_inst_pair destT1 @{cpat Cons}
21.190 -fun mk_list cT es =
21.191 - fold_rev (mk_binop (instT cT cons_term)) es (mk_fun (instT cT nil_term) [])
21.192 -
21.193 -val distinct = mk_inst_pair (destT1 o destT1) @{cpat distinct}
21.194 -fun mk_distinct [] = mk_true
21.195 - | mk_distinct (es as (e :: _)) =
21.196 - mk_fun (instT' e distinct) [mk_list (ctyp_of e) es]
21.197 -
21.198 -
21.199 -(* arithmetic *)
21.200 -
21.201 -fun mk_int_num i = mk_fun (Numeral.mk_cnumber @{ctyp int} i) []
21.202 -fun mk_real_num i = mk_fun (Numeral.mk_cnumber @{ctyp real} i) []
21.203 -fun mk_real_frac_num (e, NONE) = mk_real_num e
21.204 - | mk_real_frac_num (e, SOME d) =
21.205 - mk_binop @{cterm "op / :: real => _"} (mk_real_num e) (mk_real_num d)
21.206 -
21.207 -fun has_int_type e = (Thm.typ_of (ctyp_of e) = @{typ int})
21.208 -fun choose e i r = if has_int_type e then i else r
21.209 -
21.210 -val uminus_i = @{cterm "uminus :: int => _"}
21.211 -val uminus_r = @{cterm "uminus :: real => _"}
21.212 -fun mk_uminus e = mk_fun (choose e uminus_i uminus_r) [e]
21.213 -
21.214 -fun arith_op int_op real_op t u = mk_binop (choose t int_op real_op) t u
21.215 -
21.216 -val mk_add = arith_op @{cterm "op + :: int => _"} @{cterm "op + :: real => _"}
21.217 -val mk_sub = arith_op @{cterm "op - :: int => _"} @{cterm "op - :: real => _"}
21.218 -val mk_mul = arith_op @{cterm "op * :: int => _"} @{cterm "op * :: real => _"}
21.219 -val mk_int_div = mk_binop @{cterm "op div :: int => _"}
21.220 -val mk_real_div = mk_binop @{cterm "op / :: real => _"}
21.221 -val mk_mod = mk_binop @{cterm "op mod :: int => _"}
21.222 -val mk_lt = arith_op @{cterm "op < :: int => _"} @{cterm "op < :: real => _"}
21.223 -val mk_le = arith_op @{cterm "op <= :: int => _"} @{cterm "op <= :: real => _"}
21.224 -
21.225 -
21.226 -(* arrays *)
21.227 -
21.228 -val access = mk_inst_pair (Thm.dest_ctyp o destT1) @{cpat apply}
21.229 -fun mk_access array index =
21.230 - let val cTs = Thm.dest_ctyp (ctyp_of array)
21.231 - in mk_fun (instTs cTs access) [array, index] end
21.232 -
21.233 -val update = mk_inst_pair (Thm.dest_ctyp o destT1) @{cpat fun_upd}
21.234 -fun mk_update array index value =
21.235 - let val cTs = Thm.dest_ctyp (ctyp_of array)
21.236 - in mk_fun (instTs cTs update) [array, index, value] end
21.237 -
21.238 -
21.239 -(* bitvectors *)
21.240 -
21.241 -fun mk_binT size =
21.242 - let
21.243 - fun bitT i T =
21.244 - if i = 0
21.245 - then Type (@{type_name "Numeral_Type.bit0"}, [T])
21.246 - else Type (@{type_name "Numeral_Type.bit1"}, [T])
21.247 -
21.248 - fun binT i =
21.249 - if i = 0 then @{typ "Numeral_Type.num0"}
21.250 - else if i = 1 then @{typ "Numeral_Type.num1"}
21.251 - else let val (q, r) = Integer.div_mod i 2 in bitT r (binT q) end
21.252 - in
21.253 - if size >= 0 then binT size
21.254 - else raise TYPE ("mk_binT: " ^ string_of_int size, [], [])
21.255 - end
21.256 -
21.257 -fun mk_wordT size = Type (@{type_name "word"}, [mk_binT size])
21.258 -
21.259 -fun mk_bv_num thy (num, size) =
21.260 - mk_fun (Numeral.mk_cnumber (Thm.ctyp_of thy (mk_wordT size)) num) []
21.261 -
21.262 -
21.263 -
21.264 -(** proof parser **)
21.265 -
21.266 -datatype proof_step = Proof_Step of {
21.267 - rule: rule,
21.268 - prems: int list,
21.269 - prop: cterm }
21.270 -
21.271 -
21.272 -(* parser context *)
21.273 -
21.274 -fun make_context ctxt typs terms =
21.275 - let
21.276 - val ctxt' =
21.277 - ctxt
21.278 - |> Symtab.fold (Variable.declare_typ o snd) typs
21.279 - |> Symtab.fold (Variable.declare_term o snd) terms
21.280 -
21.281 - fun cert @{term True} = @{cterm "~False"}
21.282 - | cert t = certify ctxt' t
21.283 - in (typs, Symtab.map cert terms, Inttab.empty, Inttab.empty, [], ctxt') end
21.284 -
21.285 -fun fresh_name n (typs, terms, exprs, steps, vars, ctxt) =
21.286 - let val (n', ctxt') = yield_singleton Variable.variant_fixes n ctxt
21.287 - in (n', (typs, terms, exprs, steps, vars, ctxt')) end
21.288 -
21.289 -fun theory_of (_, _, _, _, _, ctxt) = ProofContext.theory_of ctxt
21.290 -
21.291 -fun typ_of_sort n (cx as (typs, _, _, _, _, _)) =
21.292 - (case Symtab.lookup typs n of
21.293 - SOME T => (T, cx)
21.294 - | NONE => cx
21.295 - |> fresh_name ("'" ^ n) |>> TFree o rpair @{sort type}
21.296 - |> (fn (T, (typs, terms, exprs, steps, vars, ctxt)) =>
21.297 - (T, (Symtab.update (n, T) typs, terms, exprs, steps, vars, ctxt))))
21.298 -
21.299 -fun add_decl (n, T) (cx as (_, terms, _, _, _, _)) =
21.300 - (case Symtab.lookup terms n of
21.301 - SOME _ => cx
21.302 - | NONE => cx |> fresh_name (decl_prefix ^ n)
21.303 - |> (fn (m, (typs, terms, exprs, steps, vars, ctxt)) =>
21.304 - let val upd = Symtab.update (n, certify ctxt (Free (m, T)))
21.305 - in (typs, upd terms, exprs, steps, vars, ctxt) end))
21.306 -
21.307 -datatype sym = Sym of string * sym list
21.308 -
21.309 -fun mk_app _ (Sym ("true", _), _) = SOME mk_true
21.310 - | mk_app _ (Sym ("false", _), _) = SOME mk_false
21.311 - | mk_app _ (Sym ("=", _), [t, u]) = SOME (mk_eq t u)
21.312 - | mk_app _ (Sym ("distinct", _), ts) = SOME (mk_distinct ts)
21.313 - | mk_app _ (Sym ("ite", _), [s, t, u]) = SOME (mk_if s t u)
21.314 - | mk_app _ (Sym ("and", _), ts) = SOME (mk_nary @{cterm "op &"} mk_true ts)
21.315 - | mk_app _ (Sym ("or", _), ts) = SOME (mk_nary @{cterm "op |"} mk_false ts)
21.316 - | mk_app _ (Sym ("iff", _), [t, u]) = SOME (mk_iff t u)
21.317 - | mk_app _ (Sym ("xor", _), [t, u]) = SOME (mk_not (mk_iff t u))
21.318 - | mk_app _ (Sym ("not", _), [t]) = SOME (mk_not t)
21.319 - | mk_app _ (Sym ("implies", _), [t, u]) = SOME (mk_imp t u)
21.320 - | mk_app _ (Sym ("~", _), [t, u]) = SOME (mk_iff t u)
21.321 - | mk_app _ (Sym ("<", _), [t, u]) = SOME (mk_lt t u)
21.322 - | mk_app _ (Sym ("<=", _), [t, u]) = SOME (mk_le t u)
21.323 - | mk_app _ (Sym (">", _), [t, u]) = SOME (mk_lt u t)
21.324 - | mk_app _ (Sym (">=", _), [t, u]) = SOME (mk_le u t)
21.325 - | mk_app _ (Sym ("+", _), [t, u]) = SOME (mk_add t u)
21.326 - | mk_app _ (Sym ("-", _), [t, u]) = SOME (mk_sub t u)
21.327 - | mk_app _ (Sym ("-", _), [t]) = SOME (mk_uminus t)
21.328 - | mk_app _ (Sym ("*", _), [t, u]) = SOME (mk_mul t u)
21.329 - | mk_app _ (Sym ("/", _), [t, u]) = SOME (mk_real_div t u)
21.330 - | mk_app _ (Sym ("div", _), [t, u]) = SOME (mk_int_div t u)
21.331 - | mk_app _ (Sym ("mod", _), [t, u]) = SOME (mk_mod t u)
21.332 - | mk_app _ (Sym ("select", _), [m, k]) = SOME (mk_access m k)
21.333 - | mk_app _ (Sym ("store", _), [m, k, v]) = SOME (mk_update m k v)
21.334 - | mk_app _ (Sym ("pattern", _), _) = SOME mk_true
21.335 - | mk_app (_, terms, _, _, _, _) (Sym (n, _), ts) =
21.336 - Symtab.lookup terms n |> Option.map (fn ct => mk_fun ct ts)
21.337 -
21.338 -fun add_expr k t (typs, terms, exprs, steps, vars, ctxt) =
21.339 - (typs, terms, Inttab.update (k, t) exprs, steps, vars, ctxt)
21.340 -
21.341 -fun lookup_expr (_, _, exprs, _, _, _) = Inttab.lookup exprs
21.342 -
21.343 -fun add_proof_step k ((r, prems), prop) cx =
21.344 - let
21.345 - val (typs, terms, exprs, steps, vars, ctxt) = cx
21.346 - val (ct, vs) = close ctxt prop
21.347 - val step = Proof_Step {rule=r, prems=prems, prop=ct}
21.348 - val vars' = union (op =) vs vars
21.349 - in (typs, terms, exprs, Inttab.update (k, step) steps, vars', ctxt) end
21.350 -
21.351 -fun finish (_, _, _, steps, vars, ctxt) = (steps, vars, ctxt)
21.352 -
21.353 -
21.354 -(* core parser *)
21.355 -
21.356 -fun parse_exn line_no msg = raise SMT_Solver.SMT ("Z3 proof parser (line " ^
21.357 - string_of_int line_no ^ "): " ^ msg)
21.358 -
21.359 -fun scan_exn msg ((line_no, _), _) = parse_exn line_no msg
21.360 -
21.361 -fun with_info f cx =
21.362 - (case f ((NONE, 1), cx) of
21.363 - ((SOME root, _), cx') => (root, cx')
21.364 - | ((_, line_no), _) => parse_exn line_no "bad proof")
21.365 -
21.366 -fun parse_line _ _ (st as ((SOME _, _), _)) = st
21.367 - | parse_line scan line ((_, line_no), cx) =
21.368 - let val st = ((line_no, cx), explode line)
21.369 - in
21.370 - (case Scan.catch (Scan.finite' Symbol.stopper (Scan.option scan)) st of
21.371 - (SOME r, ((_, cx'), _)) => ((r, line_no+1), cx')
21.372 - | (NONE, _) => parse_exn line_no ("bad proof line: " ^ quote line))
21.373 - end
21.374 -
21.375 -fun with_context f x ((line_no, cx), st) =
21.376 - let val (y, cx') = f x cx
21.377 - in (y, ((line_no, cx'), st)) end
21.378 -
21.379 -
21.380 -fun lookup_context f x (st as ((_, cx), _)) = (f cx x, st)
21.381 -
21.382 -
21.383 -(* parser combinators and parsers for basic entities *)
21.384 -
21.385 -fun $$ s = Scan.lift (Scan.$$ s)
21.386 -fun this s = Scan.lift (Scan.this_string s)
21.387 -fun blank st = Scan.lift (Scan.many1 Symbol.is_ascii_blank) st
21.388 -fun sep scan = blank |-- scan
21.389 -fun seps scan = Scan.repeat (sep scan)
21.390 -fun seps1 scan = Scan.repeat1 (sep scan)
21.391 -fun seps_by scan_sep scan = scan ::: Scan.repeat (scan_sep |-- scan)
21.392 -
21.393 -fun par scan = $$ "(" |-- scan --| $$ ")"
21.394 -fun bra scan = $$ "[" |-- scan --| $$ "]"
21.395 -
21.396 -val digit = (fn
21.397 - "0" => SOME 0 | "1" => SOME 1 | "2" => SOME 2 | "3" => SOME 3 |
21.398 - "4" => SOME 4 | "5" => SOME 5 | "6" => SOME 6 | "7" => SOME 7 |
21.399 - "8" => SOME 8 | "9" => SOME 9 | _ => NONE)
21.400 -
21.401 -fun mk_num ds = fold (fn d => fn i => i * 10 + d) ds 0
21.402 -val nat_num = Scan.lift (Scan.repeat1 (Scan.some digit)) >> mk_num
21.403 -val int_num = Scan.optional ($$ "-" >> K (fn i => ~i)) I :|--
21.404 - (fn sign => nat_num >> sign)
21.405 -
21.406 -val is_char = Symbol.is_ascii_letter orf Symbol.is_ascii_digit orf
21.407 - member (op =) (explode "_+*-/%~=<>$&|?!.@^#")
21.408 -val name = Scan.lift (Scan.many1 is_char) >> implode
21.409 -
21.410 -fun sym st = (name -- Scan.optional (bra (seps_by ($$ ":") sym)) [] >> Sym) st
21.411 -
21.412 -fun id st = ($$ "#" |-- nat_num) st
21.413 -
21.414 -
21.415 -(* parsers for various parts of Z3 proofs *)
21.416 -
21.417 -fun sort st = Scan.first [
21.418 - this "bool" >> K @{typ bool},
21.419 - this "int" >> K @{typ int},
21.420 - this "real" >> K @{typ real},
21.421 - this "bv" |-- bra nat_num >> mk_wordT,
21.422 - this "array" |-- bra (sort --| $$ ":" -- sort) >> (op -->),
21.423 - par (this "->" |-- seps1 sort) >> ((op --->) o split_last),
21.424 - name :|-- with_context typ_of_sort] st
21.425 -
21.426 -fun bound st = (par (this ":var" |-- sep nat_num -- sep sort) :|--
21.427 - lookup_context (mk_bound o theory_of)) st
21.428 -
21.429 -fun number st = st |> (
21.430 - int_num -- Scan.option ($$ "/" |-- int_num) --| this "::" :|--
21.431 - (fn num as (n, _) =>
21.432 - this "int" >> K (mk_int_num n) ||
21.433 - this "real" >> K (mk_real_frac_num num)))
21.434 -
21.435 -fun bv_number st = (this "bv" |-- bra (nat_num --| $$ ":" -- nat_num) :|--
21.436 - lookup_context (mk_bv_num o theory_of)) st
21.437 -
21.438 -fun appl (app as (Sym (n, _), _)) = lookup_context mk_app app :|-- (fn
21.439 - SOME app' => Scan.succeed app'
21.440 - | NONE => scan_exn ("unknown function: " ^ quote n))
21.441 -
21.442 -fun constant st = ((sym >> rpair []) :|-- appl) st
21.443 -
21.444 -fun expr_id st = (id :|-- (fn i => lookup_context lookup_expr i :|-- (fn
21.445 - SOME e => Scan.succeed e
21.446 - | NONE => scan_exn ("unknown term id: " ^ quote (string_of_int i))))) st
21.447 -
21.448 -fun arg st = Scan.first [expr_id, number, bv_number, constant] st
21.449 -
21.450 -fun application st = par ((sym -- Scan.repeat1 (sep arg)) :|-- appl) st
21.451 -
21.452 -fun variables st = par (this "vars" |-- seps1 (par (name |-- sep sort))) st
21.453 -
21.454 -fun patterns st = seps (par ((this ":pat" || this ":nopat") |-- seps1 id)) st
21.455 -
21.456 -fun quant_kind st = st |> (
21.457 - this "forall" >> K (mk_forall o theory_of) ||
21.458 - this "exists" >> K (mk_exists o theory_of))
21.459 -
21.460 -fun quantifier st =
21.461 - (par (quant_kind -- sep variables --| patterns -- sep arg) :|--
21.462 - lookup_context (fn cx => fn ((mk_q, Ts), body) => mk_q cx Ts body)) st
21.463 -
21.464 -fun expr k =
21.465 - Scan.first [bound, quantifier, application, number, bv_number, constant] :|--
21.466 - with_context (pair NONE oo add_expr k)
21.467 -
21.468 -fun rule_name st = ((name >> `(Symtab.lookup rule_names)) :|-- (fn
21.469 - (SOME r, _) => Scan.succeed r
21.470 - | (NONE, n) => scan_exn ("unknown proof rule: " ^ quote n))) st
21.471 -
21.472 -fun rule f k =
21.473 - bra (rule_name -- seps id) --| $$ ":" -- sep arg #->
21.474 - with_context (pair (f k) oo add_proof_step k)
21.475 -
21.476 -fun decl st = (this "decl" |-- sep name --| sep (this "::") -- sep sort :|--
21.477 - with_context (pair NONE oo add_decl)) st
21.478 -
21.479 -fun def st = (id --| sep (this ":=")) st
21.480 -
21.481 -fun node st = st |> (
21.482 - decl ||
21.483 - def :|-- (fn k => sep (expr k) || sep (rule (K NONE) k)) ||
21.484 - rule SOME ~1)
21.485 -
21.486 -
21.487 -(* overall parser *)
21.488 -
21.489 -(* Currently, terms are parsed bottom-up (i.e., along with parsing the proof
21.490 - text line by line), but proofs are reconstructed top-down (i.e. by an
21.491 - in-order top-down traversal of the proof tree/graph). The latter approach
21.492 - was taken because some proof texts comprise irrelevant proof steps which
21.493 - will thus not be reconstructed. This approach might also be beneficial
21.494 - for constructing terms, but it would also increase the complexity of the
21.495 - (otherwise rather modular) code. *)
21.496 -
21.497 -fun parse ctxt typs terms proof_text =
21.498 - make_context ctxt typs terms
21.499 - |> with_info (fold (parse_line node) proof_text)
21.500 - ||> finish
21.501 -
21.502 -end
22.1 --- a/src/HOL/SMT/Tools/z3_proof_reconstruction.ML Wed May 12 23:54:01 2010 +0200
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,821 +0,0 @@
22.4 -(* Title: HOL/SMT/Tools/z3_proof_reconstruction.ML
22.5 - Author: Sascha Boehme, TU Muenchen
22.6 -
22.7 -Proof reconstruction for proofs found by Z3.
22.8 -*)
22.9 -
22.10 -signature Z3_PROOF_RECONSTRUCTION =
22.11 -sig
22.12 - val trace_assms: bool Config.T
22.13 - val reconstruct: string list * SMT_Translate.recon -> Proof.context ->
22.14 - thm * Proof.context
22.15 - val setup: theory -> theory
22.16 -end
22.17 -
22.18 -structure Z3_Proof_Reconstruction: Z3_PROOF_RECONSTRUCTION =
22.19 -struct
22.20 -
22.21 -structure P = Z3_Proof_Parser
22.22 -structure T = Z3_Proof_Tools
22.23 -structure L = Z3_Proof_Literals
22.24 -
22.25 -fun z3_exn msg = raise SMT_Solver.SMT ("Z3 proof reconstruction: " ^ msg)
22.26 -
22.27 -
22.28 -
22.29 -(** net of schematic rules **)
22.30 -
22.31 -val z3_ruleN = "z3_rule"
22.32 -
22.33 -local
22.34 - val description = "declaration of Z3 proof rules"
22.35 -
22.36 - val eq = Thm.eq_thm
22.37 -
22.38 - structure Z3_Rules = Generic_Data
22.39 - (
22.40 - type T = thm Net.net
22.41 - val empty = Net.empty
22.42 - val extend = I
22.43 - val merge = Net.merge eq
22.44 - )
22.45 -
22.46 - val prep = `Thm.prop_of o Simplifier.rewrite_rule [L.rewrite_true]
22.47 -
22.48 - fun ins thm net = Net.insert_term eq (prep thm) net handle Net.INSERT => net
22.49 - fun del thm net = Net.delete_term eq (prep thm) net handle Net.DELETE => net
22.50 -
22.51 - val add = Thm.declaration_attribute (Z3_Rules.map o ins)
22.52 - val del = Thm.declaration_attribute (Z3_Rules.map o del)
22.53 -in
22.54 -
22.55 -fun get_schematic_rules ctxt = Net.content (Z3_Rules.get (Context.Proof ctxt))
22.56 -
22.57 -fun by_schematic_rule ctxt ct =
22.58 - the (T.net_instance (Z3_Rules.get (Context.Proof ctxt)) ct)
22.59 -
22.60 -val z3_rules_setup =
22.61 - Attrib.setup (Binding.name z3_ruleN) (Attrib.add_del add del) description #>
22.62 - PureThy.add_thms_dynamic (Binding.name z3_ruleN, Net.content o Z3_Rules.get)
22.63 -
22.64 -end
22.65 -
22.66 -
22.67 -
22.68 -(** proof tools **)
22.69 -
22.70 -fun named ctxt name prover ct =
22.71 - let val _ = SMT_Solver.trace_msg ctxt I ("Z3: trying " ^ name ^ " ...")
22.72 - in prover ct end
22.73 -
22.74 -fun NAMED ctxt name tac i st =
22.75 - let val _ = SMT_Solver.trace_msg ctxt I ("Z3: trying " ^ name ^ " ...")
22.76 - in tac i st end
22.77 -
22.78 -fun pretty_goal ctxt thms t =
22.79 - [Pretty.block [Pretty.str "proposition: ", Syntax.pretty_term ctxt t]]
22.80 - |> not (null thms) ? cons (Pretty.big_list "assumptions:"
22.81 - (map (Display.pretty_thm ctxt) thms))
22.82 -
22.83 -fun try_apply ctxt thms =
22.84 - let
22.85 - fun try_apply_err ct = Pretty.string_of (Pretty.chunks [
22.86 - Pretty.big_list ("Z3 found a proof," ^
22.87 - " but proof reconstruction failed at the following subgoal:")
22.88 - (pretty_goal ctxt thms (Thm.term_of ct)),
22.89 - Pretty.str ("Adding a rule to the lemma group " ^ quote z3_ruleN ^
22.90 - " might solve this problem.")])
22.91 -
22.92 - fun apply [] ct = error (try_apply_err ct)
22.93 - | apply (prover :: provers) ct =
22.94 - (case try prover ct of
22.95 - SOME thm => (SMT_Solver.trace_msg ctxt I "Z3: succeeded"; thm)
22.96 - | NONE => apply provers ct)
22.97 -
22.98 - in apply o cons (named ctxt "schematic rules" (by_schematic_rule ctxt)) end
22.99 -
22.100 -
22.101 -
22.102 -(** theorems and proofs **)
22.103 -
22.104 -(* theorem incarnations *)
22.105 -
22.106 -datatype theorem =
22.107 - Thm of thm | (* theorem without special features *)
22.108 - MetaEq of thm | (* meta equality "t == s" *)
22.109 - Literals of thm * L.littab
22.110 - (* "P1 & ... & Pn" and table of all literals P1, ..., Pn *)
22.111 -
22.112 -fun thm_of (Thm thm) = thm
22.113 - | thm_of (MetaEq thm) = thm COMP @{thm meta_eq_to_obj_eq}
22.114 - | thm_of (Literals (thm, _)) = thm
22.115 -
22.116 -fun meta_eq_of (MetaEq thm) = thm
22.117 - | meta_eq_of p = mk_meta_eq (thm_of p)
22.118 -
22.119 -fun literals_of (Literals (_, lits)) = lits
22.120 - | literals_of p = L.make_littab [thm_of p]
22.121 -
22.122 -
22.123 -(* proof representation *)
22.124 -
22.125 -datatype proof = Unproved of P.proof_step | Proved of theorem
22.126 -
22.127 -
22.128 -
22.129 -(** core proof rules **)
22.130 -
22.131 -(* assumption *)
22.132 -
22.133 -val (trace_assms, trace_assms_setup) =
22.134 - Attrib.config_bool "z3_trace_assms" (K false)
22.135 -
22.136 -local
22.137 - val remove_trigger = @{lemma "trigger t p == p"
22.138 - by (rule eq_reflection, rule trigger_def)}
22.139 -
22.140 - val prep_rules = [@{thm Let_def}, remove_trigger, L.rewrite_true]
22.141 -
22.142 - fun rewrite_conv ctxt eqs = Simplifier.full_rewrite
22.143 - (Simplifier.context ctxt Simplifier.empty_ss addsimps eqs)
22.144 -
22.145 - fun rewrites ctxt eqs = map (Conv.fconv_rule (rewrite_conv ctxt eqs))
22.146 -
22.147 - fun trace ctxt thm =
22.148 - if Config.get ctxt trace_assms
22.149 - then tracing (Display.string_of_thm ctxt thm)
22.150 - else ()
22.151 -
22.152 - fun lookup_assm ctxt assms ct =
22.153 - (case T.net_instance assms ct of
22.154 - SOME thm => (trace ctxt thm; thm)
22.155 - | _ => z3_exn ("not asserted: " ^
22.156 - quote (Syntax.string_of_term ctxt (Thm.term_of ct))))
22.157 -in
22.158 -fun prepare_assms ctxt unfolds assms =
22.159 - let
22.160 - val unfolds' = rewrites ctxt [L.rewrite_true] unfolds
22.161 - val assms' = rewrites ctxt (union Thm.eq_thm unfolds' prep_rules) assms
22.162 - in (unfolds', T.thm_net_of assms') end
22.163 -
22.164 -fun asserted _ NONE ct = Thm (Thm.assume ct)
22.165 - | asserted ctxt (SOME (unfolds, assms)) ct =
22.166 - let val revert_conv = rewrite_conv ctxt unfolds
22.167 - in Thm (T.with_conv revert_conv (lookup_assm ctxt assms) ct) end
22.168 -end
22.169 -
22.170 -
22.171 -
22.172 -(* P = Q ==> P ==> Q or P --> Q ==> P ==> Q *)
22.173 -local
22.174 - val meta_iffD1 = @{lemma "P == Q ==> P ==> (Q::bool)" by simp}
22.175 - val meta_iffD1_c = T.precompose2 Thm.dest_binop meta_iffD1
22.176 -
22.177 - val iffD1_c = T.precompose2 (Thm.dest_binop o Thm.dest_arg) @{thm iffD1}
22.178 - val mp_c = T.precompose2 (Thm.dest_binop o Thm.dest_arg) @{thm mp}
22.179 -in
22.180 -fun mp (MetaEq thm) p = Thm (Thm.implies_elim (T.compose meta_iffD1_c thm) p)
22.181 - | mp p_q p =
22.182 - let
22.183 - val pq = thm_of p_q
22.184 - val thm = T.compose iffD1_c pq handle THM _ => T.compose mp_c pq
22.185 - in Thm (Thm.implies_elim thm p) end
22.186 -end
22.187 -
22.188 -
22.189 -
22.190 -(* and_elim: P1 & ... & Pn ==> Pi *)
22.191 -(* not_or_elim: ~(P1 | ... | Pn) ==> ~Pi *)
22.192 -local
22.193 - fun is_sublit conj t = L.exists_lit conj (fn u => u aconv t)
22.194 -
22.195 - fun derive conj t lits idx ptab =
22.196 - let
22.197 - val lit = the (L.get_first_lit (is_sublit conj t) lits)
22.198 - val ls = L.explode conj false false [t] lit
22.199 - val lits' = fold L.insert_lit ls (L.delete_lit lit lits)
22.200 -
22.201 - fun upd (Proved thm) = Proved (Literals (thm_of thm, lits'))
22.202 - | upd p = p
22.203 - in (the (L.lookup_lit lits' t), Inttab.map_entry idx upd ptab) end
22.204 -
22.205 - fun lit_elim conj (p, idx) ct ptab =
22.206 - let val lits = literals_of p
22.207 - in
22.208 - (case L.lookup_lit lits (T.term_of ct) of
22.209 - SOME lit => (Thm lit, ptab)
22.210 - | NONE => apfst Thm (derive conj (T.term_of ct) lits idx ptab))
22.211 - end
22.212 -in
22.213 -val and_elim = lit_elim true
22.214 -val not_or_elim = lit_elim false
22.215 -end
22.216 -
22.217 -
22.218 -
22.219 -(* P1, ..., Pn |- False ==> |- ~P1 | ... | ~Pn *)
22.220 -local
22.221 - fun step lit thm =
22.222 - Thm.implies_elim (Thm.implies_intr (Thm.cprop_of lit) thm) lit
22.223 - val explode_disj = L.explode false false false
22.224 - fun intro hyps thm th = fold step (explode_disj hyps th) thm
22.225 -
22.226 - fun dest_ccontr ct = [Thm.dest_arg (Thm.dest_arg (Thm.dest_arg1 ct))]
22.227 - val ccontr = T.precompose dest_ccontr @{thm ccontr}
22.228 -in
22.229 -fun lemma thm ct =
22.230 - let
22.231 - val cu = Thm.capply @{cterm Not} (Thm.dest_arg ct)
22.232 - val hyps = map_filter (try HOLogic.dest_Trueprop) (#hyps (Thm.rep_thm thm))
22.233 - in Thm (T.compose ccontr (T.under_assumption (intro hyps thm) cu)) end
22.234 -end
22.235 -
22.236 -
22.237 -
22.238 -(* \/{P1, ..., Pn, Q1, ..., Qn}, ~P1, ..., ~Pn ==> \/{Q1, ..., Qn} *)
22.239 -local
22.240 - val explode_disj = L.explode false true false
22.241 - val join_disj = L.join false
22.242 - fun unit thm thms th =
22.243 - let val t = @{term Not} $ T.prop_of thm and ts = map T.prop_of thms
22.244 - in join_disj (L.make_littab (thms @ explode_disj ts th)) t end
22.245 -
22.246 - fun dest_arg2 ct = Thm.dest_arg (Thm.dest_arg ct)
22.247 - fun dest ct = pairself dest_arg2 (Thm.dest_binop ct)
22.248 - val contrapos = T.precompose2 dest @{lemma "(~P ==> ~Q) ==> Q ==> P" by fast}
22.249 -in
22.250 -fun unit_resolution thm thms ct =
22.251 - Thm.capply @{cterm Not} (Thm.dest_arg ct)
22.252 - |> T.under_assumption (unit thm thms)
22.253 - |> Thm o T.discharge thm o T.compose contrapos
22.254 -end
22.255 -
22.256 -
22.257 -
22.258 -(* P ==> P == True or P ==> P == False *)
22.259 -local
22.260 - val iff1 = @{lemma "P ==> P == (~ False)" by simp}
22.261 - val iff2 = @{lemma "~P ==> P == False" by simp}
22.262 -in
22.263 -fun iff_true thm = MetaEq (thm COMP iff1)
22.264 -fun iff_false thm = MetaEq (thm COMP iff2)
22.265 -end
22.266 -
22.267 -
22.268 -
22.269 -(* distributivity of | over & *)
22.270 -fun distributivity ctxt = Thm o try_apply ctxt [] [
22.271 - named ctxt "fast" (T.by_tac (Classical.best_tac HOL_cs))]
22.272 - (* FIXME: not very well tested *)
22.273 -
22.274 -
22.275 -
22.276 -(* Tseitin-like axioms *)
22.277 -
22.278 -local
22.279 - val disjI1 = @{lemma "(P ==> Q) ==> ~P | Q" by fast}
22.280 - val disjI2 = @{lemma "(~P ==> Q) ==> P | Q" by fast}
22.281 - val disjI3 = @{lemma "(~Q ==> P) ==> P | Q" by fast}
22.282 - val disjI4 = @{lemma "(Q ==> P) ==> P | ~Q" by fast}
22.283 -
22.284 - fun prove' conj1 conj2 ct2 thm =
22.285 - let val lits = L.true_thm :: L.explode conj1 true (conj1 <> conj2) [] thm
22.286 - in L.join conj2 (L.make_littab lits) (Thm.term_of ct2) end
22.287 -
22.288 - fun prove rule (ct1, conj1) (ct2, conj2) =
22.289 - T.under_assumption (prove' conj1 conj2 ct2) ct1 COMP rule
22.290 -
22.291 - fun prove_def_axiom ct =
22.292 - let val (ct1, ct2) = Thm.dest_binop (Thm.dest_arg ct)
22.293 - in
22.294 - (case Thm.term_of ct1 of
22.295 - @{term Not} $ (@{term "op &"} $ _ $ _) =>
22.296 - prove disjI1 (Thm.dest_arg ct1, true) (ct2, true)
22.297 - | @{term "op &"} $ _ $ _ =>
22.298 - prove disjI3 (Thm.capply @{cterm Not} ct2, false) (ct1, true)
22.299 - | @{term Not} $ (@{term "op |"} $ _ $ _) =>
22.300 - prove disjI3 (Thm.capply @{cterm Not} ct2, false) (ct1, false)
22.301 - | @{term "op |"} $ _ $ _ =>
22.302 - prove disjI2 (Thm.capply @{cterm Not} ct1, false) (ct2, true)
22.303 - | Const (@{const_name distinct}, _) $ _ =>
22.304 - let
22.305 - fun dis_conv cv = Conv.arg_conv (Conv.arg1_conv cv)
22.306 - fun prv cu =
22.307 - let val (cu1, cu2) = Thm.dest_binop (Thm.dest_arg cu)
22.308 - in prove disjI4 (Thm.dest_arg cu2, true) (cu1, true) end
22.309 - in T.with_conv (dis_conv T.unfold_distinct_conv) prv ct end
22.310 - | @{term Not} $ (Const (@{const_name distinct}, _) $ _) =>
22.311 - let
22.312 - fun dis_conv cv = Conv.arg_conv (Conv.arg1_conv (Conv.arg_conv cv))
22.313 - fun prv cu =
22.314 - let val (cu1, cu2) = Thm.dest_binop (Thm.dest_arg cu)
22.315 - in prove disjI1 (Thm.dest_arg cu1, true) (cu2, true) end
22.316 - in T.with_conv (dis_conv T.unfold_distinct_conv) prv ct end
22.317 - | _ => raise CTERM ("prove_def_axiom", [ct]))
22.318 - end
22.319 -
22.320 - val rewr_if =
22.321 - @{lemma "(if P then Q1 else Q2) = ((P --> Q1) & (~P --> Q2))" by simp}
22.322 -in
22.323 -fun def_axiom ctxt = Thm o try_apply ctxt [] [
22.324 - named ctxt "conj/disj/distinct" prove_def_axiom,
22.325 - T.by_abstraction ctxt [] (fn ctxt' =>
22.326 - named ctxt' "simp+fast" (T.by_tac (
22.327 - Simplifier.simp_tac (HOL_ss addsimps [rewr_if])
22.328 - THEN_ALL_NEW Classical.best_tac HOL_cs)))]
22.329 -end
22.330 -
22.331 -
22.332 -
22.333 -(* local definitions *)
22.334 -local
22.335 - val intro_rules = [
22.336 - @{lemma "n == P ==> (~n | P) & (n | ~P)" by simp},
22.337 - @{lemma "n == (if P then s else t) ==> (~P | n = s) & (P | n = t)"
22.338 - by simp},
22.339 - @{lemma "n == P ==> n = P" by (rule meta_eq_to_obj_eq)} ]
22.340 -
22.341 - val apply_rules = [
22.342 - @{lemma "(~n | P) & (n | ~P) ==> P == n" by (atomize(full)) fast},
22.343 - @{lemma "(~P | n = s) & (P | n = t) ==> (if P then s else t) == n"
22.344 - by (atomize(full)) fastsimp} ]
22.345 -
22.346 - val inst_rule = T.match_instantiate Thm.dest_arg
22.347 -
22.348 - fun apply_rule ct =
22.349 - (case get_first (try (inst_rule ct)) intro_rules of
22.350 - SOME thm => thm
22.351 - | NONE => raise CTERM ("intro_def", [ct]))
22.352 -in
22.353 -fun intro_def ct = T.make_hyp_def (apply_rule ct) #>> Thm
22.354 -
22.355 -fun apply_def thm =
22.356 - get_first (try (fn rule => MetaEq (thm COMP rule))) apply_rules
22.357 - |> the_default (Thm thm)
22.358 -end
22.359 -
22.360 -
22.361 -
22.362 -(* negation normal form *)
22.363 -
22.364 -local
22.365 - val quant_rules1 = ([
22.366 - @{lemma "(!!x. P x == Q) ==> ALL x. P x == Q" by simp},
22.367 - @{lemma "(!!x. P x == Q) ==> EX x. P x == Q" by simp}], [
22.368 - @{lemma "(!!x. P x == Q x) ==> ALL x. P x == ALL x. Q x" by simp},
22.369 - @{lemma "(!!x. P x == Q x) ==> EX x. P x == EX x. Q x" by simp}])
22.370 -
22.371 - val quant_rules2 = ([
22.372 - @{lemma "(!!x. ~P x == Q) ==> ~(ALL x. P x) == Q" by simp},
22.373 - @{lemma "(!!x. ~P x == Q) ==> ~(EX x. P x) == Q" by simp}], [
22.374 - @{lemma "(!!x. ~P x == Q x) ==> ~(ALL x. P x) == EX x. Q x" by simp},
22.375 - @{lemma "(!!x. ~P x == Q x) ==> ~(EX x. P x) == ALL x. Q x" by simp}])
22.376 -
22.377 - fun nnf_quant_tac thm (qs as (qs1, qs2)) i st = (
22.378 - Tactic.rtac thm ORELSE'
22.379 - (Tactic.match_tac qs1 THEN' nnf_quant_tac thm qs) ORELSE'
22.380 - (Tactic.match_tac qs2 THEN' nnf_quant_tac thm qs)) i st
22.381 -
22.382 - fun nnf_quant vars qs p ct =
22.383 - T.as_meta_eq ct
22.384 - |> T.by_tac (nnf_quant_tac (T.varify vars (meta_eq_of p)) qs)
22.385 -
22.386 - fun prove_nnf ctxt = try_apply ctxt [] [
22.387 - named ctxt "conj/disj" L.prove_conj_disj_eq]
22.388 -in
22.389 -fun nnf ctxt vars ps ct =
22.390 - (case T.term_of ct of
22.391 - _ $ (l as Const _ $ Abs _) $ (r as Const _ $ Abs _) =>
22.392 - if l aconv r
22.393 - then MetaEq (Thm.reflexive (Thm.dest_arg (Thm.dest_arg ct)))
22.394 - else MetaEq (nnf_quant vars quant_rules1 (hd ps) ct)
22.395 - | _ $ (@{term Not} $ (Const _ $ Abs _)) $ (Const _ $ Abs _) =>
22.396 - MetaEq (nnf_quant vars quant_rules2 (hd ps) ct)
22.397 - | _ =>
22.398 - let
22.399 - val nnf_rewr_conv = Conv.arg_conv (Conv.arg_conv
22.400 - (T.unfold_eqs ctxt (map (Thm.symmetric o meta_eq_of) ps)))
22.401 - in Thm (T.with_conv nnf_rewr_conv (prove_nnf ctxt) ct) end)
22.402 -end
22.403 -
22.404 -
22.405 -
22.406 -(** equality proof rules **)
22.407 -
22.408 -(* |- t = t *)
22.409 -fun refl ct = MetaEq (Thm.reflexive (Thm.dest_arg (Thm.dest_arg ct)))
22.410 -
22.411 -
22.412 -
22.413 -(* s = t ==> t = s *)
22.414 -local
22.415 - val symm_rule = @{lemma "s = t ==> t == s" by simp}
22.416 -in
22.417 -fun symm (MetaEq thm) = MetaEq (Thm.symmetric thm)
22.418 - | symm p = MetaEq (thm_of p COMP symm_rule)
22.419 -end
22.420 -
22.421 -
22.422 -
22.423 -(* s = t ==> t = u ==> s = u *)
22.424 -local
22.425 - val trans1 = @{lemma "s == t ==> t = u ==> s == u" by simp}
22.426 - val trans2 = @{lemma "s = t ==> t == u ==> s == u" by simp}
22.427 - val trans3 = @{lemma "s = t ==> t = u ==> s == u" by simp}
22.428 -in
22.429 -fun trans (MetaEq thm1) (MetaEq thm2) = MetaEq (Thm.transitive thm1 thm2)
22.430 - | trans (MetaEq thm) q = MetaEq (thm_of q COMP (thm COMP trans1))
22.431 - | trans p (MetaEq thm) = MetaEq (thm COMP (thm_of p COMP trans2))
22.432 - | trans p q = MetaEq (thm_of q COMP (thm_of p COMP trans3))
22.433 -end
22.434 -
22.435 -
22.436 -
22.437 -(* t1 = s1 ==> ... ==> tn = sn ==> f t1 ... tn = f s1 .. sn
22.438 - (reflexive antecendents are droppped) *)
22.439 -local
22.440 - exception MONO
22.441 -
22.442 - fun prove_refl (ct, _) = Thm.reflexive ct
22.443 - fun prove_comb f g cp =
22.444 - let val ((ct1, ct2), (cu1, cu2)) = pairself Thm.dest_comb cp
22.445 - in Thm.combination (f (ct1, cu1)) (g (ct2, cu2)) end
22.446 - fun prove_arg f = prove_comb prove_refl f
22.447 -
22.448 - fun prove f cp = prove_comb (prove f) f cp handle CTERM _ => prove_refl cp
22.449 -
22.450 - fun prove_nary is_comb f =
22.451 - let
22.452 - fun prove (cp as (ct, _)) = f cp handle MONO =>
22.453 - if is_comb (Thm.term_of ct)
22.454 - then prove_comb (prove_arg prove) prove cp
22.455 - else prove_refl cp
22.456 - in prove end
22.457 -
22.458 - fun prove_list f n cp =
22.459 - if n = 0 then prove_refl cp
22.460 - else prove_comb (prove_arg f) (prove_list f (n-1)) cp
22.461 -
22.462 - fun with_length f (cp as (cl, _)) =
22.463 - f (length (HOLogic.dest_list (Thm.term_of cl))) cp
22.464 -
22.465 - fun prove_distinct f = prove_arg (with_length (prove_list f))
22.466 -
22.467 - fun prove_eq exn lookup cp =
22.468 - (case lookup (Logic.mk_equals (pairself Thm.term_of cp)) of
22.469 - SOME eq => eq
22.470 - | NONE => if exn then raise MONO else prove_refl cp)
22.471 -
22.472 - val prove_eq_exn = prove_eq true
22.473 - and prove_eq_safe = prove_eq false
22.474 -
22.475 - fun mono f (cp as (cl, _)) =
22.476 - (case Term.head_of (Thm.term_of cl) of
22.477 - @{term "op &"} => prove_nary L.is_conj (prove_eq_exn f)
22.478 - | @{term "op |"} => prove_nary L.is_disj (prove_eq_exn f)
22.479 - | Const (@{const_name distinct}, _) => prove_distinct (prove_eq_safe f)
22.480 - | _ => prove (prove_eq_safe f)) cp
22.481 -in
22.482 -fun monotonicity eqs ct =
22.483 - let
22.484 - val lookup = AList.lookup (op aconv) (map (`Thm.prop_of o meta_eq_of) eqs)
22.485 - val cp = Thm.dest_binop (Thm.dest_arg ct)
22.486 - in MetaEq (prove_eq_exn lookup cp handle MONO => mono lookup cp) end
22.487 -end
22.488 -
22.489 -
22.490 -
22.491 -(* |- f a b = f b a (where f is equality) *)
22.492 -local
22.493 - val rule = @{lemma "a = b == b = a" by (atomize(full)) (rule eq_commute)}
22.494 -in
22.495 -fun commutativity ct = MetaEq (T.match_instantiate I (T.as_meta_eq ct) rule)
22.496 -end
22.497 -
22.498 -
22.499 -
22.500 -(** quantifier proof rules **)
22.501 -
22.502 -(* P ?x = Q ?x ==> (ALL x. P x) = (ALL x. Q x)
22.503 - P ?x = Q ?x ==> (EX x. P x) = (EX x. Q x) *)
22.504 -local
22.505 - val rules = [
22.506 - @{lemma "(!!x. P x == Q x) ==> (ALL x. P x) == (ALL x. Q x)" by simp},
22.507 - @{lemma "(!!x. P x == Q x) ==> (EX x. P x) == (EX x. Q x)" by simp}]
22.508 -in
22.509 -fun quant_intro vars p ct =
22.510 - let
22.511 - val thm = meta_eq_of p
22.512 - val rules' = T.varify vars thm :: rules
22.513 - val cu = T.as_meta_eq ct
22.514 - in MetaEq (T.by_tac (REPEAT_ALL_NEW (Tactic.match_tac rules')) cu) end
22.515 -end
22.516 -
22.517 -
22.518 -
22.519 -(* |- ((ALL x. P x) | Q) = (ALL x. P x | Q) *)
22.520 -fun pull_quant ctxt = Thm o try_apply ctxt [] [
22.521 - named ctxt "fast" (T.by_tac (Classical.fast_tac HOL_cs))]
22.522 - (* FIXME: not very well tested *)
22.523 -
22.524 -
22.525 -
22.526 -(* |- (ALL x. P x & Q x) = ((ALL x. P x) & (ALL x. Q x)) *)
22.527 -fun push_quant ctxt = Thm o try_apply ctxt [] [
22.528 - named ctxt "fast" (T.by_tac (Classical.fast_tac HOL_cs))]
22.529 - (* FIXME: not very well tested *)
22.530 -
22.531 -
22.532 -
22.533 -(* |- (ALL x1 ... xn y1 ... yn. P x1 ... xn) = (ALL x1 ... xn. P x1 ... xn) *)
22.534 -local
22.535 - val elim_all = @{lemma "(ALL x. P) == P" by simp}
22.536 - val elim_ex = @{lemma "(EX x. P) == P" by simp}
22.537 -
22.538 - fun elim_unused_conv ctxt =
22.539 - Conv.params_conv ~1 (K (Conv.arg_conv (Conv.arg1_conv
22.540 - (More_Conv.rewrs_conv [elim_all, elim_ex])))) ctxt
22.541 -
22.542 - fun elim_unused_tac ctxt =
22.543 - REPEAT_ALL_NEW (
22.544 - Tactic.match_tac [@{thm refl}, @{thm iff_allI}, @{thm iff_exI}]
22.545 - ORELSE' CONVERSION (elim_unused_conv ctxt))
22.546 -in
22.547 -fun elim_unused_vars ctxt = Thm o T.by_tac (elim_unused_tac ctxt)
22.548 -end
22.549 -
22.550 -
22.551 -
22.552 -(* |- (ALL x1 ... xn. ~(x1 = t1 & ... xn = tn) | P x1 ... xn) = P t1 ... tn *)
22.553 -fun dest_eq_res ctxt = Thm o try_apply ctxt [] [
22.554 - named ctxt "fast" (T.by_tac (Classical.fast_tac HOL_cs))]
22.555 - (* FIXME: not very well tested *)
22.556 -
22.557 -
22.558 -
22.559 -(* |- ~(ALL x1...xn. P x1...xn) | P a1...an *)
22.560 -local
22.561 - val rule = @{lemma "~ P x | Q ==> ~(ALL x. P x) | Q" by fast}
22.562 -in
22.563 -val quant_inst = Thm o T.by_tac (
22.564 - REPEAT_ALL_NEW (Tactic.match_tac [rule])
22.565 - THEN' Tactic.rtac @{thm excluded_middle})
22.566 -end
22.567 -
22.568 -
22.569 -
22.570 -(* c = SOME x. P x |- (EX x. P x) = P c
22.571 - c = SOME x. ~ P x |- ~(ALL x. P x) = ~ P c *)
22.572 -local
22.573 - val elim_ex = @{lemma "EX x. P == P" by simp}
22.574 - val elim_all = @{lemma "~ (ALL x. P) == ~P" by simp}
22.575 - val sk_ex = @{lemma "c == SOME x. P x ==> EX x. P x == P c"
22.576 - by simp (intro eq_reflection some_eq_ex[symmetric])}
22.577 - val sk_all = @{lemma "c == SOME x. ~ P x ==> ~(ALL x. P x) == ~ P c"
22.578 - by (simp only: not_all) (intro eq_reflection some_eq_ex[symmetric])}
22.579 - val sk_ex_rule = ((sk_ex, I), elim_ex)
22.580 - and sk_all_rule = ((sk_all, Thm.dest_arg), elim_all)
22.581 -
22.582 - fun dest f sk_rule =
22.583 - Thm.dest_comb (f (Thm.dest_arg (Thm.dest_arg (Thm.cprop_of sk_rule))))
22.584 - fun type_of f sk_rule = Thm.ctyp_of_term (snd (dest f sk_rule))
22.585 - fun pair2 (a, b) (c, d) = [(a, c), (b, d)]
22.586 - fun inst_sk (sk_rule, f) p c =
22.587 - Thm.instantiate ([(type_of f sk_rule, Thm.ctyp_of_term c)], []) sk_rule
22.588 - |> (fn sk' => Thm.instantiate ([], (pair2 (dest f sk') (p, c))) sk')
22.589 - |> Conv.fconv_rule (Thm.beta_conversion true)
22.590 -
22.591 - fun kind (Const (@{const_name Ex}, _) $ _) = (sk_ex_rule, I, I)
22.592 - | kind (@{term Not} $ (Const (@{const_name All}, _) $ _)) =
22.593 - (sk_all_rule, Thm.dest_arg, Thm.capply @{cterm Not})
22.594 - | kind t = raise TERM ("skolemize", [t])
22.595 -
22.596 - fun dest_abs_type (Abs (_, T, _)) = T
22.597 - | dest_abs_type t = raise TERM ("dest_abs_type", [t])
22.598 -
22.599 - fun bodies_of thy lhs rhs =
22.600 - let
22.601 - val (rule, dest, make) = kind (Thm.term_of lhs)
22.602 -
22.603 - fun dest_body idx cbs ct =
22.604 - let
22.605 - val cb = Thm.dest_arg (dest ct)
22.606 - val T = dest_abs_type (Thm.term_of cb)
22.607 - val cv = Thm.cterm_of thy (Var (("x", idx), T))
22.608 - val cu = make (Drule.beta_conv cb cv)
22.609 - val cbs' = (cv, cb) :: cbs
22.610 - in
22.611 - (snd (Thm.first_order_match (cu, rhs)), rev cbs')
22.612 - handle Pattern.MATCH => dest_body (idx+1) cbs' cu
22.613 - end
22.614 - in (rule, dest_body 1 [] lhs) end
22.615 -
22.616 - fun transitive f thm = Thm.transitive thm (f (Thm.rhs_of thm))
22.617 -
22.618 - fun sk_step (rule, elim) (cv, mct, cb) ((is, thm), ctxt) =
22.619 - (case mct of
22.620 - SOME ct =>
22.621 - ctxt
22.622 - |> T.make_hyp_def (inst_sk rule (Thm.instantiate_cterm ([], is) cb) ct)
22.623 - |>> pair ((cv, ct) :: is) o Thm.transitive thm
22.624 - | NONE => ((is, transitive (Conv.rewr_conv elim) thm), ctxt))
22.625 -in
22.626 -fun skolemize ct ctxt =
22.627 - let
22.628 - val (lhs, rhs) = Thm.dest_binop (Thm.dest_arg ct)
22.629 - val (rule, (ctab, cbs)) = bodies_of (ProofContext.theory_of ctxt) lhs rhs
22.630 - fun lookup_var (cv, cb) = (cv, AList.lookup (op aconvc) ctab cv, cb)
22.631 - in
22.632 - (([], Thm.reflexive lhs), ctxt)
22.633 - |> fold (sk_step rule) (map lookup_var cbs)
22.634 - |>> MetaEq o snd
22.635 - end
22.636 -end
22.637 -
22.638 -
22.639 -
22.640 -(** theory proof rules **)
22.641 -
22.642 -(* theory lemmas: linear arithmetic, arrays *)
22.643 -
22.644 -fun th_lemma ctxt simpset thms = Thm o try_apply ctxt thms [
22.645 - T.by_abstraction ctxt thms (fn ctxt' => T.by_tac (
22.646 - NAMED ctxt' "arith" (Arith_Data.arith_tac ctxt')
22.647 - ORELSE' NAMED ctxt' "simp+arith" (Simplifier.simp_tac simpset THEN_ALL_NEW
22.648 - Arith_Data.arith_tac ctxt')))]
22.649 -
22.650 -
22.651 -
22.652 -(* rewriting: prove equalities:
22.653 - * ACI of conjunction/disjunction
22.654 - * contradiction, excluded middle
22.655 - * logical rewriting rules (for negation, implication, equivalence,
22.656 - distinct)
22.657 - * normal forms for polynoms (integer/real arithmetic)
22.658 - * quantifier elimination over linear arithmetic
22.659 - * ... ? **)
22.660 -structure Z3_Simps = Named_Thms
22.661 -(
22.662 - val name = "z3_simp"
22.663 - val description = "simplification rules for Z3 proof reconstruction"
22.664 -)
22.665 -
22.666 -local
22.667 - fun spec_meta_eq_of thm =
22.668 - (case try (fn th => th RS @{thm spec}) thm of
22.669 - SOME thm' => spec_meta_eq_of thm'
22.670 - | NONE => mk_meta_eq thm)
22.671 -
22.672 - fun prep (Thm thm) = spec_meta_eq_of thm
22.673 - | prep (MetaEq thm) = thm
22.674 - | prep (Literals (thm, _)) = spec_meta_eq_of thm
22.675 -
22.676 - fun unfold_conv ctxt ths =
22.677 - Conv.arg_conv (Conv.binop_conv (T.unfold_eqs ctxt (map prep ths)))
22.678 -
22.679 - fun with_conv _ [] prv = prv
22.680 - | with_conv ctxt ths prv = T.with_conv (unfold_conv ctxt ths) prv
22.681 -
22.682 - val unfold_conv =
22.683 - Conv.arg_conv (Conv.binop_conv (Conv.try_conv T.unfold_distinct_conv))
22.684 - val prove_conj_disj_eq = T.with_conv unfold_conv L.prove_conj_disj_eq
22.685 -in
22.686 -
22.687 -fun rewrite ctxt simpset ths = Thm o with_conv ctxt ths (try_apply ctxt [] [
22.688 - named ctxt "conj/disj/distinct" prove_conj_disj_eq,
22.689 - T.by_abstraction ctxt [] (fn ctxt' => T.by_tac (
22.690 - NAMED ctxt' "simp" (Simplifier.simp_tac simpset)
22.691 - THEN_ALL_NEW (
22.692 - NAMED ctxt' "fast" (Classical.fast_tac HOL_cs)
22.693 - ORELSE' NAMED ctxt' "arith" (Arith_Data.arith_tac ctxt'))))])
22.694 -
22.695 -end
22.696 -
22.697 -
22.698 -
22.699 -(** proof reconstruction **)
22.700 -
22.701 -(* tracing and checking *)
22.702 -
22.703 -local
22.704 - fun count_rules ptab =
22.705 - let
22.706 - fun count (_, Unproved _) (solved, total) = (solved, total + 1)
22.707 - | count (_, Proved _) (solved, total) = (solved + 1, total + 1)
22.708 - in Inttab.fold count ptab (0, 0) end
22.709 -
22.710 - fun header idx r (solved, total) =
22.711 - "Z3: #" ^ string_of_int idx ^ ": " ^ P.string_of_rule r ^ " (goal " ^
22.712 - string_of_int (solved + 1) ^ " of " ^ string_of_int total ^ ")"
22.713 -
22.714 - fun check ctxt idx r ps ct p =
22.715 - let val thm = thm_of p |> tap (Thm.join_proofs o single)
22.716 - in
22.717 - if (Thm.cprop_of thm) aconvc ct then ()
22.718 - else z3_exn (Pretty.string_of (Pretty.big_list ("proof step failed: " ^
22.719 - quote (P.string_of_rule r) ^ " (#" ^ string_of_int idx ^ ")")
22.720 - (pretty_goal ctxt (map (thm_of o fst) ps) (Thm.prop_of thm) @
22.721 - [Pretty.block [Pretty.str "expected: ",
22.722 - Syntax.pretty_term ctxt (Thm.term_of ct)]])))
22.723 - end
22.724 -in
22.725 -fun trace_rule idx prove r ps ct (cxp as (ctxt, ptab)) =
22.726 - let
22.727 - val _ = SMT_Solver.trace_msg ctxt (header idx r o count_rules) ptab
22.728 - val result as (p, cxp' as (ctxt', _)) = prove r ps ct cxp
22.729 - val _ = if not (Config.get ctxt' SMT_Solver.trace) then ()
22.730 - else check ctxt' idx r ps ct p
22.731 - in result end
22.732 -end
22.733 -
22.734 -
22.735 -(* overall reconstruction procedure *)
22.736 -
22.737 -fun not_supported r =
22.738 - raise Fail ("Z3: proof rule not implemented: " ^ quote (P.string_of_rule r))
22.739 -
22.740 -fun prove ctxt unfolds assms vars =
22.741 - let
22.742 - val assms' = Option.map (prepare_assms ctxt unfolds) assms
22.743 - val simpset = T.make_simpset ctxt (Z3_Simps.get ctxt)
22.744 -
22.745 - fun step r ps ct (cxp as (cx, ptab)) =
22.746 - (case (r, ps) of
22.747 - (* core rules *)
22.748 - (P.TrueAxiom, _) => (Thm L.true_thm, cxp)
22.749 - | (P.Asserted, _) => (asserted cx assms' ct, cxp)
22.750 - | (P.Goal, _) => (asserted cx assms' ct, cxp)
22.751 - | (P.ModusPonens, [(p, _), (q, _)]) => (mp q (thm_of p), cxp)
22.752 - | (P.ModusPonensOeq, [(p, _), (q, _)]) => (mp q (thm_of p), cxp)
22.753 - | (P.AndElim, [(p, i)]) => and_elim (p, i) ct ptab ||> pair cx
22.754 - | (P.NotOrElim, [(p, i)]) => not_or_elim (p, i) ct ptab ||> pair cx
22.755 - | (P.Hypothesis, _) => (Thm (Thm.assume ct), cxp)
22.756 - | (P.Lemma, [(p, _)]) => (lemma (thm_of p) ct, cxp)
22.757 - | (P.UnitResolution, (p, _) :: ps) =>
22.758 - (unit_resolution (thm_of p) (map (thm_of o fst) ps) ct, cxp)
22.759 - | (P.IffTrue, [(p, _)]) => (iff_true (thm_of p), cxp)
22.760 - | (P.IffFalse, [(p, _)]) => (iff_false (thm_of p), cxp)
22.761 - | (P.Distributivity, _) => (distributivity cx ct, cxp)
22.762 - | (P.DefAxiom, _) => (def_axiom cx ct, cxp)
22.763 - | (P.IntroDef, _) => intro_def ct cx ||> rpair ptab
22.764 - | (P.ApplyDef, [(p, _)]) => (apply_def (thm_of p), cxp)
22.765 - | (P.IffOeq, [(p, _)]) => (p, cxp)
22.766 - | (P.NnfPos, _) => (nnf cx vars (map fst ps) ct, cxp)
22.767 - | (P.NnfNeg, _) => (nnf cx vars (map fst ps) ct, cxp)
22.768 -
22.769 - (* equality rules *)
22.770 - | (P.Reflexivity, _) => (refl ct, cxp)
22.771 - | (P.Symmetry, [(p, _)]) => (symm p, cxp)
22.772 - | (P.Transitivity, [(p, _), (q, _)]) => (trans p q, cxp)
22.773 - | (P.Monotonicity, _) => (monotonicity (map fst ps) ct, cxp)
22.774 - | (P.Commutativity, _) => (commutativity ct, cxp)
22.775 -
22.776 - (* quantifier rules *)
22.777 - | (P.QuantIntro, [(p, _)]) => (quant_intro vars p ct, cxp)
22.778 - | (P.PullQuant, _) => (pull_quant cx ct, cxp)
22.779 - | (P.PushQuant, _) => (push_quant cx ct, cxp)
22.780 - | (P.ElimUnusedVars, _) => (elim_unused_vars cx ct, cxp)
22.781 - | (P.DestEqRes, _) => (dest_eq_res cx ct, cxp)
22.782 - | (P.QuantInst, _) => (quant_inst ct, cxp)
22.783 - | (P.Skolemize, _) => skolemize ct cx ||> rpair ptab
22.784 -
22.785 - (* theory rules *)
22.786 - | (P.ThLemma, _) =>
22.787 - (th_lemma cx simpset (map (thm_of o fst) ps) ct, cxp)
22.788 - | (P.Rewrite, _) => (rewrite cx simpset [] ct, cxp)
22.789 - | (P.RewriteStar, ps) =>
22.790 - (rewrite cx simpset (map fst ps) ct, cxp)
22.791 -
22.792 - | (P.NnfStar, _) => not_supported r
22.793 - | (P.CnfStar, _) => not_supported r
22.794 - | (P.TransitivityStar, _) => not_supported r
22.795 - | (P.PullQuantStar, _) => not_supported r
22.796 -
22.797 - | _ => raise Fail ("Z3: proof rule " ^ quote (P.string_of_rule r) ^
22.798 - " has an unexpected number of arguments."))
22.799 -
22.800 - fun conclude idx rule prop (ps, cxp) =
22.801 - trace_rule idx step rule ps prop cxp
22.802 - |-> (fn p => apsnd (Inttab.update (idx, Proved p)) #> pair p)
22.803 -
22.804 - fun lookup idx (cxp as (cx, ptab)) =
22.805 - (case Inttab.lookup ptab idx of
22.806 - SOME (Unproved (P.Proof_Step {rule, prems, prop})) =>
22.807 - fold_map lookup prems cxp
22.808 - |>> map2 rpair prems
22.809 - |> conclude idx rule prop
22.810 - | SOME (Proved p) => (p, cxp)
22.811 - | NONE => z3_exn ("unknown proof id: " ^ quote (string_of_int idx)))
22.812 -
22.813 - fun result (p, (cx, _)) = (thm_of p, cx)
22.814 - in
22.815 - (fn (idx, ptab) => result (lookup idx (ctxt, Inttab.map Unproved ptab)))
22.816 - end
22.817 -
22.818 -fun reconstruct (output, {typs, terms, unfolds, assms}) ctxt =
22.819 - P.parse ctxt typs terms output
22.820 - |> (fn (idx, (ptab, vars, cx)) => prove cx unfolds assms vars (idx, ptab))
22.821 -
22.822 -val setup = trace_assms_setup #> z3_rules_setup #> Z3_Simps.setup
22.823 -
22.824 -end
23.1 --- a/src/HOL/SMT/Tools/z3_proof_tools.ML Wed May 12 23:54:01 2010 +0200
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,364 +0,0 @@
23.4 -(* Title: HOL/SMT/Tools/z3_proof_tools.ML
23.5 - Author: Sascha Boehme, TU Muenchen
23.6 -
23.7 -Helper functions required for Z3 proof reconstruction.
23.8 -*)
23.9 -
23.10 -signature Z3_PROOF_TOOLS =
23.11 -sig
23.12 - (* accessing and modifying terms *)
23.13 - val term_of: cterm -> term
23.14 - val prop_of: thm -> term
23.15 - val mk_prop: cterm -> cterm
23.16 - val as_meta_eq: cterm -> cterm
23.17 -
23.18 - (* theorem nets *)
23.19 - val thm_net_of: thm list -> thm Net.net
23.20 - val net_instance: thm Net.net -> cterm -> thm option
23.21 -
23.22 - (* proof combinators *)
23.23 - val under_assumption: (thm -> thm) -> cterm -> thm
23.24 - val with_conv: conv -> (cterm -> thm) -> cterm -> thm
23.25 - val discharge: thm -> thm -> thm
23.26 - val varify: string list -> thm -> thm
23.27 - val unfold_eqs: Proof.context -> thm list -> conv
23.28 - val match_instantiate: (cterm -> cterm) -> cterm -> thm -> thm
23.29 - val by_tac: (int -> tactic) -> cterm -> thm
23.30 - val make_hyp_def: thm -> Proof.context -> thm * Proof.context
23.31 - val by_abstraction: Proof.context -> thm list -> (Proof.context -> cterm ->
23.32 - thm) -> cterm -> thm
23.33 -
23.34 - (* a faster COMP *)
23.35 - type compose_data
23.36 - val precompose: (cterm -> cterm list) -> thm -> compose_data
23.37 - val precompose2: (cterm -> cterm * cterm) -> thm -> compose_data
23.38 - val compose: compose_data -> thm -> thm
23.39 -
23.40 - (* unfolding of 'distinct' *)
23.41 - val unfold_distinct_conv: conv
23.42 -
23.43 - (* simpset *)
23.44 - val make_simpset: Proof.context -> thm list -> simpset
23.45 -end
23.46 -
23.47 -structure Z3_Proof_Tools: Z3_PROOF_TOOLS =
23.48 -struct
23.49 -
23.50 -
23.51 -
23.52 -(* accessing terms *)
23.53 -
23.54 -val dest_prop = (fn @{term Trueprop} $ t => t | t => t)
23.55 -
23.56 -fun term_of ct = dest_prop (Thm.term_of ct)
23.57 -fun prop_of thm = dest_prop (Thm.prop_of thm)
23.58 -
23.59 -val mk_prop = Thm.capply @{cterm Trueprop}
23.60 -
23.61 -val (eqT, eq) = `(hd o Thm.dest_ctyp o Thm.ctyp_of_term) @{cpat "op =="}
23.62 -fun mk_meta_eq_cterm ct cu =
23.63 - let val inst = ([(eqT, Thm.ctyp_of_term ct)], [])
23.64 - in Thm.mk_binop (Thm.instantiate_cterm inst eq) ct cu end
23.65 -
23.66 -fun as_meta_eq ct = uncurry mk_meta_eq_cterm (Thm.dest_binop (Thm.dest_arg ct))
23.67 -
23.68 -
23.69 -
23.70 -(* theorem nets *)
23.71 -
23.72 -fun thm_net_of thms =
23.73 - let fun insert thm = Net.insert_term (K false) (Thm.prop_of thm, thm)
23.74 - in fold insert thms Net.empty end
23.75 -
23.76 -fun maybe_instantiate ct thm =
23.77 - try Thm.first_order_match (Thm.cprop_of thm, ct)
23.78 - |> Option.map (fn inst => Thm.instantiate inst thm)
23.79 -
23.80 -fun first_of thms ct = get_first (maybe_instantiate ct) thms
23.81 -fun net_instance net ct = first_of (Net.match_term net (Thm.term_of ct)) ct
23.82 -
23.83 -
23.84 -
23.85 -(* proof combinators *)
23.86 -
23.87 -fun under_assumption f ct =
23.88 - let val ct' = mk_prop ct
23.89 - in Thm.implies_intr ct' (f (Thm.assume ct')) end
23.90 -
23.91 -fun with_conv conv prove ct =
23.92 - let val eq = Thm.symmetric (conv ct)
23.93 - in Thm.equal_elim eq (prove (Thm.lhs_of eq)) end
23.94 -
23.95 -fun discharge p pq = Thm.implies_elim pq p
23.96 -
23.97 -fun varify vars = Drule.generalize ([], vars)
23.98 -
23.99 -fun unfold_eqs _ [] = Conv.all_conv
23.100 - | unfold_eqs ctxt eqs =
23.101 - More_Conv.top_sweep_conv (K (More_Conv.rewrs_conv eqs)) ctxt
23.102 -
23.103 -fun match_instantiate f ct thm =
23.104 - Thm.instantiate (Thm.match (f (Thm.cprop_of thm), ct)) thm
23.105 -
23.106 -fun by_tac tac ct = Goal.norm_result (Goal.prove_internal [] ct (K (tac 1)))
23.107 -
23.108 -(* |- c x == t x ==> P (c x) ~~> c == t |- P (c x) *)
23.109 -fun make_hyp_def thm ctxt =
23.110 - let
23.111 - val (lhs, rhs) = Thm.dest_binop (Thm.cprem_of thm 1)
23.112 - val (cf, cvs) = Drule.strip_comb lhs
23.113 - val eq = mk_meta_eq_cterm cf (fold_rev Thm.cabs cvs rhs)
23.114 - fun apply cv th =
23.115 - Thm.combination th (Thm.reflexive cv)
23.116 - |> Conv.fconv_rule (Conv.arg_conv (Thm.beta_conversion false))
23.117 - in
23.118 - yield_singleton Assumption.add_assumes eq ctxt
23.119 - |>> Thm.implies_elim thm o fold apply cvs
23.120 - end
23.121 -
23.122 -
23.123 -
23.124 -(* abstraction *)
23.125 -
23.126 -local
23.127 -
23.128 -fun typ_of ct = #T (Thm.rep_cterm ct)
23.129 -fun certify ctxt = Thm.cterm_of (ProofContext.theory_of ctxt)
23.130 -
23.131 -fun abs_context ctxt = (ctxt, Termtab.empty, 1, false)
23.132 -
23.133 -fun context_of (ctxt, _, _, _) = ctxt
23.134 -
23.135 -fun replace (cv, ct) = Thm.forall_elim ct o Thm.forall_intr cv
23.136 -
23.137 -fun abs_instantiate (_, tab, _, beta_norm) =
23.138 - fold replace (map snd (Termtab.dest tab)) #>
23.139 - beta_norm ? Conv.fconv_rule (Thm.beta_conversion true)
23.140 -
23.141 -fun generalize cvs =
23.142 - let
23.143 - val no_name = ""
23.144 -
23.145 - fun dest (Free (n, _)) = n
23.146 - | dest _ = no_name
23.147 -
23.148 - fun gen vs (t as Free (n, _)) =
23.149 - let val i = find_index (equal n) vs
23.150 - in
23.151 - if i >= 0 then insert (op aconvc) (nth cvs i) #> pair (Bound i)
23.152 - else pair t
23.153 - end
23.154 - | gen vs (t $ u) = gen vs t ##>> gen vs u #>> (op $)
23.155 - | gen vs (Abs (n, T, t)) =
23.156 - gen (no_name :: vs) t #>> (fn u => Abs (n, T, u))
23.157 - | gen _ t = pair t
23.158 -
23.159 - in (fn ct => gen (map (dest o Thm.term_of) cvs) (Thm.term_of ct) []) end
23.160 -
23.161 -fun fresh_abstraction cvs ct (cx as (ctxt, tab, idx, beta_norm)) =
23.162 - let val (t, cvs') = generalize cvs ct
23.163 - in
23.164 - (case Termtab.lookup tab t of
23.165 - SOME (cv, _) => (cv, cx)
23.166 - | NONE =>
23.167 - let
23.168 - val (n, ctxt') = yield_singleton Variable.variant_fixes "x" ctxt
23.169 - val cv = certify ctxt (Free (n, map typ_of cvs' ---> typ_of ct))
23.170 - val cv' = Drule.list_comb (cv, cvs')
23.171 - val e = (t, (cv, fold_rev Thm.cabs cvs' ct))
23.172 - val beta_norm' = beta_norm orelse not (null cvs')
23.173 - in (cv', (ctxt', Termtab.update e tab, idx + 1, beta_norm')) end)
23.174 - end
23.175 -
23.176 -fun abs_arg f cvs ct =
23.177 - let val (cf, cu) = Thm.dest_comb ct
23.178 - in f cvs cu #>> Thm.capply cf end
23.179 -
23.180 -fun abs_comb f g cvs ct =
23.181 - let val (cf, cu) = Thm.dest_comb ct
23.182 - in f cvs cf ##>> g cvs cu #>> uncurry Thm.capply end
23.183 -
23.184 -fun abs_list f g cvs ct =
23.185 - (case Thm.term_of ct of
23.186 - Const (@{const_name Nil}, _) => pair ct
23.187 - | Const (@{const_name Cons}, _) $ _ $ _ =>
23.188 - abs_comb (abs_arg f) (abs_list f g) cvs ct
23.189 - | _ => g cvs ct)
23.190 -
23.191 -fun abs_abs f cvs ct =
23.192 - let val (cv, cu) = Thm.dest_abs NONE ct
23.193 - in f (cv :: cvs) cu #>> Thm.cabs cv end
23.194 -
23.195 -val is_atomic = (fn _ $ _ => false | Abs _ => false | _ => true)
23.196 -val is_arithT = (fn @{typ int} => true | @{typ real} => true | _ => false)
23.197 -fun is_number t =
23.198 - (case try HOLogic.dest_number t of
23.199 - SOME (T, _) => is_arithT T
23.200 - | NONE => false)
23.201 -
23.202 -val abstract =
23.203 - let (* FIXME: provide an option to avoid abstraction of If/distinct/All/Ex *)
23.204 - fun abstr1 cvs ct = abs_arg abstr cvs ct
23.205 - and abstr2 cvs ct = abs_comb abstr1 abstr cvs ct
23.206 - and abstr3 cvs ct = abs_comb abstr2 abstr cvs ct
23.207 - and abstr_abs cvs ct = abs_arg (abs_abs abstr) cvs ct
23.208 -
23.209 - and abstr cvs ct =
23.210 - (case Thm.term_of ct of
23.211 - @{term Trueprop} $ _ => abstr1 cvs ct
23.212 - | @{term "op ==>"} $ _ $ _ => abstr2 cvs ct
23.213 - | @{term True} => pair ct
23.214 - | @{term False} => pair ct
23.215 - | @{term Not} $ _ => abstr1 cvs ct
23.216 - | @{term "op &"} $ _ $ _ => abstr2 cvs ct
23.217 - | @{term "op |"} $ _ $ _ => abstr2 cvs ct
23.218 - | @{term "op -->"} $ _ $ _ => abstr2 cvs ct
23.219 - | Const (@{const_name "op ="}, _) $ _ $ _ => abstr2 cvs ct
23.220 - | Const (@{const_name distinct}, _) $ _ =>
23.221 - abs_arg (abs_list abstr fresh_abstraction) cvs ct
23.222 - | Const (@{const_name If}, _) $ _ $ _ $ _ => abstr3 cvs ct
23.223 - | Const (@{const_name All}, _) $ _ => abstr_abs cvs ct
23.224 - | Const (@{const_name Ex}, _) $ _ => abstr_abs cvs ct
23.225 - | @{term "uminus :: int => _"} $ _ => abstr1 cvs ct
23.226 - | @{term "uminus :: real => _"} $ _ => abstr1 cvs ct
23.227 - | @{term "op + :: int => _"} $ _ $ _ => abstr2 cvs ct
23.228 - | @{term "op + :: real => _"} $ _ $ _ => abstr2 cvs ct
23.229 - | @{term "op - :: int => _"} $ _ $ _ => abstr2 cvs ct
23.230 - | @{term "op - :: real => _"} $ _ $ _ => abstr2 cvs ct
23.231 - | @{term "op * :: int => _"} $ _ $ _ => abstr2 cvs ct
23.232 - | @{term "op * :: real => _"} $ _ $ _ => abstr2 cvs ct
23.233 - | @{term "op div :: int => _"} $ _ $ _ => abstr2 cvs ct
23.234 - | @{term "op mod :: int => _"} $ _ $ _ => abstr2 cvs ct
23.235 - | @{term "op / :: real => _"} $ _ $ _ => abstr2 cvs ct
23.236 - | @{term "op < :: int => _"} $ _ $ _ => abstr2 cvs ct
23.237 - | @{term "op < :: real => _"} $ _ $ _ => abstr2 cvs ct
23.238 - | @{term "op <= :: int => _"} $ _ $ _ => abstr2 cvs ct
23.239 - | @{term "op <= :: real => _"} $ _ $ _ => abstr2 cvs ct
23.240 - | Const (@{const_name apply}, _) $ _ $ _ => abstr2 cvs ct
23.241 - | Const (@{const_name fun_upd}, _) $ _ $ _ $ _ => abstr3 cvs ct
23.242 - | t =>
23.243 - if is_atomic t orelse is_number t then pair ct
23.244 - else fresh_abstraction cvs ct)
23.245 - in abstr [] end
23.246 -
23.247 -fun with_prems thms f ct =
23.248 - fold_rev (Thm.mk_binop @{cterm "op ==>"} o Thm.cprop_of) thms ct
23.249 - |> f
23.250 - |> fold (fn prem => fn th => Thm.implies_elim th prem) thms
23.251 -
23.252 -in
23.253 -
23.254 -fun by_abstraction ctxt thms prove = with_prems thms (fn ct =>
23.255 - let val (cu, cx) = abstract ct (abs_context ctxt)
23.256 - in abs_instantiate cx (prove (context_of cx) cu) end)
23.257 -
23.258 -end
23.259 -
23.260 -
23.261 -
23.262 -(* a faster COMP *)
23.263 -
23.264 -type compose_data = cterm list * (cterm -> cterm list) * thm
23.265 -
23.266 -fun list2 (x, y) = [x, y]
23.267 -
23.268 -fun precompose f rule = (f (Thm.cprem_of rule 1), f, rule)
23.269 -fun precompose2 f rule = precompose (list2 o f) rule
23.270 -
23.271 -fun compose (cvs, f, rule) thm =
23.272 - discharge thm (Thm.instantiate ([], cvs ~~ f (Thm.cprop_of thm)) rule)
23.273 -
23.274 -
23.275 -
23.276 -(* unfolding of 'distinct' *)
23.277 -
23.278 -local
23.279 - val set1 = @{lemma "x ~: set [] == ~False" by simp}
23.280 - val set2 = @{lemma "x ~: set [x] == False" by simp}
23.281 - val set3 = @{lemma "x ~: set [y] == x ~= y" by simp}
23.282 - val set4 = @{lemma "x ~: set (x # ys) == False" by simp}
23.283 - val set5 = @{lemma "x ~: set (y # ys) == x ~= y & x ~: set ys" by simp}
23.284 -
23.285 - fun set_conv ct =
23.286 - (More_Conv.rewrs_conv [set1, set2, set3, set4] else_conv
23.287 - (Conv.rewr_conv set5 then_conv Conv.arg_conv set_conv)) ct
23.288 -
23.289 - val dist1 = @{lemma "distinct [] == ~False" by simp}
23.290 - val dist2 = @{lemma "distinct [x] == ~False" by simp}
23.291 - val dist3 = @{lemma "distinct (x # xs) == x ~: set xs & distinct xs"
23.292 - by simp}
23.293 -
23.294 - fun binop_conv cv1 cv2 = Conv.combination_conv (Conv.arg_conv cv1) cv2
23.295 -in
23.296 -fun unfold_distinct_conv ct =
23.297 - (More_Conv.rewrs_conv [dist1, dist2] else_conv
23.298 - (Conv.rewr_conv dist3 then_conv binop_conv set_conv unfold_distinct_conv)) ct
23.299 -end
23.300 -
23.301 -
23.302 -
23.303 -(* simpset *)
23.304 -
23.305 -local
23.306 - val antisym_le1 = mk_meta_eq @{thm order_class.antisym_conv}
23.307 - val antisym_le2 = mk_meta_eq @{thm linorder_class.antisym_conv2}
23.308 - val antisym_less1 = mk_meta_eq @{thm linorder_class.antisym_conv1}
23.309 - val antisym_less2 = mk_meta_eq @{thm linorder_class.antisym_conv3}
23.310 -
23.311 - fun eq_prop t thm = HOLogic.mk_Trueprop t aconv Thm.prop_of thm
23.312 - fun dest_binop ((c as Const _) $ t $ u) = (c, t, u)
23.313 - | dest_binop t = raise TERM ("dest_binop", [t])
23.314 -
23.315 - fun prove_antisym_le ss t =
23.316 - let
23.317 - val (le, r, s) = dest_binop t
23.318 - val less = Const (@{const_name less}, Term.fastype_of le)
23.319 - val prems = Simplifier.prems_of_ss ss
23.320 - in
23.321 - (case find_first (eq_prop (le $ s $ r)) prems of
23.322 - NONE =>
23.323 - find_first (eq_prop (HOLogic.mk_not (less $ r $ s))) prems
23.324 - |> Option.map (fn thm => thm RS antisym_less1)
23.325 - | SOME thm => SOME (thm RS antisym_le1))
23.326 - end
23.327 - handle THM _ => NONE
23.328 -
23.329 - fun prove_antisym_less ss t =
23.330 - let
23.331 - val (less, r, s) = dest_binop (HOLogic.dest_not t)
23.332 - val le = Const (@{const_name less_eq}, Term.fastype_of less)
23.333 - val prems = prems_of_ss ss
23.334 - in
23.335 - (case find_first (eq_prop (le $ r $ s)) prems of
23.336 - NONE =>
23.337 - find_first (eq_prop (HOLogic.mk_not (less $ s $ r))) prems
23.338 - |> Option.map (fn thm => thm RS antisym_less2)
23.339 - | SOME thm => SOME (thm RS antisym_le2))
23.340 - end
23.341 - handle THM _ => NONE
23.342 -in
23.343 -
23.344 -fun make_simpset ctxt rules = Simplifier.context ctxt (HOL_ss
23.345 - addsimps @{thms field_simps}
23.346 - addsimps [@{thm times_divide_eq_right}, @{thm times_divide_eq_left}]
23.347 - addsimps @{thms arith_special} addsimps @{thms less_bin_simps}
23.348 - addsimps @{thms le_bin_simps} addsimps @{thms eq_bin_simps}
23.349 - addsimps @{thms add_bin_simps} addsimps @{thms succ_bin_simps}
23.350 - addsimps @{thms minus_bin_simps} addsimps @{thms pred_bin_simps}
23.351 - addsimps @{thms mult_bin_simps} addsimps @{thms iszero_simps}
23.352 - addsimps @{thms array_rules}
23.353 - addsimprocs [
23.354 - Simplifier.simproc @{theory} "fast_int_arith" [
23.355 - "(m::int) < n", "(m::int) <= n", "(m::int) = n"] (K Lin_Arith.simproc),
23.356 - Simplifier.simproc @{theory} "fast_real_arith" [
23.357 - "(m::real) < n", "(m::real) <= n", "(m::real) = n"]
23.358 - (K Lin_Arith.simproc),
23.359 - Simplifier.simproc @{theory} "antisym_le" ["(x::'a::order) <= y"]
23.360 - (K prove_antisym_le),
23.361 - Simplifier.simproc @{theory} "antisym_less" ["~ (x::'a::linorder) < y"]
23.362 - (K prove_antisym_less)]
23.363 - addsimps rules)
23.364 -
23.365 -end
23.366 -
23.367 -end
24.1 --- a/src/HOL/SMT/Tools/z3_solver.ML Wed May 12 23:54:01 2010 +0200
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,80 +0,0 @@
24.4 -(* Title: HOL/SMT/Tools/z3_solver.ML
24.5 - Author: Sascha Boehme, TU Muenchen
24.6 -
24.7 -Interface of the SMT solver Z3.
24.8 -*)
24.9 -
24.10 -signature Z3_SOLVER =
24.11 -sig
24.12 - val proofs: bool Config.T
24.13 - val options: string Config.T
24.14 - val setup: theory -> theory
24.15 -end
24.16 -
24.17 -structure Z3_Solver: Z3_SOLVER =
24.18 -struct
24.19 -
24.20 -val solver_name = "z3"
24.21 -val env_var = "Z3_SOLVER"
24.22 -
24.23 -val (proofs, proofs_setup) = Attrib.config_bool "z3_proofs" (K false)
24.24 -val (options, options_setup) = Attrib.config_string "z3_options" (K "")
24.25 -
24.26 -fun add xs ys = ys @ xs
24.27 -
24.28 -fun explode_options s = String.tokens (Symbol.is_ascii_blank o str) s
24.29 -
24.30 -fun get_options ctxt =
24.31 - ["MODEL=true", "PRE_SIMPLIFY_EXPR=false", "CONTEXT_SIMPLIFIER=false"]
24.32 - |> Config.get ctxt proofs ? add ["DISPLAY_PROOF=true", "PROOF_MODE=2"]
24.33 - |> add (explode_options (Config.get ctxt options))
24.34 -
24.35 -fun pretty_config context = [
24.36 - Pretty.str ("With proofs: " ^
24.37 - (if Config.get_generic context proofs then "true" else "false")),
24.38 - Pretty.str ("Options: " ^
24.39 - space_implode " " (get_options (Context.proof_of context))) ]
24.40 -
24.41 -fun cmdline_options ctxt =
24.42 - get_options ctxt
24.43 - |> add ["-smt"]
24.44 -
24.45 -fun raise_cex real recon ls =
24.46 - let val cex = Z3_Model.parse_counterex recon ls
24.47 - in raise SMT_Solver.SMT_COUNTEREXAMPLE (real, cex) end
24.48 -
24.49 -fun if_unsat f (output, recon) =
24.50 - let
24.51 - fun jnk l =
24.52 - String.isPrefix "WARNING" l orelse
24.53 - String.isPrefix "ERROR" l orelse
24.54 - forall Symbol.is_ascii_blank (Symbol.explode l)
24.55 - val (ls, l) = the_default ([], "") (try split_last (filter_out jnk output))
24.56 - in
24.57 - if String.isPrefix "unsat" l then f (ls, recon)
24.58 - else if String.isPrefix "sat" l then raise_cex true recon ls
24.59 - else if String.isPrefix "unknown" l then raise_cex false recon ls
24.60 - else raise SMT_Solver.SMT (solver_name ^ " failed")
24.61 - end
24.62 -
24.63 -val core_oracle = if_unsat (K @{cprop False})
24.64 -
24.65 -val prover = if_unsat Z3_Proof_Reconstruction.reconstruct
24.66 -
24.67 -fun solver oracle ctxt =
24.68 - let val with_proof = Config.get ctxt proofs
24.69 - in
24.70 - {command = {env_var=env_var, remote_name=SOME solver_name},
24.71 - arguments = cmdline_options ctxt,
24.72 - interface = Z3_Interface.interface,
24.73 - reconstruct = if with_proof then prover else pair o oracle}
24.74 - end
24.75 -
24.76 -val setup =
24.77 - proofs_setup #>
24.78 - options_setup #>
24.79 - Thm.add_oracle (Binding.name solver_name, core_oracle) #-> (fn (_, oracle) =>
24.80 - SMT_Solver.add_solver (solver_name, solver oracle)) #>
24.81 - SMT_Solver.add_solver_info (solver_name, pretty_config)
24.82 -
24.83 -end
25.1 --- a/src/HOL/SMT/Z3.thy Wed May 12 23:54:01 2010 +0200
25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
25.3 @@ -1,89 +0,0 @@
25.4 -(* Title: HOL/SMT/Z3.thy
25.5 - Author: Sascha Boehme, TU Muenchen
25.6 -*)
25.7 -
25.8 -header {* Binding to the SMT solver Z3, with proof reconstruction *}
25.9 -
25.10 -theory Z3
25.11 -imports SMT_Base "~~/src/HOL/Decision_Procs/Dense_Linear_Order"
25.12 -uses
25.13 - "Tools/z3_proof_parser.ML"
25.14 - "Tools/z3_proof_tools.ML"
25.15 - "Tools/z3_proof_literals.ML"
25.16 - "Tools/z3_proof_reconstruction.ML"
25.17 - "Tools/z3_model.ML"
25.18 - "Tools/z3_interface.ML"
25.19 - "Tools/z3_solver.ML"
25.20 -begin
25.21 -
25.22 -setup {*
25.23 - Z3_Proof_Reconstruction.setup #>
25.24 - Z3_Solver.setup #>
25.25 - Arith_Data.add_tactic "Ferrante-Rackoff" (K FerranteRackoff.dlo_tac)
25.26 -*}
25.27 -
25.28 -lemmas [z3_rule] =
25.29 - refl eq_commute conj_commute disj_commute simp_thms nnf_simps
25.30 - ring_distribs field_simps times_divide_eq_right times_divide_eq_left
25.31 - if_True if_False not_not
25.32 -
25.33 -lemma [z3_rule]:
25.34 - "(P \<longrightarrow> Q) = (Q \<or> \<not>P)"
25.35 - "(\<not>P \<longrightarrow> Q) = (P \<or> Q)"
25.36 - "(\<not>P \<longrightarrow> Q) = (Q \<or> P)"
25.37 - by auto
25.38 -
25.39 -lemma [z3_rule]:
25.40 - "((P = Q) \<longrightarrow> R) = (R | (Q = (\<not>P)))"
25.41 - by auto
25.42 -
25.43 -lemma [z3_rule]:
25.44 - "((\<not>P) = P) = False"
25.45 - "(P = (\<not>P)) = False"
25.46 - "(P \<noteq> Q) = (Q = (\<not>P))"
25.47 - "(P = Q) = ((\<not>P \<or> Q) \<and> (P \<or> \<not>Q))"
25.48 - "(P \<noteq> Q) = ((\<not>P \<or> \<not>Q) \<and> (P \<or> Q))"
25.49 - by auto
25.50 -
25.51 -lemma [z3_rule]:
25.52 - "(if P then P else \<not>P) = True"
25.53 - "(if \<not>P then \<not>P else P) = True"
25.54 - "(if P then True else False) = P"
25.55 - "(if P then False else True) = (\<not>P)"
25.56 - "(if \<not>P then x else y) = (if P then y else x)"
25.57 - by auto
25.58 -
25.59 -lemma [z3_rule]:
25.60 - "P = Q \<or> P \<or> Q"
25.61 - "P = Q \<or> \<not>P \<or> \<not>Q"
25.62 - "(\<not>P) = Q \<or> \<not>P \<or> Q"
25.63 - "(\<not>P) = Q \<or> P \<or> \<not>Q"
25.64 - "P = (\<not>Q) \<or> \<not>P \<or> Q"
25.65 - "P = (\<not>Q) \<or> P \<or> \<not>Q"
25.66 - "P \<noteq> Q \<or> P \<or> \<not>Q"
25.67 - "P \<noteq> Q \<or> \<not>P \<or> Q"
25.68 - "P \<noteq> (\<not>Q) \<or> P \<or> Q"
25.69 - "(\<not>P) \<noteq> Q \<or> P \<or> Q"
25.70 - "P \<or> Q \<or> P \<noteq> (\<not>Q)"
25.71 - "P \<or> Q \<or> (\<not>P) \<noteq> Q"
25.72 - "P \<or> \<not>Q \<or> P \<noteq> Q"
25.73 - "\<not>P \<or> Q \<or> P \<noteq> Q"
25.74 - by auto
25.75 -
25.76 -lemma [z3_rule]:
25.77 - "0 + (x::int) = x"
25.78 - "x + 0 = x"
25.79 - "0 * x = 0"
25.80 - "1 * x = x"
25.81 - "x + y = y + x"
25.82 - by auto
25.83 -
25.84 -lemma [z3_rule]:
25.85 - "0 + (x::real) = x"
25.86 - "x + 0 = x"
25.87 - "0 * x = 0"
25.88 - "1 * x = x"
25.89 - "x + y = y + x"
25.90 - by auto
25.91 -
25.92 -end
26.1 --- a/src/HOL/SMT/etc/settings Wed May 12 23:54:01 2010 +0200
26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
26.3 @@ -1,14 +0,0 @@
26.4 -ISABELLE_SMT="$COMPONENT"
26.5 -
26.6 -RUN_SMT_SOLVER="$ISABELLE_SMT/lib/scripts/run_smt_solver"
26.7 -REMOTE_SMT="$ISABELLE_SMT/lib/scripts/remote_smt"
26.8 -
26.9 -REMOTE_SMT_URL="http://smt.in.tum.de/smt"
26.10 -
26.11 -#
26.12 -# Paths to local SMT solvers:
26.13 -#
26.14 -# CVC_SOLVER=PATH
26.15 -# YICES_SOLVER=PATH
26.16 -# Z3_SOLVER=PATH
26.17 -
27.1 --- a/src/HOL/SMT/lib/scripts/remote_smt Wed May 12 23:54:01 2010 +0200
27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
27.3 @@ -1,31 +0,0 @@
27.4 -#!/usr/bin/env perl
27.5 -#
27.6 -# Author: Sascha Boehme, TU Muenchen
27.7 -#
27.8 -# Invoke remote SMT solvers.
27.9 -
27.10 -use strict;
27.11 -use warnings;
27.12 -use LWP;
27.13 -
27.14 -
27.15 -# arguments
27.16 -
27.17 -my $solver = $ARGV[0];
27.18 -my @options = @ARGV[1 .. ($#ARGV - 1)];
27.19 -my $problem_file = $ARGV[-1];
27.20 -
27.21 -
27.22 -# call solver
27.23 -
27.24 -my $agent = LWP::UserAgent->new;
27.25 -$agent->agent("SMT-Request");
27.26 -$agent->timeout(180);
27.27 -my $response = $agent->post($ENV{"REMOTE_SMT_URL"}, [
27.28 - "Solver" => $solver,
27.29 - "Options" => join(" ", @options),
27.30 - "Problem" => [$problem_file] ],
27.31 - "Content_Type" => "form-data");
27.32 -if (not $response->is_success) { die "HTTP-Error: " . $response->message; }
27.33 -else { print $response->content; }
27.34 -
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/src/HOL/SMT_Examples/SMT_Examples.thy Wed May 12 23:54:02 2010 +0200
28.3 @@ -0,0 +1,587 @@
28.4 +(* Title: HOL/SMT/SMT_Examples.thy
28.5 + Author: Sascha Boehme, TU Muenchen
28.6 +*)
28.7 +
28.8 +header {* Examples for the 'smt' tactic. *}
28.9 +
28.10 +theory SMT_Examples
28.11 +imports SMT
28.12 +begin
28.13 +
28.14 +declare [[smt_solver=z3, z3_proofs=true]]
28.15 +
28.16 +declare [[smt_certificates="$ISABELLE_SMT/Examples/SMT_Examples.certs"]]
28.17 +
28.18 +text {*
28.19 +To avoid re-generation of certificates,
28.20 +the following option is set to "false":
28.21 +*}
28.22 +
28.23 +declare [[smt_fixed=true]]
28.24 +
28.25 +
28.26 +
28.27 +section {* Propositional and first-order logic *}
28.28 +
28.29 +lemma "True" by smt
28.30 +
28.31 +lemma "p \<or> \<not>p" by smt
28.32 +
28.33 +lemma "(p \<and> True) = p" by smt
28.34 +
28.35 +lemma "(p \<or> q) \<and> \<not>p \<Longrightarrow> q" by smt
28.36 +
28.37 +lemma "(a \<and> b) \<or> (c \<and> d) \<Longrightarrow> (a \<and> b) \<or> (c \<and> d)"
28.38 + using [[z3_proofs=false]] (* no Z3 proof *)
28.39 + by smt
28.40 +
28.41 +lemma "(p1 \<and> p2) \<or> p3 \<longrightarrow> (p1 \<longrightarrow> (p3 \<and> p2) \<or> (p1 \<and> p3)) \<or> p1" by smt
28.42 +
28.43 +lemma "P=P=P=P=P=P=P=P=P=P" by smt
28.44 +
28.45 +lemma
28.46 + assumes "a | b | c | d"
28.47 + and "e | f | (a & d)"
28.48 + and "~(a | (c & ~c)) | b"
28.49 + and "~(b & (x | ~x)) | c"
28.50 + and "~(d | False) | c"
28.51 + and "~(c | (~p & (p | (q & ~q))))"
28.52 + shows False
28.53 + using assms by smt
28.54 +
28.55 +axiomatization symm_f :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" where
28.56 + symm_f: "symm_f x y = symm_f y x"
28.57 +lemma "a = a \<and> symm_f a b = symm_f b a" by (smt symm_f)
28.58 +
28.59 +(*
28.60 +Taken from ~~/src/HOL/ex/SAT_Examples.thy.
28.61 +Translated from TPTP problem library: PUZ015-2.006.dimacs
28.62 +*)
28.63 +lemma
28.64 + assumes "~x0"
28.65 + and "~x30"
28.66 + and "~x29"
28.67 + and "~x59"
28.68 + and "x1 | x31 | x0"
28.69 + and "x2 | x32 | x1"
28.70 + and "x3 | x33 | x2"
28.71 + and "x4 | x34 | x3"
28.72 + and "x35 | x4"
28.73 + and "x5 | x36 | x30"
28.74 + and "x6 | x37 | x5 | x31"
28.75 + and "x7 | x38 | x6 | x32"
28.76 + and "x8 | x39 | x7 | x33"
28.77 + and "x9 | x40 | x8 | x34"
28.78 + and "x41 | x9 | x35"
28.79 + and "x10 | x42 | x36"
28.80 + and "x11 | x43 | x10 | x37"
28.81 + and "x12 | x44 | x11 | x38"
28.82 + and "x13 | x45 | x12 | x39"
28.83 + and "x14 | x46 | x13 | x40"
28.84 + and "x47 | x14 | x41"
28.85 + and "x15 | x48 | x42"
28.86 + and "x16 | x49 | x15 | x43"
28.87 + and "x17 | x50 | x16 | x44"
28.88 + and "x18 | x51 | x17 | x45"
28.89 + and "x19 | x52 | x18 | x46"
28.90 + and "x53 | x19 | x47"
28.91 + and "x20 | x54 | x48"
28.92 + and "x21 | x55 | x20 | x49"
28.93 + and "x22 | x56 | x21 | x50"
28.94 + and "x23 | x57 | x22 | x51"
28.95 + and "x24 | x58 | x23 | x52"
28.96 + and "x59 | x24 | x53"
28.97 + and "x25 | x54"
28.98 + and "x26 | x25 | x55"
28.99 + and "x27 | x26 | x56"
28.100 + and "x28 | x27 | x57"
28.101 + and "x29 | x28 | x58"
28.102 + and "~x1 | ~x31"
28.103 + and "~x1 | ~x0"
28.104 + and "~x31 | ~x0"
28.105 + and "~x2 | ~x32"
28.106 + and "~x2 | ~x1"
28.107 + and "~x32 | ~x1"
28.108 + and "~x3 | ~x33"
28.109 + and "~x3 | ~x2"
28.110 + and "~x33 | ~x2"
28.111 + and "~x4 | ~x34"
28.112 + and "~x4 | ~x3"
28.113 + and "~x34 | ~x3"
28.114 + and "~x35 | ~x4"
28.115 + and "~x5 | ~x36"
28.116 + and "~x5 | ~x30"
28.117 + and "~x36 | ~x30"
28.118 + and "~x6 | ~x37"
28.119 + and "~x6 | ~x5"
28.120 + and "~x6 | ~x31"
28.121 + and "~x37 | ~x5"
28.122 + and "~x37 | ~x31"
28.123 + and "~x5 | ~x31"
28.124 + and "~x7 | ~x38"
28.125 + and "~x7 | ~x6"
28.126 + and "~x7 | ~x32"
28.127 + and "~x38 | ~x6"
28.128 + and "~x38 | ~x32"
28.129 + and "~x6 | ~x32"
28.130 + and "~x8 | ~x39"
28.131 + and "~x8 | ~x7"
28.132 + and "~x8 | ~x33"
28.133 + and "~x39 | ~x7"
28.134 + and "~x39 | ~x33"
28.135 + and "~x7 | ~x33"
28.136 + and "~x9 | ~x40"
28.137 + and "~x9 | ~x8"
28.138 + and "~x9 | ~x34"
28.139 + and "~x40 | ~x8"
28.140 + and "~x40 | ~x34"
28.141 + and "~x8 | ~x34"
28.142 + and "~x41 | ~x9"
28.143 + and "~x41 | ~x35"
28.144 + and "~x9 | ~x35"
28.145 + and "~x10 | ~x42"
28.146 + and "~x10 | ~x36"
28.147 + and "~x42 | ~x36"
28.148 + and "~x11 | ~x43"
28.149 + and "~x11 | ~x10"
28.150 + and "~x11 | ~x37"
28.151 + and "~x43 | ~x10"
28.152 + and "~x43 | ~x37"
28.153 + and "~x10 | ~x37"
28.154 + and "~x12 | ~x44"
28.155 + and "~x12 | ~x11"
28.156 + and "~x12 | ~x38"
28.157 + and "~x44 | ~x11"
28.158 + and "~x44 | ~x38"
28.159 + and "~x11 | ~x38"
28.160 + and "~x13 | ~x45"
28.161 + and "~x13 | ~x12"
28.162 + and "~x13 | ~x39"
28.163 + and "~x45 | ~x12"
28.164 + and "~x45 | ~x39"
28.165 + and "~x12 | ~x39"
28.166 + and "~x14 | ~x46"
28.167 + and "~x14 | ~x13"
28.168 + and "~x14 | ~x40"
28.169 + and "~x46 | ~x13"
28.170 + and "~x46 | ~x40"
28.171 + and "~x13 | ~x40"
28.172 + and "~x47 | ~x14"
28.173 + and "~x47 | ~x41"
28.174 + and "~x14 | ~x41"
28.175 + and "~x15 | ~x48"
28.176 + and "~x15 | ~x42"
28.177 + and "~x48 | ~x42"
28.178 + and "~x16 | ~x49"
28.179 + and "~x16 | ~x15"
28.180 + and "~x16 | ~x43"
28.181 + and "~x49 | ~x15"
28.182 + and "~x49 | ~x43"
28.183 + and "~x15 | ~x43"
28.184 + and "~x17 | ~x50"
28.185 + and "~x17 | ~x16"
28.186 + and "~x17 | ~x44"
28.187 + and "~x50 | ~x16"
28.188 + and "~x50 | ~x44"
28.189 + and "~x16 | ~x44"
28.190 + and "~x18 | ~x51"
28.191 + and "~x18 | ~x17"
28.192 + and "~x18 | ~x45"
28.193 + and "~x51 | ~x17"
28.194 + and "~x51 | ~x45"
28.195 + and "~x17 | ~x45"
28.196 + and "~x19 | ~x52"
28.197 + and "~x19 | ~x18"
28.198 + and "~x19 | ~x46"
28.199 + and "~x52 | ~x18"
28.200 + and "~x52 | ~x46"
28.201 + and "~x18 | ~x46"
28.202 + and "~x53 | ~x19"
28.203 + and "~x53 | ~x47"
28.204 + and "~x19 | ~x47"
28.205 + and "~x20 | ~x54"
28.206 + and "~x20 | ~x48"
28.207 + and "~x54 | ~x48"
28.208 + and "~x21 | ~x55"
28.209 + and "~x21 | ~x20"
28.210 + and "~x21 | ~x49"
28.211 + and "~x55 | ~x20"
28.212 + and "~x55 | ~x49"
28.213 + and "~x20 | ~x49"
28.214 + and "~x22 | ~x56"
28.215 + and "~x22 | ~x21"
28.216 + and "~x22 | ~x50"
28.217 + and "~x56 | ~x21"
28.218 + and "~x56 | ~x50"
28.219 + and "~x21 | ~x50"
28.220 + and "~x23 | ~x57"
28.221 + and "~x23 | ~x22"
28.222 + and "~x23 | ~x51"
28.223 + and "~x57 | ~x22"
28.224 + and "~x57 | ~x51"
28.225 + and "~x22 | ~x51"
28.226 + and "~x24 | ~x58"
28.227 + and "~x24 | ~x23"
28.228 + and "~x24 | ~x52"
28.229 + and "~x58 | ~x23"
28.230 + and "~x58 | ~x52"
28.231 + and "~x23 | ~x52"
28.232 + and "~x59 | ~x24"
28.233 + and "~x59 | ~x53"
28.234 + and "~x24 | ~x53"
28.235 + and "~x25 | ~x54"
28.236 + and "~x26 | ~x25"
28.237 + and "~x26 | ~x55"
28.238 + and "~x25 | ~x55"
28.239 + and "~x27 | ~x26"
28.240 + and "~x27 | ~x56"
28.241 + and "~x26 | ~x56"
28.242 + and "~x28 | ~x27"
28.243 + and "~x28 | ~x57"
28.244 + and "~x27 | ~x57"
28.245 + and "~x29 | ~x28"
28.246 + and "~x29 | ~x58"
28.247 + and "~x28 | ~x58"
28.248 + shows False
28.249 + using assms by smt
28.250 +
28.251 +lemma "\<forall>x::int. P x \<longrightarrow> (\<forall>y::int. P x \<or> P y)"
28.252 + by smt
28.253 +
28.254 +lemma
28.255 + assumes "(\<forall>x y. P x y = x)"
28.256 + shows "(\<exists>y. P x y) = P x c"
28.257 + using assms by smt
28.258 +
28.259 +lemma
28.260 + assumes "(\<forall>x y. P x y = x)"
28.261 + and "(\<forall>x. \<exists>y. P x y) = (\<forall>x. P x c)"
28.262 + shows "(EX y. P x y) = P x c"
28.263 + using assms by smt
28.264 +
28.265 +lemma
28.266 + assumes "if P x then \<not>(\<exists>y. P y) else (\<forall>y. \<not>P y)"
28.267 + shows "P x \<longrightarrow> P y"
28.268 + using assms by smt
28.269 +
28.270 +
28.271 +section {* Arithmetic *}
28.272 +
28.273 +subsection {* Linear arithmetic over integers and reals *}
28.274 +
28.275 +lemma "(3::int) = 3" by smt
28.276 +
28.277 +lemma "(3::real) = 3" by smt
28.278 +
28.279 +lemma "(3 :: int) + 1 = 4" by smt
28.280 +
28.281 +lemma "x + (y + z) = y + (z + (x::int))" by smt
28.282 +
28.283 +lemma "max (3::int) 8 > 5" by smt
28.284 +
28.285 +lemma "abs (x :: real) + abs y \<ge> abs (x + y)" by smt
28.286 +
28.287 +lemma "P ((2::int) < 3) = P True" by smt
28.288 +
28.289 +lemma "x + 3 \<ge> 4 \<or> x < (1::int)" by smt
28.290 +
28.291 +lemma
28.292 + assumes "x \<ge> (3::int)" and "y = x + 4"
28.293 + shows "y - x > 0"
28.294 + using assms by smt
28.295 +
28.296 +lemma "let x = (2 :: int) in x + x \<noteq> 5" by smt
28.297 +
28.298 +lemma
28.299 + fixes x :: real
28.300 + assumes "3 * x + 7 * a < 4" and "3 < 2 * x"
28.301 + shows "a < 0"
28.302 + using assms by smt
28.303 +
28.304 +lemma "(0 \<le> y + -1 * x \<or> \<not> 0 \<le> x \<or> 0 \<le> (x::int)) = (\<not> False)" by smt
28.305 +
28.306 +lemma "distinct [x < (3::int), 3 \<le> x]" by smt
28.307 +
28.308 +lemma
28.309 + assumes "a > (0::int)"
28.310 + shows "distinct [a, a * 2, a - a]"
28.311 + using assms by smt
28.312 +
28.313 +lemma "
28.314 + (n < m & m < n') | (n < m & m = n') | (n < n' & n' < m) |
28.315 + (n = n' & n' < m) | (n = m & m < n') |
28.316 + (n' < m & m < n) | (n' < m & m = n) |
28.317 + (n' < n & n < m) | (n' = n & n < m) | (n' = m & m < n) |
28.318 + (m < n & n < n') | (m < n & n' = n) | (m < n' & n' < n) |
28.319 + (m = n & n < n') | (m = n' & n' < n) |
28.320 + (n' = m & m = (n::int))"
28.321 + by smt
28.322 +
28.323 +text{*
28.324 +The following example was taken from HOL/ex/PresburgerEx.thy, where it says:
28.325 +
28.326 + This following theorem proves that all solutions to the
28.327 + recurrence relation $x_{i+2} = |x_{i+1}| - x_i$ are periodic with
28.328 + period 9. The example was brought to our attention by John
28.329 + Harrison. It does does not require Presburger arithmetic but merely
28.330 + quantifier-free linear arithmetic and holds for the rationals as well.
28.331 +
28.332 + Warning: it takes (in 2006) over 4.2 minutes!
28.333 +
28.334 +There, it is proved by "arith". SMT is able to prove this within a fraction
28.335 +of one second. With proof reconstruction, it takes about 13 seconds on a Core2
28.336 +processor.
28.337 +*}
28.338 +
28.339 +lemma "\<lbrakk> x3 = abs x2 - x1; x4 = abs x3 - x2; x5 = abs x4 - x3;
28.340 + x6 = abs x5 - x4; x7 = abs x6 - x5; x8 = abs x7 - x6;
28.341 + x9 = abs x8 - x7; x10 = abs x9 - x8; x11 = abs x10 - x9 \<rbrakk>
28.342 + \<Longrightarrow> x1 = x10 & x2 = (x11::int)"
28.343 + by smt
28.344 +
28.345 +
28.346 +lemma "let P = 2 * x + 1 > x + (x::real) in P \<or> False \<or> P" by smt
28.347 +
28.348 +lemma "x + (let y = x mod 2 in 2 * y + 1) \<ge> x + (1::int)" by smt
28.349 +
28.350 +lemma "x + (let y = x mod 2 in y + y) < x + (3::int)" by smt
28.351 +
28.352 +lemma
28.353 + assumes "x \<noteq> (0::real)"
28.354 + shows "x + x \<noteq> (let P = (abs x > 1) in if P \<or> \<not>P then 4 else 2) * x"
28.355 + using assms by smt
28.356 +
28.357 +lemma
28.358 + assumes "(n + m) mod 2 = 0" and "n mod 4 = 3"
28.359 + shows "n mod 2 = 1 & m mod 2 = (1::int)"
28.360 + using assms by smt
28.361 +
28.362 +
28.363 +subsection {* Linear arithmetic with quantifiers *}
28.364 +
28.365 +lemma "~ (\<exists>x::int. False)" by smt
28.366 +
28.367 +lemma "~ (\<exists>x::real. False)" by smt
28.368 +
28.369 +lemma "\<exists>x::int. 0 < x"
28.370 + using [[z3_proofs=false]] (* no Z3 proof *)
28.371 + by smt
28.372 +
28.373 +lemma "\<exists>x::real. 0 < x"
28.374 + using [[z3_proofs=false]] (* no Z3 proof *)
28.375 + by smt
28.376 +
28.377 +lemma "\<forall>x::int. \<exists>y. y > x"
28.378 + using [[z3_proofs=false]] (* no Z3 proof *)
28.379 + by smt
28.380 +
28.381 +lemma "\<forall>x y::int. (x = 0 \<and> y = 1) \<longrightarrow> x \<noteq> y" by smt
28.382 +
28.383 +lemma "\<exists>x::int. \<forall>y. x < y \<longrightarrow> y < 0 \<or> y >= 0" by smt
28.384 +
28.385 +lemma "\<forall>x y::int. x < y \<longrightarrow> (2 * x + 1) < (2 * y)" by smt
28.386 +
28.387 +lemma "\<forall>x y::int. (2 * x + 1) \<noteq> (2 * y)" by smt
28.388 +
28.389 +lemma "\<forall>x y::int. x + y > 2 \<or> x + y = 2 \<or> x + y < 2" by smt
28.390 +
28.391 +lemma "\<forall>x::int. if x > 0 then x + 1 > 0 else 1 > x" by smt
28.392 +
28.393 +lemma "if (ALL x::int. x < 0 \<or> x > 0) then False else True" by smt
28.394 +
28.395 +lemma "(if (ALL x::int. x < 0 \<or> x > 0) then -1 else 3) > (0::int)" by smt
28.396 +
28.397 +lemma "~ (\<exists>x y z::int. 4 * x + -6 * y = (1::int))" by smt
28.398 +
28.399 +lemma "\<exists>x::int. \<forall>x y. 0 < x \<and> 0 < y \<longrightarrow> (0::int) < x + y" by smt
28.400 +
28.401 +lemma "\<exists>u::int. \<forall>(x::int) y::real. 0 < x \<and> 0 < y \<longrightarrow> -1 < x" by smt
28.402 +
28.403 +lemma "\<exists>x::int. (\<forall>y. y \<ge> x \<longrightarrow> y > 0) \<longrightarrow> x > 0" by smt
28.404 +
28.405 +lemma "\<forall>x::int. trigger [pat x] (x < a \<longrightarrow> 2 * x < 2 * a)" by smt
28.406 +
28.407 +
28.408 +subsection {* Non-linear arithmetic over integers and reals *}
28.409 +
28.410 +lemma "a > (0::int) \<Longrightarrow> a*b > 0 \<Longrightarrow> b > 0"
28.411 + using [[z3_proofs=false]] -- {* Isabelle's arithmetic decision procedures
28.412 + are too weak to automatically prove @{thm zero_less_mult_pos}. *}
28.413 + by smt
28.414 +
28.415 +lemma "(a::int) * (x + 1 + y) = a * x + a * (y + 1)" by smt
28.416 +
28.417 +lemma "((x::real) * (1 + y) - x * (1 - y)) = (2 * x * y)" by smt
28.418 +
28.419 +lemma
28.420 + "(U::int) + (1 + p) * (b + e) + p * d =
28.421 + U + (2 * (1 + p) * (b + e) + (1 + p) * d + d * p) - (1 + p) * (b + d + e)"
28.422 + by smt
28.423 +
28.424 +
28.425 +subsection {* Linear arithmetic for natural numbers *}
28.426 +
28.427 +lemma "2 * (x::nat) ~= 1" by smt
28.428 +
28.429 +lemma "a < 3 \<Longrightarrow> (7::nat) > 2 * a" by smt
28.430 +
28.431 +lemma "let x = (1::nat) + y in x - y > 0 * x" by smt
28.432 +
28.433 +lemma
28.434 + "let x = (1::nat) + y in
28.435 + let P = (if x > 0 then True else False) in
28.436 + False \<or> P = (x - 1 = y) \<or> (\<not>P \<longrightarrow> False)"
28.437 + by smt
28.438 +
28.439 +lemma "distinct [a + (1::nat), a * 2 + 3, a - a]" by smt
28.440 +
28.441 +lemma "int (nat \<bar>x::int\<bar>) = \<bar>x\<bar>" by smt
28.442 +
28.443 +definition prime_nat :: "nat \<Rightarrow> bool" where
28.444 + "prime_nat p = (1 < p \<and> (\<forall>m. m dvd p --> m = 1 \<or> m = p))"
28.445 +lemma "prime_nat (4*m + 1) \<Longrightarrow> m \<ge> (1::nat)" by (smt prime_nat_def)
28.446 +
28.447 +
28.448 +section {* Bitvectors *}
28.449 +
28.450 +locale z3_bv_test
28.451 +begin
28.452 +
28.453 +text {*
28.454 +The following examples only work for Z3, and only without proof reconstruction.
28.455 +*}
28.456 +
28.457 +declare [[smt_solver=z3, z3_proofs=false]]
28.458 +
28.459 +
28.460 +subsection {* Bitvector arithmetic *}
28.461 +
28.462 +lemma "(27 :: 4 word) = -5" by smt
28.463 +
28.464 +lemma "(27 :: 4 word) = 11" by smt
28.465 +
28.466 +lemma "23 < (27::8 word)" by smt
28.467 +
28.468 +lemma "27 + 11 = (6::5 word)" by smt
28.469 +
28.470 +lemma "7 * 3 = (21::8 word)" by smt
28.471 +
28.472 +lemma "11 - 27 = (-16::8 word)" by smt
28.473 +
28.474 +lemma "- -11 = (11::5 word)" by smt
28.475 +
28.476 +lemma "-40 + 1 = (-39::7 word)" by smt
28.477 +
28.478 +lemma "a + 2 * b + c - b = (b + c) + (a :: 32 word)" by smt
28.479 +
28.480 +lemma "x = (5 :: 4 word) \<Longrightarrow> 4 * x = 4" by smt
28.481 +
28.482 +
28.483 +subsection {* Bit-level logic *}
28.484 +
28.485 +lemma "0b110 AND 0b101 = (0b100 :: 32 word)" by smt
28.486 +
28.487 +lemma "0b110 OR 0b011 = (0b111 :: 8 word)" by smt
28.488 +
28.489 +lemma "0xF0 XOR 0xFF = (0x0F :: 8 word)" by smt
28.490 +
28.491 +lemma "NOT (0xF0 :: 16 word) = 0xFF0F" by smt
28.492 +
28.493 +lemma "word_cat (27::4 word) (27::8 word) = (2843::12 word)" by smt
28.494 +
28.495 +lemma "word_cat (0b0011::4 word) (0b1111::6word) = (0b0011001111 :: 10 word)"
28.496 + by smt
28.497 +
28.498 +lemma "slice 1 (0b10110 :: 4 word) = (0b11 :: 2 word)" by smt
28.499 +
28.500 +lemma "ucast (0b1010 :: 4 word) = (0b1010 :: 10 word)" by smt
28.501 +
28.502 +lemma "scast (0b1010 :: 4 word) = (0b111010 :: 6 word)" by smt
28.503 +
28.504 +lemma "bv_lshr 0b10011 2 = (0b100::8 word)" by smt
28.505 +
28.506 +lemma "bv_ashr 0b10011 2 = (0b100::8 word)" by smt
28.507 +
28.508 +lemma "word_rotr 2 0b0110 = (0b1001::4 word)" by smt
28.509 +
28.510 +lemma "word_rotl 1 0b1110 = (0b1101::4 word)" by smt
28.511 +
28.512 +lemma "(x AND 0xff00) OR (x AND 0x00ff) = (x::16 word)" by smt
28.513 +
28.514 +lemma "w < 256 \<Longrightarrow> (w :: 16 word) AND 0x00FF = w" by smt
28.515 +
28.516 +end
28.517 +
28.518 +lemma
28.519 + assumes "bv2int 0 = 0"
28.520 + and "bv2int 1 = 1"
28.521 + and "bv2int 2 = 2"
28.522 + and "bv2int 3 = 3"
28.523 + and "\<forall>x::2 word. bv2int x > 0"
28.524 + shows "\<forall>i::int. i < 0 \<longrightarrow> (\<forall>x::2 word. bv2int x > i)"
28.525 + using assms
28.526 + using [[smt_solver=z3]]
28.527 + by smt
28.528 +
28.529 +lemma "P (0 \<le> (a :: 4 word)) = P True"
28.530 + using [[smt_solver=z3, z3_proofs=false]]
28.531 + by smt
28.532 +
28.533 +
28.534 +section {* Pairs *}
28.535 +
28.536 +lemma "fst (x, y) = a \<Longrightarrow> x = a" by smt
28.537 +
28.538 +lemma "p1 = (x, y) \<and> p2 = (y, x) \<Longrightarrow> fst p1 = snd p2" by smt
28.539 +
28.540 +
28.541 +section {* Higher-order problems and recursion *}
28.542 +
28.543 +lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> (f (i1 := v1, i2 := v2)) i = f i" by smt
28.544 +
28.545 +lemma "(f g (x::'a::type) = (g x \<and> True)) \<or> (f g x = True) \<or> (g x = True)"
28.546 + by smt
28.547 +
28.548 +lemma "id 3 = 3 \<and> id True = True" by (smt id_def)
28.549 +
28.550 +lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> ((f (i1 := v1)) (i2 := v2)) i = f i" by smt
28.551 +
28.552 +lemma "map (\<lambda>i::nat. i + 1) [0, 1] = [1, 2]" by (smt map.simps)
28.553 +
28.554 +lemma "(ALL x. P x) | ~ All P" by smt
28.555 +
28.556 +fun dec_10 :: "nat \<Rightarrow> nat" where
28.557 + "dec_10 n = (if n < 10 then n else dec_10 (n - 10))"
28.558 +lemma "dec_10 (4 * dec_10 4) = 6" by (smt dec_10.simps)
28.559 +
28.560 +axiomatization
28.561 + eval_dioph :: "int list \<Rightarrow> nat list \<Rightarrow> int"
28.562 + where
28.563 + eval_dioph_mod:
28.564 + "eval_dioph ks xs mod int n = eval_dioph ks (map (\<lambda>x. x mod n) xs) mod int n"
28.565 + and
28.566 + eval_dioph_div_mult:
28.567 + "eval_dioph ks (map (\<lambda>x. x div n) xs) * int n +
28.568 + eval_dioph ks (map (\<lambda>x. x mod n) xs) = eval_dioph ks xs"
28.569 +lemma
28.570 + "(eval_dioph ks xs = l) =
28.571 + (eval_dioph ks (map (\<lambda>x. x mod 2) xs) mod 2 = l mod 2 \<and>
28.572 + eval_dioph ks (map (\<lambda>x. x div 2) xs) =
28.573 + (l - eval_dioph ks (map (\<lambda>x. x mod 2) xs)) div 2)"
28.574 + by (smt eval_dioph_mod[where n=2] eval_dioph_div_mult[where n=2])
28.575 +
28.576 +
28.577 +section {* Monomorphization examples *}
28.578 +
28.579 +definition P :: "'a \<Rightarrow> bool" where "P x = True"
28.580 +lemma poly_P: "P x \<and> (P [x] \<or> \<not>P[x])" by (simp add: P_def)
28.581 +lemma "P (1::int)" by (smt poly_P)
28.582 +
28.583 +consts g :: "'a \<Rightarrow> nat"
28.584 +axioms
28.585 + g1: "g (Some x) = g [x]"
28.586 + g2: "g None = g []"
28.587 + g3: "g xs = length xs"
28.588 +lemma "g (Some (3::int)) = g (Some True)" by (smt g1 g2 g3 list.size)
28.589 +
28.590 +end
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/src/HOL/Tools/SMT/cvc3_solver.ML Wed May 12 23:54:02 2010 +0200
29.3 @@ -0,0 +1,48 @@
29.4 +(* Title: HOL/Tools/SMT/cvc3_solver.ML
29.5 + Author: Sascha Boehme, TU Muenchen
29.6 +
29.7 +Interface of the SMT solver CVC3.
29.8 +*)
29.9 +
29.10 +signature CVC3_SOLVER =
29.11 +sig
29.12 + val setup: theory -> theory
29.13 +end
29.14 +
29.15 +structure CVC3_Solver: CVC3_SOLVER =
29.16 +struct
29.17 +
29.18 +val solver_name = "cvc3"
29.19 +val env_var = "CVC3_SOLVER"
29.20 +
29.21 +val options = ["-lang", "smtlib", "-output-lang", "presentation"]
29.22 +
29.23 +val is_sat = String.isPrefix "Satisfiable."
29.24 +val is_unsat = String.isPrefix "Unsatisfiable."
29.25 +val is_unknown = String.isPrefix "Unknown."
29.26 +
29.27 +fun raise_cex real = raise SMT_Solver.SMT_COUNTEREXAMPLE (real, [])
29.28 +
29.29 +fun core_oracle (output, _) =
29.30 + let
29.31 + val empty_line = (fn "" => true | _ => false)
29.32 + val split_first = (fn [] => ("", []) | l :: ls => (l, ls))
29.33 + val (l, _) = split_first (dropwhile empty_line output)
29.34 + in
29.35 + if is_unsat l then @{cprop False}
29.36 + else if is_sat l then raise_cex true
29.37 + else if is_unknown l then raise_cex false
29.38 + else raise SMT_Solver.SMT (solver_name ^ " failed")
29.39 + end
29.40 +
29.41 +fun smtlib_solver oracle _ = {
29.42 + command = {env_var=env_var, remote_name=SOME solver_name},
29.43 + arguments = options,
29.44 + interface = SMTLIB_Interface.interface,
29.45 + reconstruct = pair o oracle }
29.46 +
29.47 +val setup =
29.48 + Thm.add_oracle (Binding.name solver_name, core_oracle) #-> (fn (_, oracle) =>
29.49 + SMT_Solver.add_solver (solver_name, smtlib_solver oracle))
29.50 +
29.51 +end
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/src/HOL/Tools/SMT/etc/settings Wed May 12 23:54:02 2010 +0200
30.3 @@ -0,0 +1,13 @@
30.4 +ISABELLE_SMT="$COMPONENT"
30.5 +
30.6 +REMOTE_SMT="$ISABELLE_SMT/lib/scripts/remote_smt"
30.7 +
30.8 +REMOTE_SMT_URL="http://smt.in.tum.de/smt"
30.9 +
30.10 +#
30.11 +# Paths to local SMT solvers:
30.12 +#
30.13 +# CVC_SOLVER=PATH
30.14 +# YICES_SOLVER=PATH
30.15 +# Z3_SOLVER=PATH
30.16 +
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/src/HOL/Tools/SMT/lib/scripts/remote_smt Wed May 12 23:54:02 2010 +0200
31.3 @@ -0,0 +1,31 @@
31.4 +#!/usr/bin/env perl
31.5 +#
31.6 +# Author: Sascha Boehme, TU Muenchen
31.7 +#
31.8 +# Invoke remote SMT solvers.
31.9 +
31.10 +use strict;
31.11 +use warnings;
31.12 +use LWP;
31.13 +
31.14 +
31.15 +# arguments
31.16 +
31.17 +my $solver = $ARGV[0];
31.18 +my @options = @ARGV[1 .. ($#ARGV - 1)];
31.19 +my $problem_file = $ARGV[-1];
31.20 +
31.21 +
31.22 +# call solver
31.23 +
31.24 +my $agent = LWP::UserAgent->new;
31.25 +$agent->agent("SMT-Request");
31.26 +$agent->timeout(180);
31.27 +my $response = $agent->post($ENV{"REMOTE_SMT_URL"}, [
31.28 + "Solver" => $solver,
31.29 + "Options" => join(" ", @options),
31.30 + "Problem" => [$problem_file] ],
31.31 + "Content_Type" => "form-data");
31.32 +if (not $response->is_success) { die "HTTP-Error: " . $response->message; }
31.33 +else { print $response->content; }
31.34 +
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/src/HOL/Tools/SMT/smt_monomorph.ML Wed May 12 23:54:02 2010 +0200
32.3 @@ -0,0 +1,201 @@
32.4 +(* Title: HOL/Tools/SMT/smt_monomorph.ML
32.5 + Author: Sascha Boehme, TU Muenchen
32.6 +
32.7 +Monomorphization of theorems, i.e., computation of all (necessary) instances.
32.8 +*)
32.9 +
32.10 +signature SMT_MONOMORPH =
32.11 +sig
32.12 + val monomorph: thm list -> Proof.context -> thm list * Proof.context
32.13 +end
32.14 +
32.15 +structure SMT_Monomorph: SMT_MONOMORPH =
32.16 +struct
32.17 +
32.18 +val typ_has_tvars = Term.exists_subtype (fn TVar _ => true | _ => false)
32.19 +
32.20 +val ignored = member (op =) [
32.21 + @{const_name All}, @{const_name Ex}, @{const_name Let}, @{const_name If},
32.22 + @{const_name "op ="}, @{const_name zero_class.zero},
32.23 + @{const_name one_class.one}, @{const_name number_of}]
32.24 +
32.25 +fun is_const f (n, T) = not (ignored n) andalso f T
32.26 +fun add_const_if f g (Const c) = if is_const f c then g c else I
32.27 + | add_const_if _ _ _ = I
32.28 +
32.29 +fun collect_consts_if f g thm =
32.30 + Term.fold_aterms (add_const_if f g) (Thm.prop_of thm)
32.31 +
32.32 +fun add_consts f =
32.33 + collect_consts_if f (fn (n, T) => Symtab.map_entry n (insert (op =) T))
32.34 +
32.35 +val insert_const = OrdList.insert (prod_ord fast_string_ord Term_Ord.typ_ord)
32.36 +fun tvar_consts_of thm = collect_consts_if typ_has_tvars insert_const thm []
32.37 +
32.38 +
32.39 +fun incr_indexes thms =
32.40 + let fun inc thm idx = (Thm.incr_indexes idx thm, Thm.maxidx_of thm + idx + 1)
32.41 + in fst (fold_map inc thms 0) end
32.42 +
32.43 +
32.44 +(* Compute all substitutions from the types "Ts" to all relevant
32.45 + types in "grounds", with respect to the given substitution. *)
32.46 +fun new_substitutions thy grounds (n, T) subst =
32.47 + if not (typ_has_tvars T) then [subst]
32.48 + else
32.49 + Symtab.lookup_list grounds n
32.50 + |> map_filter (try (fn U => Sign.typ_match thy (T, U) subst))
32.51 + |> cons subst
32.52 +
32.53 +
32.54 +(* Instantiate a set of constants with a substitution. Also collect
32.55 + all new ground instances for the next round of specialization. *)
32.56 +fun apply_subst grounds consts subst =
32.57 + let
32.58 + fun is_new_ground (n, T) = not (typ_has_tvars T) andalso
32.59 + not (member (op =) (Symtab.lookup_list grounds n) T)
32.60 +
32.61 + fun apply_const (n, T) new_grounds =
32.62 + let val c = (n, Envir.subst_type subst T)
32.63 + in
32.64 + new_grounds
32.65 + |> is_new_ground c ? Symtab.insert_list (op =) c
32.66 + |> pair c
32.67 + end
32.68 + in fold_map apply_const consts #>> pair subst end
32.69 +
32.70 +
32.71 +(* Compute new substitutions for the theorem "thm", based on
32.72 + previously found substitutions.
32.73 + Also collect new grounds, i.e., instantiated constants
32.74 + (without schematic types) which do not occur in any of the
32.75 + previous rounds. Note that thus no schematic type variables are
32.76 + shared among theorems. *)
32.77 +fun specialize thy all_grounds new_grounds (thm, scs) =
32.78 + let
32.79 + fun spec (subst, consts) next_grounds =
32.80 + [subst]
32.81 + |> fold (maps o new_substitutions thy new_grounds) consts
32.82 + |> rpair next_grounds
32.83 + |-> fold_map (apply_subst all_grounds consts)
32.84 + in
32.85 + fold_map spec scs #>> (fn scss =>
32.86 + (thm, fold (fold (insert (eq_snd (op =)))) scss []))
32.87 + end
32.88 +
32.89 +
32.90 +(* Compute all necessary substitutions.
32.91 + Instead of operating on the propositions of the theorems, the
32.92 + computation uses only the constants occurring with schematic type
32.93 + variables in the propositions. To ease comparisons, such sets of
32.94 + costants are always kept in their initial order. *)
32.95 +fun incremental_monomorph thy limit all_grounds new_grounds ths =
32.96 + let
32.97 + val all_grounds' = Symtab.merge_list (op =) (all_grounds, new_grounds)
32.98 + val spec = specialize thy all_grounds' new_grounds
32.99 + val (ths', new_grounds') = fold_map spec ths Symtab.empty
32.100 + in
32.101 + if Symtab.is_empty new_grounds' then ths'
32.102 + else if limit > 0
32.103 + then incremental_monomorph thy (limit-1) all_grounds' new_grounds' ths'
32.104 + else (warning "SMT: monomorphization limit reached"; ths')
32.105 + end
32.106 +
32.107 +
32.108 +fun filter_most_specific thy =
32.109 + let
32.110 + fun typ_match (_, T) (_, U) = Sign.typ_match thy (T, U)
32.111 +
32.112 + fun is_trivial subst = Vartab.is_empty subst orelse
32.113 + forall (fn (v, (S, T)) => TVar (v, S) = T) (Vartab.dest subst)
32.114 +
32.115 + fun match general specific =
32.116 + (case try (fold2 typ_match general specific) Vartab.empty of
32.117 + NONE => false
32.118 + | SOME subst => not (is_trivial subst))
32.119 +
32.120 + fun most_specific _ [] = []
32.121 + | most_specific css ((ss, cs) :: scs) =
32.122 + let val substs = most_specific (cs :: css) scs
32.123 + in
32.124 + if exists (match cs) css orelse exists (match cs o snd) scs
32.125 + then substs else ss :: substs
32.126 + end
32.127 +
32.128 + in most_specific [] end
32.129 +
32.130 +
32.131 +fun instantiate thy Tenv =
32.132 + let
32.133 + fun replace (v, (_, T)) (U as TVar (u, _)) = if u = v then T else U
32.134 + | replace _ T = T
32.135 +
32.136 + fun complete (vT as (v, _)) subst =
32.137 + subst
32.138 + |> not (Vartab.defined subst v) ? Vartab.update vT
32.139 + |> Vartab.map (apsnd (Term.map_atyps (replace vT)))
32.140 +
32.141 + fun cert (ix, (S, T)) = pairself (Thm.ctyp_of thy) (TVar (ix, S), T)
32.142 +
32.143 + fun inst thm subst =
32.144 + let val cTs = Vartab.fold (cons o cert) (fold complete Tenv subst) []
32.145 + in Thm.instantiate (cTs, []) thm end
32.146 +
32.147 + in uncurry (map o inst) end
32.148 +
32.149 +
32.150 +fun mono_all ctxt _ [] monos = (monos, ctxt)
32.151 + | mono_all ctxt limit polys monos =
32.152 + let
32.153 + fun invent_types thm ctxt =
32.154 + let val (vs, Ss) = split_list (Term.add_tvars (Thm.prop_of thm) [])
32.155 + in
32.156 + ctxt
32.157 + |> Variable.invent_types Ss
32.158 + |>> map2 (fn v => fn (n, S) => (v, (S, TFree (n, S)))) vs
32.159 + end
32.160 + val (Tenvs, ctxt') = fold_map invent_types polys ctxt
32.161 +
32.162 + val thy = ProofContext.theory_of ctxt'
32.163 +
32.164 + val ths = polys
32.165 + |> map (fn thm => (thm, [(Vartab.empty, tvar_consts_of thm)]))
32.166 +
32.167 + (* all constant names occurring with schematic types *)
32.168 + val ns = fold (fold (fold (insert (op =) o fst) o snd) o snd) ths []
32.169 +
32.170 + (* all known instances with non-schematic types *)
32.171 + val grounds =
32.172 + Symtab.make (map (rpair []) ns)
32.173 + |> fold (add_consts (K true)) monos
32.174 + |> fold (add_consts (not o typ_has_tvars)) polys
32.175 + in
32.176 + polys
32.177 + |> map (fn thm => (thm, [(Vartab.empty, tvar_consts_of thm)]))
32.178 + |> incremental_monomorph thy limit Symtab.empty grounds
32.179 + |> map (apsnd (filter_most_specific thy))
32.180 + |> flat o map2 (instantiate thy) Tenvs
32.181 + |> append monos
32.182 + |> rpair ctxt'
32.183 + end
32.184 +
32.185 +
32.186 +val monomorph_limit = 10
32.187 +
32.188 +
32.189 +(* Instantiate all polymorphic constants (i.e., constants occurring
32.190 + both with ground types and type variables) with all (necessary)
32.191 + ground types; thereby create copies of theorems containing those
32.192 + constants.
32.193 + To prevent non-termination, there is an upper limit for the
32.194 + number of recursions involved in the fixpoint construction.
32.195 + The initial set of theorems must not contain any schematic term
32.196 + variables, and the final list of theorems does not contain any
32.197 + schematic type variables anymore. *)
32.198 +fun monomorph thms ctxt =
32.199 + thms
32.200 + |> List.partition (Term.exists_type typ_has_tvars o Thm.prop_of)
32.201 + |>> incr_indexes
32.202 + |-> mono_all ctxt monomorph_limit
32.203 +
32.204 +end
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/src/HOL/Tools/SMT/smt_normalize.ML Wed May 12 23:54:02 2010 +0200
33.3 @@ -0,0 +1,448 @@
33.4 +(* Title: HOL/Tools/SMT/smt_normalize.ML
33.5 + Author: Sascha Boehme, TU Muenchen
33.6 +
33.7 +Normalization steps on theorems required by SMT solvers:
33.8 + * simplify trivial distincts (those with less than three elements),
33.9 + * rewrite bool case expressions as if expressions,
33.10 + * normalize numerals (e.g. replace negative numerals by negated positive
33.11 + numerals),
33.12 + * embed natural numbers into integers,
33.13 + * add extra rules specifying types and constants which occur frequently,
33.14 + * fully translate into object logic, add universal closure,
33.15 + * lift lambda terms,
33.16 + * make applications explicit for functions with varying number of arguments.
33.17 +*)
33.18 +
33.19 +signature SMT_NORMALIZE =
33.20 +sig
33.21 + type extra_norm = thm list -> Proof.context -> thm list * Proof.context
33.22 + val normalize: extra_norm -> thm list -> Proof.context ->
33.23 + thm list * Proof.context
33.24 + val eta_expand_conv: (Proof.context -> conv) -> Proof.context -> conv
33.25 +end
33.26 +
33.27 +structure SMT_Normalize: SMT_NORMALIZE =
33.28 +struct
33.29 +
33.30 +infix 2 ??
33.31 +fun (test ?? f) x = if test x then f x else x
33.32 +
33.33 +fun if_conv c cv1 cv2 ct = (if c (Thm.term_of ct) then cv1 else cv2) ct
33.34 +fun if_true_conv c cv = if_conv c cv Conv.all_conv
33.35 +
33.36 +
33.37 +
33.38 +(* simplification of trivial distincts (distinct should have at least
33.39 + three elements in the argument list) *)
33.40 +
33.41 +local
33.42 + fun is_trivial_distinct (Const (@{const_name distinct}, _) $ t) =
33.43 + length (HOLogic.dest_list t) <= 2
33.44 + | is_trivial_distinct _ = false
33.45 +
33.46 + val thms = @{lemma
33.47 + "distinct [] == True"
33.48 + "distinct [x] == True"
33.49 + "distinct [x, y] == (x ~= y)"
33.50 + by simp_all}
33.51 + fun distinct_conv _ =
33.52 + if_true_conv is_trivial_distinct (More_Conv.rewrs_conv thms)
33.53 +in
33.54 +fun trivial_distinct ctxt =
33.55 + map ((Term.exists_subterm is_trivial_distinct o Thm.prop_of) ??
33.56 + Conv.fconv_rule (More_Conv.top_conv distinct_conv ctxt))
33.57 +end
33.58 +
33.59 +
33.60 +
33.61 +(* rewrite bool case expressions as if expressions *)
33.62 +
33.63 +local
33.64 + val is_bool_case = (fn
33.65 + Const (@{const_name "bool.bool_case"}, _) $ _ $ _ $ _ => true
33.66 + | _ => false)
33.67 +
33.68 + val thms = @{lemma
33.69 + "(case P of True => x | False => y) == (if P then x else y)"
33.70 + "(case P of False => y | True => x) == (if P then x else y)"
33.71 + by (rule eq_reflection, simp)+}
33.72 + val unfold_conv = if_true_conv is_bool_case (More_Conv.rewrs_conv thms)
33.73 +in
33.74 +fun rewrite_bool_cases ctxt =
33.75 + map ((Term.exists_subterm is_bool_case o Thm.prop_of) ??
33.76 + Conv.fconv_rule (More_Conv.top_conv (K unfold_conv) ctxt))
33.77 +end
33.78 +
33.79 +
33.80 +
33.81 +(* normalization of numerals: rewriting of negative integer numerals into
33.82 + positive numerals, Numeral0 into 0, Numeral1 into 1 *)
33.83 +
33.84 +local
33.85 + fun is_number_sort ctxt T =
33.86 + Sign.of_sort (ProofContext.theory_of ctxt) (T, @{sort number_ring})
33.87 +
33.88 + fun is_strange_number ctxt (t as Const (@{const_name number_of}, _) $ _) =
33.89 + (case try HOLogic.dest_number t of
33.90 + SOME (T, i) => is_number_sort ctxt T andalso i < 2
33.91 + | NONE => false)
33.92 + | is_strange_number _ _ = false
33.93 +
33.94 + val pos_numeral_ss = HOL_ss
33.95 + addsimps [@{thm Int.number_of_minus}, @{thm Int.number_of_Min}]
33.96 + addsimps [@{thm Int.number_of_Pls}, @{thm Int.numeral_1_eq_1}]
33.97 + addsimps @{thms Int.pred_bin_simps}
33.98 + addsimps @{thms Int.normalize_bin_simps}
33.99 + addsimps @{lemma
33.100 + "Int.Min = - Int.Bit1 Int.Pls"
33.101 + "Int.Bit0 (- Int.Pls) = - Int.Pls"
33.102 + "Int.Bit0 (- k) = - Int.Bit0 k"
33.103 + "Int.Bit1 (- k) = - Int.Bit1 (Int.pred k)"
33.104 + by simp_all (simp add: pred_def)}
33.105 +
33.106 + fun pos_conv ctxt = if_conv (is_strange_number ctxt)
33.107 + (Simplifier.rewrite (Simplifier.context ctxt pos_numeral_ss))
33.108 + Conv.no_conv
33.109 +in
33.110 +fun normalize_numerals ctxt =
33.111 + map ((Term.exists_subterm (is_strange_number ctxt) o Thm.prop_of) ??
33.112 + Conv.fconv_rule (More_Conv.top_sweep_conv pos_conv ctxt))
33.113 +end
33.114 +
33.115 +
33.116 +
33.117 +(* embedding of standard natural number operations into integer operations *)
33.118 +
33.119 +local
33.120 + val nat_embedding = @{lemma
33.121 + "nat (int n) = n"
33.122 + "i >= 0 --> int (nat i) = i"
33.123 + "i < 0 --> int (nat i) = 0"
33.124 + by simp_all}
33.125 +
33.126 + val nat_rewriting = @{lemma
33.127 + "0 = nat 0"
33.128 + "1 = nat 1"
33.129 + "number_of i = nat (number_of i)"
33.130 + "int (nat 0) = 0"
33.131 + "int (nat 1) = 1"
33.132 + "a < b = (int a < int b)"
33.133 + "a <= b = (int a <= int b)"
33.134 + "Suc a = nat (int a + 1)"
33.135 + "a + b = nat (int a + int b)"
33.136 + "a - b = nat (int a - int b)"
33.137 + "a * b = nat (int a * int b)"
33.138 + "a div b = nat (int a div int b)"
33.139 + "a mod b = nat (int a mod int b)"
33.140 + "min a b = nat (min (int a) (int b))"
33.141 + "max a b = nat (max (int a) (int b))"
33.142 + "int (nat (int a + int b)) = int a + int b"
33.143 + "int (nat (int a * int b)) = int a * int b"
33.144 + "int (nat (int a div int b)) = int a div int b"
33.145 + "int (nat (int a mod int b)) = int a mod int b"
33.146 + "int (nat (min (int a) (int b))) = min (int a) (int b)"
33.147 + "int (nat (max (int a) (int b))) = max (int a) (int b)"
33.148 + by (simp_all add: nat_mult_distrib nat_div_distrib nat_mod_distrib
33.149 + int_mult[symmetric] zdiv_int[symmetric] zmod_int[symmetric])}
33.150 +
33.151 + fun on_positive num f x =
33.152 + (case try HOLogic.dest_number (Thm.term_of num) of
33.153 + SOME (_, i) => if i >= 0 then SOME (f x) else NONE
33.154 + | NONE => NONE)
33.155 +
33.156 + val cancel_int_nat_ss = HOL_ss
33.157 + addsimps [@{thm Nat_Numeral.nat_number_of}]
33.158 + addsimps [@{thm Nat_Numeral.int_nat_number_of}]
33.159 + addsimps @{thms neg_simps}
33.160 +
33.161 + fun cancel_int_nat_simproc _ ss ct =
33.162 + let
33.163 + val num = Thm.dest_arg (Thm.dest_arg ct)
33.164 + val goal = Thm.mk_binop @{cterm "op == :: int => _"} ct num
33.165 + val simpset = Simplifier.inherit_context ss cancel_int_nat_ss
33.166 + fun tac _ = Simplifier.simp_tac simpset 1
33.167 + in on_positive num (Goal.prove_internal [] goal) tac end
33.168 +
33.169 + val nat_ss = HOL_ss
33.170 + addsimps nat_rewriting
33.171 + addsimprocs [Simplifier.make_simproc {
33.172 + name = "cancel_int_nat_num", lhss = [@{cpat "int (nat _)"}],
33.173 + proc = cancel_int_nat_simproc, identifier = [] }]
33.174 +
33.175 + fun conv ctxt = Simplifier.rewrite (Simplifier.context ctxt nat_ss)
33.176 +
33.177 + val uses_nat_type = Term.exists_type (Term.exists_subtype (equal @{typ nat}))
33.178 + val uses_nat_int =
33.179 + Term.exists_subterm (member (op aconv) [@{term int}, @{term nat}])
33.180 +in
33.181 +fun nat_as_int ctxt =
33.182 + map ((uses_nat_type o Thm.prop_of) ?? Conv.fconv_rule (conv ctxt)) #>
33.183 + exists (uses_nat_int o Thm.prop_of) ?? append nat_embedding
33.184 +end
33.185 +
33.186 +
33.187 +
33.188 +(* further normalizations: beta/eta, universal closure, atomize *)
33.189 +
33.190 +val eta_expand_eq = @{lemma "f == (%x. f x)" by (rule reflexive)}
33.191 +
33.192 +fun eta_expand_conv cv ctxt =
33.193 + Conv.rewr_conv eta_expand_eq then_conv Conv.abs_conv (cv o snd) ctxt
33.194 +
33.195 +local
33.196 + val eta_conv = eta_expand_conv
33.197 +
33.198 + fun keep_conv ctxt = More_Conv.binder_conv norm_conv ctxt
33.199 + and eta_binder_conv ctxt = Conv.arg_conv (eta_conv norm_conv ctxt)
33.200 + and keep_let_conv ctxt = Conv.combination_conv
33.201 + (Conv.arg_conv (norm_conv ctxt)) (Conv.abs_conv (norm_conv o snd) ctxt)
33.202 + and unfold_let_conv ctxt = Conv.combination_conv
33.203 + (Conv.arg_conv (norm_conv ctxt)) (eta_conv norm_conv ctxt)
33.204 + and unfold_conv thm ctxt = Conv.rewr_conv thm then_conv keep_conv ctxt
33.205 + and unfold_ex1_conv ctxt = unfold_conv @{thm Ex1_def} ctxt
33.206 + and unfold_ball_conv ctxt = unfold_conv @{thm Ball_def} ctxt
33.207 + and unfold_bex_conv ctxt = unfold_conv @{thm Bex_def} ctxt
33.208 + and norm_conv ctxt ct =
33.209 + (case Thm.term_of ct of
33.210 + Const (@{const_name All}, _) $ Abs _ => keep_conv
33.211 + | Const (@{const_name All}, _) $ _ => eta_binder_conv
33.212 + | Const (@{const_name All}, _) => eta_conv eta_binder_conv
33.213 + | Const (@{const_name Ex}, _) $ Abs _ => keep_conv
33.214 + | Const (@{const_name Ex}, _) $ _ => eta_binder_conv
33.215 + | Const (@{const_name Ex}, _) => eta_conv eta_binder_conv
33.216 + | Const (@{const_name Let}, _) $ _ $ Abs _ => keep_let_conv
33.217 + | Const (@{const_name Let}, _) $ _ $ _ => unfold_let_conv
33.218 + | Const (@{const_name Let}, _) $ _ => eta_conv unfold_let_conv
33.219 + | Const (@{const_name Let}, _) => eta_conv (eta_conv unfold_let_conv)
33.220 + | Const (@{const_name Ex1}, _) $ _ => unfold_ex1_conv
33.221 + | Const (@{const_name Ex1}, _) => eta_conv unfold_ex1_conv
33.222 + | Const (@{const_name Ball}, _) $ _ $ _ => unfold_ball_conv
33.223 + | Const (@{const_name Ball}, _) $ _ => eta_conv unfold_ball_conv
33.224 + | Const (@{const_name Ball}, _) => eta_conv (eta_conv unfold_ball_conv)
33.225 + | Const (@{const_name Bex}, _) $ _ $ _ => unfold_bex_conv
33.226 + | Const (@{const_name Bex}, _) $ _ => eta_conv unfold_bex_conv
33.227 + | Const (@{const_name Bex}, _) => eta_conv (eta_conv unfold_bex_conv)
33.228 + | Abs _ => Conv.abs_conv (norm_conv o snd)
33.229 + | _ $ _ => Conv.comb_conv o norm_conv
33.230 + | _ => K Conv.all_conv) ctxt ct
33.231 +
33.232 + fun is_normed t =
33.233 + (case t of
33.234 + Const (@{const_name All}, _) $ Abs (_, _, u) => is_normed u
33.235 + | Const (@{const_name All}, _) $ _ => false
33.236 + | Const (@{const_name All}, _) => false
33.237 + | Const (@{const_name Ex}, _) $ Abs (_, _, u) => is_normed u
33.238 + | Const (@{const_name Ex}, _) $ _ => false
33.239 + | Const (@{const_name Ex}, _) => false
33.240 + | Const (@{const_name Let}, _) $ u1 $ Abs (_, _, u2) =>
33.241 + is_normed u1 andalso is_normed u2
33.242 + | Const (@{const_name Let}, _) $ _ $ _ => false
33.243 + | Const (@{const_name Let}, _) $ _ => false
33.244 + | Const (@{const_name Let}, _) => false
33.245 + | Const (@{const_name Ex1}, _) => false
33.246 + | Const (@{const_name Ball}, _) => false
33.247 + | Const (@{const_name Bex}, _) => false
33.248 + | Abs (_, _, u) => is_normed u
33.249 + | u1 $ u2 => is_normed u1 andalso is_normed u2
33.250 + | _ => true)
33.251 +in
33.252 +fun norm_binder_conv ctxt = if_conv is_normed Conv.all_conv (norm_conv ctxt)
33.253 +end
33.254 +
33.255 +fun norm_def ctxt thm =
33.256 + (case Thm.prop_of thm of
33.257 + @{term Trueprop} $ (Const (@{const_name "op ="}, _) $ _ $ Abs _) =>
33.258 + norm_def ctxt (thm RS @{thm fun_cong})
33.259 + | Const (@{const_name "=="}, _) $ _ $ Abs _ =>
33.260 + norm_def ctxt (thm RS @{thm meta_eq_to_obj_eq})
33.261 + | _ => thm)
33.262 +
33.263 +fun atomize_conv ctxt ct =
33.264 + (case Thm.term_of ct of
33.265 + @{term "op ==>"} $ _ $ _ =>
33.266 + Conv.binop_conv (atomize_conv ctxt) then_conv
33.267 + Conv.rewr_conv @{thm atomize_imp}
33.268 + | Const (@{const_name "=="}, _) $ _ $ _ =>
33.269 + Conv.binop_conv (atomize_conv ctxt) then_conv
33.270 + Conv.rewr_conv @{thm atomize_eq}
33.271 + | Const (@{const_name all}, _) $ Abs _ =>
33.272 + More_Conv.binder_conv atomize_conv ctxt then_conv
33.273 + Conv.rewr_conv @{thm atomize_all}
33.274 + | _ => Conv.all_conv) ct
33.275 +
33.276 +fun normalize_rule ctxt =
33.277 + Conv.fconv_rule (
33.278 + (* reduce lambda abstractions, except at known binders: *)
33.279 + Thm.beta_conversion true then_conv
33.280 + Thm.eta_conversion then_conv
33.281 + norm_binder_conv ctxt) #>
33.282 + norm_def ctxt #>
33.283 + Drule.forall_intr_vars #>
33.284 + Conv.fconv_rule (atomize_conv ctxt)
33.285 +
33.286 +
33.287 +
33.288 +(* lift lambda terms into additional rules *)
33.289 +
33.290 +local
33.291 + val meta_eq = @{cpat "op =="}
33.292 + val meta_eqT = hd (Thm.dest_ctyp (Thm.ctyp_of_term meta_eq))
33.293 + fun inst_meta cT = Thm.instantiate_cterm ([(meta_eqT, cT)], []) meta_eq
33.294 + fun mk_meta_eq ct cu = Thm.mk_binop (inst_meta (Thm.ctyp_of_term ct)) ct cu
33.295 +
33.296 + fun cert ctxt = Thm.cterm_of (ProofContext.theory_of ctxt)
33.297 +
33.298 + fun used_vars cvs ct =
33.299 + let
33.300 + val lookup = AList.lookup (op aconv) (map (` Thm.term_of) cvs)
33.301 + val add = (fn SOME ct => insert (op aconvc) ct | _ => I)
33.302 + in Term.fold_aterms (add o lookup) (Thm.term_of ct) [] end
33.303 +
33.304 + fun apply cv thm =
33.305 + let val thm' = Thm.combination thm (Thm.reflexive cv)
33.306 + in Thm.transitive thm' (Thm.beta_conversion false (Thm.rhs_of thm')) end
33.307 + fun apply_def cvs eq = Thm.symmetric (fold apply cvs eq)
33.308 +
33.309 + fun replace_lambda cvs ct (cx as (ctxt, defs)) =
33.310 + let
33.311 + val cvs' = used_vars cvs ct
33.312 + val ct' = fold_rev Thm.cabs cvs' ct
33.313 + in
33.314 + (case Termtab.lookup defs (Thm.term_of ct') of
33.315 + SOME eq => (apply_def cvs' eq, cx)
33.316 + | NONE =>
33.317 + let
33.318 + val {T, ...} = Thm.rep_cterm ct' and n = Name.uu
33.319 + val (n', ctxt') = yield_singleton Variable.variant_fixes n ctxt
33.320 + val cu = mk_meta_eq (cert ctxt (Free (n', T))) ct'
33.321 + val (eq, ctxt'') = yield_singleton Assumption.add_assumes cu ctxt'
33.322 + val defs' = Termtab.update (Thm.term_of ct', eq) defs
33.323 + in (apply_def cvs' eq, (ctxt'', defs')) end)
33.324 + end
33.325 +
33.326 + fun none ct cx = (Thm.reflexive ct, cx)
33.327 + fun in_comb f g ct cx =
33.328 + let val (cu1, cu2) = Thm.dest_comb ct
33.329 + in cx |> f cu1 ||>> g cu2 |>> uncurry Thm.combination end
33.330 + fun in_arg f = in_comb none f
33.331 + fun in_abs f cvs ct (ctxt, defs) =
33.332 + let
33.333 + val (n, ctxt') = yield_singleton Variable.variant_fixes Name.uu ctxt
33.334 + val (cv, cu) = Thm.dest_abs (SOME n) ct
33.335 + in (ctxt', defs) |> f (cv :: cvs) cu |>> Thm.abstract_rule n cv end
33.336 +
33.337 + fun traverse cvs ct =
33.338 + (case Thm.term_of ct of
33.339 + Const (@{const_name All}, _) $ Abs _ => in_arg (in_abs traverse cvs)
33.340 + | Const (@{const_name Ex}, _) $ Abs _ => in_arg (in_abs traverse cvs)
33.341 + | Const (@{const_name Let}, _) $ _ $ Abs _ =>
33.342 + in_comb (in_arg (traverse cvs)) (in_abs traverse cvs)
33.343 + | Abs _ => at_lambda cvs
33.344 + | _ $ _ => in_comb (traverse cvs) (traverse cvs)
33.345 + | _ => none) ct
33.346 +
33.347 + and at_lambda cvs ct =
33.348 + in_abs traverse cvs ct #-> (fn thm =>
33.349 + replace_lambda cvs (Thm.rhs_of thm) #>> Thm.transitive thm)
33.350 +
33.351 + fun has_free_lambdas t =
33.352 + (case t of
33.353 + Const (@{const_name All}, _) $ Abs (_, _, u) => has_free_lambdas u
33.354 + | Const (@{const_name Ex}, _) $ Abs (_, _, u) => has_free_lambdas u
33.355 + | Const (@{const_name Let}, _) $ u1 $ Abs (_, _, u2) =>
33.356 + has_free_lambdas u1 orelse has_free_lambdas u2
33.357 + | Abs _ => true
33.358 + | u1 $ u2 => has_free_lambdas u1 orelse has_free_lambdas u2
33.359 + | _ => false)
33.360 +
33.361 + fun lift_lm f thm cx =
33.362 + if not (has_free_lambdas (Thm.prop_of thm)) then (thm, cx)
33.363 + else cx |> f (Thm.cprop_of thm) |>> (fn thm' => Thm.equal_elim thm' thm)
33.364 +in
33.365 +fun lift_lambdas thms ctxt =
33.366 + let
33.367 + val cx = (ctxt, Termtab.empty)
33.368 + val (thms', (ctxt', defs)) = fold_map (lift_lm (traverse [])) thms cx
33.369 + val eqs = Termtab.fold (cons o normalize_rule ctxt' o snd) defs []
33.370 + in (eqs @ thms', ctxt') end
33.371 +end
33.372 +
33.373 +
33.374 +
33.375 +(* make application explicit for functions with varying number of arguments *)
33.376 +
33.377 +local
33.378 + val const = prefix "c" and free = prefix "f"
33.379 + fun min i (e as (_, j)) = if i <> j then (true, Int.min (i, j)) else e
33.380 + fun add t i = Symtab.map_default (t, (false, i)) (min i)
33.381 + fun traverse t =
33.382 + (case Term.strip_comb t of
33.383 + (Const (n, _), ts) => add (const n) (length ts) #> fold traverse ts
33.384 + | (Free (n, _), ts) => add (free n) (length ts) #> fold traverse ts
33.385 + | (Abs (_, _, u), ts) => fold traverse (u :: ts)
33.386 + | (_, ts) => fold traverse ts)
33.387 + val prune = (fn (n, (true, i)) => Symtab.update (n, i) | _ => I)
33.388 + fun prune_tab tab = Symtab.fold prune tab Symtab.empty
33.389 +
33.390 + fun binop_conv cv1 cv2 = Conv.combination_conv (Conv.arg_conv cv1) cv2
33.391 + fun nary_conv conv1 conv2 ct =
33.392 + (Conv.combination_conv (nary_conv conv1 conv2) conv2 else_conv conv1) ct
33.393 + fun abs_conv conv tb = Conv.abs_conv (fn (cv, cx) =>
33.394 + let val n = fst (Term.dest_Free (Thm.term_of cv))
33.395 + in conv (Symtab.update (free n, 0) tb) cx end)
33.396 + val apply_rule = @{lemma "f x == apply f x" by (simp add: apply_def)}
33.397 +in
33.398 +fun explicit_application ctxt thms =
33.399 + let
33.400 + fun sub_conv tb ctxt ct =
33.401 + (case Term.strip_comb (Thm.term_of ct) of
33.402 + (Const (n, _), ts) => app_conv tb (const n) (length ts) ctxt
33.403 + | (Free (n, _), ts) => app_conv tb (free n) (length ts) ctxt
33.404 + | (Abs _, _) => nary_conv (abs_conv sub_conv tb ctxt) (sub_conv tb ctxt)
33.405 + | (_, _) => nary_conv Conv.all_conv (sub_conv tb ctxt)) ct
33.406 + and app_conv tb n i ctxt =
33.407 + (case Symtab.lookup tb n of
33.408 + NONE => nary_conv Conv.all_conv (sub_conv tb ctxt)
33.409 + | SOME j => apply_conv tb ctxt (i - j))
33.410 + and apply_conv tb ctxt i ct = (
33.411 + if i = 0 then nary_conv Conv.all_conv (sub_conv tb ctxt)
33.412 + else
33.413 + Conv.rewr_conv apply_rule then_conv
33.414 + binop_conv (apply_conv tb ctxt (i-1)) (sub_conv tb ctxt)) ct
33.415 +
33.416 + fun needs_exp_app tab = Term.exists_subterm (fn
33.417 + Bound _ $ _ => true
33.418 + | Const (n, _) => Symtab.defined tab (const n)
33.419 + | Free (n, _) => Symtab.defined tab (free n)
33.420 + | _ => false)
33.421 +
33.422 + fun rewrite tab ctxt thm =
33.423 + if not (needs_exp_app tab (Thm.prop_of thm)) then thm
33.424 + else Conv.fconv_rule (sub_conv tab ctxt) thm
33.425 +
33.426 + val tab = prune_tab (fold (traverse o Thm.prop_of) thms Symtab.empty)
33.427 + in map (rewrite tab ctxt) thms end
33.428 +end
33.429 +
33.430 +
33.431 +
33.432 +(* combined normalization *)
33.433 +
33.434 +type extra_norm = thm list -> Proof.context -> thm list * Proof.context
33.435 +
33.436 +fun with_context f thms ctxt = (f ctxt thms, ctxt)
33.437 +
33.438 +fun normalize extra_norm thms ctxt =
33.439 + thms
33.440 + |> trivial_distinct ctxt
33.441 + |> rewrite_bool_cases ctxt
33.442 + |> normalize_numerals ctxt
33.443 + |> nat_as_int ctxt
33.444 + |> rpair ctxt
33.445 + |-> extra_norm
33.446 + |-> with_context (fn cx => map (normalize_rule cx))
33.447 + |-> SMT_Monomorph.monomorph
33.448 + |-> lift_lambdas
33.449 + |-> with_context explicit_application
33.450 +
33.451 +end
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
34.2 +++ b/src/HOL/Tools/SMT/smt_solver.ML Wed May 12 23:54:02 2010 +0200
34.3 @@ -0,0 +1,360 @@
34.4 +(* Title: HOL/Tools/SMT/smt_solver.ML
34.5 + Author: Sascha Boehme, TU Muenchen
34.6 +
34.7 +SMT solvers registry and SMT tactic.
34.8 +*)
34.9 +
34.10 +signature SMT_SOLVER =
34.11 +sig
34.12 + exception SMT of string
34.13 + exception SMT_COUNTEREXAMPLE of bool * term list
34.14 +
34.15 + type interface = {
34.16 + extra_norm: SMT_Normalize.extra_norm,
34.17 + translate: SMT_Translate.config }
34.18 + type solver_config = {
34.19 + command: {env_var: string, remote_name: string option},
34.20 + arguments: string list,
34.21 + interface: interface,
34.22 + reconstruct: (string list * SMT_Translate.recon) -> Proof.context ->
34.23 + thm * Proof.context }
34.24 +
34.25 + (*options*)
34.26 + val timeout: int Config.T
34.27 + val with_timeout: Proof.context -> ('a -> 'b) -> 'a -> 'b
34.28 + val trace: bool Config.T
34.29 + val trace_msg: Proof.context -> ('a -> string) -> 'a -> unit
34.30 +
34.31 + (*certificates*)
34.32 + val fixed_certificates: bool Config.T
34.33 + val select_certificates: string -> Context.generic -> Context.generic
34.34 +
34.35 + (*solvers*)
34.36 + type solver = Proof.context -> thm list -> thm
34.37 + type solver_info = Context.generic -> Pretty.T list
34.38 + val add_solver: string * (Proof.context -> solver_config) -> theory ->
34.39 + theory
34.40 + val all_solver_names_of: theory -> string list
34.41 + val add_solver_info: string * solver_info -> theory -> theory
34.42 + val solver_name_of: Context.generic -> string
34.43 + val select_solver: string -> Context.generic -> Context.generic
34.44 + val solver_of: Context.generic -> solver
34.45 +
34.46 + (*tactic*)
34.47 + val smt_tac': bool -> Proof.context -> thm list -> int -> Tactical.tactic
34.48 + val smt_tac: Proof.context -> thm list -> int -> Tactical.tactic
34.49 +
34.50 + (*setup*)
34.51 + val setup: theory -> theory
34.52 + val print_setup: Context.generic -> unit
34.53 +end
34.54 +
34.55 +structure SMT_Solver: SMT_SOLVER =
34.56 +struct
34.57 +
34.58 +exception SMT of string
34.59 +exception SMT_COUNTEREXAMPLE of bool * term list
34.60 +
34.61 +
34.62 +type interface = {
34.63 + extra_norm: SMT_Normalize.extra_norm,
34.64 + translate: SMT_Translate.config }
34.65 +
34.66 +type solver_config = {
34.67 + command: {env_var: string, remote_name: string option},
34.68 + arguments: string list,
34.69 + interface: interface,
34.70 + reconstruct: (string list * SMT_Translate.recon) -> Proof.context ->
34.71 + thm * Proof.context }
34.72 +
34.73 +
34.74 +
34.75 +(* SMT options *)
34.76 +
34.77 +val (timeout, setup_timeout) = Attrib.config_int "smt_timeout" (K 30)
34.78 +
34.79 +fun with_timeout ctxt f x =
34.80 + TimeLimit.timeLimit (Time.fromSeconds (Config.get ctxt timeout)) f x
34.81 + handle TimeLimit.TimeOut => raise SMT "timeout"
34.82 +
34.83 +val (trace, setup_trace) = Attrib.config_bool "smt_trace" (K false)
34.84 +
34.85 +fun trace_msg ctxt f x =
34.86 + if Config.get ctxt trace then tracing (f x) else ()
34.87 +
34.88 +
34.89 +
34.90 +(* SMT certificates *)
34.91 +
34.92 +val (fixed_certificates, setup_fixed_certificates) =
34.93 + Attrib.config_bool "smt_fixed" (K false)
34.94 +
34.95 +structure Certificates = Generic_Data
34.96 +(
34.97 + type T = Cache_IO.cache option
34.98 + val empty = NONE
34.99 + val extend = I
34.100 + fun merge (s, _) = s
34.101 +)
34.102 +
34.103 +val get_certificates_path =
34.104 + Option.map (Cache_IO.cache_path_of) o Certificates.get
34.105 +
34.106 +fun select_certificates name = Certificates.put (
34.107 + if name = "" then NONE
34.108 + else SOME (Cache_IO.make (Path.explode name)))
34.109 +
34.110 +
34.111 +
34.112 +(* interface to external solvers *)
34.113 +
34.114 +local
34.115 +
34.116 +fun choose {env_var, remote_name} =
34.117 + let
34.118 + val local_solver = getenv env_var
34.119 + val remote_solver = the_default "" remote_name
34.120 + val remote_url = getenv "REMOTE_SMT_URL"
34.121 + in
34.122 + if local_solver <> ""
34.123 + then
34.124 + (tracing ("Invoking local SMT solver " ^ quote local_solver ^ " ...");
34.125 + [local_solver])
34.126 + else if remote_solver <> ""
34.127 + then
34.128 + (tracing ("Invoking remote SMT solver " ^ quote remote_solver ^ " at " ^
34.129 + quote remote_url ^ " ...");
34.130 + [getenv "REMOTE_SMT", remote_solver])
34.131 + else error ("Undefined Isabelle environment variable: " ^ quote env_var)
34.132 + end
34.133 +
34.134 +fun make_cmd solver args problem_path proof_path = space_implode " " (
34.135 + map File.shell_quote (solver @ args) @
34.136 + [File.shell_path problem_path, "2>&1", ">", File.shell_path proof_path])
34.137 +
34.138 +fun run ctxt cmd args input =
34.139 + (case Certificates.get (Context.Proof ctxt) of
34.140 + NONE => Cache_IO.run (make_cmd (choose cmd) args) input
34.141 + | SOME certs =>
34.142 + (case Cache_IO.lookup certs input of
34.143 + (NONE, key) =>
34.144 + if Config.get ctxt fixed_certificates
34.145 + then error ("Bad certificates cache: missing certificate")
34.146 + else Cache_IO.run_and_cache certs key (make_cmd (choose cmd) args)
34.147 + input
34.148 + | (SOME output, _) =>
34.149 + (tracing ("Using cached certificate from " ^
34.150 + File.shell_path (Cache_IO.cache_path_of certs) ^ " ...");
34.151 + output)))
34.152 +
34.153 +in
34.154 +
34.155 +fun run_solver ctxt cmd args input =
34.156 + let
34.157 + fun pretty tag ls = Pretty.string_of (Pretty.big_list tag
34.158 + (map Pretty.str ls))
34.159 +
34.160 + val _ = trace_msg ctxt (pretty "SMT problem:" o split_lines) input
34.161 +
34.162 + val (res, err) = with_timeout ctxt (run ctxt cmd args) input
34.163 + val _ = trace_msg ctxt (pretty "SMT solver:") err
34.164 +
34.165 + val ls = rev (dropwhile (equal "") (rev res))
34.166 + val _ = trace_msg ctxt (pretty "SMT result:") ls
34.167 + in ls end
34.168 +
34.169 +end
34.170 +
34.171 +fun trace_recon_data ctxt {typs, terms, ...} =
34.172 + let
34.173 + fun pretty_eq n p = Pretty.block [Pretty.str n, Pretty.str " = ", p]
34.174 + fun pretty_typ (n, T) = pretty_eq n (Syntax.pretty_typ ctxt T)
34.175 + fun pretty_term (n, t) = pretty_eq n (Syntax.pretty_term ctxt t)
34.176 + in
34.177 + trace_msg ctxt (fn () => Pretty.string_of (Pretty.big_list "SMT names:" [
34.178 + Pretty.big_list "sorts:" (map pretty_typ (Symtab.dest typs)),
34.179 + Pretty.big_list "functions:" (map pretty_term (Symtab.dest terms))])) ()
34.180 + end
34.181 +
34.182 +fun invoke translate_config comments command arguments thms ctxt =
34.183 + thms
34.184 + |> SMT_Translate.translate translate_config ctxt comments
34.185 + ||> tap (trace_recon_data ctxt)
34.186 + |>> run_solver ctxt command arguments
34.187 + |> rpair ctxt
34.188 +
34.189 +fun discharge_definitions thm =
34.190 + if Thm.nprems_of thm = 0 then thm
34.191 + else discharge_definitions (@{thm reflexive} RS thm)
34.192 +
34.193 +fun gen_solver name solver ctxt prems =
34.194 + let
34.195 + val {command, arguments, interface, reconstruct} = solver ctxt
34.196 + val comments = ("solver: " ^ name) ::
34.197 + ("timeout: " ^ string_of_int (Config.get ctxt timeout)) ::
34.198 + "arguments:" :: arguments
34.199 + val {extra_norm, translate} = interface
34.200 + in
34.201 + (prems, ctxt)
34.202 + |-> SMT_Normalize.normalize extra_norm
34.203 + |-> invoke translate comments command arguments
34.204 + |-> reconstruct
34.205 + |-> (fn thm => fn ctxt' => thm
34.206 + |> singleton (ProofContext.export ctxt' ctxt)
34.207 + |> discharge_definitions)
34.208 + end
34.209 +
34.210 +
34.211 +
34.212 +(* solver store *)
34.213 +
34.214 +type solver = Proof.context -> thm list -> thm
34.215 +type solver_info = Context.generic -> Pretty.T list
34.216 +
34.217 +structure Solvers = Theory_Data
34.218 +(
34.219 + type T = ((Proof.context -> solver_config) * solver_info) Symtab.table
34.220 + val empty = Symtab.empty
34.221 + val extend = I
34.222 + fun merge data = Symtab.merge (K true) data
34.223 + handle Symtab.DUP name => error ("Duplicate SMT solver: " ^ quote name)
34.224 +)
34.225 +
34.226 +val no_solver = "(none)"
34.227 +val add_solver = Solvers.map o Symtab.update_new o apsnd (rpair (K []))
34.228 +val all_solver_names_of = Symtab.keys o Solvers.get
34.229 +val lookup_solver = Symtab.lookup o Solvers.get
34.230 +fun add_solver_info (n, i) = Solvers.map (Symtab.map_entry n (apsnd (K i)))
34.231 +
34.232 +
34.233 +
34.234 +(* selected solver *)
34.235 +
34.236 +structure Selected_Solver = Generic_Data
34.237 +(
34.238 + type T = string
34.239 + val empty = no_solver
34.240 + val extend = I
34.241 + fun merge (s, _) = s
34.242 +)
34.243 +
34.244 +val solver_name_of = Selected_Solver.get
34.245 +
34.246 +fun select_solver name context =
34.247 + if is_none (lookup_solver (Context.theory_of context) name)
34.248 + then error ("SMT solver not registered: " ^ quote name)
34.249 + else Selected_Solver.map (K name) context
34.250 +
34.251 +fun raw_solver_of context name =
34.252 + (case lookup_solver (Context.theory_of context) name of
34.253 + NONE => error "No SMT solver selected"
34.254 + | SOME (s, _) => s)
34.255 +
34.256 +fun solver_of context =
34.257 + let val name = solver_name_of context
34.258 + in gen_solver name (raw_solver_of context name) end
34.259 +
34.260 +
34.261 +
34.262 +(* SMT tactic *)
34.263 +
34.264 +local
34.265 + fun pretty_cex ctxt (real, ex) =
34.266 + let
34.267 + val msg = if real then "SMT: counterexample found"
34.268 + else "SMT: potential counterexample found"
34.269 + in
34.270 + if null ex then msg ^ "."
34.271 + else Pretty.string_of (Pretty.big_list (msg ^ ":")
34.272 + (map (Syntax.pretty_term ctxt) ex))
34.273 + end
34.274 +
34.275 + fun fail_tac f msg st = (f msg; Tactical.no_tac st)
34.276 +
34.277 + fun SAFE pass_exns tac ctxt i st =
34.278 + if pass_exns then tac ctxt i st
34.279 + else (tac ctxt i st
34.280 + handle SMT msg => fail_tac (trace_msg ctxt (prefix "SMT: ")) msg st
34.281 + | SMT_COUNTEREXAMPLE ce => fail_tac tracing (pretty_cex ctxt ce) st)
34.282 +
34.283 + fun smt_solver rules ctxt = solver_of (Context.Proof ctxt) ctxt rules
34.284 +
34.285 + val has_topsort = Term.exists_type (Term.exists_subtype (fn
34.286 + TFree (_, []) => true
34.287 + | TVar (_, []) => true
34.288 + | _ => false))
34.289 +in
34.290 +fun smt_tac' pass_exns ctxt rules =
34.291 + Tactic.rtac @{thm ccontr} THEN'
34.292 + SUBPROOF (fn {context, prems, ...} =>
34.293 + let val thms = rules @ prems
34.294 + in
34.295 + if exists (has_topsort o Thm.prop_of) thms
34.296 + then fail_tac (trace_msg context I)
34.297 + "SMT: proof state contains the universal sort {}"
34.298 + else SAFE pass_exns (Tactic.rtac o smt_solver thms) context 1
34.299 + end) ctxt
34.300 +
34.301 +val smt_tac = smt_tac' false
34.302 +end
34.303 +
34.304 +val smt_method =
34.305 + Scan.optional Attrib.thms [] >>
34.306 + (fn thms => fn ctxt => METHOD (fn facts =>
34.307 + HEADGOAL (smt_tac ctxt (thms @ facts))))
34.308 +
34.309 +
34.310 +
34.311 +(* setup *)
34.312 +
34.313 +val setup =
34.314 + Attrib.setup (Binding.name "smt_solver")
34.315 + (Scan.lift (OuterParse.$$$ "=" |-- Args.name) >>
34.316 + (Thm.declaration_attribute o K o select_solver))
34.317 + "SMT solver configuration" #>
34.318 + setup_timeout #>
34.319 + setup_trace #>
34.320 + setup_fixed_certificates #>
34.321 + Attrib.setup (Binding.name "smt_certificates")
34.322 + (Scan.lift (OuterParse.$$$ "=" |-- Args.name) >>
34.323 + (Thm.declaration_attribute o K o select_certificates))
34.324 + "SMT certificates" #>
34.325 + Method.setup (Binding.name "smt") smt_method
34.326 + "Applies an SMT solver to the current goal."
34.327 +
34.328 +
34.329 +fun print_setup gen =
34.330 + let
34.331 + val t = string_of_int (Config.get_generic gen timeout)
34.332 + val names = sort_strings (all_solver_names_of (Context.theory_of gen))
34.333 + val ns = if null names then [no_solver] else names
34.334 + val take_info = (fn (_, []) => NONE | info => SOME info)
34.335 + val infos =
34.336 + Context.theory_of gen
34.337 + |> Symtab.dest o Solvers.get
34.338 + |> map_filter (fn (n, (_, info)) => take_info (n, info gen))
34.339 + |> sort (prod_ord string_ord (K EQUAL))
34.340 + |> map (fn (n, ps) => Pretty.big_list (n ^ ":") ps)
34.341 + val certs_filename =
34.342 + (case get_certificates_path gen of
34.343 + SOME path => Path.implode path
34.344 + | NONE => "(disabled)")
34.345 + val fixed = if Config.get_generic gen fixed_certificates then "true"
34.346 + else "false"
34.347 + in
34.348 + Pretty.writeln (Pretty.big_list "SMT setup:" [
34.349 + Pretty.str ("Current SMT solver: " ^ solver_name_of gen),
34.350 + Pretty.str_list "Available SMT solvers: " "" ns,
34.351 + Pretty.str ("Current timeout: " ^ t ^ " seconds"),
34.352 + Pretty.str ("Certificates cache: " ^ certs_filename),
34.353 + Pretty.str ("Fixed certificates: " ^ fixed),
34.354 + Pretty.big_list "Solver-specific settings:" infos])
34.355 + end
34.356 +
34.357 +val _ = OuterSyntax.improper_command "smt_status"
34.358 + "Show the available SMT solvers and the currently selected solver."
34.359 + OuterKeyword.diag
34.360 + (Scan.succeed (Toplevel.no_timing o Toplevel.keep (fn state =>
34.361 + print_setup (Context.Proof (Toplevel.context_of state)))))
34.362 +
34.363 +end
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
35.2 +++ b/src/HOL/Tools/SMT/smt_translate.ML Wed May 12 23:54:02 2010 +0200
35.3 @@ -0,0 +1,344 @@
35.4 +(* Title: HOL/Tools/SMT/smt_translate.ML
35.5 + Author: Sascha Boehme, TU Muenchen
35.6 +
35.7 +Translate theorems into an SMT intermediate format and serialize them.
35.8 +*)
35.9 +
35.10 +signature SMT_TRANSLATE =
35.11 +sig
35.12 + (* intermediate term structure *)
35.13 + datatype squant = SForall | SExists
35.14 + datatype 'a spattern = SPat of 'a list | SNoPat of 'a list
35.15 + datatype sterm =
35.16 + SVar of int |
35.17 + SApp of string * sterm list |
35.18 + SLet of string * sterm * sterm |
35.19 + SQua of squant * string list * sterm spattern list * sterm
35.20 +
35.21 + (* configuration options *)
35.22 + type prefixes = {sort_prefix: string, func_prefix: string}
35.23 + type strict = {
35.24 + is_builtin_conn: string * typ -> bool,
35.25 + is_builtin_pred: string * typ -> bool,
35.26 + is_builtin_distinct: bool}
35.27 + type builtins = {
35.28 + builtin_typ: typ -> string option,
35.29 + builtin_num: typ -> int -> string option,
35.30 + builtin_fun: string * typ -> term list -> (string * term list) option }
35.31 + datatype smt_theory = Integer | Real | Bitvector
35.32 + type sign = {
35.33 + theories: smt_theory list,
35.34 + sorts: string list,
35.35 + funcs: (string * (string list * string)) list }
35.36 + type config = {
35.37 + prefixes: prefixes,
35.38 + strict: strict option,
35.39 + builtins: builtins,
35.40 + serialize: string list -> sign -> sterm list -> string }
35.41 + type recon = {
35.42 + typs: typ Symtab.table,
35.43 + terms: term Symtab.table,
35.44 + unfolds: thm list,
35.45 + assms: thm list option }
35.46 +
35.47 + val translate: config -> Proof.context -> string list -> thm list ->
35.48 + string * recon
35.49 +end
35.50 +
35.51 +structure SMT_Translate: SMT_TRANSLATE =
35.52 +struct
35.53 +
35.54 +(* intermediate term structure *)
35.55 +
35.56 +datatype squant = SForall | SExists
35.57 +
35.58 +datatype 'a spattern = SPat of 'a list | SNoPat of 'a list
35.59 +
35.60 +datatype sterm =
35.61 + SVar of int |
35.62 + SApp of string * sterm list |
35.63 + SLet of string * sterm * sterm |
35.64 + SQua of squant * string list * sterm spattern list * sterm
35.65 +
35.66 +
35.67 +
35.68 +(* configuration options *)
35.69 +
35.70 +type prefixes = {sort_prefix: string, func_prefix: string}
35.71 +
35.72 +type strict = {
35.73 + is_builtin_conn: string * typ -> bool,
35.74 + is_builtin_pred: string * typ -> bool,
35.75 + is_builtin_distinct: bool}
35.76 +
35.77 +type builtins = {
35.78 + builtin_typ: typ -> string option,
35.79 + builtin_num: typ -> int -> string option,
35.80 + builtin_fun: string * typ -> term list -> (string * term list) option }
35.81 +
35.82 +datatype smt_theory = Integer | Real | Bitvector
35.83 +
35.84 +type sign = {
35.85 + theories: smt_theory list,
35.86 + sorts: string list,
35.87 + funcs: (string * (string list * string)) list }
35.88 +
35.89 +type config = {
35.90 + prefixes: prefixes,
35.91 + strict: strict option,
35.92 + builtins: builtins,
35.93 + serialize: string list -> sign -> sterm list -> string }
35.94 +
35.95 +type recon = {
35.96 + typs: typ Symtab.table,
35.97 + terms: term Symtab.table,
35.98 + unfolds: thm list,
35.99 + assms: thm list option }
35.100 +
35.101 +
35.102 +
35.103 +(* utility functions *)
35.104 +
35.105 +val dest_funT =
35.106 + let
35.107 + fun dest Ts 0 T = (rev Ts, T)
35.108 + | dest Ts i (Type ("fun", [T, U])) = dest (T::Ts) (i-1) U
35.109 + | dest _ _ T = raise TYPE ("dest_funT", [T], [])
35.110 + in dest [] end
35.111 +
35.112 +val quantifier = (fn
35.113 + @{const_name All} => SOME SForall
35.114 + | @{const_name Ex} => SOME SExists
35.115 + | _ => NONE)
35.116 +
35.117 +fun group_quant qname Ts (t as Const (q, _) $ Abs (_, T, u)) =
35.118 + if q = qname then group_quant qname (T :: Ts) u else (Ts, t)
35.119 + | group_quant _ Ts t = (Ts, t)
35.120 +
35.121 +fun dest_pat ts (Const (@{const_name pat}, _) $ t) = SPat (rev (t :: ts))
35.122 + | dest_pat ts (Const (@{const_name nopat}, _) $ t) = SNoPat (rev (t :: ts))
35.123 + | dest_pat ts (Const (@{const_name andpat}, _) $ p $ t) = dest_pat (t::ts) p
35.124 + | dest_pat _ t = raise TERM ("dest_pat", [t])
35.125 +
35.126 +fun dest_trigger (@{term trigger} $ tl $ t) =
35.127 + (map (dest_pat []) (HOLogic.dest_list tl), t)
35.128 + | dest_trigger t = ([], t)
35.129 +
35.130 +fun dest_quant qn T t = quantifier qn |> Option.map (fn q =>
35.131 + let
35.132 + val (Ts, u) = group_quant qn [T] t
35.133 + val (ps, b) = dest_trigger u
35.134 + in (q, rev Ts, ps, b) end)
35.135 +
35.136 +fun fold_map_pat f (SPat ts) = fold_map f ts #>> SPat
35.137 + | fold_map_pat f (SNoPat ts) = fold_map f ts #>> SNoPat
35.138 +
35.139 +fun prop_of thm = HOLogic.dest_Trueprop (Thm.prop_of thm)
35.140 +
35.141 +
35.142 +
35.143 +(* enforce a strict separation between formulas and terms *)
35.144 +
35.145 +val term_eq_rewr = @{lemma "x term_eq y == x = y" by (simp add: term_eq_def)}
35.146 +
35.147 +val term_bool = @{lemma "~(True term_eq False)" by (simp add: term_eq_def)}
35.148 +val term_bool' = Simplifier.rewrite_rule [term_eq_rewr] term_bool
35.149 +
35.150 +
35.151 +val needs_rewrite = Thm.prop_of #> Term.exists_subterm (fn
35.152 + Const (@{const_name Let}, _) => true
35.153 + | @{term "op = :: bool => _"} $ _ $ @{term True} => true
35.154 + | Const (@{const_name If}, _) $ _ $ @{term True} $ @{term False} => true
35.155 + | _ => false)
35.156 +
35.157 +val rewrite_rules = [
35.158 + Let_def,
35.159 + @{lemma "P = True == P" by (rule eq_reflection) simp},
35.160 + @{lemma "if P then True else False == P" by (rule eq_reflection) simp}]
35.161 +
35.162 +fun rewrite ctxt = Simplifier.full_rewrite
35.163 + (Simplifier.context ctxt empty_ss addsimps rewrite_rules)
35.164 +
35.165 +fun normalize ctxt thm =
35.166 + if needs_rewrite thm then Conv.fconv_rule (rewrite ctxt) thm else thm
35.167 +
35.168 +val unfold_rules = term_eq_rewr :: rewrite_rules
35.169 +
35.170 +
35.171 +val revert_types =
35.172 + let
35.173 + fun revert @{typ prop} = @{typ bool}
35.174 + | revert (Type (n, Ts)) = Type (n, map revert Ts)
35.175 + | revert T = T
35.176 + in Term.map_types revert end
35.177 +
35.178 +
35.179 +fun strictify {is_builtin_conn, is_builtin_pred, is_builtin_distinct} ctxt =
35.180 + let
35.181 +
35.182 + fun is_builtin_conn' (@{const_name True}, _) = false
35.183 + | is_builtin_conn' (@{const_name False}, _) = false
35.184 + | is_builtin_conn' c = is_builtin_conn c
35.185 +
35.186 + val propT = @{typ prop} and boolT = @{typ bool}
35.187 + val as_propT = (fn @{typ bool} => propT | T => T)
35.188 + fun mapTs f g = Term.strip_type #> (fn (Ts, T) => map f Ts ---> g T)
35.189 + fun conn (n, T) = (n, mapTs as_propT as_propT T)
35.190 + fun pred (n, T) = (n, mapTs I as_propT T)
35.191 +
35.192 + val term_eq = @{term "op = :: bool => _"} |> Term.dest_Const |> pred
35.193 + fun as_term t = Const term_eq $ t $ @{term True}
35.194 +
35.195 + val if_term = Const (@{const_name If}, [propT, boolT, boolT] ---> boolT)
35.196 + fun wrap_in_if t = if_term $ t $ @{term True} $ @{term False}
35.197 +
35.198 + fun in_list T f t = HOLogic.mk_list T (map f (HOLogic.dest_list t))
35.199 +
35.200 + fun in_term t =
35.201 + (case Term.strip_comb t of
35.202 + (c as Const (@{const_name If}, _), [t1, t2, t3]) =>
35.203 + c $ in_form t1 $ in_term t2 $ in_term t3
35.204 + | (h as Const c, ts) =>
35.205 + if is_builtin_conn' (conn c) orelse is_builtin_pred (pred c)
35.206 + then wrap_in_if (in_form t)
35.207 + else Term.list_comb (h, map in_term ts)
35.208 + | (h as Free _, ts) => Term.list_comb (h, map in_term ts)
35.209 + | _ => t)
35.210 +
35.211 + and in_pat ((c as Const (@{const_name pat}, _)) $ t) = c $ in_term t
35.212 + | in_pat ((c as Const (@{const_name nopat}, _)) $ t) = c $ in_term t
35.213 + | in_pat ((c as Const (@{const_name andpat}, _)) $ p $ t) =
35.214 + c $ in_pat p $ in_term t
35.215 + | in_pat t = raise TERM ("in_pat", [t])
35.216 +
35.217 + and in_pats p = in_list @{typ pattern} in_pat p
35.218 +
35.219 + and in_trig ((c as @{term trigger}) $ p $ t) = c $ in_pats p $ in_form t
35.220 + | in_trig t = in_form t
35.221 +
35.222 + and in_form t =
35.223 + (case Term.strip_comb t of
35.224 + (q as Const (qn, _), [Abs (n, T, t')]) =>
35.225 + if is_some (quantifier qn) then q $ Abs (n, T, in_trig t')
35.226 + else as_term (in_term t)
35.227 + | (Const (c as (@{const_name distinct}, T)), [t']) =>
35.228 + if is_builtin_distinct then Const (pred c) $ in_list T in_term t'
35.229 + else as_term (in_term t)
35.230 + | (Const c, ts) =>
35.231 + if is_builtin_conn (conn c)
35.232 + then Term.list_comb (Const (conn c), map in_form ts)
35.233 + else if is_builtin_pred (pred c)
35.234 + then Term.list_comb (Const (pred c), map in_term ts)
35.235 + else as_term (in_term t)
35.236 + | _ => as_term (in_term t))
35.237 + in
35.238 + map (normalize ctxt) #> (fn thms => ((unfold_rules, term_bool' :: thms),
35.239 + map (in_form o prop_of) (term_bool :: thms)))
35.240 + end
35.241 +
35.242 +
35.243 +
35.244 +(* translation from Isabelle terms into SMT intermediate terms *)
35.245 +
35.246 +val empty_context = (1, Typtab.empty, 1, Termtab.empty, [])
35.247 +
35.248 +fun make_sign (_, typs, _, terms, thys) = {
35.249 + theories = thys,
35.250 + sorts = Typtab.fold (cons o snd) typs [],
35.251 + funcs = Termtab.fold (cons o snd) terms [] }
35.252 +
35.253 +fun make_recon (unfolds, assms) (_, typs, _, terms, _) = {
35.254 + typs = Symtab.make (map swap (Typtab.dest typs)),
35.255 + terms = Symtab.make (map (fn (t, (n, _)) => (n, t)) (Termtab.dest terms)),
35.256 + unfolds = unfolds,
35.257 + assms = SOME assms }
35.258 +
35.259 +fun string_of_index pre i = pre ^ string_of_int i
35.260 +
35.261 +fun add_theory T (Tidx, typs, idx, terms, thys) =
35.262 + let
35.263 + fun add @{typ int} = insert (op =) Integer
35.264 + | add @{typ real} = insert (op =) Real
35.265 + | add (Type (@{type_name word}, _)) = insert (op =) Bitvector
35.266 + | add (Type (_, Ts)) = fold add Ts
35.267 + | add _ = I
35.268 + in (Tidx, typs, idx, terms, add T thys) end
35.269 +
35.270 +fun fresh_typ sort_prefix T (cx as (Tidx, typs, idx, terms, thys)) =
35.271 + (case Typtab.lookup typs T of
35.272 + SOME s => (s, cx)
35.273 + | NONE =>
35.274 + let
35.275 + val s = string_of_index sort_prefix Tidx
35.276 + val typs' = Typtab.update (T, s) typs
35.277 + in (s, (Tidx+1, typs', idx, terms, thys)) end)
35.278 +
35.279 +fun fresh_fun func_prefix t ss (cx as (Tidx, typs, idx, terms, thys)) =
35.280 + (case Termtab.lookup terms t of
35.281 + SOME (f, _) => (f, cx)
35.282 + | NONE =>
35.283 + let
35.284 + val f = string_of_index func_prefix idx
35.285 + val terms' = Termtab.update (revert_types t, (f, ss)) terms
35.286 + in (f, (Tidx, typs, idx+1, terms', thys)) end)
35.287 +
35.288 +fun relaxed thms = (([], thms), map prop_of thms)
35.289 +
35.290 +fun with_context f (ths, ts) =
35.291 + let val (us, context) = fold_map f ts empty_context
35.292 + in ((make_sign context, us), make_recon ths context) end
35.293 +
35.294 +
35.295 +fun translate {prefixes, strict, builtins, serialize} ctxt comments =
35.296 + let
35.297 + val {sort_prefix, func_prefix} = prefixes
35.298 + val {builtin_typ, builtin_num, builtin_fun} = builtins
35.299 +
35.300 + fun transT T = add_theory T #>
35.301 + (case builtin_typ T of
35.302 + SOME n => pair n
35.303 + | NONE => fresh_typ sort_prefix T)
35.304 +
35.305 + fun app n ts = SApp (n, ts)
35.306 +
35.307 + fun trans t =
35.308 + (case Term.strip_comb t of
35.309 + (Const (qn, _), [Abs (_, T, t1)]) =>
35.310 + (case dest_quant qn T t1 of
35.311 + SOME (q, Ts, ps, b) =>
35.312 + fold_map transT Ts ##>> fold_map (fold_map_pat trans) ps ##>>
35.313 + trans b #>> (fn ((Ts', ps'), b') => SQua (q, Ts', ps', b'))
35.314 + | NONE => raise TERM ("intermediate", [t]))
35.315 + | (Const (@{const_name Let}, _), [t1, Abs (_, T, t2)]) =>
35.316 + transT T ##>> trans t1 ##>> trans t2 #>>
35.317 + (fn ((U, u1), u2) => SLet (U, u1, u2))
35.318 + | (h as Const (c as (@{const_name distinct}, T)), [t1]) =>
35.319 + (case builtin_fun c (HOLogic.dest_list t1) of
35.320 + SOME (n, ts) => add_theory T #> fold_map trans ts #>> app n
35.321 + | NONE => transs h T [t1])
35.322 + | (h as Const (c as (_, T)), ts) =>
35.323 + (case try HOLogic.dest_number t of
35.324 + SOME (T, i) =>
35.325 + (case builtin_num T i of
35.326 + SOME n => add_theory T #> pair (SApp (n, []))
35.327 + | NONE => transs t T [])
35.328 + | NONE =>
35.329 + (case builtin_fun c ts of
35.330 + SOME (n, ts') => add_theory T #> fold_map trans ts' #>> app n
35.331 + | NONE => transs h T ts))
35.332 + | (h as Free (_, T), ts) => transs h T ts
35.333 + | (Bound i, []) => pair (SVar i)
35.334 + | _ => raise TERM ("intermediate", [t]))
35.335 +
35.336 + and transs t T ts =
35.337 + let val (Us, U) = dest_funT (length ts) T
35.338 + in
35.339 + fold_map transT Us ##>> transT U #-> (fn Up =>
35.340 + fresh_fun func_prefix t Up ##>> fold_map trans ts #>> SApp)
35.341 + end
35.342 + in
35.343 + (if is_some strict then strictify (the strict) ctxt else relaxed) #>
35.344 + with_context trans #>> uncurry (serialize comments)
35.345 + end
35.346 +
35.347 +end
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
36.2 +++ b/src/HOL/Tools/SMT/smtlib_interface.ML Wed May 12 23:54:02 2010 +0200
36.3 @@ -0,0 +1,287 @@
36.4 +(* Title: HOL/Tools/SMT/smtlib_interface.ML
36.5 + Author: Sascha Boehme, TU Muenchen
36.6 +
36.7 +Interface to SMT solvers based on the SMT-LIB format.
36.8 +*)
36.9 +
36.10 +signature SMTLIB_INTERFACE =
36.11 +sig
36.12 + val interface: SMT_Solver.interface
36.13 +end
36.14 +
36.15 +structure SMTLIB_Interface: SMTLIB_INTERFACE =
36.16 +struct
36.17 +
36.18 +structure N = SMT_Normalize
36.19 +structure T = SMT_Translate
36.20 +
36.21 +
36.22 +
36.23 +(** facts about uninterpreted constants **)
36.24 +
36.25 +infix 2 ??
36.26 +fun (ex ?? f) thms = if exists (ex o Thm.prop_of) thms then f thms else thms
36.27 +
36.28 +
36.29 +(* pairs *)
36.30 +
36.31 +val pair_rules = [@{thm fst_conv}, @{thm snd_conv}, @{thm pair_collapse}]
36.32 +
36.33 +val pair_type = (fn Type (@{type_name "*"}, _) => true | _ => false)
36.34 +val exists_pair_type = Term.exists_type (Term.exists_subtype pair_type)
36.35 +
36.36 +val add_pair_rules = exists_pair_type ?? append pair_rules
36.37 +
36.38 +
36.39 +(* function update *)
36.40 +
36.41 +val fun_upd_rules = [@{thm fun_upd_same}, @{thm fun_upd_apply}]
36.42 +
36.43 +val is_fun_upd = (fn Const (@{const_name fun_upd}, _) => true | _ => false)
36.44 +val exists_fun_upd = Term.exists_subterm is_fun_upd
36.45 +
36.46 +val add_fun_upd_rules = exists_fun_upd ?? append fun_upd_rules
36.47 +
36.48 +
36.49 +(* abs/min/max *)
36.50 +
36.51 +val exists_abs_min_max = Term.exists_subterm (fn
36.52 + Const (@{const_name abs}, _) => true
36.53 + | Const (@{const_name min}, _) => true
36.54 + | Const (@{const_name max}, _) => true
36.55 + | _ => false)
36.56 +
36.57 +val unfold_abs_conv = Conv.rewr_conv @{thm abs_if[THEN eq_reflection]}
36.58 +val unfold_min_conv = Conv.rewr_conv @{thm min_def[THEN eq_reflection]}
36.59 +val unfold_max_conv = Conv.rewr_conv @{thm max_def[THEN eq_reflection]}
36.60 +
36.61 +fun expand_conv cv = N.eta_expand_conv (K cv)
36.62 +fun expand2_conv cv = N.eta_expand_conv (N.eta_expand_conv (K cv))
36.63 +
36.64 +fun unfold_def_conv ctxt ct =
36.65 + (case Thm.term_of ct of
36.66 + Const (@{const_name abs}, _) $ _ => unfold_abs_conv
36.67 + | Const (@{const_name abs}, _) => expand_conv unfold_abs_conv ctxt
36.68 + | Const (@{const_name min}, _) $ _ $ _ => unfold_min_conv
36.69 + | Const (@{const_name min}, _) $ _ => expand_conv unfold_min_conv ctxt
36.70 + | Const (@{const_name min}, _) => expand2_conv unfold_min_conv ctxt
36.71 + | Const (@{const_name max}, _) $ _ $ _ => unfold_max_conv
36.72 + | Const (@{const_name max}, _) $ _ => expand_conv unfold_max_conv ctxt
36.73 + | Const (@{const_name max}, _) => expand2_conv unfold_max_conv ctxt
36.74 + | _ => Conv.all_conv) ct
36.75 +
36.76 +fun unfold_abs_min_max_defs ctxt thm =
36.77 + if exists_abs_min_max (Thm.prop_of thm)
36.78 + then Conv.fconv_rule (More_Conv.top_conv unfold_def_conv ctxt) thm
36.79 + else thm
36.80 +
36.81 +
36.82 +(* include additional facts *)
36.83 +
36.84 +fun extra_norm thms ctxt =
36.85 + thms
36.86 + |> add_pair_rules
36.87 + |> add_fun_upd_rules
36.88 + |> map (unfold_abs_min_max_defs ctxt)
36.89 + |> rpair ctxt
36.90 +
36.91 +
36.92 +
36.93 +(** builtins **)
36.94 +
36.95 +fun dest_binT T =
36.96 + (case T of
36.97 + Type (@{type_name "Numeral_Type.num0"}, _) => 0
36.98 + | Type (@{type_name "Numeral_Type.num1"}, _) => 1
36.99 + | Type (@{type_name "Numeral_Type.bit0"}, [T]) => 2 * dest_binT T
36.100 + | Type (@{type_name "Numeral_Type.bit1"}, [T]) => 1 + 2 * dest_binT T
36.101 + | _ => raise TYPE ("dest_binT", [T], []))
36.102 +
36.103 +fun dest_wordT (Type (@{type_name word}, [T])) = dest_binT T
36.104 + | dest_wordT T = raise TYPE ("dest_wordT", [T], [])
36.105 +
36.106 +fun index1 n i = n ^ "[" ^ string_of_int i ^ "]"
36.107 +fun index2 n i j = n ^ "[" ^ string_of_int i ^ ":" ^ string_of_int j ^ "]"
36.108 +
36.109 +fun builtin_typ @{typ int} = SOME "Int"
36.110 + | builtin_typ @{typ real} = SOME "Real"
36.111 + | builtin_typ (Type (@{type_name word}, [T])) =
36.112 + Option.map (index1 "BitVec") (try dest_binT T)
36.113 + | builtin_typ _ = NONE
36.114 +
36.115 +fun builtin_num @{typ int} i = SOME (string_of_int i)
36.116 + | builtin_num @{typ real} i = SOME (string_of_int i ^ ".0")
36.117 + | builtin_num (Type (@{type_name word}, [T])) i =
36.118 + Option.map (index1 ("bv" ^ string_of_int i)) (try dest_binT T)
36.119 + | builtin_num _ _ = NONE
36.120 +
36.121 +val is_propT = (fn @{typ prop} => true | _ => false)
36.122 +fun is_connT T = Term.strip_type T |> (fn (Us, U) => forall is_propT (U :: Us))
36.123 +fun is_predT T = is_propT (Term.body_type T)
36.124 +
36.125 +fun just c ts = SOME (c, ts)
36.126 +
36.127 +val is_arith_type = member (op =) [@{typ int}, @{typ real}] o Term.domain_type
36.128 +
36.129 +fun fixed_bvT (Ts, T) x =
36.130 + if forall (can dest_wordT) (T :: Ts) then SOME x else NONE
36.131 +
36.132 +fun if_fixed_bvT' T = fixed_bvT ([], Term.domain_type T)
36.133 +fun if_fixed_bvT T = curry (fixed_bvT ([], Term.domain_type T))
36.134 +fun if_full_fixed_bvT T = curry (fixed_bvT (Term.strip_type T))
36.135 +
36.136 +fun dest_word_funT (Type ("fun", [T, U])) = (dest_wordT T, dest_wordT U)
36.137 + | dest_word_funT T = raise TYPE ("dest_word_funT", [T], [])
36.138 +fun dest_nat (@{term nat} $ n :: ts) = (snd (HOLogic.dest_number n), ts)
36.139 + | dest_nat ts = raise TERM ("dest_nat", ts)
36.140 +fun dest_nat_word_funT (T, ts) =
36.141 + (dest_word_funT (Term.range_type T), dest_nat ts)
36.142 +
36.143 +fun bv_extend n T ts =
36.144 + (case try dest_word_funT T of
36.145 + SOME (i, j) => if j-i >= 0 then SOME (index1 n (j-i), ts) else NONE
36.146 + | _ => NONE)
36.147 +
36.148 +fun bv_rotate n T ts =
36.149 + try dest_nat ts
36.150 + |> Option.map (fn (i, ts') => (index1 n i, ts'))
36.151 +
36.152 +fun bv_extract n T ts =
36.153 + try dest_nat_word_funT (T, ts)
36.154 + |> Option.map (fn ((_, i), (lb, ts')) => (index2 n (i + lb - 1) lb, ts'))
36.155 +
36.156 +
36.157 +fun conn @{const_name True} = SOME "true"
36.158 + | conn @{const_name False} = SOME "false"
36.159 + | conn @{const_name Not} = SOME "not"
36.160 + | conn @{const_name "op &"} = SOME "and"
36.161 + | conn @{const_name "op |"} = SOME "or"
36.162 + | conn @{const_name "op -->"} = SOME "implies"
36.163 + | conn @{const_name "op ="} = SOME "iff"
36.164 + | conn @{const_name If} = SOME "if_then_else"
36.165 + | conn _ = NONE
36.166 +
36.167 +fun pred @{const_name distinct} _ = SOME "distinct"
36.168 + | pred @{const_name "op ="} _ = SOME "="
36.169 + | pred @{const_name term_eq} _ = SOME "="
36.170 + | pred @{const_name less} T =
36.171 + if is_arith_type T then SOME "<"
36.172 + else if_fixed_bvT' T "bvult"
36.173 + | pred @{const_name less_eq} T =
36.174 + if is_arith_type T then SOME "<="
36.175 + else if_fixed_bvT' T "bvule"
36.176 + | pred @{const_name word_sless} T = if_fixed_bvT' T "bvslt"
36.177 + | pred @{const_name word_sle} T = if_fixed_bvT' T "bvsle"
36.178 + | pred _ _ = NONE
36.179 +
36.180 +fun func @{const_name If} _ = just "ite"
36.181 + | func @{const_name uminus} T =
36.182 + if is_arith_type T then just "~"
36.183 + else if_fixed_bvT T "bvneg"
36.184 + | func @{const_name plus} T =
36.185 + if is_arith_type T then just "+"
36.186 + else if_fixed_bvT T "bvadd"
36.187 + | func @{const_name minus} T =
36.188 + if is_arith_type T then just "-"
36.189 + else if_fixed_bvT T "bvsub"
36.190 + | func @{const_name times} T =
36.191 + if is_arith_type T then just "*"
36.192 + else if_fixed_bvT T "bvmul"
36.193 + | func @{const_name bitNOT} T = if_fixed_bvT T "bvnot"
36.194 + | func @{const_name bitAND} T = if_fixed_bvT T "bvand"
36.195 + | func @{const_name bitOR} T = if_fixed_bvT T "bvor"
36.196 + | func @{const_name bitXOR} T = if_fixed_bvT T "bvxor"
36.197 + | func @{const_name div} T = if_fixed_bvT T "bvudiv"
36.198 + | func @{const_name mod} T = if_fixed_bvT T "bvurem"
36.199 + | func @{const_name sdiv} T = if_fixed_bvT T "bvsdiv"
36.200 + | func @{const_name smod} T = if_fixed_bvT T "bvsmod"
36.201 + | func @{const_name srem} T = if_fixed_bvT T "bvsrem"
36.202 + | func @{const_name word_cat} T = if_full_fixed_bvT T "concat"
36.203 + | func @{const_name bv_shl} T = if_full_fixed_bvT T "bvshl"
36.204 + | func @{const_name bv_lshr} T = if_full_fixed_bvT T "bvlshr"
36.205 + | func @{const_name bv_ashr} T = if_full_fixed_bvT T "bvashr"
36.206 + | func @{const_name slice} T = bv_extract "extract" T
36.207 + | func @{const_name ucast} T = bv_extend "zero_extend" T
36.208 + | func @{const_name scast} T = bv_extend "sign_extend" T
36.209 + | func @{const_name word_rotl} T = bv_rotate "rotate_left" T
36.210 + | func @{const_name word_rotr} T = bv_rotate "rotate_right" T
36.211 + | func _ _ = K NONE
36.212 +
36.213 +fun is_builtin_conn (n, T) = is_connT T andalso is_some (conn n)
36.214 +fun is_builtin_pred (n, T) = is_predT T andalso is_some (pred n T)
36.215 +
36.216 +fun builtin_fun (n, T) ts =
36.217 + if is_connT T then conn n |> Option.map (rpair ts)
36.218 + else if is_predT T then pred n T |> Option.map (rpair ts)
36.219 + else func n T ts
36.220 +
36.221 +
36.222 +
36.223 +(** serialization **)
36.224 +
36.225 +val add = Buffer.add
36.226 +fun sep f = add " " #> f
36.227 +fun enclose l r f = sep (add l #> f #> add r)
36.228 +val par = enclose "(" ")"
36.229 +fun app n f = (fn [] => sep (add n) | xs => par (add n #> fold f xs))
36.230 +fun line f = f #> add "\n"
36.231 +
36.232 +fun var i = add "?v" #> add (string_of_int i)
36.233 +
36.234 +fun sterm l (T.SVar i) = sep (var (l - i - 1))
36.235 + | sterm l (T.SApp (n, ts)) = app n (sterm l) ts
36.236 + | sterm _ (T.SLet _) = raise Fail "SMT-LIB: unsupported let expression"
36.237 + | sterm l (T.SQua (q, ss, ps, t)) =
36.238 + let
36.239 + val quant = add o (fn T.SForall => "forall" | T.SExists => "exists")
36.240 + val vs = map_index (apfst (Integer.add l)) ss
36.241 + fun var_decl (i, s) = par (var i #> sep (add s))
36.242 + val sub = sterm (l + length ss)
36.243 + fun pat kind ts = sep (add kind #> enclose "{" " }" (fold sub ts))
36.244 + fun pats (T.SPat ts) = pat ":pat" ts
36.245 + | pats (T.SNoPat ts) = pat ":nopat" ts
36.246 + in par (quant q #> fold var_decl vs #> sub t #> fold pats ps) end
36.247 +
36.248 +fun choose_logic theories =
36.249 + if member (op =) theories T.Bitvector then "QF_AUFBV"
36.250 + else if member (op =) theories T.Real then "AUFLIRA"
36.251 + else "AUFLIA"
36.252 +
36.253 +fun serialize comments {theories, sorts, funcs} ts =
36.254 + Buffer.empty
36.255 + |> line (add "(benchmark Isabelle")
36.256 + |> line (add ":status unknown")
36.257 + |> line (add ":logic " #> add (choose_logic theories))
36.258 + |> length sorts > 0 ?
36.259 + line (add ":extrasorts" #> par (fold (sep o add) sorts))
36.260 + |> length funcs > 0 ? (
36.261 + line (add ":extrafuns" #> add " (") #>
36.262 + fold (fn (f, (ss, s)) =>
36.263 + line (sep (app f (sep o add) (ss @ [s])))) funcs #>
36.264 + line (add ")"))
36.265 + |> fold (fn t => line (add ":assumption" #> sterm 0 t)) ts
36.266 + |> line (add ":formula true)")
36.267 + |> fold (fn str => line (add "; " #> add str)) comments
36.268 + |> Buffer.content
36.269 +
36.270 +
36.271 +
36.272 +(** interface **)
36.273 +
36.274 +val interface = {
36.275 + extra_norm = extra_norm,
36.276 + translate = {
36.277 + prefixes = {
36.278 + sort_prefix = "S",
36.279 + func_prefix = "f"},
36.280 + strict = SOME {
36.281 + is_builtin_conn = is_builtin_conn,
36.282 + is_builtin_pred = is_builtin_pred,
36.283 + is_builtin_distinct = true},
36.284 + builtins = {
36.285 + builtin_typ = builtin_typ,
36.286 + builtin_num = builtin_num,
36.287 + builtin_fun = builtin_fun},
36.288 + serialize = serialize}}
36.289 +
36.290 +end
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
37.2 +++ b/src/HOL/Tools/SMT/yices_solver.ML Wed May 12 23:54:02 2010 +0200
37.3 @@ -0,0 +1,44 @@
37.4 +(* Title: HOL/Tools/SMT/yices_solver.ML
37.5 + Author: Sascha Boehme, TU Muenchen
37.6 +
37.7 +Interface of the SMT solver Yices.
37.8 +*)
37.9 +
37.10 +signature YICES_SOLVER =
37.11 +sig
37.12 + val setup: theory -> theory
37.13 +end
37.14 +
37.15 +structure Yices_Solver: YICES_SOLVER =
37.16 +struct
37.17 +
37.18 +val solver_name = "yices"
37.19 +val env_var = "YICES_SOLVER"
37.20 +
37.21 +val options = ["--smtlib"]
37.22 +
37.23 +fun raise_cex real = raise SMT_Solver.SMT_COUNTEREXAMPLE (real, [])
37.24 +
37.25 +fun core_oracle (output, _) =
37.26 + let
37.27 + val empty_line = (fn "" => true | _ => false)
37.28 + val split_first = (fn [] => ("", []) | l :: ls => (l, ls))
37.29 + val (l, _) = split_first (dropwhile empty_line output)
37.30 + in
37.31 + if String.isPrefix "unsat" l then @{cprop False}
37.32 + else if String.isPrefix "sat" l then raise_cex true
37.33 + else if String.isPrefix "unknown" l then raise_cex false
37.34 + else raise SMT_Solver.SMT (solver_name ^ " failed")
37.35 + end
37.36 +
37.37 +fun smtlib_solver oracle _ = {
37.38 + command = {env_var=env_var, remote_name=NONE},
37.39 + arguments = options,
37.40 + interface = SMTLIB_Interface.interface,
37.41 + reconstruct = pair o oracle }
37.42 +
37.43 +val setup =
37.44 + Thm.add_oracle (Binding.name solver_name, core_oracle) #-> (fn (_, oracle) =>
37.45 + SMT_Solver.add_solver (solver_name, smtlib_solver oracle))
37.46 +
37.47 +end
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
38.2 +++ b/src/HOL/Tools/SMT/z3_interface.ML Wed May 12 23:54:02 2010 +0200
38.3 @@ -0,0 +1,37 @@
38.4 +(* Title: HOL/Tools/SMT/z3_interface.ML
38.5 + Author: Sascha Boehme, TU Muenchen
38.6 +
38.7 +Interface to Z3 based on a relaxed version of SMT-LIB.
38.8 +*)
38.9 +
38.10 +signature Z3_INTERFACE =
38.11 +sig
38.12 + val interface: SMT_Translate.config
38.13 +
38.14 + val is_builtin: term -> bool
38.15 +end
38.16 +
38.17 +structure Z3_Interface: Z3_INTERFACE =
38.18 +struct
38.19 +
38.20 +fun z3_builtin_fun bf c ts =
38.21 + (case Const c of
38.22 + @{term "op / :: real => _"} => SOME ("/", ts)
38.23 + | _ => bf c ts)
38.24 +
38.25 +
38.26 +val {prefixes, strict, builtins, serialize} = SMTLIB_Interface.interface
38.27 +val {builtin_typ, builtin_num, builtin_fun} = builtins
38.28 +
38.29 +val interface = {
38.30 + extra_norm =
38.31 + translate = {
38.32 + prefixes = prefixes,
38.33 + strict = strict,
38.34 + builtins = {
38.35 + builtin_typ = builtin_typ,
38.36 + builtin_num = builtin_num,
38.37 + builtin_fun = z3_builtin_fun builtin_fun},
38.38 + serialize = serialize}}
38.39 +
38.40 +end
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
39.2 +++ b/src/HOL/Tools/SMT/z3_model.ML Wed May 12 23:54:02 2010 +0200
39.3 @@ -0,0 +1,146 @@
39.4 +(* Title: HOL/Tools/SMT/z3_model.ML
39.5 + Author: Sascha Boehme and Philipp Meyer, TU Muenchen
39.6 +
39.7 +Parser for counterexamples generated by Z3.
39.8 +*)
39.9 +
39.10 +signature Z3_MODEL =
39.11 +sig
39.12 + val parse_counterex: SMT_Translate.recon -> string list -> term list
39.13 +end
39.14 +
39.15 +structure Z3_Model: Z3_MODEL =
39.16 +struct
39.17 +
39.18 +(* counterexample expressions *)
39.19 +
39.20 +datatype expr = True | False | Number of int * int option | Value of int |
39.21 + Array of array
39.22 +and array = Fresh of expr | Store of (array * expr) * expr
39.23 +
39.24 +
39.25 +(* parsing *)
39.26 +
39.27 +val space = Scan.many Symbol.is_ascii_blank
39.28 +fun in_parens p = Scan.$$ "(" |-- p --| Scan.$$ ")"
39.29 +fun in_braces p = (space -- Scan.$$ "{") |-- p --| (space -- Scan.$$ "}")
39.30 +
39.31 +val digit = (fn
39.32 + "0" => SOME 0 | "1" => SOME 1 | "2" => SOME 2 | "3" => SOME 3 |
39.33 + "4" => SOME 4 | "5" => SOME 5 | "6" => SOME 6 | "7" => SOME 7 |
39.34 + "8" => SOME 8 | "9" => SOME 9 | _ => NONE)
39.35 +
39.36 +val nat_num = Scan.repeat1 (Scan.some digit) >>
39.37 + (fn ds => fold (fn d => fn i => i * 10 + d) ds 0)
39.38 +val int_num = Scan.optional ($$ "-" >> K (fn i => ~i)) I :|--
39.39 + (fn sign => nat_num >> sign)
39.40 +
39.41 +val is_char = Symbol.is_ascii_letter orf Symbol.is_ascii_digit orf
39.42 + member (op =) (explode "_+*-/%~=<>$&|?!.@^#")
39.43 +val name = Scan.many1 is_char >> implode
39.44 +
39.45 +fun array_expr st = st |>
39.46 + in_parens (space |-- (
39.47 + Scan.this_string "const" |-- expr >> Fresh ||
39.48 + Scan.this_string "store" -- space |-- array_expr -- expr -- expr >> Store))
39.49 +
39.50 +and expr st = st |> (space |-- (
39.51 + Scan.this_string "true" >> K True ||
39.52 + Scan.this_string "false" >> K False ||
39.53 + int_num -- Scan.option (Scan.$$ "/" |-- int_num) >> Number ||
39.54 + Scan.this_string "val!" |-- nat_num >> Value ||
39.55 + array_expr >> Array))
39.56 +
39.57 +val mapping = space -- Scan.this_string "->"
39.58 +val value = mapping |-- expr
39.59 +
39.60 +val args_case = Scan.repeat expr -- value
39.61 +val else_case = space -- Scan.this_string "else" |-- value >>
39.62 + pair ([] : expr list)
39.63 +
39.64 +val func =
39.65 + let fun cases st = (else_case >> single || args_case ::: cases) st
39.66 + in in_braces cases end
39.67 +
39.68 +val cex = space |-- Scan.repeat (space |-- name --| mapping --
39.69 + (func || expr >> (single o pair [])))
39.70 +
39.71 +fun read_cex ls =
39.72 + explode (cat_lines ls)
39.73 + |> try (fst o Scan.finite Symbol.stopper cex)
39.74 + |> the_default []
39.75 +
39.76 +
39.77 +(* translation into terms *)
39.78 +
39.79 +fun lookup_term tab (name, e) = Option.map (rpair e) (Symtab.lookup tab name)
39.80 +
39.81 +fun with_name_context tab f xs =
39.82 + let
39.83 + val ns = Symtab.fold (Term.add_free_names o snd) tab []
39.84 + val nctxt = Name.make_context ns
39.85 + in fst (fold_map f xs (Inttab.empty, nctxt)) end
39.86 +
39.87 +fun fresh_term T (tab, nctxt) =
39.88 + let val (n, nctxt') = yield_singleton Name.variants "" nctxt
39.89 + in (Free (n, T), (tab, nctxt')) end
39.90 +
39.91 +fun term_of_value T i (cx as (tab, _)) =
39.92 + (case Inttab.lookup tab i of
39.93 + SOME t => (t, cx)
39.94 + | NONE =>
39.95 + let val (t, (tab', nctxt')) = fresh_term T cx
39.96 + in (t, (Inttab.update (i, t) tab', nctxt')) end)
39.97 +
39.98 +fun trans_expr _ True = pair @{term True}
39.99 + | trans_expr _ False = pair @{term False}
39.100 + | trans_expr T (Number (i, NONE)) = pair (HOLogic.mk_number T i)
39.101 + | trans_expr T (Number (i, SOME j)) =
39.102 + pair (Const (@{const_name divide}, [T, T] ---> T) $
39.103 + HOLogic.mk_number T i $ HOLogic.mk_number T j)
39.104 + | trans_expr T (Value i) = term_of_value T i
39.105 + | trans_expr T (Array a) = trans_array T a
39.106 +
39.107 +and trans_array T a =
39.108 + let val dT = Term.domain_type T and rT = Term.range_type T
39.109 + in
39.110 + (case a of
39.111 + Fresh e => trans_expr rT e #>> (fn t => Abs ("x", dT, t))
39.112 + | Store ((a', e1), e2) =>
39.113 + trans_array T a' ##>> trans_expr dT e1 ##>> trans_expr rT e2 #>>
39.114 + (fn ((m, k), v) =>
39.115 + Const (@{const_name fun_upd}, [T, dT, rT] ---> T) $ m $ k $ v))
39.116 + end
39.117 +
39.118 +fun trans_pat i T f x =
39.119 + f (Term.domain_type T) ##>> trans (i-1) (Term.range_type T) x #>>
39.120 + (fn (u, (us, t)) => (u :: us, t))
39.121 +
39.122 +and trans i T ([], v) =
39.123 + if i > 0 then trans_pat i T fresh_term ([], v)
39.124 + else trans_expr T v #>> pair []
39.125 + | trans i T (p :: ps, v) = trans_pat i T (fn U => trans_expr U p) (ps, v)
39.126 +
39.127 +fun mk_eq' t us u = HOLogic.mk_eq (Term.list_comb (t, us), u)
39.128 +fun mk_eq (Const (@{const_name apply}, _)) (u' :: us', u) = mk_eq' u' us' u
39.129 + | mk_eq t (us, u) = mk_eq' t us u
39.130 +
39.131 +fun translate (t, cs) =
39.132 + let val T = Term.fastype_of t
39.133 + in
39.134 + (case (can HOLogic.dest_number t, cs) of
39.135 + (true, [c]) => trans 0 T c #>> (fn (_, u) => [mk_eq u ([], t)])
39.136 + | (_, (es, _) :: _) => fold_map (trans (length es) T) cs #>> map (mk_eq t)
39.137 + | _ => raise TERM ("translate: no cases", [t]))
39.138 + end
39.139 +
39.140 +
39.141 +(* overall procedure *)
39.142 +
39.143 +fun parse_counterex ({terms, ...} : SMT_Translate.recon) ls =
39.144 + read_cex ls
39.145 + |> map_filter (lookup_term terms)
39.146 + |> with_name_context terms translate
39.147 + |> flat
39.148 +
39.149 +end
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
40.2 +++ b/src/HOL/Tools/SMT/z3_proof_literals.ML Wed May 12 23:54:02 2010 +0200
40.3 @@ -0,0 +1,346 @@
40.4 +(* Title: HOL/Tools/SMT/z3_proof_literals.ML
40.5 + Author: Sascha Boehme, TU Muenchen
40.6 +
40.7 +Proof tools related to conjunctions and disjunctions.
40.8 +*)
40.9 +
40.10 +signature Z3_PROOF_LITERALS =
40.11 +sig
40.12 + (* literal table *)
40.13 + type littab = thm Termtab.table
40.14 + val make_littab: thm list -> littab
40.15 + val insert_lit: thm -> littab -> littab
40.16 + val delete_lit: thm -> littab -> littab
40.17 + val lookup_lit: littab -> term -> thm option
40.18 + val get_first_lit: (term -> bool) -> littab -> thm option
40.19 +
40.20 + (* rules *)
40.21 + val true_thm: thm
40.22 + val rewrite_true: thm
40.23 +
40.24 + (* properties *)
40.25 + val is_conj: term -> bool
40.26 + val is_disj: term -> bool
40.27 + val exists_lit: bool -> (term -> bool) -> term -> bool
40.28 +
40.29 + (* proof tools *)
40.30 + val explode: bool -> bool -> bool -> term list -> thm -> thm list
40.31 + val join: bool -> littab -> term -> thm
40.32 + val prove_conj_disj_eq: cterm -> thm
40.33 +end
40.34 +
40.35 +structure Z3_Proof_Literals: Z3_PROOF_LITERALS =
40.36 +struct
40.37 +
40.38 +structure T = Z3_Proof_Tools
40.39 +
40.40 +
40.41 +
40.42 +(** literal table **)
40.43 +
40.44 +type littab = thm Termtab.table
40.45 +
40.46 +fun make_littab thms = fold (Termtab.update o `T.prop_of) thms Termtab.empty
40.47 +
40.48 +fun insert_lit thm = Termtab.update (`T.prop_of thm)
40.49 +fun delete_lit thm = Termtab.delete (T.prop_of thm)
40.50 +fun lookup_lit lits = Termtab.lookup lits
40.51 +fun get_first_lit f =
40.52 + Termtab.get_first (fn (t, thm) => if f t then SOME thm else NONE)
40.53 +
40.54 +
40.55 +
40.56 +(** rules **)
40.57 +
40.58 +val true_thm = @{lemma "~False" by simp}
40.59 +val rewrite_true = @{lemma "True == ~ False" by simp}
40.60 +
40.61 +
40.62 +
40.63 +(** properties and term operations **)
40.64 +
40.65 +val is_neg = (fn @{term Not} $ _ => true | _ => false)
40.66 +fun is_neg' f = (fn @{term Not} $ t => f t | _ => false)
40.67 +val is_dneg = is_neg' is_neg
40.68 +val is_conj = (fn @{term "op &"} $ _ $ _ => true | _ => false)
40.69 +val is_disj = (fn @{term "op |"} $ _ $ _ => true | _ => false)
40.70 +
40.71 +fun dest_disj_term' f = (fn
40.72 + @{term Not} $ (@{term "op |"} $ t $ u) => SOME (f t, f u)
40.73 + | _ => NONE)
40.74 +
40.75 +val dest_conj_term = (fn @{term "op &"} $ t $ u => SOME (t, u) | _ => NONE)
40.76 +val dest_disj_term =
40.77 + dest_disj_term' (fn @{term Not} $ t => t | t => @{term Not} $ t)
40.78 +
40.79 +fun exists_lit is_conj P =
40.80 + let
40.81 + val dest = if is_conj then dest_conj_term else dest_disj_term
40.82 + fun exists t = P t orelse
40.83 + (case dest t of
40.84 + SOME (t1, t2) => exists t1 orelse exists t2
40.85 + | NONE => false)
40.86 + in exists end
40.87 +
40.88 +
40.89 +
40.90 +(** proof tools **)
40.91 +
40.92 +(* explosion of conjunctions and disjunctions *)
40.93 +
40.94 +local
40.95 + fun destc ct = Thm.dest_binop (Thm.dest_arg ct)
40.96 + val dest_conj1 = T.precompose2 destc @{thm conjunct1}
40.97 + val dest_conj2 = T.precompose2 destc @{thm conjunct2}
40.98 + fun dest_conj_rules t =
40.99 + dest_conj_term t |> Option.map (K (dest_conj1, dest_conj2))
40.100 +
40.101 + fun destd f ct = f (Thm.dest_binop (Thm.dest_arg (Thm.dest_arg ct)))
40.102 + val dn1 = apfst Thm.dest_arg and dn2 = apsnd Thm.dest_arg
40.103 + val dest_disj1 = T.precompose2 (destd I) @{lemma "~(P | Q) ==> ~P" by fast}
40.104 + val dest_disj2 = T.precompose2 (destd dn1) @{lemma "~(~P | Q) ==> P" by fast}
40.105 + val dest_disj3 = T.precompose2 (destd I) @{lemma "~(P | Q) ==> ~Q" by fast}
40.106 + val dest_disj4 = T.precompose2 (destd dn2) @{lemma "~(P | ~Q) ==> Q" by fast}
40.107 +
40.108 + fun dest_disj_rules t =
40.109 + (case dest_disj_term' is_neg t of
40.110 + SOME (true, true) => SOME (dest_disj2, dest_disj4)
40.111 + | SOME (true, false) => SOME (dest_disj2, dest_disj3)
40.112 + | SOME (false, true) => SOME (dest_disj1, dest_disj4)
40.113 + | SOME (false, false) => SOME (dest_disj1, dest_disj3)
40.114 + | NONE => NONE)
40.115 +
40.116 + fun destn ct = [Thm.dest_arg (Thm.dest_arg (Thm.dest_arg ct))]
40.117 + val dneg_rule = T.precompose destn @{thm notnotD}
40.118 +in
40.119 +
40.120 +(* explode a term into literals and collect all rules to be able to deduce
40.121 + particular literals afterwards *)
40.122 +fun explode_term is_conj =
40.123 + let
40.124 + val dest = if is_conj then dest_conj_term else dest_disj_term
40.125 + val dest_rules = if is_conj then dest_conj_rules else dest_disj_rules
40.126 +
40.127 + fun add (t, rs) = Termtab.map_default (t, rs)
40.128 + (fn rs' => if length rs' < length rs then rs' else rs)
40.129 +
40.130 + fun explode1 rules t =
40.131 + (case dest t of
40.132 + SOME (t1, t2) =>
40.133 + let val (rule1, rule2) = the (dest_rules t)
40.134 + in
40.135 + explode1 (rule1 :: rules) t1 #>
40.136 + explode1 (rule2 :: rules) t2 #>
40.137 + add (t, rev rules)
40.138 + end
40.139 + | NONE => add (t, rev rules))
40.140 +
40.141 + fun explode0 (@{term Not} $ (@{term Not} $ t)) =
40.142 + Termtab.make [(t, [dneg_rule])]
40.143 + | explode0 t = explode1 [] t Termtab.empty
40.144 +
40.145 + in explode0 end
40.146 +
40.147 +(* extract a literal by applying previously collected rules *)
40.148 +fun extract_lit thm rules = fold T.compose rules thm
40.149 +
40.150 +
40.151 +(* explode a theorem into its literals *)
40.152 +fun explode is_conj full keep_intermediate stop_lits =
40.153 + let
40.154 + val dest_rules = if is_conj then dest_conj_rules else dest_disj_rules
40.155 + val tab = fold (Termtab.update o rpair ()) stop_lits Termtab.empty
40.156 +
40.157 + fun explode1 thm =
40.158 + if Termtab.defined tab (T.prop_of thm) then cons thm
40.159 + else
40.160 + (case dest_rules (T.prop_of thm) of
40.161 + SOME (rule1, rule2) =>
40.162 + explode2 rule1 thm #>
40.163 + explode2 rule2 thm #>
40.164 + keep_intermediate ? cons thm
40.165 + | NONE => cons thm)
40.166 +
40.167 + and explode2 dest_rule thm =
40.168 + if full orelse exists_lit is_conj (Termtab.defined tab) (T.prop_of thm)
40.169 + then explode1 (T.compose dest_rule thm)
40.170 + else cons (T.compose dest_rule thm)
40.171 +
40.172 + fun explode0 thm =
40.173 + if not is_conj andalso is_dneg (T.prop_of thm)
40.174 + then [T.compose dneg_rule thm]
40.175 + else explode1 thm []
40.176 +
40.177 + in explode0 end
40.178 +
40.179 +end
40.180 +
40.181 +
40.182 +
40.183 +(* joining of literals to conjunctions or disjunctions *)
40.184 +
40.185 +local
40.186 + fun on_cprem i f thm = f (Thm.cprem_of thm i)
40.187 + fun on_cprop f thm = f (Thm.cprop_of thm)
40.188 + fun precomp2 f g thm = (on_cprem 1 f thm, on_cprem 2 g thm, f, g, thm)
40.189 + fun comp2 (cv1, cv2, f, g, rule) thm1 thm2 =
40.190 + Thm.instantiate ([], [(cv1, on_cprop f thm1), (cv2, on_cprop g thm2)]) rule
40.191 + |> T.discharge thm1 |> T.discharge thm2
40.192 +
40.193 + fun d1 ct = Thm.dest_arg ct and d2 ct = Thm.dest_arg (Thm.dest_arg ct)
40.194 +
40.195 + val conj_rule = precomp2 d1 d1 @{thm conjI}
40.196 + fun comp_conj ((_, thm1), (_, thm2)) = comp2 conj_rule thm1 thm2
40.197 +
40.198 + val disj1 = precomp2 d2 d2 @{lemma "~P ==> ~Q ==> ~(P | Q)" by fast}
40.199 + val disj2 = precomp2 d2 d1 @{lemma "~P ==> Q ==> ~(P | ~Q)" by fast}
40.200 + val disj3 = precomp2 d1 d2 @{lemma "P ==> ~Q ==> ~(~P | Q)" by fast}
40.201 + val disj4 = precomp2 d1 d1 @{lemma "P ==> Q ==> ~(~P | ~Q)" by fast}
40.202 +
40.203 + fun comp_disj ((false, thm1), (false, thm2)) = comp2 disj1 thm1 thm2
40.204 + | comp_disj ((false, thm1), (true, thm2)) = comp2 disj2 thm1 thm2
40.205 + | comp_disj ((true, thm1), (false, thm2)) = comp2 disj3 thm1 thm2
40.206 + | comp_disj ((true, thm1), (true, thm2)) = comp2 disj4 thm1 thm2
40.207 +
40.208 + fun dest_conj (@{term "op &"} $ t $ u) = ((false, t), (false, u))
40.209 + | dest_conj t = raise TERM ("dest_conj", [t])
40.210 +
40.211 + val neg = (fn @{term Not} $ t => (true, t) | t => (false, @{term Not} $ t))
40.212 + fun dest_disj (@{term Not} $ (@{term "op |"} $ t $ u)) = (neg t, neg u)
40.213 + | dest_disj t = raise TERM ("dest_disj", [t])
40.214 +
40.215 + val dnegE = T.precompose (single o d2 o d1) @{thm notnotD}
40.216 + val dnegI = T.precompose (single o d1) @{lemma "P ==> ~~P" by fast}
40.217 + fun as_dneg f t = f (@{term Not} $ (@{term Not} $ t))
40.218 +
40.219 + fun dni f = apsnd f o Thm.dest_binop o f o d1
40.220 + val negIffE = T.precompose2 (dni d1) @{lemma "~(P = (~Q)) ==> Q = P" by fast}
40.221 + val negIffI = T.precompose2 (dni I) @{lemma "P = Q ==> ~(Q = (~P))" by fast}
40.222 + val iff_const = @{term "op = :: bool => _"}
40.223 + fun as_negIff f (@{term "op = :: bool => _"} $ t $ u) =
40.224 + f (@{term Not} $ (iff_const $ u $ (@{term Not} $ t)))
40.225 + | as_negIff _ _ = NONE
40.226 +in
40.227 +
40.228 +fun join is_conj littab t =
40.229 + let
40.230 + val comp = if is_conj then comp_conj else comp_disj
40.231 + val dest = if is_conj then dest_conj else dest_disj
40.232 +
40.233 + val lookup = lookup_lit littab
40.234 +
40.235 + fun lookup_rule t =
40.236 + (case t of
40.237 + @{term Not} $ (@{term Not} $ t) => (T.compose dnegI, lookup t)
40.238 + | @{term Not} $ (@{term "op = :: bool => _"} $ t $ (@{term Not} $ u)) =>
40.239 + (T.compose negIffI, lookup (iff_const $ u $ t))
40.240 + | @{term Not} $ ((eq as Const (@{const_name "op ="}, _)) $ t $ u) =>
40.241 + let fun rewr lit = lit COMP @{thm not_sym}
40.242 + in (rewr, lookup (@{term Not} $ (eq $ u $ t))) end
40.243 + | _ =>
40.244 + (case as_dneg lookup t of
40.245 + NONE => (T.compose negIffE, as_negIff lookup t)
40.246 + | x => (T.compose dnegE, x)))
40.247 +
40.248 + fun join1 (s, t) =
40.249 + (case lookup t of
40.250 + SOME lit => (s, lit)
40.251 + | NONE =>
40.252 + (case lookup_rule t of
40.253 + (rewrite, SOME lit) => (s, rewrite lit)
40.254 + | (_, NONE) => (s, comp (pairself join1 (dest t)))))
40.255 +
40.256 + in snd (join1 (if is_conj then (false, t) else (true, t))) end
40.257 +
40.258 +end
40.259 +
40.260 +
40.261 +
40.262 +(* proving equality of conjunctions or disjunctions *)
40.263 +
40.264 +fun iff_intro thm1 thm2 = thm2 COMP (thm1 COMP @{thm iffI})
40.265 +
40.266 +local
40.267 + val cp1 = @{lemma "(~P) = (~Q) ==> P = Q" by simp}
40.268 + val cp2 = @{lemma "(~P) = Q ==> P = (~Q)" by fastsimp}
40.269 + val cp3 = @{lemma "P = (~Q) ==> (~P) = Q" by simp}
40.270 + val neg = Thm.capply @{cterm Not}
40.271 +in
40.272 +fun contrapos1 prove (ct, cu) = prove (neg ct, neg cu) COMP cp1
40.273 +fun contrapos2 prove (ct, cu) = prove (neg ct, Thm.dest_arg cu) COMP cp2
40.274 +fun contrapos3 prove (ct, cu) = prove (Thm.dest_arg ct, neg cu) COMP cp3
40.275 +end
40.276 +
40.277 +
40.278 +local
40.279 + val contra_rule = @{lemma "P ==> ~P ==> False" by (rule notE)}
40.280 + fun contra_left conj thm =
40.281 + let
40.282 + val rules = explode_term conj (T.prop_of thm)
40.283 + fun contra_lits (t, rs) =
40.284 + (case t of
40.285 + @{term Not} $ u => Termtab.lookup rules u |> Option.map (pair rs)
40.286 + | _ => NONE)
40.287 + in
40.288 + (case Termtab.lookup rules @{term False} of
40.289 + SOME rs => extract_lit thm rs
40.290 + | NONE =>
40.291 + the (Termtab.get_first contra_lits rules)
40.292 + |> pairself (extract_lit thm)
40.293 + |> (fn (nlit, plit) => nlit COMP (plit COMP contra_rule)))
40.294 + end
40.295 +
40.296 + val falseE_v = Thm.dest_arg (Thm.dest_arg (Thm.cprop_of @{thm FalseE}))
40.297 + fun contra_right ct = Thm.instantiate ([], [(falseE_v, ct)]) @{thm FalseE}
40.298 +in
40.299 +fun contradict conj ct =
40.300 + iff_intro (T.under_assumption (contra_left conj) ct) (contra_right ct)
40.301 +end
40.302 +
40.303 +
40.304 +local
40.305 + fun prove_eq l r (cl, cr) =
40.306 + let
40.307 + fun explode' is_conj = explode is_conj true (l <> r) []
40.308 + fun make_tab is_conj thm = make_littab (true_thm :: explode' is_conj thm)
40.309 + fun prove is_conj ct tab = join is_conj tab (Thm.term_of ct)
40.310 +
40.311 + val thm1 = T.under_assumption (prove r cr o make_tab l) cl
40.312 + val thm2 = T.under_assumption (prove l cl o make_tab r) cr
40.313 + in iff_intro thm1 thm2 end
40.314 +
40.315 + datatype conj_disj = CONJ | DISJ | NCON | NDIS
40.316 + fun kind_of t =
40.317 + if is_conj t then SOME CONJ
40.318 + else if is_disj t then SOME DISJ
40.319 + else if is_neg' is_conj t then SOME NCON
40.320 + else if is_neg' is_disj t then SOME NDIS
40.321 + else NONE
40.322 +in
40.323 +
40.324 +fun prove_conj_disj_eq ct =
40.325 + let val cp as (cl, cr) = Thm.dest_binop (Thm.dest_arg ct)
40.326 + in
40.327 + (case (kind_of (Thm.term_of cl), Thm.term_of cr) of
40.328 + (SOME CONJ, @{term False}) => contradict true cl
40.329 + | (SOME DISJ, @{term "~False"}) => contrapos2 (contradict false o fst) cp
40.330 + | (kl, _) =>
40.331 + (case (kl, kind_of (Thm.term_of cr)) of
40.332 + (SOME CONJ, SOME CONJ) => prove_eq true true cp
40.333 + | (SOME CONJ, SOME NDIS) => prove_eq true false cp
40.334 + | (SOME CONJ, _) => prove_eq true true cp
40.335 + | (SOME DISJ, SOME DISJ) => contrapos1 (prove_eq false false) cp
40.336 + | (SOME DISJ, SOME NCON) => contrapos2 (prove_eq false true) cp
40.337 + | (SOME DISJ, _) => contrapos1 (prove_eq false false) cp
40.338 + | (SOME NCON, SOME NCON) => contrapos1 (prove_eq true true) cp
40.339 + | (SOME NCON, SOME DISJ) => contrapos3 (prove_eq true false) cp
40.340 + | (SOME NCON, NONE) => contrapos3 (prove_eq true false) cp
40.341 + | (SOME NDIS, SOME NDIS) => prove_eq false false cp
40.342 + | (SOME NDIS, SOME CONJ) => prove_eq false true cp
40.343 + | (SOME NDIS, NONE) => prove_eq false true cp
40.344 + | _ => raise CTERM ("prove_conj_disj_eq", [ct])))
40.345 + end
40.346 +
40.347 +end
40.348 +
40.349 +end
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
41.2 +++ b/src/HOL/Tools/SMT/z3_proof_parser.ML Wed May 12 23:54:02 2010 +0200
41.3 @@ -0,0 +1,499 @@
41.4 +(* Title: HOL/Tools/SMT/z3_proof_parser.ML
41.5 + Author: Sascha Boehme, TU Muenchen
41.6 +
41.7 +Parser for Z3 proofs.
41.8 +*)
41.9 +
41.10 +signature Z3_PROOF_PARSER =
41.11 +sig
41.12 + (* proof rules *)
41.13 + datatype rule = TrueAxiom | Asserted | Goal | ModusPonens | Reflexivity |
41.14 + Symmetry | Transitivity | TransitivityStar | Monotonicity | QuantIntro |
41.15 + Distributivity | AndElim | NotOrElim | Rewrite | RewriteStar | PullQuant |
41.16 + PullQuantStar | PushQuant | ElimUnusedVars | DestEqRes | QuantInst |
41.17 + Hypothesis | Lemma | UnitResolution | IffTrue | IffFalse | Commutativity |
41.18 + DefAxiom | IntroDef | ApplyDef | IffOeq | NnfPos | NnfNeg | NnfStar |
41.19 + CnfStar | Skolemize | ModusPonensOeq | ThLemma
41.20 + val string_of_rule: rule -> string
41.21 +
41.22 + (* proof parser *)
41.23 + datatype proof_step = Proof_Step of {
41.24 + rule: rule,
41.25 + prems: int list,
41.26 + prop: cterm }
41.27 + val parse: Proof.context -> typ Symtab.table -> term Symtab.table ->
41.28 + string list ->
41.29 + int * (proof_step Inttab.table * string list * Proof.context)
41.30 +end
41.31 +
41.32 +structure Z3_Proof_Parser: Z3_PROOF_PARSER =
41.33 +struct
41.34 +
41.35 +(** proof rules **)
41.36 +
41.37 +datatype rule = TrueAxiom | Asserted | Goal | ModusPonens | Reflexivity |
41.38 + Symmetry | Transitivity | TransitivityStar | Monotonicity | QuantIntro |
41.39 + Distributivity | AndElim | NotOrElim | Rewrite | RewriteStar | PullQuant |
41.40 + PullQuantStar | PushQuant | ElimUnusedVars | DestEqRes | QuantInst |
41.41 + Hypothesis | Lemma | UnitResolution | IffTrue | IffFalse | Commutativity |
41.42 + DefAxiom | IntroDef | ApplyDef | IffOeq | NnfPos | NnfNeg | NnfStar |
41.43 + CnfStar | Skolemize | ModusPonensOeq | ThLemma
41.44 +
41.45 +val rule_names = Symtab.make [
41.46 + ("true-axiom", TrueAxiom),
41.47 + ("asserted", Asserted),
41.48 + ("goal", Goal),
41.49 + ("mp", ModusPonens),
41.50 + ("refl", Reflexivity),
41.51 + ("symm", Symmetry),
41.52 + ("trans", Transitivity),
41.53 + ("trans*", TransitivityStar),
41.54 + ("monotonicity", Monotonicity),
41.55 + ("quant-intro", QuantIntro),
41.56 + ("distributivity", Distributivity),
41.57 + ("and-elim", AndElim),
41.58 + ("not-or-elim", NotOrElim),
41.59 + ("rewrite", Rewrite),
41.60 + ("rewrite*", RewriteStar),
41.61 + ("pull-quant", PullQuant),
41.62 + ("pull-quant*", PullQuantStar),
41.63 + ("push-quant", PushQuant),
41.64 + ("elim-unused", ElimUnusedVars),
41.65 + ("der", DestEqRes),
41.66 + ("quant-inst", QuantInst),
41.67 + ("hypothesis", Hypothesis),
41.68 + ("lemma", Lemma),
41.69 + ("unit-resolution", UnitResolution),
41.70 + ("iff-true", IffTrue),
41.71 + ("iff-false", IffFalse),
41.72 + ("commutativity", Commutativity),
41.73 + ("def-axiom", DefAxiom),
41.74 + ("intro-def", IntroDef),
41.75 + ("apply-def", ApplyDef),
41.76 + ("iff~", IffOeq),
41.77 + ("nnf-pos", NnfPos),
41.78 + ("nnf-neg", NnfNeg),
41.79 + ("nnf*", NnfStar),
41.80 + ("cnf*", CnfStar),
41.81 + ("sk", Skolemize),
41.82 + ("mp~", ModusPonensOeq),
41.83 + ("th-lemma", ThLemma)]
41.84 +
41.85 +fun string_of_rule r =
41.86 + let fun eq_rule (s, r') = if r = r' then SOME s else NONE
41.87 + in the (Symtab.get_first eq_rule rule_names) end
41.88 +
41.89 +
41.90 +
41.91 +(** certified terms and variables **)
41.92 +
41.93 +val (var_prefix, decl_prefix) = ("v", "sk") (* must be distinct *)
41.94 +
41.95 +fun instTs cUs (cTs, ct) = Thm.instantiate_cterm (cTs ~~ cUs, []) ct
41.96 +fun instT cU (cT, ct) = instTs [cU] ([cT], ct)
41.97 +fun mk_inst_pair destT cpat = (destT (Thm.ctyp_of_term cpat), cpat)
41.98 +val destT1 = hd o Thm.dest_ctyp
41.99 +val destT2 = hd o tl o Thm.dest_ctyp
41.100 +
41.101 +fun ctyp_of (ct, _) = Thm.ctyp_of_term ct
41.102 +fun instT' t = instT (ctyp_of t)
41.103 +
41.104 +fun certify ctxt = Thm.cterm_of (ProofContext.theory_of ctxt)
41.105 +
41.106 +val maxidx_of = #maxidx o Thm.rep_cterm
41.107 +
41.108 +fun mk_inst ctxt vars =
41.109 + let
41.110 + val max = fold (Integer.max o fst) vars 0
41.111 + val ns = fst (Variable.variant_fixes (replicate (max + 1) var_prefix) ctxt)
41.112 + fun mk (i, v) = (v, certify ctxt (Free (nth ns i, #T (Thm.rep_cterm v))))
41.113 + in map mk vars end
41.114 +
41.115 +fun close ctxt (ct, vars) =
41.116 + let
41.117 + val inst = mk_inst ctxt vars
41.118 + val mk_prop = Thm.capply @{cterm Trueprop}
41.119 + val names = fold (Term.add_free_names o Thm.term_of o snd) inst []
41.120 + in (mk_prop (Thm.instantiate_cterm ([], inst) ct), names) end
41.121 +
41.122 +
41.123 +fun mk_bound thy (i, T) =
41.124 + let val ct = Thm.cterm_of thy (Var ((Name.uu, 0), T))
41.125 + in (ct, [(i, ct)]) end
41.126 +
41.127 +local
41.128 + fun mk_quant thy q T (ct, vars) =
41.129 + let
41.130 + val cv =
41.131 + (case AList.lookup (op =) vars 0 of
41.132 + SOME cv => cv
41.133 + | _ => Thm.cterm_of thy (Var ((Name.uu, maxidx_of ct + 1), T)))
41.134 + val cq = instT (Thm.ctyp_of_term cv) q
41.135 + fun dec (i, v) = if i = 0 then NONE else SOME (i-1, v)
41.136 + in (Thm.capply cq (Thm.cabs cv ct), map_filter dec vars) end
41.137 +
41.138 + val forall = mk_inst_pair (destT1 o destT1) @{cpat All}
41.139 + val exists = mk_inst_pair (destT1 o destT1) @{cpat Ex}
41.140 +in
41.141 +fun mk_forall thy = fold_rev (mk_quant thy forall)
41.142 +fun mk_exists thy = fold_rev (mk_quant thy exists)
41.143 +end
41.144 +
41.145 +
41.146 +local
41.147 + fun equal_var cv (_, cu) = (cv aconvc cu)
41.148 +
41.149 + fun apply (ct2, vars2) (ct1, vars1) =
41.150 + let
41.151 + val incr = Thm.incr_indexes_cterm (maxidx_of ct1 + maxidx_of ct2 + 2)
41.152 +
41.153 + fun part (v as (i, cv)) =
41.154 + (case AList.lookup (op =) vars1 i of
41.155 + SOME cu => apfst (if cu aconvc cv then I else cons (cv, cu))
41.156 + | NONE =>
41.157 + if not (exists (equal_var cv) vars1) then apsnd (cons v)
41.158 + else
41.159 + let val cv' = incr cv
41.160 + in apfst (cons (cv, cv')) #> apsnd (cons (i, cv')) end)
41.161 +
41.162 + val (ct2', vars2') =
41.163 + if null vars1 then (ct2, vars2)
41.164 + else fold part vars2 ([], [])
41.165 + |>> (fn inst => Thm.instantiate_cterm ([], inst) ct2)
41.166 +
41.167 + in (Thm.capply ct1 ct2', vars1 @ vars2') end
41.168 +in
41.169 +fun mk_fun ct ts = fold apply ts (ct, [])
41.170 +fun mk_binop f t u = mk_fun f [t, u]
41.171 +fun mk_nary _ e [] = e
41.172 + | mk_nary ct _ es = uncurry (fold_rev (mk_binop ct)) (split_last es)
41.173 +end
41.174 +
41.175 +
41.176 +val mk_true = mk_fun @{cterm "~False"} []
41.177 +val mk_false = mk_fun @{cterm "False"} []
41.178 +fun mk_not t = mk_fun @{cterm Not} [t]
41.179 +val mk_imp = mk_binop @{cterm "op -->"}
41.180 +val mk_iff = mk_binop @{cterm "op = :: bool => _"}
41.181 +
41.182 +val eq = mk_inst_pair destT1 @{cpat "op ="}
41.183 +fun mk_eq t u = mk_binop (instT' t eq) t u
41.184 +
41.185 +val if_term = mk_inst_pair (destT1 o destT2) @{cpat If}
41.186 +fun mk_if c t u = mk_fun (instT' t if_term) [c, t, u]
41.187 +
41.188 +val nil_term = mk_inst_pair destT1 @{cpat Nil}
41.189 +val cons_term = mk_inst_pair destT1 @{cpat Cons}
41.190 +fun mk_list cT es =
41.191 + fold_rev (mk_binop (instT cT cons_term)) es (mk_fun (instT cT nil_term) [])
41.192 +
41.193 +val distinct = mk_inst_pair (destT1 o destT1) @{cpat distinct}
41.194 +fun mk_distinct [] = mk_true
41.195 + | mk_distinct (es as (e :: _)) =
41.196 + mk_fun (instT' e distinct) [mk_list (ctyp_of e) es]
41.197 +
41.198 +
41.199 +(* arithmetic *)
41.200 +
41.201 +fun mk_int_num i = mk_fun (Numeral.mk_cnumber @{ctyp int} i) []
41.202 +fun mk_real_num i = mk_fun (Numeral.mk_cnumber @{ctyp real} i) []
41.203 +fun mk_real_frac_num (e, NONE) = mk_real_num e
41.204 + | mk_real_frac_num (e, SOME d) =
41.205 + mk_binop @{cterm "op / :: real => _"} (mk_real_num e) (mk_real_num d)
41.206 +
41.207 +fun has_int_type e = (Thm.typ_of (ctyp_of e) = @{typ int})
41.208 +fun choose e i r = if has_int_type e then i else r
41.209 +
41.210 +val uminus_i = @{cterm "uminus :: int => _"}
41.211 +val uminus_r = @{cterm "uminus :: real => _"}
41.212 +fun mk_uminus e = mk_fun (choose e uminus_i uminus_r) [e]
41.213 +
41.214 +fun arith_op int_op real_op t u = mk_binop (choose t int_op real_op) t u
41.215 +
41.216 +val mk_add = arith_op @{cterm "op + :: int => _"} @{cterm "op + :: real => _"}
41.217 +val mk_sub = arith_op @{cterm "op - :: int => _"} @{cterm "op - :: real => _"}
41.218 +val mk_mul = arith_op @{cterm "op * :: int => _"} @{cterm "op * :: real => _"}
41.219 +val mk_int_div = mk_binop @{cterm "op div :: int => _"}
41.220 +val mk_real_div = mk_binop @{cterm "op / :: real => _"}
41.221 +val mk_mod = mk_binop @{cterm "op mod :: int => _"}
41.222 +val mk_lt = arith_op @{cterm "op < :: int => _"} @{cterm "op < :: real => _"}
41.223 +val mk_le = arith_op @{cterm "op <= :: int => _"} @{cterm "op <= :: real => _"}
41.224 +
41.225 +
41.226 +(* arrays *)
41.227 +
41.228 +val access = mk_inst_pair (Thm.dest_ctyp o destT1) @{cpat apply}
41.229 +fun mk_access array index =
41.230 + let val cTs = Thm.dest_ctyp (ctyp_of array)
41.231 + in mk_fun (instTs cTs access) [array, index] end
41.232 +
41.233 +val update = mk_inst_pair (Thm.dest_ctyp o destT1) @{cpat fun_upd}
41.234 +fun mk_update array index value =
41.235 + let val cTs = Thm.dest_ctyp (ctyp_of array)
41.236 + in mk_fun (instTs cTs update) [array, index, value] end
41.237 +
41.238 +
41.239 +(* bitvectors *)
41.240 +
41.241 +fun mk_binT size =
41.242 + let
41.243 + fun bitT i T =
41.244 + if i = 0
41.245 + then Type (@{type_name "Numeral_Type.bit0"}, [T])
41.246 + else Type (@{type_name "Numeral_Type.bit1"}, [T])
41.247 +
41.248 + fun binT i =
41.249 + if i = 0 then @{typ "Numeral_Type.num0"}
41.250 + else if i = 1 then @{typ "Numeral_Type.num1"}
41.251 + else let val (q, r) = Integer.div_mod i 2 in bitT r (binT q) end
41.252 + in
41.253 + if size >= 0 then binT size
41.254 + else raise TYPE ("mk_binT: " ^ string_of_int size, [], [])
41.255 + end
41.256 +
41.257 +fun mk_wordT size = Type (@{type_name "word"}, [mk_binT size])
41.258 +
41.259 +fun mk_bv_num thy (num, size) =
41.260 + mk_fun (Numeral.mk_cnumber (Thm.ctyp_of thy (mk_wordT size)) num) []
41.261 +
41.262 +
41.263 +
41.264 +(** proof parser **)
41.265 +
41.266 +datatype proof_step = Proof_Step of {
41.267 + rule: rule,
41.268 + prems: int list,
41.269 + prop: cterm }
41.270 +
41.271 +
41.272 +(* parser context *)
41.273 +
41.274 +fun make_context ctxt typs terms =
41.275 + let
41.276 + val ctxt' =
41.277 + ctxt
41.278 + |> Symtab.fold (Variable.declare_typ o snd) typs
41.279 + |> Symtab.fold (Variable.declare_term o snd) terms
41.280 +
41.281 + fun cert @{term True} = @{cterm "~False"}
41.282 + | cert t = certify ctxt' t
41.283 + in (typs, Symtab.map cert terms, Inttab.empty, Inttab.empty, [], ctxt') end
41.284 +
41.285 +fun fresh_name n (typs, terms, exprs, steps, vars, ctxt) =
41.286 + let val (n', ctxt') = yield_singleton Variable.variant_fixes n ctxt
41.287 + in (n', (typs, terms, exprs, steps, vars, ctxt')) end
41.288 +
41.289 +fun theory_of (_, _, _, _, _, ctxt) = ProofContext.theory_of ctxt
41.290 +
41.291 +fun typ_of_sort n (cx as (typs, _, _, _, _, _)) =
41.292 + (case Symtab.lookup typs n of
41.293 + SOME T => (T, cx)
41.294 + | NONE => cx
41.295 + |> fresh_name ("'" ^ n) |>> TFree o rpair @{sort type}
41.296 + |> (fn (T, (typs, terms, exprs, steps, vars, ctxt)) =>
41.297 + (T, (Symtab.update (n, T) typs, terms, exprs, steps, vars, ctxt))))
41.298 +
41.299 +fun add_decl (n, T) (cx as (_, terms, _, _, _, _)) =
41.300 + (case Symtab.lookup terms n of
41.301 + SOME _ => cx
41.302 + | NONE => cx |> fresh_name (decl_prefix ^ n)
41.303 + |> (fn (m, (typs, terms, exprs, steps, vars, ctxt)) =>
41.304 + let val upd = Symtab.update (n, certify ctxt (Free (m, T)))
41.305 + in (typs, upd terms, exprs, steps, vars, ctxt) end))
41.306 +
41.307 +datatype sym = Sym of string * sym list
41.308 +
41.309 +fun mk_app _ (Sym ("true", _), _) = SOME mk_true
41.310 + | mk_app _ (Sym ("false", _), _) = SOME mk_false
41.311 + | mk_app _ (Sym ("=", _), [t, u]) = SOME (mk_eq t u)
41.312 + | mk_app _ (Sym ("distinct", _), ts) = SOME (mk_distinct ts)
41.313 + | mk_app _ (Sym ("ite", _), [s, t, u]) = SOME (mk_if s t u)
41.314 + | mk_app _ (Sym ("and", _), ts) = SOME (mk_nary @{cterm "op &"} mk_true ts)
41.315 + | mk_app _ (Sym ("or", _), ts) = SOME (mk_nary @{cterm "op |"} mk_false ts)
41.316 + | mk_app _ (Sym ("iff", _), [t, u]) = SOME (mk_iff t u)
41.317 + | mk_app _ (Sym ("xor", _), [t, u]) = SOME (mk_not (mk_iff t u))
41.318 + | mk_app _ (Sym ("not", _), [t]) = SOME (mk_not t)
41.319 + | mk_app _ (Sym ("implies", _), [t, u]) = SOME (mk_imp t u)
41.320 + | mk_app _ (Sym ("~", _), [t, u]) = SOME (mk_iff t u)
41.321 + | mk_app _ (Sym ("<", _), [t, u]) = SOME (mk_lt t u)
41.322 + | mk_app _ (Sym ("<=", _), [t, u]) = SOME (mk_le t u)
41.323 + | mk_app _ (Sym (">", _), [t, u]) = SOME (mk_lt u t)
41.324 + | mk_app _ (Sym (">=", _), [t, u]) = SOME (mk_le u t)
41.325 + | mk_app _ (Sym ("+", _), [t, u]) = SOME (mk_add t u)
41.326 + | mk_app _ (Sym ("-", _), [t, u]) = SOME (mk_sub t u)
41.327 + | mk_app _ (Sym ("-", _), [t]) = SOME (mk_uminus t)
41.328 + | mk_app _ (Sym ("*", _), [t, u]) = SOME (mk_mul t u)
41.329 + | mk_app _ (Sym ("/", _), [t, u]) = SOME (mk_real_div t u)
41.330 + | mk_app _ (Sym ("div", _), [t, u]) = SOME (mk_int_div t u)
41.331 + | mk_app _ (Sym ("mod", _), [t, u]) = SOME (mk_mod t u)
41.332 + | mk_app _ (Sym ("select", _), [m, k]) = SOME (mk_access m k)
41.333 + | mk_app _ (Sym ("store", _), [m, k, v]) = SOME (mk_update m k v)
41.334 + | mk_app _ (Sym ("pattern", _), _) = SOME mk_true
41.335 + | mk_app (_, terms, _, _, _, _) (Sym (n, _), ts) =
41.336 + Symtab.lookup terms n |> Option.map (fn ct => mk_fun ct ts)
41.337 +
41.338 +fun add_expr k t (typs, terms, exprs, steps, vars, ctxt) =
41.339 + (typs, terms, Inttab.update (k, t) exprs, steps, vars, ctxt)
41.340 +
41.341 +fun lookup_expr (_, _, exprs, _, _, _) = Inttab.lookup exprs
41.342 +
41.343 +fun add_proof_step k ((r, prems), prop) cx =
41.344 + let
41.345 + val (typs, terms, exprs, steps, vars, ctxt) = cx
41.346 + val (ct, vs) = close ctxt prop
41.347 + val step = Proof_Step {rule=r, prems=prems, prop=ct}
41.348 + val vars' = union (op =) vs vars
41.349 + in (typs, terms, exprs, Inttab.update (k, step) steps, vars', ctxt) end
41.350 +
41.351 +fun finish (_, _, _, steps, vars, ctxt) = (steps, vars, ctxt)
41.352 +
41.353 +
41.354 +(* core parser *)
41.355 +
41.356 +fun parse_exn line_no msg = raise SMT_Solver.SMT ("Z3 proof parser (line " ^
41.357 + string_of_int line_no ^ "): " ^ msg)
41.358 +
41.359 +fun scan_exn msg ((line_no, _), _) = parse_exn line_no msg
41.360 +
41.361 +fun with_info f cx =
41.362 + (case f ((NONE, 1), cx) of
41.363 + ((SOME root, _), cx') => (root, cx')
41.364 + | ((_, line_no), _) => parse_exn line_no "bad proof")
41.365 +
41.366 +fun parse_line _ _ (st as ((SOME _, _), _)) = st
41.367 + | parse_line scan line ((_, line_no), cx) =
41.368 + let val st = ((line_no, cx), explode line)
41.369 + in
41.370 + (case Scan.catch (Scan.finite' Symbol.stopper (Scan.option scan)) st of
41.371 + (SOME r, ((_, cx'), _)) => ((r, line_no+1), cx')
41.372 + | (NONE, _) => parse_exn line_no ("bad proof line: " ^ quote line))
41.373 + end
41.374 +
41.375 +fun with_context f x ((line_no, cx), st) =
41.376 + let val (y, cx') = f x cx
41.377 + in (y, ((line_no, cx'), st)) end
41.378 +
41.379 +
41.380 +fun lookup_context f x (st as ((_, cx), _)) = (f cx x, st)
41.381 +
41.382 +
41.383 +(* parser combinators and parsers for basic entities *)
41.384 +
41.385 +fun $$ s = Scan.lift (Scan.$$ s)
41.386 +fun this s = Scan.lift (Scan.this_string s)
41.387 +fun blank st = Scan.lift (Scan.many1 Symbol.is_ascii_blank) st
41.388 +fun sep scan = blank |-- scan
41.389 +fun seps scan = Scan.repeat (sep scan)
41.390 +fun seps1 scan = Scan.repeat1 (sep scan)
41.391 +fun seps_by scan_sep scan = scan ::: Scan.repeat (scan_sep |-- scan)
41.392 +
41.393 +fun par scan = $$ "(" |-- scan --| $$ ")"
41.394 +fun bra scan = $$ "[" |-- scan --| $$ "]"
41.395 +
41.396 +val digit = (fn
41.397 + "0" => SOME 0 | "1" => SOME 1 | "2" => SOME 2 | "3" => SOME 3 |
41.398 + "4" => SOME 4 | "5" => SOME 5 | "6" => SOME 6 | "7" => SOME 7 |
41.399 + "8" => SOME 8 | "9" => SOME 9 | _ => NONE)
41.400 +
41.401 +fun mk_num ds = fold (fn d => fn i => i * 10 + d) ds 0
41.402 +val nat_num = Scan.lift (Scan.repeat1 (Scan.some digit)) >> mk_num
41.403 +val int_num = Scan.optional ($$ "-" >> K (fn i => ~i)) I :|--
41.404 + (fn sign => nat_num >> sign)
41.405 +
41.406 +val is_char = Symbol.is_ascii_letter orf Symbol.is_ascii_digit orf
41.407 + member (op =) (explode "_+*-/%~=<>$&|?!.@^#")
41.408 +val name = Scan.lift (Scan.many1 is_char) >> implode
41.409 +
41.410 +fun sym st = (name -- Scan.optional (bra (seps_by ($$ ":") sym)) [] >> Sym) st
41.411 +
41.412 +fun id st = ($$ "#" |-- nat_num) st
41.413 +
41.414 +
41.415 +(* parsers for various parts of Z3 proofs *)
41.416 +
41.417 +fun sort st = Scan.first [
41.418 + this "bool" >> K @{typ bool},
41.419 + this "int" >> K @{typ int},
41.420 + this "real" >> K @{typ real},
41.421 + this "bv" |-- bra nat_num >> mk_wordT,
41.422 + this "array" |-- bra (sort --| $$ ":" -- sort) >> (op -->),
41.423 + par (this "->" |-- seps1 sort) >> ((op --->) o split_last),
41.424 + name :|-- with_context typ_of_sort] st
41.425 +
41.426 +fun bound st = (par (this ":var" |-- sep nat_num -- sep sort) :|--
41.427 + lookup_context (mk_bound o theory_of)) st
41.428 +
41.429 +fun number st = st |> (
41.430 + int_num -- Scan.option ($$ "/" |-- int_num) --| this "::" :|--
41.431 + (fn num as (n, _) =>
41.432 + this "int" >> K (mk_int_num n) ||
41.433 + this "real" >> K (mk_real_frac_num num)))
41.434 +
41.435 +fun bv_number st = (this "bv" |-- bra (nat_num --| $$ ":" -- nat_num) :|--
41.436 + lookup_context (mk_bv_num o theory_of)) st
41.437 +
41.438 +fun appl (app as (Sym (n, _), _)) = lookup_context mk_app app :|-- (fn
41.439 + SOME app' => Scan.succeed app'
41.440 + | NONE => scan_exn ("unknown function: " ^ quote n))
41.441 +
41.442 +fun constant st = ((sym >> rpair []) :|-- appl) st
41.443 +
41.444 +fun expr_id st = (id :|-- (fn i => lookup_context lookup_expr i :|-- (fn
41.445 + SOME e => Scan.succeed e
41.446 + | NONE => scan_exn ("unknown term id: " ^ quote (string_of_int i))))) st
41.447 +
41.448 +fun arg st = Scan.first [expr_id, number, bv_number, constant] st
41.449 +
41.450 +fun application st = par ((sym -- Scan.repeat1 (sep arg)) :|-- appl) st
41.451 +
41.452 +fun variables st = par (this "vars" |-- seps1 (par (name |-- sep sort))) st
41.453 +
41.454 +fun patterns st = seps (par ((this ":pat" || this ":nopat") |-- seps1 id)) st
41.455 +
41.456 +fun quant_kind st = st |> (
41.457 + this "forall" >> K (mk_forall o theory_of) ||
41.458 + this "exists" >> K (mk_exists o theory_of))
41.459 +
41.460 +fun quantifier st =
41.461 + (par (quant_kind -- sep variables --| patterns -- sep arg) :|--
41.462 + lookup_context (fn cx => fn ((mk_q, Ts), body) => mk_q cx Ts body)) st
41.463 +
41.464 +fun expr k =
41.465 + Scan.first [bound, quantifier, application, number, bv_number, constant] :|--
41.466 + with_context (pair NONE oo add_expr k)
41.467 +
41.468 +fun rule_name st = ((name >> `(Symtab.lookup rule_names)) :|-- (fn
41.469 + (SOME r, _) => Scan.succeed r
41.470 + | (NONE, n) => scan_exn ("unknown proof rule: " ^ quote n))) st
41.471 +
41.472 +fun rule f k =
41.473 + bra (rule_name -- seps id) --| $$ ":" -- sep arg #->
41.474 + with_context (pair (f k) oo add_proof_step k)
41.475 +
41.476 +fun decl st = (this "decl" |-- sep name --| sep (this "::") -- sep sort :|--
41.477 + with_context (pair NONE oo add_decl)) st
41.478 +
41.479 +fun def st = (id --| sep (this ":=")) st
41.480 +
41.481 +fun node st = st |> (
41.482 + decl ||
41.483 + def :|-- (fn k => sep (expr k) || sep (rule (K NONE) k)) ||
41.484 + rule SOME ~1)
41.485 +
41.486 +
41.487 +(* overall parser *)
41.488 +
41.489 +(* Currently, terms are parsed bottom-up (i.e., along with parsing the proof
41.490 + text line by line), but proofs are reconstructed top-down (i.e. by an
41.491 + in-order top-down traversal of the proof tree/graph). The latter approach
41.492 + was taken because some proof texts comprise irrelevant proof steps which
41.493 + will thus not be reconstructed. This approach might also be beneficial
41.494 + for constructing terms, but it would also increase the complexity of the
41.495 + (otherwise rather modular) code. *)
41.496 +
41.497 +fun parse ctxt typs terms proof_text =
41.498 + make_context ctxt typs terms
41.499 + |> with_info (fold (parse_line node) proof_text)
41.500 + ||> finish
41.501 +
41.502 +end
42.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
42.2 +++ b/src/HOL/Tools/SMT/z3_proof_reconstruction.ML Wed May 12 23:54:02 2010 +0200
42.3 @@ -0,0 +1,821 @@
42.4 +(* Title: HOL/Tools/SMT/z3_proof_reconstruction.ML
42.5 + Author: Sascha Boehme, TU Muenchen
42.6 +
42.7 +Proof reconstruction for proofs found by Z3.
42.8 +*)
42.9 +
42.10 +signature Z3_PROOF_RECONSTRUCTION =
42.11 +sig
42.12 + val trace_assms: bool Config.T
42.13 + val reconstruct: string list * SMT_Translate.recon -> Proof.context ->
42.14 + thm * Proof.context
42.15 + val setup: theory -> theory
42.16 +end
42.17 +
42.18 +structure Z3_Proof_Reconstruction: Z3_PROOF_RECONSTRUCTION =
42.19 +struct
42.20 +
42.21 +structure P = Z3_Proof_Parser
42.22 +structure T = Z3_Proof_Tools
42.23 +structure L = Z3_Proof_Literals
42.24 +
42.25 +fun z3_exn msg = raise SMT_Solver.SMT ("Z3 proof reconstruction: " ^ msg)
42.26 +
42.27 +
42.28 +
42.29 +(** net of schematic rules **)
42.30 +
42.31 +val z3_ruleN = "z3_rule"
42.32 +
42.33 +local
42.34 + val description = "declaration of Z3 proof rules"
42.35 +
42.36 + val eq = Thm.eq_thm
42.37 +
42.38 + structure Z3_Rules = Generic_Data
42.39 + (
42.40 + type T = thm Net.net
42.41 + val empty = Net.empty
42.42 + val extend = I
42.43 + val merge = Net.merge eq
42.44 + )
42.45 +
42.46 + val prep = `Thm.prop_of o Simplifier.rewrite_rule [L.rewrite_true]
42.47 +
42.48 + fun ins thm net = Net.insert_term eq (prep thm) net handle Net.INSERT => net
42.49 + fun del thm net = Net.delete_term eq (prep thm) net handle Net.DELETE => net
42.50 +
42.51 + val add = Thm.declaration_attribute (Z3_Rules.map o ins)
42.52 + val del = Thm.declaration_attribute (Z3_Rules.map o del)
42.53 +in
42.54 +
42.55 +fun get_schematic_rules ctxt = Net.content (Z3_Rules.get (Context.Proof ctxt))
42.56 +
42.57 +fun by_schematic_rule ctxt ct =
42.58 + the (T.net_instance (Z3_Rules.get (Context.Proof ctxt)) ct)
42.59 +
42.60 +val z3_rules_setup =
42.61 + Attrib.setup (Binding.name z3_ruleN) (Attrib.add_del add del) description #>
42.62 + PureThy.add_thms_dynamic (Binding.name z3_ruleN, Net.content o Z3_Rules.get)
42.63 +
42.64 +end
42.65 +
42.66 +
42.67 +
42.68 +(** proof tools **)
42.69 +
42.70 +fun named ctxt name prover ct =
42.71 + let val _ = SMT_Solver.trace_msg ctxt I ("Z3: trying " ^ name ^ " ...")
42.72 + in prover ct end
42.73 +
42.74 +fun NAMED ctxt name tac i st =
42.75 + let val _ = SMT_Solver.trace_msg ctxt I ("Z3: trying " ^ name ^ " ...")
42.76 + in tac i st end
42.77 +
42.78 +fun pretty_goal ctxt thms t =
42.79 + [Pretty.block [Pretty.str "proposition: ", Syntax.pretty_term ctxt t]]
42.80 + |> not (null thms) ? cons (Pretty.big_list "assumptions:"
42.81 + (map (Display.pretty_thm ctxt) thms))
42.82 +
42.83 +fun try_apply ctxt thms =
42.84 + let
42.85 + fun try_apply_err ct = Pretty.string_of (Pretty.chunks [
42.86 + Pretty.big_list ("Z3 found a proof," ^
42.87 + " but proof reconstruction failed at the following subgoal:")
42.88 + (pretty_goal ctxt thms (Thm.term_of ct)),
42.89 + Pretty.str ("Adding a rule to the lemma group " ^ quote z3_ruleN ^
42.90 + " might solve this problem.")])
42.91 +
42.92 + fun apply [] ct = error (try_apply_err ct)
42.93 + | apply (prover :: provers) ct =
42.94 + (case try prover ct of
42.95 + SOME thm => (SMT_Solver.trace_msg ctxt I "Z3: succeeded"; thm)
42.96 + | NONE => apply provers ct)
42.97 +
42.98 + in apply o cons (named ctxt "schematic rules" (by_schematic_rule ctxt)) end
42.99 +
42.100 +
42.101 +
42.102 +(** theorems and proofs **)
42.103 +
42.104 +(* theorem incarnations *)
42.105 +
42.106 +datatype theorem =
42.107 + Thm of thm | (* theorem without special features *)
42.108 + MetaEq of thm | (* meta equality "t == s" *)
42.109 + Literals of thm * L.littab
42.110 + (* "P1 & ... & Pn" and table of all literals P1, ..., Pn *)
42.111 +
42.112 +fun thm_of (Thm thm) = thm
42.113 + | thm_of (MetaEq thm) = thm COMP @{thm meta_eq_to_obj_eq}
42.114 + | thm_of (Literals (thm, _)) = thm
42.115 +
42.116 +fun meta_eq_of (MetaEq thm) = thm
42.117 + | meta_eq_of p = mk_meta_eq (thm_of p)
42.118 +
42.119 +fun literals_of (Literals (_, lits)) = lits
42.120 + | literals_of p = L.make_littab [thm_of p]
42.121 +
42.122 +
42.123 +(* proof representation *)
42.124 +
42.125 +datatype proof = Unproved of P.proof_step | Proved of theorem
42.126 +
42.127 +
42.128 +
42.129 +(** core proof rules **)
42.130 +
42.131 +(* assumption *)
42.132 +
42.133 +val (trace_assms, trace_assms_setup) =
42.134 + Attrib.config_bool "z3_trace_assms" (K false)
42.135 +
42.136 +local
42.137 + val remove_trigger = @{lemma "trigger t p == p"
42.138 + by (rule eq_reflection, rule trigger_def)}
42.139 +
42.140 + val prep_rules = [@{thm Let_def}, remove_trigger, L.rewrite_true]
42.141 +
42.142 + fun rewrite_conv ctxt eqs = Simplifier.full_rewrite
42.143 + (Simplifier.context ctxt Simplifier.empty_ss addsimps eqs)
42.144 +
42.145 + fun rewrites ctxt eqs = map (Conv.fconv_rule (rewrite_conv ctxt eqs))
42.146 +
42.147 + fun trace ctxt thm =
42.148 + if Config.get ctxt trace_assms
42.149 + then tracing (Display.string_of_thm ctxt thm)
42.150 + else ()
42.151 +
42.152 + fun lookup_assm ctxt assms ct =
42.153 + (case T.net_instance assms ct of
42.154 + SOME thm => (trace ctxt thm; thm)
42.155 + | _ => z3_exn ("not asserted: " ^
42.156 + quote (Syntax.string_of_term ctxt (Thm.term_of ct))))
42.157 +in
42.158 +fun prepare_assms ctxt unfolds assms =
42.159 + let
42.160 + val unfolds' = rewrites ctxt [L.rewrite_true] unfolds
42.161 + val assms' = rewrites ctxt (union Thm.eq_thm unfolds' prep_rules) assms
42.162 + in (unfolds', T.thm_net_of assms') end
42.163 +
42.164 +fun asserted _ NONE ct = Thm (Thm.assume ct)
42.165 + | asserted ctxt (SOME (unfolds, assms)) ct =
42.166 + let val revert_conv = rewrite_conv ctxt unfolds
42.167 + in Thm (T.with_conv revert_conv (lookup_assm ctxt assms) ct) end
42.168 +end
42.169 +
42.170 +
42.171 +
42.172 +(* P = Q ==> P ==> Q or P --> Q ==> P ==> Q *)
42.173 +local
42.174 + val meta_iffD1 = @{lemma "P == Q ==> P ==> (Q::bool)" by simp}
42.175 + val meta_iffD1_c = T.precompose2 Thm.dest_binop meta_iffD1
42.176 +
42.177 + val iffD1_c = T.precompose2 (Thm.dest_binop o Thm.dest_arg) @{thm iffD1}
42.178 + val mp_c = T.precompose2 (Thm.dest_binop o Thm.dest_arg) @{thm mp}
42.179 +in
42.180 +fun mp (MetaEq thm) p = Thm (Thm.implies_elim (T.compose meta_iffD1_c thm) p)
42.181 + | mp p_q p =
42.182 + let
42.183 + val pq = thm_of p_q
42.184 + val thm = T.compose iffD1_c pq handle THM _ => T.compose mp_c pq
42.185 + in Thm (Thm.implies_elim thm p) end
42.186 +end
42.187 +
42.188 +
42.189 +
42.190 +(* and_elim: P1 & ... & Pn ==> Pi *)
42.191 +(* not_or_elim: ~(P1 | ... | Pn) ==> ~Pi *)
42.192 +local
42.193 + fun is_sublit conj t = L.exists_lit conj (fn u => u aconv t)
42.194 +
42.195 + fun derive conj t lits idx ptab =
42.196 + let
42.197 + val lit = the (L.get_first_lit (is_sublit conj t) lits)
42.198 + val ls = L.explode conj false false [t] lit
42.199 + val lits' = fold L.insert_lit ls (L.delete_lit lit lits)
42.200 +
42.201 + fun upd (Proved thm) = Proved (Literals (thm_of thm, lits'))
42.202 + | upd p = p
42.203 + in (the (L.lookup_lit lits' t), Inttab.map_entry idx upd ptab) end
42.204 +
42.205 + fun lit_elim conj (p, idx) ct ptab =
42.206 + let val lits = literals_of p
42.207 + in
42.208 + (case L.lookup_lit lits (T.term_of ct) of
42.209 + SOME lit => (Thm lit, ptab)
42.210 + | NONE => apfst Thm (derive conj (T.term_of ct) lits idx ptab))
42.211 + end
42.212 +in
42.213 +val and_elim = lit_elim true
42.214 +val not_or_elim = lit_elim false
42.215 +end
42.216 +
42.217 +
42.218 +
42.219 +(* P1, ..., Pn |- False ==> |- ~P1 | ... | ~Pn *)
42.220 +local
42.221 + fun step lit thm =
42.222 + Thm.implies_elim (Thm.implies_intr (Thm.cprop_of lit) thm) lit
42.223 + val explode_disj = L.explode false false false
42.224 + fun intro hyps thm th = fold step (explode_disj hyps th) thm
42.225 +
42.226 + fun dest_ccontr ct = [Thm.dest_arg (Thm.dest_arg (Thm.dest_arg1 ct))]
42.227 + val ccontr = T.precompose dest_ccontr @{thm ccontr}
42.228 +in
42.229 +fun lemma thm ct =
42.230 + let
42.231 + val cu = Thm.capply @{cterm Not} (Thm.dest_arg ct)
42.232 + val hyps = map_filter (try HOLogic.dest_Trueprop) (#hyps (Thm.rep_thm thm))
42.233 + in Thm (T.compose ccontr (T.under_assumption (intro hyps thm) cu)) end
42.234 +end
42.235 +
42.236 +
42.237 +
42.238 +(* \/{P1, ..., Pn, Q1, ..., Qn}, ~P1, ..., ~Pn ==> \/{Q1, ..., Qn} *)
42.239 +local
42.240 + val explode_disj = L.explode false true false
42.241 + val join_disj = L.join false
42.242 + fun unit thm thms th =
42.243 + let val t = @{term Not} $ T.prop_of thm and ts = map T.prop_of thms
42.244 + in join_disj (L.make_littab (thms @ explode_disj ts th)) t end
42.245 +
42.246 + fun dest_arg2 ct = Thm.dest_arg (Thm.dest_arg ct)
42.247 + fun dest ct = pairself dest_arg2 (Thm.dest_binop ct)
42.248 + val contrapos = T.precompose2 dest @{lemma "(~P ==> ~Q) ==> Q ==> P" by fast}
42.249 +in
42.250 +fun unit_resolution thm thms ct =
42.251 + Thm.capply @{cterm Not} (Thm.dest_arg ct)
42.252 + |> T.under_assumption (unit thm thms)
42.253 + |> Thm o T.discharge thm o T.compose contrapos
42.254 +end
42.255 +
42.256 +
42.257 +
42.258 +(* P ==> P == True or P ==> P == False *)
42.259 +local
42.260 + val iff1 = @{lemma "P ==> P == (~ False)" by simp}
42.261 + val iff2 = @{lemma "~P ==> P == False" by simp}
42.262 +in
42.263 +fun iff_true thm = MetaEq (thm COMP iff1)
42.264 +fun iff_false thm = MetaEq (thm COMP iff2)
42.265 +end
42.266 +
42.267 +
42.268 +
42.269 +(* distributivity of | over & *)
42.270 +fun distributivity ctxt = Thm o try_apply ctxt [] [
42.271 + named ctxt "fast" (T.by_tac (Classical.best_tac HOL_cs))]
42.272 + (* FIXME: not very well tested *)
42.273 +
42.274 +
42.275 +
42.276 +(* Tseitin-like axioms *)
42.277 +
42.278 +local
42.279 + val disjI1 = @{lemma "(P ==> Q) ==> ~P | Q" by fast}
42.280 + val disjI2 = @{lemma "(~P ==> Q) ==> P | Q" by fast}
42.281 + val disjI3 = @{lemma "(~Q ==> P) ==> P | Q" by fast}
42.282 + val disjI4 = @{lemma "(Q ==> P) ==> P | ~Q" by fast}
42.283 +
42.284 + fun prove' conj1 conj2 ct2 thm =
42.285 + let val lits = L.true_thm :: L.explode conj1 true (conj1 <> conj2) [] thm
42.286 + in L.join conj2 (L.make_littab lits) (Thm.term_of ct2) end
42.287 +
42.288 + fun prove rule (ct1, conj1) (ct2, conj2) =
42.289 + T.under_assumption (prove' conj1 conj2 ct2) ct1 COMP rule
42.290 +
42.291 + fun prove_def_axiom ct =
42.292 + let val (ct1, ct2) = Thm.dest_binop (Thm.dest_arg ct)
42.293 + in
42.294 + (case Thm.term_of ct1 of
42.295 + @{term Not} $ (@{term "op &"} $ _ $ _) =>
42.296 + prove disjI1 (Thm.dest_arg ct1, true) (ct2, true)
42.297 + | @{term "op &"} $ _ $ _ =>
42.298 + prove disjI3 (Thm.capply @{cterm Not} ct2, false) (ct1, true)
42.299 + | @{term Not} $ (@{term "op |"} $ _ $ _) =>
42.300 + prove disjI3 (Thm.capply @{cterm Not} ct2, false) (ct1, false)
42.301 + | @{term "op |"} $ _ $ _ =>
42.302 + prove disjI2 (Thm.capply @{cterm Not} ct1, false) (ct2, true)
42.303 + | Const (@{const_name distinct}, _) $ _ =>
42.304 + let
42.305 + fun dis_conv cv = Conv.arg_conv (Conv.arg1_conv cv)
42.306 + fun prv cu =
42.307 + let val (cu1, cu2) = Thm.dest_binop (Thm.dest_arg cu)
42.308 + in prove disjI4 (Thm.dest_arg cu2, true) (cu1, true) end
42.309 + in T.with_conv (dis_conv T.unfold_distinct_conv) prv ct end
42.310 + | @{term Not} $ (Const (@{const_name distinct}, _) $ _) =>
42.311 + let
42.312 + fun dis_conv cv = Conv.arg_conv (Conv.arg1_conv (Conv.arg_conv cv))
42.313 + fun prv cu =
42.314 + let val (cu1, cu2) = Thm.dest_binop (Thm.dest_arg cu)
42.315 + in prove disjI1 (Thm.dest_arg cu1, true) (cu2, true) end
42.316 + in T.with_conv (dis_conv T.unfold_distinct_conv) prv ct end
42.317 + | _ => raise CTERM ("prove_def_axiom", [ct]))
42.318 + end
42.319 +
42.320 + val rewr_if =
42.321 + @{lemma "(if P then Q1 else Q2) = ((P --> Q1) & (~P --> Q2))" by simp}
42.322 +in
42.323 +fun def_axiom ctxt = Thm o try_apply ctxt [] [
42.324 + named ctxt "conj/disj/distinct" prove_def_axiom,
42.325 + T.by_abstraction ctxt [] (fn ctxt' =>
42.326 + named ctxt' "simp+fast" (T.by_tac (
42.327 + Simplifier.simp_tac (HOL_ss addsimps [rewr_if])
42.328 + THEN_ALL_NEW Classical.best_tac HOL_cs)))]
42.329 +end
42.330 +
42.331 +
42.332 +
42.333 +(* local definitions *)
42.334 +local
42.335 + val intro_rules = [
42.336 + @{lemma "n == P ==> (~n | P) & (n | ~P)" by simp},
42.337 + @{lemma "n == (if P then s else t) ==> (~P | n = s) & (P | n = t)"
42.338 + by simp},
42.339 + @{lemma "n == P ==> n = P" by (rule meta_eq_to_obj_eq)} ]
42.340 +
42.341 + val apply_rules = [
42.342 + @{lemma "(~n | P) & (n | ~P) ==> P == n" by (atomize(full)) fast},
42.343 + @{lemma "(~P | n = s) & (P | n = t) ==> (if P then s else t) == n"
42.344 + by (atomize(full)) fastsimp} ]
42.345 +
42.346 + val inst_rule = T.match_instantiate Thm.dest_arg
42.347 +
42.348 + fun apply_rule ct =
42.349 + (case get_first (try (inst_rule ct)) intro_rules of
42.350 + SOME thm => thm
42.351 + | NONE => raise CTERM ("intro_def", [ct]))
42.352 +in
42.353 +fun intro_def ct = T.make_hyp_def (apply_rule ct) #>> Thm
42.354 +
42.355 +fun apply_def thm =
42.356 + get_first (try (fn rule => MetaEq (thm COMP rule))) apply_rules
42.357 + |> the_default (Thm thm)
42.358 +end
42.359 +
42.360 +
42.361 +
42.362 +(* negation normal form *)
42.363 +
42.364 +local
42.365 + val quant_rules1 = ([
42.366 + @{lemma "(!!x. P x == Q) ==> ALL x. P x == Q" by simp},
42.367 + @{lemma "(!!x. P x == Q) ==> EX x. P x == Q" by simp}], [
42.368 + @{lemma "(!!x. P x == Q x) ==> ALL x. P x == ALL x. Q x" by simp},
42.369 + @{lemma "(!!x. P x == Q x) ==> EX x. P x == EX x. Q x" by simp}])
42.370 +
42.371 + val quant_rules2 = ([
42.372 + @{lemma "(!!x. ~P x == Q) ==> ~(ALL x. P x) == Q" by simp},
42.373 + @{lemma "(!!x. ~P x == Q) ==> ~(EX x. P x) == Q" by simp}], [
42.374 + @{lemma "(!!x. ~P x == Q x) ==> ~(ALL x. P x) == EX x. Q x" by simp},
42.375 + @{lemma "(!!x. ~P x == Q x) ==> ~(EX x. P x) == ALL x. Q x" by simp}])
42.376 +
42.377 + fun nnf_quant_tac thm (qs as (qs1, qs2)) i st = (
42.378 + Tactic.rtac thm ORELSE'
42.379 + (Tactic.match_tac qs1 THEN' nnf_quant_tac thm qs) ORELSE'
42.380 + (Tactic.match_tac qs2 THEN' nnf_quant_tac thm qs)) i st
42.381 +
42.382 + fun nnf_quant vars qs p ct =
42.383 + T.as_meta_eq ct
42.384 + |> T.by_tac (nnf_quant_tac (T.varify vars (meta_eq_of p)) qs)
42.385 +
42.386 + fun prove_nnf ctxt = try_apply ctxt [] [
42.387 + named ctxt "conj/disj" L.prove_conj_disj_eq]
42.388 +in
42.389 +fun nnf ctxt vars ps ct =
42.390 + (case T.term_of ct of
42.391 + _ $ (l as Const _ $ Abs _) $ (r as Const _ $ Abs _) =>
42.392 + if l aconv r
42.393 + then MetaEq (Thm.reflexive (Thm.dest_arg (Thm.dest_arg ct)))
42.394 + else MetaEq (nnf_quant vars quant_rules1 (hd ps) ct)
42.395 + | _ $ (@{term Not} $ (Const _ $ Abs _)) $ (Const _ $ Abs _) =>
42.396 + MetaEq (nnf_quant vars quant_rules2 (hd ps) ct)
42.397 + | _ =>
42.398 + let
42.399 + val nnf_rewr_conv = Conv.arg_conv (Conv.arg_conv
42.400 + (T.unfold_eqs ctxt (map (Thm.symmetric o meta_eq_of) ps)))
42.401 + in Thm (T.with_conv nnf_rewr_conv (prove_nnf ctxt) ct) end)
42.402 +end
42.403 +
42.404 +
42.405 +
42.406 +(** equality proof rules **)
42.407 +
42.408 +(* |- t = t *)
42.409 +fun refl ct = MetaEq (Thm.reflexive (Thm.dest_arg (Thm.dest_arg ct)))
42.410 +
42.411 +
42.412 +
42.413 +(* s = t ==> t = s *)
42.414 +local
42.415 + val symm_rule = @{lemma "s = t ==> t == s" by simp}
42.416 +in
42.417 +fun symm (MetaEq thm) = MetaEq (Thm.symmetric thm)
42.418 + | symm p = MetaEq (thm_of p COMP symm_rule)
42.419 +end
42.420 +
42.421 +
42.422 +
42.423 +(* s = t ==> t = u ==> s = u *)
42.424 +local
42.425 + val trans1 = @{lemma "s == t ==> t = u ==> s == u" by simp}
42.426 + val trans2 = @{lemma "s = t ==> t == u ==> s == u" by simp}
42.427 + val trans3 = @{lemma "s = t ==> t = u ==> s == u" by simp}
42.428 +in
42.429 +fun trans (MetaEq thm1) (MetaEq thm2) = MetaEq (Thm.transitive thm1 thm2)
42.430 + | trans (MetaEq thm) q = MetaEq (thm_of q COMP (thm COMP trans1))
42.431 + | trans p (MetaEq thm) = MetaEq (thm COMP (thm_of p COMP trans2))
42.432 + | trans p q = MetaEq (thm_of q COMP (thm_of p COMP trans3))
42.433 +end
42.434 +
42.435 +
42.436 +
42.437 +(* t1 = s1 ==> ... ==> tn = sn ==> f t1 ... tn = f s1 .. sn
42.438 + (reflexive antecendents are droppped) *)
42.439 +local
42.440 + exception MONO
42.441 +
42.442 + fun prove_refl (ct, _) = Thm.reflexive ct
42.443 + fun prove_comb f g cp =
42.444 + let val ((ct1, ct2), (cu1, cu2)) = pairself Thm.dest_comb cp
42.445 + in Thm.combination (f (ct1, cu1)) (g (ct2, cu2)) end
42.446 + fun prove_arg f = prove_comb prove_refl f
42.447 +
42.448 + fun prove f cp = prove_comb (prove f) f cp handle CTERM _ => prove_refl cp
42.449 +
42.450 + fun prove_nary is_comb f =
42.451 + let
42.452 + fun prove (cp as (ct, _)) = f cp handle MONO =>
42.453 + if is_comb (Thm.term_of ct)
42.454 + then prove_comb (prove_arg prove) prove cp
42.455 + else prove_refl cp
42.456 + in prove end
42.457 +
42.458 + fun prove_list f n cp =
42.459 + if n = 0 then prove_refl cp
42.460 + else prove_comb (prove_arg f) (prove_list f (n-1)) cp
42.461 +
42.462 + fun with_length f (cp as (cl, _)) =
42.463 + f (length (HOLogic.dest_list (Thm.term_of cl))) cp
42.464 +
42.465 + fun prove_distinct f = prove_arg (with_length (prove_list f))
42.466 +
42.467 + fun prove_eq exn lookup cp =
42.468 + (case lookup (Logic.mk_equals (pairself Thm.term_of cp)) of
42.469 + SOME eq => eq
42.470 + | NONE => if exn then raise MONO else prove_refl cp)
42.471 +
42.472 + val prove_eq_exn = prove_eq true
42.473 + and prove_eq_safe = prove_eq false
42.474 +
42.475 + fun mono f (cp as (cl, _)) =
42.476 + (case Term.head_of (Thm.term_of cl) of
42.477 + @{term "op &"} => prove_nary L.is_conj (prove_eq_exn f)
42.478 + | @{term "op |"} => prove_nary L.is_disj (prove_eq_exn f)
42.479 + | Const (@{const_name distinct}, _) => prove_distinct (prove_eq_safe f)
42.480 + | _ => prove (prove_eq_safe f)) cp
42.481 +in
42.482 +fun monotonicity eqs ct =
42.483 + let
42.484 + val lookup = AList.lookup (op aconv) (map (`Thm.prop_of o meta_eq_of) eqs)
42.485 + val cp = Thm.dest_binop (Thm.dest_arg ct)
42.486 + in MetaEq (prove_eq_exn lookup cp handle MONO => mono lookup cp) end
42.487 +end
42.488 +
42.489 +
42.490 +
42.491 +(* |- f a b = f b a (where f is equality) *)
42.492 +local
42.493 + val rule = @{lemma "a = b == b = a" by (atomize(full)) (rule eq_commute)}
42.494 +in
42.495 +fun commutativity ct = MetaEq (T.match_instantiate I (T.as_meta_eq ct) rule)
42.496 +end
42.497 +
42.498 +
42.499 +
42.500 +(** quantifier proof rules **)
42.501 +
42.502 +(* P ?x = Q ?x ==> (ALL x. P x) = (ALL x. Q x)
42.503 + P ?x = Q ?x ==> (EX x. P x) = (EX x. Q x) *)
42.504 +local
42.505 + val rules = [
42.506 + @{lemma "(!!x. P x == Q x) ==> (ALL x. P x) == (ALL x. Q x)" by simp},
42.507 + @{lemma "(!!x. P x == Q x) ==> (EX x. P x) == (EX x. Q x)" by simp}]
42.508 +in
42.509 +fun quant_intro vars p ct =
42.510 + let
42.511 + val thm = meta_eq_of p
42.512 + val rules' = T.varify vars thm :: rules
42.513 + val cu = T.as_meta_eq ct
42.514 + in MetaEq (T.by_tac (REPEAT_ALL_NEW (Tactic.match_tac rules')) cu) end
42.515 +end
42.516 +
42.517 +
42.518 +
42.519 +(* |- ((ALL x. P x) | Q) = (ALL x. P x | Q) *)
42.520 +fun pull_quant ctxt = Thm o try_apply ctxt [] [
42.521 + named ctxt "fast" (T.by_tac (Classical.fast_tac HOL_cs))]
42.522 + (* FIXME: not very well tested *)
42.523 +
42.524 +
42.525 +
42.526 +(* |- (ALL x. P x & Q x) = ((ALL x. P x) & (ALL x. Q x)) *)
42.527 +fun push_quant ctxt = Thm o try_apply ctxt [] [
42.528 + named ctxt "fast" (T.by_tac (Classical.fast_tac HOL_cs))]
42.529 + (* FIXME: not very well tested *)
42.530 +
42.531 +
42.532 +
42.533 +(* |- (ALL x1 ... xn y1 ... yn. P x1 ... xn) = (ALL x1 ... xn. P x1 ... xn) *)
42.534 +local
42.535 + val elim_all = @{lemma "(ALL x. P) == P" by simp}
42.536 + val elim_ex = @{lemma "(EX x. P) == P" by simp}
42.537 +
42.538 + fun elim_unused_conv ctxt =
42.539 + Conv.params_conv ~1 (K (Conv.arg_conv (Conv.arg1_conv
42.540 + (More_Conv.rewrs_conv [elim_all, elim_ex])))) ctxt
42.541 +
42.542 + fun elim_unused_tac ctxt =
42.543 + REPEAT_ALL_NEW (
42.544 + Tactic.match_tac [@{thm refl}, @{thm iff_allI}, @{thm iff_exI}]
42.545 + ORELSE' CONVERSION (elim_unused_conv ctxt))
42.546 +in
42.547 +fun elim_unused_vars ctxt = Thm o T.by_tac (elim_unused_tac ctxt)
42.548 +end
42.549 +
42.550 +
42.551 +
42.552 +(* |- (ALL x1 ... xn. ~(x1 = t1 & ... xn = tn) | P x1 ... xn) = P t1 ... tn *)
42.553 +fun dest_eq_res ctxt = Thm o try_apply ctxt [] [
42.554 + named ctxt "fast" (T.by_tac (Classical.fast_tac HOL_cs))]
42.555 + (* FIXME: not very well tested *)
42.556 +
42.557 +
42.558 +
42.559 +(* |- ~(ALL x1...xn. P x1...xn) | P a1...an *)
42.560 +local
42.561 + val rule = @{lemma "~ P x | Q ==> ~(ALL x. P x) | Q" by fast}
42.562 +in
42.563 +val quant_inst = Thm o T.by_tac (
42.564 + REPEAT_ALL_NEW (Tactic.match_tac [rule])
42.565 + THEN' Tactic.rtac @{thm excluded_middle})
42.566 +end
42.567 +
42.568 +
42.569 +
42.570 +(* c = SOME x. P x |- (EX x. P x) = P c
42.571 + c = SOME x. ~ P x |- ~(ALL x. P x) = ~ P c *)
42.572 +local
42.573 + val elim_ex = @{lemma "EX x. P == P" by simp}
42.574 + val elim_all = @{lemma "~ (ALL x. P) == ~P" by simp}
42.575 + val sk_ex = @{lemma "c == SOME x. P x ==> EX x. P x == P c"
42.576 + by simp (intro eq_reflection some_eq_ex[symmetric])}
42.577 + val sk_all = @{lemma "c == SOME x. ~ P x ==> ~(ALL x. P x) == ~ P c"
42.578 + by (simp only: not_all) (intro eq_reflection some_eq_ex[symmetric])}
42.579 + val sk_ex_rule = ((sk_ex, I), elim_ex)
42.580 + and sk_all_rule = ((sk_all, Thm.dest_arg), elim_all)
42.581 +
42.582 + fun dest f sk_rule =
42.583 + Thm.dest_comb (f (Thm.dest_arg (Thm.dest_arg (Thm.cprop_of sk_rule))))
42.584 + fun type_of f sk_rule = Thm.ctyp_of_term (snd (dest f sk_rule))
42.585 + fun pair2 (a, b) (c, d) = [(a, c), (b, d)]
42.586 + fun inst_sk (sk_rule, f) p c =
42.587 + Thm.instantiate ([(type_of f sk_rule, Thm.ctyp_of_term c)], []) sk_rule
42.588 + |> (fn sk' => Thm.instantiate ([], (pair2 (dest f sk') (p, c))) sk')
42.589 + |> Conv.fconv_rule (Thm.beta_conversion true)
42.590 +
42.591 + fun kind (Const (@{const_name Ex}, _) $ _) = (sk_ex_rule, I, I)
42.592 + | kind (@{term Not} $ (Const (@{const_name All}, _) $ _)) =
42.593 + (sk_all_rule, Thm.dest_arg, Thm.capply @{cterm Not})
42.594 + | kind t = raise TERM ("skolemize", [t])
42.595 +
42.596 + fun dest_abs_type (Abs (_, T, _)) = T
42.597 + | dest_abs_type t = raise TERM ("dest_abs_type", [t])
42.598 +
42.599 + fun bodies_of thy lhs rhs =
42.600 + let
42.601 + val (rule, dest, make) = kind (Thm.term_of lhs)
42.602 +
42.603 + fun dest_body idx cbs ct =
42.604 + let
42.605 + val cb = Thm.dest_arg (dest ct)
42.606 + val T = dest_abs_type (Thm.term_of cb)
42.607 + val cv = Thm.cterm_of thy (Var (("x", idx), T))
42.608 + val cu = make (Drule.beta_conv cb cv)
42.609 + val cbs' = (cv, cb) :: cbs
42.610 + in
42.611 + (snd (Thm.first_order_match (cu, rhs)), rev cbs')
42.612 + handle Pattern.MATCH => dest_body (idx+1) cbs' cu
42.613 + end
42.614 + in (rule, dest_body 1 [] lhs) end
42.615 +
42.616 + fun transitive f thm = Thm.transitive thm (f (Thm.rhs_of thm))
42.617 +
42.618 + fun sk_step (rule, elim) (cv, mct, cb) ((is, thm), ctxt) =
42.619 + (case mct of
42.620 + SOME ct =>
42.621 + ctxt
42.622 + |> T.make_hyp_def (inst_sk rule (Thm.instantiate_cterm ([], is) cb) ct)
42.623 + |>> pair ((cv, ct) :: is) o Thm.transitive thm
42.624 + | NONE => ((is, transitive (Conv.rewr_conv elim) thm), ctxt))
42.625 +in
42.626 +fun skolemize ct ctxt =
42.627 + let
42.628 + val (lhs, rhs) = Thm.dest_binop (Thm.dest_arg ct)
42.629 + val (rule, (ctab, cbs)) = bodies_of (ProofContext.theory_of ctxt) lhs rhs
42.630 + fun lookup_var (cv, cb) = (cv, AList.lookup (op aconvc) ctab cv, cb)
42.631 + in
42.632 + (([], Thm.reflexive lhs), ctxt)
42.633 + |> fold (sk_step rule) (map lookup_var cbs)
42.634 + |>> MetaEq o snd
42.635 + end
42.636 +end
42.637 +
42.638 +
42.639 +
42.640 +(** theory proof rules **)
42.641 +
42.642 +(* theory lemmas: linear arithmetic, arrays *)
42.643 +
42.644 +fun th_lemma ctxt simpset thms = Thm o try_apply ctxt thms [
42.645 + T.by_abstraction ctxt thms (fn ctxt' => T.by_tac (
42.646 + NAMED ctxt' "arith" (Arith_Data.arith_tac ctxt')
42.647 + ORELSE' NAMED ctxt' "simp+arith" (Simplifier.simp_tac simpset THEN_ALL_NEW
42.648 + Arith_Data.arith_tac ctxt')))]
42.649 +
42.650 +
42.651 +
42.652 +(* rewriting: prove equalities:
42.653 + * ACI of conjunction/disjunction
42.654 + * contradiction, excluded middle
42.655 + * logical rewriting rules (for negation, implication, equivalence,
42.656 + distinct)
42.657 + * normal forms for polynoms (integer/real arithmetic)
42.658 + * quantifier elimination over linear arithmetic
42.659 + * ... ? **)
42.660 +structure Z3_Simps = Named_Thms
42.661 +(
42.662 + val name = "z3_simp"
42.663 + val description = "simplification rules for Z3 proof reconstruction"
42.664 +)
42.665 +
42.666 +local
42.667 + fun spec_meta_eq_of thm =
42.668 + (case try (fn th => th RS @{thm spec}) thm of
42.669 + SOME thm' => spec_meta_eq_of thm'
42.670 + | NONE => mk_meta_eq thm)
42.671 +
42.672 + fun prep (Thm thm) = spec_meta_eq_of thm
42.673 + | prep (MetaEq thm) = thm
42.674 + | prep (Literals (thm, _)) = spec_meta_eq_of thm
42.675 +
42.676 + fun unfold_conv ctxt ths =
42.677 + Conv.arg_conv (Conv.binop_conv (T.unfold_eqs ctxt (map prep ths)))
42.678 +
42.679 + fun with_conv _ [] prv = prv
42.680 + | with_conv ctxt ths prv = T.with_conv (unfold_conv ctxt ths) prv
42.681 +
42.682 + val unfold_conv =
42.683 + Conv.arg_conv (Conv.binop_conv (Conv.try_conv T.unfold_distinct_conv))
42.684 + val prove_conj_disj_eq = T.with_conv unfold_conv L.prove_conj_disj_eq
42.685 +in
42.686 +
42.687 +fun rewrite ctxt simpset ths = Thm o with_conv ctxt ths (try_apply ctxt [] [
42.688 + named ctxt "conj/disj/distinct" prove_conj_disj_eq,
42.689 + T.by_abstraction ctxt [] (fn ctxt' => T.by_tac (
42.690 + NAMED ctxt' "simp" (Simplifier.simp_tac simpset)
42.691 + THEN_ALL_NEW (
42.692 + NAMED ctxt' "fast" (Classical.fast_tac HOL_cs)
42.693 + ORELSE' NAMED ctxt' "arith" (Arith_Data.arith_tac ctxt'))))])
42.694 +
42.695 +end
42.696 +
42.697 +
42.698 +
42.699 +(** proof reconstruction **)
42.700 +
42.701 +(* tracing and checking *)
42.702 +
42.703 +local
42.704 + fun count_rules ptab =
42.705 + let
42.706 + fun count (_, Unproved _) (solved, total) = (solved, total + 1)
42.707 + | count (_, Proved _) (solved, total) = (solved + 1, total + 1)
42.708 + in Inttab.fold count ptab (0, 0) end
42.709 +
42.710 + fun header idx r (solved, total) =
42.711 + "Z3: #" ^ string_of_int idx ^ ": " ^ P.string_of_rule r ^ " (goal " ^
42.712 + string_of_int (solved + 1) ^ " of " ^ string_of_int total ^ ")"
42.713 +
42.714 + fun check ctxt idx r ps ct p =
42.715 + let val thm = thm_of p |> tap (Thm.join_proofs o single)
42.716 + in
42.717 + if (Thm.cprop_of thm) aconvc ct then ()
42.718 + else z3_exn (Pretty.string_of (Pretty.big_list ("proof step failed: " ^
42.719 + quote (P.string_of_rule r) ^ " (#" ^ string_of_int idx ^ ")")
42.720 + (pretty_goal ctxt (map (thm_of o fst) ps) (Thm.prop_of thm) @
42.721 + [Pretty.block [Pretty.str "expected: ",
42.722 + Syntax.pretty_term ctxt (Thm.term_of ct)]])))
42.723 + end
42.724 +in
42.725 +fun trace_rule idx prove r ps ct (cxp as (ctxt, ptab)) =
42.726 + let
42.727 + val _ = SMT_Solver.trace_msg ctxt (header idx r o count_rules) ptab
42.728 + val result as (p, cxp' as (ctxt', _)) = prove r ps ct cxp
42.729 + val _ = if not (Config.get ctxt' SMT_Solver.trace) then ()
42.730 + else check ctxt' idx r ps ct p
42.731 + in result end
42.732 +end
42.733 +
42.734 +
42.735 +(* overall reconstruction procedure *)
42.736 +
42.737 +fun not_supported r =
42.738 + raise Fail ("Z3: proof rule not implemented: " ^ quote (P.string_of_rule r))
42.739 +
42.740 +fun prove ctxt unfolds assms vars =
42.741 + let
42.742 + val assms' = Option.map (prepare_assms ctxt unfolds) assms
42.743 + val simpset = T.make_simpset ctxt (Z3_Simps.get ctxt)
42.744 +
42.745 + fun step r ps ct (cxp as (cx, ptab)) =
42.746 + (case (r, ps) of
42.747 + (* core rules *)
42.748 + (P.TrueAxiom, _) => (Thm L.true_thm, cxp)
42.749 + | (P.Asserted, _) => (asserted cx assms' ct, cxp)
42.750 + | (P.Goal, _) => (asserted cx assms' ct, cxp)
42.751 + | (P.ModusPonens, [(p, _), (q, _)]) => (mp q (thm_of p), cxp)
42.752 + | (P.ModusPonensOeq, [(p, _), (q, _)]) => (mp q (thm_of p), cxp)
42.753 + | (P.AndElim, [(p, i)]) => and_elim (p, i) ct ptab ||> pair cx
42.754 + | (P.NotOrElim, [(p, i)]) => not_or_elim (p, i) ct ptab ||> pair cx
42.755 + | (P.Hypothesis, _) => (Thm (Thm.assume ct), cxp)
42.756 + | (P.Lemma, [(p, _)]) => (lemma (thm_of p) ct, cxp)
42.757 + | (P.UnitResolution, (p, _) :: ps) =>
42.758 + (unit_resolution (thm_of p) (map (thm_of o fst) ps) ct, cxp)
42.759 + | (P.IffTrue, [(p, _)]) => (iff_true (thm_of p), cxp)
42.760 + | (P.IffFalse, [(p, _)]) => (iff_false (thm_of p), cxp)
42.761 + | (P.Distributivity, _) => (distributivity cx ct, cxp)
42.762 + | (P.DefAxiom, _) => (def_axiom cx ct, cxp)
42.763 + | (P.IntroDef, _) => intro_def ct cx ||> rpair ptab
42.764 + | (P.ApplyDef, [(p, _)]) => (apply_def (thm_of p), cxp)
42.765 + | (P.IffOeq, [(p, _)]) => (p, cxp)
42.766 + | (P.NnfPos, _) => (nnf cx vars (map fst ps) ct, cxp)
42.767 + | (P.NnfNeg, _) => (nnf cx vars (map fst ps) ct, cxp)
42.768 +
42.769 + (* equality rules *)
42.770 + | (P.Reflexivity, _) => (refl ct, cxp)
42.771 + | (P.Symmetry, [(p, _)]) => (symm p, cxp)
42.772 + | (P.Transitivity, [(p, _), (q, _)]) => (trans p q, cxp)
42.773 + | (P.Monotonicity, _) => (monotonicity (map fst ps) ct, cxp)
42.774 + | (P.Commutativity, _) => (commutativity ct, cxp)
42.775 +
42.776 + (* quantifier rules *)
42.777 + | (P.QuantIntro, [(p, _)]) => (quant_intro vars p ct, cxp)
42.778 + | (P.PullQuant, _) => (pull_quant cx ct, cxp)
42.779 + | (P.PushQuant, _) => (push_quant cx ct, cxp)
42.780 + | (P.ElimUnusedVars, _) => (elim_unused_vars cx ct, cxp)
42.781 + | (P.DestEqRes, _) => (dest_eq_res cx ct, cxp)
42.782 + | (P.QuantInst, _) => (quant_inst ct, cxp)
42.783 + | (P.Skolemize, _) => skolemize ct cx ||> rpair ptab
42.784 +
42.785 + (* theory rules *)
42.786 + | (P.ThLemma, _) =>
42.787 + (th_lemma cx simpset (map (thm_of o fst) ps) ct, cxp)
42.788 + | (P.Rewrite, _) => (rewrite cx simpset [] ct, cxp)
42.789 + | (P.RewriteStar, ps) =>
42.790 + (rewrite cx simpset (map fst ps) ct, cxp)
42.791 +
42.792 + | (P.NnfStar, _) => not_supported r
42.793 + | (P.CnfStar, _) => not_supported r
42.794 + | (P.TransitivityStar, _) => not_supported r
42.795 + | (P.PullQuantStar, _) => not_supported r
42.796 +
42.797 + | _ => raise Fail ("Z3: proof rule " ^ quote (P.string_of_rule r) ^
42.798 + " has an unexpected number of arguments."))
42.799 +
42.800 + fun conclude idx rule prop (ps, cxp) =
42.801 + trace_rule idx step rule ps prop cxp
42.802 + |-> (fn p => apsnd (Inttab.update (idx, Proved p)) #> pair p)
42.803 +
42.804 + fun lookup idx (cxp as (cx, ptab)) =
42.805 + (case Inttab.lookup ptab idx of
42.806 + SOME (Unproved (P.Proof_Step {rule, prems, prop})) =>
42.807 + fold_map lookup prems cxp
42.808 + |>> map2 rpair prems
42.809 + |> conclude idx rule prop
42.810 + | SOME (Proved p) => (p, cxp)
42.811 + | NONE => z3_exn ("unknown proof id: " ^ quote (string_of_int idx)))
42.812 +
42.813 + fun result (p, (cx, _)) = (thm_of p, cx)
42.814 + in
42.815 + (fn (idx, ptab) => result (lookup idx (ctxt, Inttab.map Unproved ptab)))
42.816 + end
42.817 +
42.818 +fun reconstruct (output, {typs, terms, unfolds, assms}) ctxt =
42.819 + P.parse ctxt typs terms output
42.820 + |> (fn (idx, (ptab, vars, cx)) => prove cx unfolds assms vars (idx, ptab))
42.821 +
42.822 +val setup = trace_assms_setup #> z3_rules_setup #> Z3_Simps.setup
42.823 +
42.824 +end
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
43.2 +++ b/src/HOL/Tools/SMT/z3_proof_tools.ML Wed May 12 23:54:02 2010 +0200
43.3 @@ -0,0 +1,368 @@
43.4 +(* Title: HOL/Tools/SMT/z3_proof_tools.ML
43.5 + Author: Sascha Boehme, TU Muenchen
43.6 +
43.7 +Helper functions required for Z3 proof reconstruction.
43.8 +*)
43.9 +
43.10 +signature Z3_PROOF_TOOLS =
43.11 +sig
43.12 + (* accessing and modifying terms *)
43.13 + val term_of: cterm -> term
43.14 + val prop_of: thm -> term
43.15 + val mk_prop: cterm -> cterm
43.16 + val as_meta_eq: cterm -> cterm
43.17 +
43.18 + (* theorem nets *)
43.19 + val thm_net_of: thm list -> thm Net.net
43.20 + val net_instance: thm Net.net -> cterm -> thm option
43.21 +
43.22 + (* proof combinators *)
43.23 + val under_assumption: (thm -> thm) -> cterm -> thm
43.24 + val with_conv: conv -> (cterm -> thm) -> cterm -> thm
43.25 + val discharge: thm -> thm -> thm
43.26 + val varify: string list -> thm -> thm
43.27 + val unfold_eqs: Proof.context -> thm list -> conv
43.28 + val match_instantiate: (cterm -> cterm) -> cterm -> thm -> thm
43.29 + val by_tac: (int -> tactic) -> cterm -> thm
43.30 + val make_hyp_def: thm -> Proof.context -> thm * Proof.context
43.31 + val by_abstraction: Proof.context -> thm list -> (Proof.context -> cterm ->
43.32 + thm) -> cterm -> thm
43.33 +
43.34 + (* a faster COMP *)
43.35 + type compose_data
43.36 + val precompose: (cterm -> cterm list) -> thm -> compose_data
43.37 + val precompose2: (cterm -> cterm * cterm) -> thm -> compose_data
43.38 + val compose: compose_data -> thm -> thm
43.39 +
43.40 + (* unfolding of 'distinct' *)
43.41 + val unfold_distinct_conv: conv
43.42 +
43.43 + (* simpset *)
43.44 + val make_simpset: Proof.context -> thm list -> simpset
43.45 +end
43.46 +
43.47 +structure Z3_Proof_Tools: Z3_PROOF_TOOLS =
43.48 +struct
43.49 +
43.50 +
43.51 +
43.52 +(* accessing terms *)
43.53 +
43.54 +val dest_prop = (fn @{term Trueprop} $ t => t | t => t)
43.55 +
43.56 +fun term_of ct = dest_prop (Thm.term_of ct)
43.57 +fun prop_of thm = dest_prop (Thm.prop_of thm)
43.58 +
43.59 +val mk_prop = Thm.capply @{cterm Trueprop}
43.60 +
43.61 +val (eqT, eq) = `(hd o Thm.dest_ctyp o Thm.ctyp_of_term) @{cpat "op =="}
43.62 +fun mk_meta_eq_cterm ct cu =
43.63 + let val inst = ([(eqT, Thm.ctyp_of_term ct)], [])
43.64 + in Thm.mk_binop (Thm.instantiate_cterm inst eq) ct cu end
43.65 +
43.66 +fun as_meta_eq ct = uncurry mk_meta_eq_cterm (Thm.dest_binop (Thm.dest_arg ct))
43.67 +
43.68 +
43.69 +
43.70 +(* theorem nets *)
43.71 +
43.72 +fun thm_net_of thms =
43.73 + let fun insert thm = Net.insert_term (K false) (Thm.prop_of thm, thm)
43.74 + in fold insert thms Net.empty end
43.75 +
43.76 +fun maybe_instantiate ct thm =
43.77 + try Thm.first_order_match (Thm.cprop_of thm, ct)
43.78 + |> Option.map (fn inst => Thm.instantiate inst thm)
43.79 +
43.80 +fun first_of thms ct = get_first (maybe_instantiate ct) thms
43.81 +fun net_instance net ct = first_of (Net.match_term net (Thm.term_of ct)) ct
43.82 +
43.83 +
43.84 +
43.85 +(* proof combinators *)
43.86 +
43.87 +fun under_assumption f ct =
43.88 + let val ct' = mk_prop ct
43.89 + in Thm.implies_intr ct' (f (Thm.assume ct')) end
43.90 +
43.91 +fun with_conv conv prove ct =
43.92 + let val eq = Thm.symmetric (conv ct)
43.93 + in Thm.equal_elim eq (prove (Thm.lhs_of eq)) end
43.94 +
43.95 +fun discharge p pq = Thm.implies_elim pq p
43.96 +
43.97 +fun varify vars = Drule.generalize ([], vars)
43.98 +
43.99 +fun unfold_eqs _ [] = Conv.all_conv
43.100 + | unfold_eqs ctxt eqs =
43.101 + More_Conv.top_sweep_conv (K (More_Conv.rewrs_conv eqs)) ctxt
43.102 +
43.103 +fun match_instantiate f ct thm =
43.104 + Thm.instantiate (Thm.match (f (Thm.cprop_of thm), ct)) thm
43.105 +
43.106 +fun by_tac tac ct = Goal.norm_result (Goal.prove_internal [] ct (K (tac 1)))
43.107 +
43.108 +(* |- c x == t x ==> P (c x) ~~> c == t |- P (c x) *)
43.109 +fun make_hyp_def thm ctxt =
43.110 + let
43.111 + val (lhs, rhs) = Thm.dest_binop (Thm.cprem_of thm 1)
43.112 + val (cf, cvs) = Drule.strip_comb lhs
43.113 + val eq = mk_meta_eq_cterm cf (fold_rev Thm.cabs cvs rhs)
43.114 + fun apply cv th =
43.115 + Thm.combination th (Thm.reflexive cv)
43.116 + |> Conv.fconv_rule (Conv.arg_conv (Thm.beta_conversion false))
43.117 + in
43.118 + yield_singleton Assumption.add_assumes eq ctxt
43.119 + |>> Thm.implies_elim thm o fold apply cvs
43.120 + end
43.121 +
43.122 +
43.123 +
43.124 +(* abstraction *)
43.125 +
43.126 +local
43.127 +
43.128 +fun typ_of ct = #T (Thm.rep_cterm ct)
43.129 +fun certify ctxt = Thm.cterm_of (ProofContext.theory_of ctxt)
43.130 +
43.131 +fun abs_context ctxt = (ctxt, Termtab.empty, 1, false)
43.132 +
43.133 +fun context_of (ctxt, _, _, _) = ctxt
43.134 +
43.135 +fun replace (cv, ct) = Thm.forall_elim ct o Thm.forall_intr cv
43.136 +
43.137 +fun abs_instantiate (_, tab, _, beta_norm) =
43.138 + fold replace (map snd (Termtab.dest tab)) #>
43.139 + beta_norm ? Conv.fconv_rule (Thm.beta_conversion true)
43.140 +
43.141 +fun generalize cvs =
43.142 + let
43.143 + val no_name = ""
43.144 +
43.145 + fun dest (Free (n, _)) = n
43.146 + | dest _ = no_name
43.147 +
43.148 + fun gen vs (t as Free (n, _)) =
43.149 + let val i = find_index (equal n) vs
43.150 + in
43.151 + if i >= 0 then insert (op aconvc) (nth cvs i) #> pair (Bound i)
43.152 + else pair t
43.153 + end
43.154 + | gen vs (t $ u) = gen vs t ##>> gen vs u #>> (op $)
43.155 + | gen vs (Abs (n, T, t)) =
43.156 + gen (no_name :: vs) t #>> (fn u => Abs (n, T, u))
43.157 + | gen _ t = pair t
43.158 +
43.159 + in (fn ct => gen (map (dest o Thm.term_of) cvs) (Thm.term_of ct) []) end
43.160 +
43.161 +fun fresh_abstraction cvs ct (cx as (ctxt, tab, idx, beta_norm)) =
43.162 + let val (t, cvs') = generalize cvs ct
43.163 + in
43.164 + (case Termtab.lookup tab t of
43.165 + SOME (cv, _) => (cv, cx)
43.166 + | NONE =>
43.167 + let
43.168 + val (n, ctxt') = yield_singleton Variable.variant_fixes "x" ctxt
43.169 + val cv = certify ctxt (Free (n, map typ_of cvs' ---> typ_of ct))
43.170 + val cv' = Drule.list_comb (cv, cvs')
43.171 + val e = (t, (cv, fold_rev Thm.cabs cvs' ct))
43.172 + val beta_norm' = beta_norm orelse not (null cvs')
43.173 + in (cv', (ctxt', Termtab.update e tab, idx + 1, beta_norm')) end)
43.174 + end
43.175 +
43.176 +fun abs_arg f cvs ct =
43.177 + let val (cf, cu) = Thm.dest_comb ct
43.178 + in f cvs cu #>> Thm.capply cf end
43.179 +
43.180 +fun abs_comb f g cvs ct =
43.181 + let val (cf, cu) = Thm.dest_comb ct
43.182 + in f cvs cf ##>> g cvs cu #>> uncurry Thm.capply end
43.183 +
43.184 +fun abs_list f g cvs ct =
43.185 + (case Thm.term_of ct of
43.186 + Const (@{const_name Nil}, _) => pair ct
43.187 + | Const (@{const_name Cons}, _) $ _ $ _ =>
43.188 + abs_comb (abs_arg f) (abs_list f g) cvs ct
43.189 + | _ => g cvs ct)
43.190 +
43.191 +fun abs_abs f cvs ct =
43.192 + let val (cv, cu) = Thm.dest_abs NONE ct
43.193 + in f (cv :: cvs) cu #>> Thm.cabs cv end
43.194 +
43.195 +val is_atomic = (fn _ $ _ => false | Abs _ => false | _ => true)
43.196 +val is_arithT = (fn @{typ int} => true | @{typ real} => true | _ => false)
43.197 +fun is_number t =
43.198 + (case try HOLogic.dest_number t of
43.199 + SOME (T, _) => is_arithT T
43.200 + | NONE => false)
43.201 +
43.202 +fun abstract (ext_logic, with_theories) =
43.203 + let
43.204 + fun abstr1 cvs ct = abs_arg abstr cvs ct
43.205 + and abstr2 cvs ct = abs_comb abstr1 abstr cvs ct
43.206 + and abstr3 cvs ct = abs_comb abstr2 abstr cvs ct
43.207 + and abstr_abs cvs ct = abs_arg (abs_abs abstr) cvs ct
43.208 +
43.209 + and abstr cvs ct =
43.210 + (case Thm.term_of ct of
43.211 + @{term Trueprop} $ _ => abstr1 cvs ct
43.212 + | @{term "op ==>"} $ _ $ _ => abstr2 cvs ct
43.213 + | @{term True} => pair ct
43.214 + | @{term False} => pair ct
43.215 + | @{term Not} $ _ => abstr1 cvs ct
43.216 + | @{term "op &"} $ _ $ _ => abstr2 cvs ct
43.217 + | @{term "op |"} $ _ $ _ => abstr2 cvs ct
43.218 + | @{term "op -->"} $ _ $ _ => abstr2 cvs ct
43.219 + | Const (@{const_name "op ="}, _) $ _ $ _ => abstr2 cvs ct
43.220 + | Const (@{const_name distinct}, _) $ _ =>
43.221 + if ext_logic then abs_arg (abs_list abstr fresh_abstraction) cvs ct
43.222 + else fresh_abstraction cvs ct
43.223 + | Const (@{const_name If}, _) $ _ $ _ $ _ =>
43.224 + if ext_logic then abstr3 cvs ct else fresh_abstraction cvs ct
43.225 + | Const (@{const_name All}, _) $ _ =>
43.226 + if ext_logic then abstr_abs cvs ct else fresh_abstraction cvs ct
43.227 + | Const (@{const_name Ex}, _) $ _ =>
43.228 + if ext_logic then abstr_abs cvs ct else fresh_abstraction cvs ct
43.229 + | @{term "uminus :: int => _"} $ _ => abstr1 cvs ct
43.230 + | @{term "uminus :: real => _"} $ _ => abstr1 cvs ct
43.231 + | @{term "op + :: int => _"} $ _ $ _ => abstr2 cvs ct
43.232 + | @{term "op + :: real => _"} $ _ $ _ => abstr2 cvs ct
43.233 + | @{term "op - :: int => _"} $ _ $ _ => abstr2 cvs ct
43.234 + | @{term "op - :: real => _"} $ _ $ _ => abstr2 cvs ct
43.235 + | @{term "op * :: int => _"} $ _ $ _ => abstr2 cvs ct
43.236 + | @{term "op * :: real => _"} $ _ $ _ => abstr2 cvs ct
43.237 + | @{term "op div :: int => _"} $ _ $ _ => abstr2 cvs ct
43.238 + | @{term "op mod :: int => _"} $ _ $ _ => abstr2 cvs ct
43.239 + | @{term "op / :: real => _"} $ _ $ _ => abstr2 cvs ct
43.240 + | @{term "op < :: int => _"} $ _ $ _ => abstr2 cvs ct
43.241 + | @{term "op < :: real => _"} $ _ $ _ => abstr2 cvs ct
43.242 + | @{term "op <= :: int => _"} $ _ $ _ => abstr2 cvs ct
43.243 + | @{term "op <= :: real => _"} $ _ $ _ => abstr2 cvs ct
43.244 + | Const (@{const_name apply}, _) $ _ $ _ => abstr2 cvs ct
43.245 + | Const (@{const_name fun_upd}, _) $ _ $ _ $ _ => abstr3 cvs ct
43.246 + | t =>
43.247 + if is_atomic t orelse is_number t then pair ct
43.248 + else fresh_abstraction cvs ct)
43.249 + in abstr [] end
43.250 +
43.251 +fun with_prems thms f ct =
43.252 + fold_rev (Thm.mk_binop @{cterm "op ==>"} o Thm.cprop_of) thms ct
43.253 + |> f
43.254 + |> fold (fn prem => fn th => Thm.implies_elim th prem) thms
43.255 +
43.256 +in
43.257 +
43.258 +fun by_abstraction ctxt thms prove = with_prems thms (fn ct =>
43.259 + let val (cu, cx) = abstract (true, true) ct (abs_context ctxt)
43.260 + in abs_instantiate cx (prove (context_of cx) cu) end)
43.261 +
43.262 +end
43.263 +
43.264 +
43.265 +
43.266 +(* a faster COMP *)
43.267 +
43.268 +type compose_data = cterm list * (cterm -> cterm list) * thm
43.269 +
43.270 +fun list2 (x, y) = [x, y]
43.271 +
43.272 +fun precompose f rule = (f (Thm.cprem_of rule 1), f, rule)
43.273 +fun precompose2 f rule = precompose (list2 o f) rule
43.274 +
43.275 +fun compose (cvs, f, rule) thm =
43.276 + discharge thm (Thm.instantiate ([], cvs ~~ f (Thm.cprop_of thm)) rule)
43.277 +
43.278 +
43.279 +
43.280 +(* unfolding of 'distinct' *)
43.281 +
43.282 +local
43.283 + val set1 = @{lemma "x ~: set [] == ~False" by simp}
43.284 + val set2 = @{lemma "x ~: set [x] == False" by simp}
43.285 + val set3 = @{lemma "x ~: set [y] == x ~= y" by simp}
43.286 + val set4 = @{lemma "x ~: set (x # ys) == False" by simp}
43.287 + val set5 = @{lemma "x ~: set (y # ys) == x ~= y & x ~: set ys" by simp}
43.288 +
43.289 + fun set_conv ct =
43.290 + (More_Conv.rewrs_conv [set1, set2, set3, set4] else_conv
43.291 + (Conv.rewr_conv set5 then_conv Conv.arg_conv set_conv)) ct
43.292 +
43.293 + val dist1 = @{lemma "distinct [] == ~False" by simp}
43.294 + val dist2 = @{lemma "distinct [x] == ~False" by simp}
43.295 + val dist3 = @{lemma "distinct (x # xs) == x ~: set xs & distinct xs"
43.296 + by simp}
43.297 +
43.298 + fun binop_conv cv1 cv2 = Conv.combination_conv (Conv.arg_conv cv1) cv2
43.299 +in
43.300 +fun unfold_distinct_conv ct =
43.301 + (More_Conv.rewrs_conv [dist1, dist2] else_conv
43.302 + (Conv.rewr_conv dist3 then_conv binop_conv set_conv unfold_distinct_conv)) ct
43.303 +end
43.304 +
43.305 +
43.306 +
43.307 +(* simpset *)
43.308 +
43.309 +local
43.310 + val antisym_le1 = mk_meta_eq @{thm order_class.antisym_conv}
43.311 + val antisym_le2 = mk_meta_eq @{thm linorder_class.antisym_conv2}
43.312 + val antisym_less1 = mk_meta_eq @{thm linorder_class.antisym_conv1}
43.313 + val antisym_less2 = mk_meta_eq @{thm linorder_class.antisym_conv3}
43.314 +
43.315 + fun eq_prop t thm = HOLogic.mk_Trueprop t aconv Thm.prop_of thm
43.316 + fun dest_binop ((c as Const _) $ t $ u) = (c, t, u)
43.317 + | dest_binop t = raise TERM ("dest_binop", [t])
43.318 +
43.319 + fun prove_antisym_le ss t =
43.320 + let
43.321 + val (le, r, s) = dest_binop t
43.322 + val less = Const (@{const_name less}, Term.fastype_of le)
43.323 + val prems = Simplifier.prems_of_ss ss
43.324 + in
43.325 + (case find_first (eq_prop (le $ s $ r)) prems of
43.326 + NONE =>
43.327 + find_first (eq_prop (HOLogic.mk_not (less $ r $ s))) prems
43.328 + |> Option.map (fn thm => thm RS antisym_less1)
43.329 + | SOME thm => SOME (thm RS antisym_le1))
43.330 + end
43.331 + handle THM _ => NONE
43.332 +
43.333 + fun prove_antisym_less ss t =
43.334 + let
43.335 + val (less, r, s) = dest_binop (HOLogic.dest_not t)
43.336 + val le = Const (@{const_name less_eq}, Term.fastype_of less)
43.337 + val prems = prems_of_ss ss
43.338 + in
43.339 + (case find_first (eq_prop (le $ r $ s)) prems of
43.340 + NONE =>
43.341 + find_first (eq_prop (HOLogic.mk_not (less $ s $ r))) prems
43.342 + |> Option.map (fn thm => thm RS antisym_less2)
43.343 + | SOME thm => SOME (thm RS antisym_le2))
43.344 + end
43.345 + handle THM _ => NONE
43.346 +in
43.347 +
43.348 +fun make_simpset ctxt rules = Simplifier.context ctxt (HOL_ss
43.349 + addsimps @{thms field_simps}
43.350 + addsimps [@{thm times_divide_eq_right}, @{thm times_divide_eq_left}]
43.351 + addsimps @{thms arith_special} addsimps @{thms less_bin_simps}
43.352 + addsimps @{thms le_bin_simps} addsimps @{thms eq_bin_simps}
43.353 + addsimps @{thms add_bin_simps} addsimps @{thms succ_bin_simps}
43.354 + addsimps @{thms minus_bin_simps} addsimps @{thms pred_bin_simps}
43.355 + addsimps @{thms mult_bin_simps} addsimps @{thms iszero_simps}
43.356 + addsimps @{thms array_rules}
43.357 + addsimprocs [
43.358 + Simplifier.simproc @{theory} "fast_int_arith" [
43.359 + "(m::int) < n", "(m::int) <= n", "(m::int) = n"] (K Lin_Arith.simproc),
43.360 + Simplifier.simproc @{theory} "fast_real_arith" [
43.361 + "(m::real) < n", "(m::real) <= n", "(m::real) = n"]
43.362 + (K Lin_Arith.simproc),
43.363 + Simplifier.simproc @{theory} "antisym_le" ["(x::'a::order) <= y"]
43.364 + (K prove_antisym_le),
43.365 + Simplifier.simproc @{theory} "antisym_less" ["~ (x::'a::linorder) < y"]
43.366 + (K prove_antisym_less)]
43.367 + addsimps rules)
43.368 +
43.369 +end
43.370 +
43.371 +end