2 (* Why driver for Mathematica *)
4 prelude "(* this is a prelude for Mathematica *)"
10 unknown "\\bFalse\\b" "\\bFalse\\b"
11 time "why3cpulimit time : %s s"
13 (* Performed introductions depending on whether counterexamples are
14 requested, as said by the meta "get_counterexmp". When this meta
15 set, this transformation introduces the model variables that are
16 still embedded in the goal. When it is not set, it removes all
17 these unused-ce-related variables, even in the context. *)
18 transformation "counterexamples_dependent_intros"
20 transformation "inline_trivial"
21 transformation "inline_all"
23 transformation "eliminate_builtin"
24 (*transformation "eliminate_definition"*)
25 (*transformation "eliminate_recursion"*)
26 (*transformation "eliminate_inductive"*)
27 (*transformation "eliminate_if"*)
28 transformation "eliminate_epsilon"
29 (*transformation "eliminate_algebraic"*)
30 (*transformation "eliminate_algebraic_math"*)
31 transformation "eliminate_literal"
32 transformation "eliminate_let"
34 (*transformation "split_premise"*)
35 transformation "simplify_formula"
36 (*transformation "simplify_unknown_lsymbols"*)
37 transformation "simplify_trivial_quantification"
38 (*transformation "introduce_premises"*)
39 (*transformation "instantiate_predicate"*)
40 (*transformation "abstract_unknown_lsymbols"*)
43 syntax type int "Integers"
44 syntax type real "Reals"
45 syntax predicate (=) "(%1 == %2)"
47 meta "encoding:kept" type int
54 prelude "(* this is a prelude for Mathematica integer arithmetic *)"
56 syntax function zero "0"
57 syntax function one "1"
59 syntax function (+) "(%1 + %2)"
60 syntax function (-) "(%1 - %2)"
61 syntax function (*) "(%1 %2)"
62 syntax function (-_) "(-%1)"
64 syntax predicate (<=) "(%1 <= %2)"
65 syntax predicate (<) "(%1 < %2)"
66 syntax predicate (>=) "(%1 >= %2)"
67 syntax predicate (>) "(%1 > %2)"
69 meta "inline:no" predicate (<=)
70 meta "inline:no" predicate (>=)
71 meta "inline:no" predicate (>)
73 remove prop MulComm.Comm
74 remove prop MulAssoc.Assoc
75 remove prop Unit_def_l
76 remove prop Unit_def_r
80 remove prop Mul_distr_l
81 remove prop Mul_distr_r
88 remove prop NonTrivialRing
89 remove prop CompatOrderAdd
90 remove prop CompatOrderMult
91 remove prop ZeroLessOne
93 meta "encoding:kept" type int
98 syntax function abs "Abs[%1]"
102 theory int.EuclideanDivision
104 syntax function div "Quotient[%1, %2]"
105 syntax function mod "Mod[%1, %2]"
107 remove prop Mod_bound
108 remove prop Div_bound
113 meta "encoding:kept" type int
120 prelude "(* this is a prelude for Mathematica real arithmetic *)"
122 syntax function zero "0"
123 syntax function one "1"
125 syntax function (+) "(%1 + %2)"
126 syntax function (-) "(%1 - %2)"
127 syntax function (*) "(%1 * %2)"
128 syntax function (/) "(%1 / %2)"
129 syntax function (-_) "(-%1)"
130 syntax function inv "(1 / %1)"
132 syntax predicate (<=) "(%1 <= %2)"
133 syntax predicate (<) "(%1 < %2)"
134 syntax predicate (>=) "(%1 >= %2)"
135 syntax predicate (>) "(%1 > %2)"
137 meta "inline:no" predicate (<=)
138 meta "inline:no" predicate (>=)
139 meta "inline:no" predicate (>)
141 remove prop MulComm.Comm
142 remove prop MulAssoc.Assoc
143 remove prop Unit_def_l
144 remove prop Unit_def_r
145 remove prop Inv_def_l
146 remove prop Inv_def_r
148 remove prop Mul_distr_l
149 remove prop Mul_distr_r
157 remove prop NonTrivialRing
158 remove prop CompatOrderAdd
159 remove prop ZeroLessOne
164 remove prop assoc_mul_div
165 remove prop assoc_div_mul
166 remove prop assoc_div_div
167 remove prop CompatOrderMult
169 (*meta "encoding:kept" type real*)
174 syntax function abs "Abs[%1]"
180 syntax function min "Min[%1, %2]"
181 syntax function max "Max[%1, %2]"
187 syntax function sqr "Power[%1,2]"
188 syntax function sqrt "Sqrt[%1]"
194 syntax function exp "Exp[%1]"
195 syntax function e "E"
196 syntax function log "Log[%1]"
197 syntax function log2 "Log[2, %1]"
198 syntax function log10 "Log[10, %1]"
211 syntax function power "Power[%1, %2]"
215 theory real.PowerReal
217 syntax function pow "Power[%1, %2]"
221 theory real.Trigonometry
223 syntax function cos "Cos[%1]"
224 syntax function sin "Sin[%1]"
225 syntax function tan "Tan[%1]"
226 syntax function atan "ArcTan[%1]"
228 syntax function pi "Pi"
232 theory real.Hyperbolic
234 syntax function sinh "Sinh[%1]"
235 syntax function cosh "Cosh[%1]"
236 syntax function tanh "Tanh[%1]"
237 syntax function asinh "ArcSinh[%1]"
238 syntax function acosh "ArcCosh[%1]"
239 syntax function atanh "ArcTanh[%1]"
256 syntax type bool "Bool"
257 syntax function True "True"
258 syntax function False "False"
260 meta "encoding:kept" type bool
264 syntax function andb "(%1 && %2)"
265 syntax function orb "(%1 || %2)"
266 syntax function xorb "Xor[%1, %2]"
267 syntax function notb "(! %1)"
268 syntax function implb "Implies[%1, %2]"