3 unknown "Error: \\(.*\\)$" "\\1"
4 fail "Syntax error: \\(.*\\)$" "\\1"
5 time "why3cpulimit time : %s s"
7 transformation "eliminate_non_struct_recursion"
8 transformation "eliminate_if"
9 transformation "eliminate_literal"
10 transformation "eliminate_non_lambda_set_epsilon"
12 transformation "eliminate_projections"
14 transformation "simplify_formula"
15 (*transformation "simplify_trivial_quantification_in_goal"*)
20 prelude "Require Import BuiltIn."
22 syntax type int "Numbers.BinNums.Z"
23 syntax type real "Reals.Rdefinitions.R"
24 syntax predicate (=) "(%1 = %2)"
28 syntax predicate ignore'term "true"
32 syntax type unit "Init.Datatypes.unit"
37 syntax type bool "Init.Datatypes.bool"
39 syntax function True "Init.Datatypes.true"
40 syntax function False "Init.Datatypes.false"
45 syntax function andb "Init.Datatypes.andb"
46 syntax function orb "Init.Datatypes.orb"
47 syntax function xorb "Init.Datatypes.xorb"
48 syntax function notb "Init.Datatypes.negb"
49 syntax function implb "Init.Datatypes.implb"
56 syntax function zero "0%Z"
57 syntax function one "1%Z"
59 syntax function (+) "(%1 + %2)%Z"
60 syntax function (-) "(%1 - %2)%Z"
61 syntax function (*) "(%1 * %2)%Z"
62 syntax function (-_) "(-%1)%Z"
64 syntax predicate (<=) "(%1 <= %2)%Z"
65 syntax predicate (<) "(%1 < %2)%Z"
66 syntax predicate (>=) "(%1 >= %2)%Z"
67 syntax predicate (>) "(%1 > %2)%Z"
69 remove prop MulComm.Comm
70 remove prop MulAssoc.Assoc
71 remove prop Unit_def_l
72 remove prop Unit_def_r
76 remove prop Mul_distr_l
77 remove prop Mul_distr_r
84 remove prop NonTrivialRing
85 remove prop CompatOrderAdd
86 remove prop CompatOrderMult
87 remove prop ZeroLessOne
93 syntax function abs "ZArith.BinInt.Z.abs"
101 syntax function min "ZArith.BinInt.Z.min"
102 syntax function max "ZArith.BinInt.Z.max"
106 (* removed: Coq Zdiv is NOT true Euclidean division:
107 Zmod can be negative, in fact (Zmod x y) has the same sign as y,
108 which is not the usual convention of programming language either.
110 theory int.EuclideanDivision
112 syntax function div "ZArith.BinInt.Z.div"
113 syntax function mod "ZArith.BinInt.Z.modulo"
116 remove prop Div_bound
117 remove prop Mod_bound
124 theory int.ComputerDivision
126 (* Coq provides the division and modulo operators
127 with the same convention as mainstream programming language
128 such C, Java, OCaml *)
130 syntax function div "ZArith.BinInt.Z.quot"
131 syntax function mod "ZArith.BinInt.Z.rem"
134 remove prop Div_bound
135 remove prop Mod_bound
136 remove prop Div_sign_pos
137 remove prop Div_sign_neg
138 remove prop Mod_sign_pos
139 remove prop Mod_sign_neg
140 remove prop Rounds_toward_zero
153 syntax function zero "0%R"
154 syntax function one "1%R"
156 syntax function (+) "(%1 + %2)%R"
157 syntax function (-) "(%1 - %2)%R"
158 syntax function (-_) "(-%1)%R"
159 syntax function (*) "(%1 * %2)%R"
160 syntax function (/) "(%1 / %2)%R"
161 syntax function inv "(/ %1)%R"
163 syntax predicate (<=) "(%1 <= %2)%R"
164 syntax predicate (<) "(%1 < %2)%R"
165 syntax predicate (>=) "(%1 >= %2)%R"
166 syntax predicate (>) "(%1 > %2)%R"
168 remove prop MulComm.Comm
169 remove prop MulAssoc.Assoc
170 remove prop Unit_def_l
171 remove prop Unit_def_r
172 remove prop Inv_def_l
173 remove prop Inv_def_r
175 remove prop Mul_distr_l
176 remove prop Mul_distr_r
180 remove prop NonTrivialRing
181 remove prop CompatOrderAdd
182 remove prop CompatOrderMult
183 remove prop ZeroLessOne
188 remove prop assoc_mul_div
189 remove prop assoc_div_mul
190 remove prop assoc_div_div
194 theory real.RealInfix
196 syntax function (+.) "(%1 + %2)%R"
197 syntax function (-.) "(%1 - %2)%R"
198 syntax function (-._) "(-%1)%R"
199 syntax function ( *.) "(%1 * %2)%R"
200 syntax function (/.) "(%1 / %2)%R"
202 syntax predicate (<=.) "(%1 <= %2)%R"
203 syntax predicate (<.) "(%1 < %2)%R"
204 syntax predicate (>=.) "(%1 >= %2)%R"
205 syntax predicate (>.) "(%1 > %2)%R"
211 prelude "Require Reals.Rbasic_fun."
213 syntax function abs "Reals.Rbasic_fun.Rabs"
222 syntax function min "Reals.Rbasic_fun.Rmin"
223 syntax function max "Reals.Rbasic_fun.Rmax"
229 syntax function from_int "BuiltIn.IZR"
242 prelude "Require Reals.R_sqrt."
244 syntax function sqr "Reals.RIneq.Rsqr"
245 syntax function sqrt "Reals.R_sqrt.sqrt" (* and not Rsqrt *)
247 remove prop Sqrt_positive
248 remove prop Sqrt_square
249 remove prop Square_sqrt
255 prelude "Require Reals.Rtrigo_def."
256 prelude "Require Reals.Rpower."
258 syntax function exp "Reals.Rtrigo_def.exp"
259 syntax function log "Reals.Rpower.ln"
272 prelude "Require Reals.Rfunctions."
274 syntax function power "Reals.Rfunctions.powerRZ"
276 remove prop Power_0 (* already as powerRZ_O *)
277 (* remove prop Power_s *)
278 remove prop Power_1 (* already as powerRZ_1 *)
279 (* remove prop Power_sum *) (* not the same as powerRZ_add *)
280 (* remove prop Power_mult *)
284 theory real.PowerReal
286 syntax function pow "Reals.Rpower.Rpower"
290 theory real.Trigonometry
292 prelude "Require Reals.Rtrigo_def."
293 prelude "Require Reals.Rtrigo1."
294 prelude "Require Reals.Ratan."
296 syntax function cos "Reals.Rtrigo_def.cos"
297 syntax function sin "Reals.Rtrigo_def.sin"
299 syntax function pi "Reals.Rtrigo1.PI"
301 syntax function tan "Reals.Rtrigo1.tan"
303 syntax function atan "Reals.Ratan.atan"
305 remove prop Pythagorean_identity
306 remove prop Cos_le_one
307 remove prop Sin_le_one
319 syntax type list "Init.Datatypes.list"
320 syntax function Nil "Init.Datatypes.nil"
321 syntax function Cons "Init.Datatypes.cons"
327 syntax function (++) "Init.Datatypes.app"
333 syntax function reverse "Lists.List.rev"
337 theory list.RevAppend
339 syntax function rev_append "Lists.List.rev_append"
345 syntax function combine "Lists.List.combine"
351 syntax type option "Init.Datatypes.option"
352 syntax function None "Init.Datatypes.None"
353 syntax function Some "Init.Datatypes.Some"
357 (* this file has an extension .aux rather than .gen since it should not be distributed *)
358 import "coq-realizations.aux"