Commit c817c1ca authored by Guillaume Melquiond's avatar Guillaume Melquiond

Regenerate Coq proofs broken by the support for realizations.

Note that this is just a consequence of symbols not being imported from
realizations. If Coq files were generated with "Require Import" directives
rather than just "Require", the change would have been completely
transparent. This is not reason enough to switch to "Require Import" but
it should be kept in mind.
parent 32881636
......@@ -2,6 +2,9 @@
(* Beware! Only edit allowed sections below *)
Require Import ZArith.
Require Import Rbase.
Require int.Int.
Require int.Abs.
Require int.EuclideanDivision.
Definition unit := unit.
Parameter qtmark : Type.
......@@ -14,6 +17,12 @@ Parameter old: forall (a:Type), a -> a.
Implicit Arguments old.
Definition implb(x:bool) (y:bool): bool := match (x,
y) with
| (true, false) => false
| (_, _) => true
end.
Parameter fib: Z -> Z.
......@@ -24,28 +33,6 @@ Axiom fib1 : ((fib 1%Z) = 1%Z).
Axiom fibn : forall (n:Z), (2%Z <= n)%Z ->
((fib n) = ((fib (n - 1%Z)%Z) + (fib (n - 2%Z)%Z))%Z).
Axiom Abs_le : forall (x:Z) (y:Z), ((Zabs x) <= y)%Z <-> (((-y)%Z <= x)%Z /\
(x <= y)%Z).
Parameter div: Z -> Z -> Z.
Parameter mod1: Z -> Z -> Z.
Axiom Div_mod : forall (x:Z) (y:Z), (~ (y = 0%Z)) -> (x = ((y * (div x
y))%Z + (mod1 x y))%Z).
Axiom Div_bound : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z < y)%Z) ->
((0%Z <= (div x y))%Z /\ ((div x y) <= x)%Z).
Axiom Mod_bound : forall (x:Z) (y:Z), (~ (y = 0%Z)) -> ((0%Z <= (mod1 x
y))%Z /\ ((mod1 x y) < (Zabs y))%Z).
Axiom Mod_1 : forall (x:Z), ((mod1 x 1%Z) = 0%Z).
Axiom Div_1 : forall (x:Z), ((div x 1%Z) = x).
Inductive t :=
| mk_t : Z -> Z -> Z -> Z -> t .
......@@ -88,22 +75,24 @@ Axiom Power_mult : forall (x:t) (n:Z) (m:Z), (0%Z <= n)%Z -> ((0%Z <= m)%Z ->
((power x (n * m)%Z) = (power (power x n) m))).
(* YOU MAY EDIT THE CONTEXT BELOW *)
(* DO NOT EDIT BELOW *)
Theorem WP_parameter_logfib : forall (n:Z), (0%Z <= n)%Z -> ((~ (n = 0%Z)) ->
((((0%Z <= n)%Z /\ ((div n 2%Z) < n)%Z) /\ (0%Z <= (div n 2%Z))%Z) ->
forall (result:Z) (result1:Z), ((power (mk_t 1%Z 1%Z 1%Z 0%Z) (div n
2%Z)) = (mk_t (result + result1)%Z result1 result1 result)) -> ((((mod1 n
2%Z) = 0%Z) -> match (((result * result)%Z + (result1 * result1)%Z)%Z,
((((0%Z <= n)%Z /\ ((int.EuclideanDivision.div n 2%Z) < n)%Z) /\
(0%Z <= (int.EuclideanDivision.div n 2%Z))%Z) -> forall (result:Z)
(result1:Z), ((power (mk_t 1%Z 1%Z 1%Z 0%Z) (int.EuclideanDivision.div n
2%Z)) = (mk_t (result + result1)%Z result1 result1 result)) ->
((((int.EuclideanDivision.mod1 n 2%Z) = 0%Z) -> match (
((result * result)%Z + (result1 * result1)%Z)%Z,
(result1 * (result + (result + result1)%Z)%Z)%Z) with
| (a, b) => ((power (mk_t 1%Z 1%Z 1%Z 0%Z) n) = (mk_t (a + b)%Z b b a))
end) /\ ((~ ((mod1 n 2%Z) = 0%Z)) -> match (
end) /\ ((~ ((int.EuclideanDivision.mod1 n 2%Z) = 0%Z)) -> match (
(result1 * (result + (result + result1)%Z)%Z)%Z,
(((result + result1)%Z * (result + result1)%Z)%Z + (result1 * result1)%Z)%Z) with
| (a, b) => ((power (mk_t 1%Z 1%Z 1%Z 0%Z) n) = (mk_t (a + b)%Z b b a))
end)))).
(* YOU MAY EDIT THE PROOF BELOW *)
Import EuclideanDivision.
intros.
assert (h: (2 <> 0)%Z) by omega.
generalize (Div_mod n 2 h)%Z.
......
......@@ -2,6 +2,8 @@
(* Beware! Only edit allowed sections below *)
Require Import ZArith.
Require Import Rbase.
Require int.Int.
Require int.MinMax.
Definition unit := unit.
Parameter qtmark : Type.
......@@ -14,6 +16,12 @@ Parameter old: forall (a:Type), a -> a.
Implicit Arguments old.
Definition implb(x:bool) (y:bool): bool := match (x,
y) with
| (true, false) => false
| (_, _) => true
end.
Parameter bag : forall (a:Type), Type.
Parameter nb_occ: forall (a:Type), a -> (bag a) -> Z.
......@@ -102,28 +110,6 @@ Axiom Card_union : forall (a:Type), forall (x:(bag a)) (y:(bag a)),
Axiom Card_zero_empty : forall (a:Type), forall (x:(bag a)),
((card x) = 0%Z) -> (x = (empty_bag:(bag a))).
Axiom Max_is_ge : forall (x:Z) (y:Z), (x <= (Zmax x y))%Z /\
(y <= (Zmax x y))%Z.
Axiom Max_is_some : forall (x:Z) (y:Z), ((Zmax x y) = x) \/ ((Zmax x y) = y).
Axiom Min_is_le : forall (x:Z) (y:Z), ((Zmin x y) <= x)%Z /\
((Zmin x y) <= y)%Z.
Axiom Min_is_some : forall (x:Z) (y:Z), ((Zmin x y) = x) \/ ((Zmin x y) = y).
Axiom Max_x : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmax x y) = x).
Axiom Max_y : forall (x:Z) (y:Z), (x <= y)%Z -> ((Zmax x y) = y).
Axiom Min_x : forall (x:Z) (y:Z), (x <= y)%Z -> ((Zmin x y) = x).
Axiom Min_y : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmin x y) = y).
Axiom Max_sym : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmax x y) = (Zmax y x)).
Axiom Min_sym : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmin x y) = (Zmin y x)).
Parameter diff: forall (a:Type), (bag a) -> (bag a) -> (bag a).
Implicit Arguments diff.
......@@ -310,11 +296,13 @@ assert (h: (i = j-1 \/ i < j-1)%Z) by omega.
auto.
assert (h: (get a i <= get a (n-1))%Z).
apply H_sorted; intuition.
rewrite Min_y; auto.
rewrite Zmin_r; auto.
rewrite <- (H_induc (j-1)%Z); auto with zarith.
unfold sorted_sub; auto with zarith.
pattern (min_bag (elements a i (j-1)));
rewrite H_induc; auto with zarith.
unfold sorted_sub; auto with zarith.
Qed.
(* DO NOT EDIT BELOW *)
\ No newline at end of file
(* DO NOT EDIT BELOW *)
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