1 (* Why driver for MetiTarski *)
2 (* main author: Piotr Trojanek <piotr.trojanek@gmail.com> *)
7 * real.PowerInt (incomplete)
9 * real.Polar (should work as is)
13 filename "%f-%t-%g.tptp"
15 valid "^SZS status Theorem"
16 valid "^SZS status Unsatisfiable"
17 unknown "^SZS status CounterSatisfiable" ""
18 unknown "^SZS status Satisfiable" ""
19 timeout "^SZS status Timeout"
20 unknown "^SZS status GaveUp" ""
21 fail "^SZS status Error" ""
23 time "why3cpulimit time : %s s"
27 (* Performed introductions depending on whether counterexamples are
28 requested, as said by the meta "get_counterexmp". When this meta
29 set, this transformation introduces the model variables that are
30 still embedded in the goal. When it is not set, it removes all
31 these unused-ce-related variables, even in the context. *)
32 transformation "counterexamples_dependent_intros"
34 transformation "inline_trivial"
35 transformation "eliminate_builtin"
36 transformation "inline_all"
37 transformation "eliminate_definition"
38 transformation "eliminate_inductive"
39 transformation "eliminate_if"
40 transformation "eliminate_epsilon"
41 transformation "eliminate_algebraic"
42 transformation "eliminate_literal"
43 transformation "eliminate_let"
44 transformation "eliminate_negative_constants" (* due to integers, see below *)
46 transformation "simplify_formula"
47 transformation "simplify_unknown_lsymbols"
48 transformation "simplify_trivial_quantification"
49 transformation "introduce_premises"
50 transformation "instantiate_predicate"
51 transformation "abstract_unknown_lsymbols"
53 transformation "discriminate"
54 transformation "encoding_tptp"
57 (* support for integers disabled because may be inconsistent
58 meta "encoding:kept" type int
60 meta "encoding:base" type real
61 syntax predicate (=) "(%1 = %2)"
62 meta "eliminate_algebraic" "no_index"
65 import "discrimination.gen"
69 syntax function zero "0.0"
70 syntax function one "1.0"
72 syntax function (+) "(%1 + %2)"
73 syntax function (-) "(%1 - %2)"
74 syntax function (-_) "(-%1)"
75 syntax function (*) "(%1 * %2)"
76 syntax function (/) "(%1 / %2)"
77 syntax function inv "(1/ %1)"
79 syntax predicate (<=) "(%1 <= %2)"
80 syntax predicate (<) "(%1 < %2)"
81 syntax predicate (>=) "(%1 >= %2)"
82 syntax predicate (>) "(%1 > %2)"
84 meta "inline:no" predicate (<=)
85 meta "inline:no" predicate (>=)
86 meta "inline:no" predicate (>)
88 (* These follow from Metitarski's axioms. *)
89 remove prop MulComm.Comm
90 remove prop MulAssoc.Assoc
91 remove prop Unit_def_l
92 remove prop Unit_def_r
96 remove prop Mul_distr_l
97 remove prop Mul_distr_r
105 remove prop NonTrivialRing
106 remove prop CompatOrderAdd
107 remove prop ZeroLessOne
112 remove prop assoc_mul_div
113 remove prop assoc_div_mul
114 remove prop assoc_div_div
115 remove prop CompatOrderMult
118 prelude "%%% this is a prelude for Metitarski"
119 prelude "include('Axioms/general.ax')."
122 prelude "%%% this is a prelude for Metitarski absolute value"
124 syntax function abs "abs(%1)"
126 prelude "include('Axioms/abs.ax')."
127 prelude "include('Axioms/abs2.ax')."
129 (* These follow from Metitarski's axioms. *)
134 remove prop triangular_inequality
138 prelude "%%% this is a prelude for Metitarski square"
140 prelude "include('Axioms/sqrt-general.ax')."
142 syntax function sqr "(%1)^2"
143 syntax function sqrt "sqrt(%1)"
145 (* This follows from Metitarski's general axioms. *)
146 remove prop Sqrt_positive
150 theory real.Trigonometry
151 prelude "%%% this is a prelude for Metitarski trigonometry"
154 prelude "include('Axioms/pi.ax')."
156 syntax function atan "arctan(%1)"
157 syntax function tan "tan(%1)"
159 prelude "include('Axioms/tan.ax')."
160 prelude "include('Axioms/arctan-lower.ax')."
161 prelude "include('Axioms/arctan-upper.ax')."
163 syntax function cos "cos(%1)"
164 syntax function sin "sin(%1)"
166 prelude "include('Axioms/cos.ax')."
167 prelude "include('Axioms/sin.ax')."
169 (* The following files "greatly increase the search space" and thus
170 cause failures. Do not include them! *)
172 prelude "include('Axioms/cos-constant.ax')."
173 prelude "include('Axioms/sin-constant.ax')."
179 prelude "%%% this is a prelude for Metitarski min-max"
181 prelude "include('Axioms/minmax.ax')."
183 syntax function min "min(%1,%2)"
184 syntax function max "max(%1,%2)"
190 remove prop Max_assoc
191 remove prop Min_assoc
194 (* support for integers disabled because may be inconsistent
196 syntax function power "%1^%2"
198 prelude "%%% this is a prelude for Metitarski power function"
200 prelude "include('Axioms/pow.ax')."
202 (* These follow from Metitarski's axioms. *)
207 syntax function exp "exp(%1)"
208 syntax function log "ln(%1)"
210 prelude "%%% this is a prelude for Metitarski exp/log"
212 prelude "include('Axioms/exp-general.ax')."
213 prelude "include('Axioms/ln-general.ax')."
215 (* These follow from Metitarski's axioms. *)
220 theory real.PowerReal
221 syntax function pow "pow(%1,%2)"
223 prelude "include('Axioms/pow.ax')."
225 (* These follow from Metitarski's axioms. *)
227 remove prop Pow_one_y
230 (* support for integers disabled because may be inconsistent
233 syntax function zero "0"
234 syntax function one "1"
236 syntax function (+) "(%1 + %2)"
237 syntax function (-) "(%1 - %2)"
238 syntax function (*) "(%1 * %2)"
239 syntax function (-_) "(-%1)"
241 syntax predicate (<=) "(%1 <= %2)"
242 syntax predicate (<) "(%1 < %2)"
243 syntax predicate (>=) "(%1 >= %2)"
244 syntax predicate (>) "(%1 > %2)"
246 (* These follow from Metitarski's axioms. *)
247 remove prop MulComm.Comm
248 remove prop MulAssoc.Assoc
249 remove prop Unit_def_l
250 remove prop Unit_def_r
251 remove prop Inv_def_l
252 remove prop Inv_def_r
254 remove prop Mul_distr_l
255 remove prop Mul_distr_r
262 remove prop NonTrivialRing
263 remove prop CompatOrderAdd
264 remove prop CompatOrderMult
265 remove prop ZeroLessOne