Commit 1d9ad151 authored by MARCHE Claude's avatar MARCHE Claude

more goals in einstein

parent 88a5fbc2
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
theory T
use import int.Int
logic sqr (x:int) : int = x * x
goal WP : forall x:int. x >= 0 ->
( ( 0 >= 0) and ( ( x >= sqr 0) and ( 1 = sqr (0 + 1)))) and
(forall sum:int. forall count:int. ( ( count >= 0) and ( ( x >= sqr
count) and ( sum = sqr (count + 1)))) ->
(if sum <= x then
( ( (count + 1) >= 0) and ( ( x >= sqr (count + 1)) and
( ((sum + (2 * (count + 1))) + 1) = sqr ((count + 1) + 1)))) else ( count >= 0) and
( ( sqr count <= x) and ( x < sqr (count + 1)))))
end
\ No newline at end of file
(v,t,u,f,i) - valid, unknown, timeout, invalid, failure
(17 : 0.06, 0 : 0.00, 2 : 5.01, 0 : 0.00, 0 : 0.00) - fast.cvc3
(16 : 0.29, 0 : 0.00, 3 : 5.01, 0 : 0.00, 0 : 0.00) - fast.alt-ergo
prover ,funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm, , funny.talk290.mlw.Pgm,
fast.cvc3 ,Valid, 0.045, Valid, 0.042, Timeout, 5.008, Valid, 0.054, Valid, 0.074, Timeout, 5.020, Valid, 0.025, Valid, 0.036, Valid, 0.038, Valid, 0.036, Valid, 0.032, Valid, 0.028, Valid, 0.033, Valid, 0.111, Valid, 0.066, Valid, 0.033, Valid, 0.382, Valid, 0.030, Valid, 0.027
fast.alt-ergo ,Valid, 0.042, Valid, 0.069, Timeout, 4.995, Valid, 0.036, Valid, 0.033, Timeout, 5.015, Valid, 0.030, Valid, 0.031, Valid, 0.026, Valid, 0.023, Valid, 0.033, Valid, 0.023, Valid, 0.023, Timeout, 5.011, Valid, 2.704, Valid, 0.028, Valid, 1.529, Valid, 0.030, Valid, 0.018
\ No newline at end of file
0.00, 0.28, 0.56, 0.84, 1.12, 1.40, 1.68, 1.96, 2.24, 2.52
0, 16, 17, 17, 17, 17, 17, 17, 17, 17 - fast.cvc3
0, 14, 14, 14, 14, 14, 15, 15, 15, 15 - fast.alt-ergo
(* this is a prelude for Alt-Ergo*)
type person
logic Agatha : person
logic Butler : person
logic Charles : person
logic match_person : person, 'a, 'a, 'a -> 'a
axiom match_person_Agatha :
(forall z:'a. forall z1:'a. forall z2:'a [match_person(Agatha, z, z1, z2)].
(match_person(Agatha, z, z1, z2) = z))
axiom match_person_Butler :
(forall z:'a. forall z1:'a. forall z2:'a [match_person(Butler, z, z1, z2)].
(match_person(Butler, z, z1, z2) = z1))
axiom match_person_Charles :
(forall z:'a. forall z1:'a. forall z2:'a [match_person(Charles, z, z1,
z2)]. (match_person(Charles, z, z1, z2) = z2))
axiom person_inversion :
(forall u:person. forall z:'a. forall z1:'a. forall z2:'a [match_person(u,
z2, z1, z)]. (((u = Agatha) or (u = Butler)) or (u = Charles)))
logic hates : person, person -> prop
logic richer : person, person -> prop
logic lives : person -> prop
logic killed : person, person -> prop
axiom Lives1 : lives(Agatha)
axiom Lives2 : lives(Charles)
axiom Lives3 : lives(Butler)
axiom NoOneLivesForever :
(forall x:person. (lives(x) -> ((x = Agatha) or ((x = Charles) or
(x = Butler)))))
axiom MURDER : (exists x:person. (lives(x) and killed(x, Agatha)))
axiom Hate_and_killed :
(forall p1:person. forall p2:person. (killed(p1, p2) -> hates(p1, p2)))
axiom Killed_and_wealth :
(forall p1:person. forall p2:person. (killed(p1, p2) -> (not richer(p1,
p2))))
goal Diff1 : (not (Agatha = Butler))
(* Beware! Only edit allowed sections below *)
(* This file is generated by Why3's Coq driver *)
Require Import ZArith.
Require Import Rbase.
Inductive person :=
| agatha : person
| butler : person
| charles : person .
Parameter hates: person -> person -> Prop.
Parameter richer: person -> person -> Prop.
Parameter lives: person -> Prop.
Parameter killed: person -> person -> Prop.
Axiom Lives1 : (lives (agatha )).
Axiom Lives2 : (lives (charles )).
Axiom Lives3 : (lives (butler )).
Axiom NoOneLivesForever : forall (x:person), (lives x) -> ((x = (agatha )) \/
((x = (charles )) \/ (x = (butler )))).
Axiom MURDER : exists x:person, (lives x) /\ (killed x (agatha )).
Axiom Hate_and_killed : forall (p1:person) (p2:person), (killed p1 p2) ->
(hates p1 p2).
Axiom Killed_and_wealth : forall (p1:person) (p2:person), (killed p1 p2) ->
~ (richer p1 p2).
Axiom Diff1 : ~ ((agatha ) = (butler )).
Axiom Diff2 : ~ ((agatha ) = (charles )).
Axiom Diff3 : ~ ((charles ) = (butler )).
Axiom H1 : forall (x:person), (hates (agatha ) x) -> ~ (hates (charles ) x).
Axiom H2 : forall (x:person), (~ (x = (butler ))) -> (hates (agatha ) x).
Axiom H3 : forall (x:person), (~ (richer x (agatha ))) -> (hates (butler )
x).
Axiom H4 : forall (x:person), (hates (agatha ) x) -> (hates (butler ) x).
Axiom H5 : forall (x:person), exists y:person, ~ (hates x y).
Theorem Enigma : (killed (agatha ) (agatha )).
(* YOU MAY EDIT THE PROOF BELOW *)
Qed.
(* DO NOT EDIT BELOW *)
(* Beware! Only edit allowed sections below *)
(* This file is generated by Why3's Coq driver *)
Require Import ZArith.
Require Import Rbase.
Parameter t : Type.
Parameter ge: t -> t -> Prop.
Parameter min: t -> t -> t.
Parameter max: t -> t -> t.
Axiom Max_is_ge : forall (x:t) (y:t), (ge (max x y) x) /\ (ge (max x y) y).
Axiom Max_is_some : forall (x:t) (y:t), ((max x y) = x) \/ ((max x y) = y).
Axiom Min_is_le : forall (x:t) (y:t), (ge x (min x y)) /\ (ge y (min x y)).
Axiom Min_is_some : forall (x:t) (y:t), ((min x y) = x) \/ ((min x y) = y).
Axiom Max_x : forall (x:t) (y:t), (ge x y) -> ((max x y) = x).
Axiom Max_y : forall (x:t) (y:t), (ge y x) -> ((max x y) = y).
Axiom Min_x : forall (x:t) (y:t), (ge y x) -> ((min x y) = x).
Axiom Min_y : forall (x:t) (y:t), (ge x y) -> ((min x y) = y).
Theorem Max_sym : forall (x:t) (y:t), (ge x y) -> ((max x y) = (max y x)).
(* YOU MAY EDIT THE PROOF BELOW *)
intuition.
Qed.
(* DO NOT EDIT BELOW *)
(* Beware! Only edit allowed sections below *)
(* This file is generated by Why3's Coq driver *)
Require Import ZArith.
Require Import Rbase.
Parameter t : Type.
Parameter ge: t -> t -> Prop.
Parameter min: t -> t -> t.
Parameter max: t -> t -> t.
Axiom Max_is_ge : forall (x:t) (y:t), (ge (max x y) x) /\ (ge (max x y) y).
Axiom Max_is_some : forall (x:t) (y:t), ((max x y) = x) \/ ((max x y) = y).
Axiom Min_is_le : forall (x:t) (y:t), (ge x (min x y)) /\ (ge y (min x y)).
Axiom Min_is_some : forall (x:t) (y:t), ((min x y) = x) \/ ((min x y) = y).
Theorem Max_x : forall (x:t) (y:t), (ge x y) -> ((max x y) = x).
(* YOU MAY EDIT THE PROOF BELOW *)
Qed.
(* DO NOT EDIT BELOW *)
theory CosineSingle
use import real.Real
use import real.Abs
use import real.Trigonometry
use import floating_point.Rounding
use import floating_point.Single
(* approximation of cosine function by 1 - x^2 / 2 on interval [-1/32; 1/32] *)
lemma MethodError: forall x:real. abs x <= 0x1p-5 ->
abs (1.0 - x * x * 0.5 - cos x) <= 0x1p-24
(* computation in single precision *)
logic round_single (m:mode) (x:real) : single
axiom RoundSingle: forall m:mode, x:real.
value (round_single m x) = round m x
logic cos_single (x:single) : single =
let x2 = round_single NearestTiesToEven (value x * value x) in
let x2o2 = round_single NearestTiesToEven (0.5 * value x2) in
round_single NearestTiesToEven (1.0 - value x2o2)
lemma TotalError: forall x:single. abs (value x) <= 0x1p-5 ->
let cos_x = cos_single x in
abs (value cos_x - cos (value x)) <= 0x1p-24
end
(*
Local Variables:
compile-command: "../bin/whyide.byte my_cosine.why"
End:
*)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment