Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 404a9dd8 authored by Guillaume Melquiond's avatar Guillaume Melquiond

Update Coq realizations.

parent 648ecbd5
...@@ -39,15 +39,15 @@ exact (model 53 1024). ...@@ -39,15 +39,15 @@ exact (model 53 1024).
Defined. Defined.
(* Why3 assumption *) (* Why3 assumption *)
Definition round_error(x:floating_point.DoubleFormat.double): R := Definition round_error (x:floating_point.DoubleFormat.double): R :=
(Rabs ((value x) - (exact x))%R). (Rabs ((value x) - (exact x))%R).
(* Why3 assumption *) (* Why3 assumption *)
Definition total_error(x:floating_point.DoubleFormat.double): R := Definition total_error (x:floating_point.DoubleFormat.double): R :=
(Rabs ((value x) - (model x))%R). (Rabs ((value x) - (model x))%R).
(* Why3 assumption *) (* Why3 assumption *)
Definition no_overflow(m:floating_point.Rounding.mode) (x:R): Prop := Definition no_overflow (m:floating_point.Rounding.mode) (x:R): Prop :=
((Rabs (round m ((Rabs (round m
x)) <= (9007199254740991 * 19958403095347198116563727130368385660674512604354575415025472424372118918689640657849579654926357010893424468441924952439724379883935936607391717982848314203200056729510856765175377214443629871826533567445439239933308104551208703888888552684480441575071209068757560416423584952303440099278848)%R)%R. x)) <= (9007199254740991 * 19958403095347198116563727130368385660674512604354575415025472424372118918689640657849579654926357010893424468441924952439724379883935936607391717982848314203200056729510856765175377214443629871826533567445439239933308104551208703888888552684480441575071209068757560416423584952303440099278848)%R)%R.
...@@ -118,12 +118,12 @@ now apply Round_up_neg. ...@@ -118,12 +118,12 @@ now apply Round_up_neg.
Qed. Qed.
(* Why3 assumption *) (* Why3 assumption *)
Definition of_real_post(m:floating_point.Rounding.mode) (x:R) Definition of_real_post (m:floating_point.Rounding.mode) (x:R)
(res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m (res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m
x)) /\ (((exact res) = x) /\ ((model res) = x)). x)) /\ (((exact res) = x) /\ ((model res) = x)).
(* Why3 assumption *) (* Why3 assumption *)
Definition add_post(m:floating_point.Rounding.mode) Definition add_post (m:floating_point.Rounding.mode)
(x:floating_point.DoubleFormat.double) (x:floating_point.DoubleFormat.double)
(y:floating_point.DoubleFormat.double) (y:floating_point.DoubleFormat.double)
(res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m (res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m
...@@ -132,7 +132,7 @@ Definition add_post(m:floating_point.Rounding.mode) ...@@ -132,7 +132,7 @@ Definition add_post(m:floating_point.Rounding.mode)
((model res) = ((model x) + (model y))%R)). ((model res) = ((model x) + (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition sub_post(m:floating_point.Rounding.mode) Definition sub_post (m:floating_point.Rounding.mode)
(x:floating_point.DoubleFormat.double) (x:floating_point.DoubleFormat.double)
(y:floating_point.DoubleFormat.double) (y:floating_point.DoubleFormat.double)
(res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m (res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m
...@@ -141,7 +141,7 @@ Definition sub_post(m:floating_point.Rounding.mode) ...@@ -141,7 +141,7 @@ Definition sub_post(m:floating_point.Rounding.mode)
((model res) = ((model x) - (model y))%R)). ((model res) = ((model x) - (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition mul_post(m:floating_point.Rounding.mode) Definition mul_post (m:floating_point.Rounding.mode)
(x:floating_point.DoubleFormat.double) (x:floating_point.DoubleFormat.double)
(y:floating_point.DoubleFormat.double) (y:floating_point.DoubleFormat.double)
(res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m (res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m
...@@ -150,7 +150,7 @@ Definition mul_post(m:floating_point.Rounding.mode) ...@@ -150,7 +150,7 @@ Definition mul_post(m:floating_point.Rounding.mode)
((model res) = ((model x) * (model y))%R)). ((model res) = ((model x) * (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition div_post(m:floating_point.Rounding.mode) Definition div_post (m:floating_point.Rounding.mode)
(x:floating_point.DoubleFormat.double) (x:floating_point.DoubleFormat.double)
(y:floating_point.DoubleFormat.double) (y:floating_point.DoubleFormat.double)
(res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m (res:floating_point.DoubleFormat.double): Prop := ((value res) = (round m
...@@ -159,17 +159,17 @@ Definition div_post(m:floating_point.Rounding.mode) ...@@ -159,17 +159,17 @@ Definition div_post(m:floating_point.Rounding.mode)
((model res) = (Rdiv (model x) (model y))%R)). ((model res) = (Rdiv (model x) (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition neg_post(x:floating_point.DoubleFormat.double) Definition neg_post (x:floating_point.DoubleFormat.double)
(res:floating_point.DoubleFormat.double): Prop := (res:floating_point.DoubleFormat.double): Prop :=
((value res) = (-(value x))%R) /\ (((exact res) = (-(exact x))%R) /\ ((value res) = (-(value x))%R) /\ (((exact res) = (-(exact x))%R) /\
((model res) = (-(model x))%R)). ((model res) = (-(model x))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition lt(x:floating_point.DoubleFormat.double) Definition lt (x:floating_point.DoubleFormat.double)
(y:floating_point.DoubleFormat.double): Prop := ((value x) < (value y))%R. (y:floating_point.DoubleFormat.double): Prop := ((value x) < (value y))%R.
(* Why3 assumption *) (* Why3 assumption *)
Definition gt(x:floating_point.DoubleFormat.double) Definition gt (x:floating_point.DoubleFormat.double)
(y:floating_point.DoubleFormat.double): Prop := ((value y) < (value x))%R. (y:floating_point.DoubleFormat.double): Prop := ((value y) < (value x))%R.
...@@ -4,12 +4,12 @@ Require Import BuiltIn. ...@@ -4,12 +4,12 @@ Require Import BuiltIn.
Require BuiltIn. Require BuiltIn.
(* Why3 assumption *) (* Why3 assumption *)
Inductive mode := Inductive mode :=
| NearestTiesToEven : mode | NearestTiesToEven : mode
| ToZero : mode | ToZero : mode
| Up : mode | Up : mode
| Down : mode | Down : mode
| NearestTiesToAway : mode . | NearestTiesToAway : mode.
Axiom mode_WhyType : WhyType mode. Axiom mode_WhyType : WhyType mode.
Existing Instance mode_WhyType. Existing Instance mode_WhyType.
......
...@@ -39,15 +39,15 @@ exact (model 24 128). ...@@ -39,15 +39,15 @@ exact (model 24 128).
Defined. Defined.
(* Why3 assumption *) (* Why3 assumption *)
Definition round_error(x:floating_point.SingleFormat.single): R := Definition round_error (x:floating_point.SingleFormat.single): R :=
(Rabs ((value x) - (exact x))%R). (Rabs ((value x) - (exact x))%R).
(* Why3 assumption *) (* Why3 assumption *)
Definition total_error(x:floating_point.SingleFormat.single): R := Definition total_error (x:floating_point.SingleFormat.single): R :=
(Rabs ((value x) - (model x))%R). (Rabs ((value x) - (model x))%R).
(* Why3 assumption *) (* Why3 assumption *)
Definition no_overflow(m:floating_point.Rounding.mode) (x:R): Prop := Definition no_overflow (m:floating_point.Rounding.mode) (x:R): Prop :=
((Rabs (round m x)) <= (33554430 * 10141204801825835211973625643008)%R)%R. ((Rabs (round m x)) <= (33554430 * 10141204801825835211973625643008)%R)%R.
Lemma max_single_eq: (33554430 * 10141204801825835211973625643008 = max 24 128)%R. Lemma max_single_eq: (33554430 * 10141204801825835211973625643008 = max 24 128)%R.
...@@ -126,12 +126,12 @@ now apply Round_up_neg. ...@@ -126,12 +126,12 @@ now apply Round_up_neg.
Qed. Qed.
(* Why3 assumption *) (* Why3 assumption *)
Definition of_real_post(m:floating_point.Rounding.mode) (x:R) Definition of_real_post (m:floating_point.Rounding.mode) (x:R)
(res:floating_point.SingleFormat.single): Prop := ((value res) = (round m (res:floating_point.SingleFormat.single): Prop := ((value res) = (round m
x)) /\ (((exact res) = x) /\ ((model res) = x)). x)) /\ (((exact res) = x) /\ ((model res) = x)).
(* Why3 assumption *) (* Why3 assumption *)
Definition add_post(m:floating_point.Rounding.mode) Definition add_post (m:floating_point.Rounding.mode)
(x:floating_point.SingleFormat.single) (x:floating_point.SingleFormat.single)
(y:floating_point.SingleFormat.single) (y:floating_point.SingleFormat.single)
(res:floating_point.SingleFormat.single): Prop := ((value res) = (round m (res:floating_point.SingleFormat.single): Prop := ((value res) = (round m
...@@ -140,7 +140,7 @@ Definition add_post(m:floating_point.Rounding.mode) ...@@ -140,7 +140,7 @@ Definition add_post(m:floating_point.Rounding.mode)
((model res) = ((model x) + (model y))%R)). ((model res) = ((model x) + (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition sub_post(m:floating_point.Rounding.mode) Definition sub_post (m:floating_point.Rounding.mode)
(x:floating_point.SingleFormat.single) (x:floating_point.SingleFormat.single)
(y:floating_point.SingleFormat.single) (y:floating_point.SingleFormat.single)
(res:floating_point.SingleFormat.single): Prop := ((value res) = (round m (res:floating_point.SingleFormat.single): Prop := ((value res) = (round m
...@@ -149,7 +149,7 @@ Definition sub_post(m:floating_point.Rounding.mode) ...@@ -149,7 +149,7 @@ Definition sub_post(m:floating_point.Rounding.mode)
((model res) = ((model x) - (model y))%R)). ((model res) = ((model x) - (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition mul_post(m:floating_point.Rounding.mode) Definition mul_post (m:floating_point.Rounding.mode)
(x:floating_point.SingleFormat.single) (x:floating_point.SingleFormat.single)
(y:floating_point.SingleFormat.single) (y:floating_point.SingleFormat.single)
(res:floating_point.SingleFormat.single): Prop := ((value res) = (round m (res:floating_point.SingleFormat.single): Prop := ((value res) = (round m
...@@ -158,7 +158,7 @@ Definition mul_post(m:floating_point.Rounding.mode) ...@@ -158,7 +158,7 @@ Definition mul_post(m:floating_point.Rounding.mode)
((model res) = ((model x) * (model y))%R)). ((model res) = ((model x) * (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition div_post(m:floating_point.Rounding.mode) Definition div_post (m:floating_point.Rounding.mode)
(x:floating_point.SingleFormat.single) (x:floating_point.SingleFormat.single)
(y:floating_point.SingleFormat.single) (y:floating_point.SingleFormat.single)
(res:floating_point.SingleFormat.single): Prop := ((value res) = (round m (res:floating_point.SingleFormat.single): Prop := ((value res) = (round m
...@@ -167,17 +167,17 @@ Definition div_post(m:floating_point.Rounding.mode) ...@@ -167,17 +167,17 @@ Definition div_post(m:floating_point.Rounding.mode)
((model res) = (Rdiv (model x) (model y))%R)). ((model res) = (Rdiv (model x) (model y))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition neg_post(x:floating_point.SingleFormat.single) Definition neg_post (x:floating_point.SingleFormat.single)
(res:floating_point.SingleFormat.single): Prop := (res:floating_point.SingleFormat.single): Prop :=
((value res) = (-(value x))%R) /\ (((exact res) = (-(exact x))%R) /\ ((value res) = (-(value x))%R) /\ (((exact res) = (-(exact x))%R) /\
((model res) = (-(model x))%R)). ((model res) = (-(model x))%R)).
(* Why3 assumption *) (* Why3 assumption *)
Definition lt(x:floating_point.SingleFormat.single) Definition lt (x:floating_point.SingleFormat.single)
(y:floating_point.SingleFormat.single): Prop := ((value x) < (value y))%R. (y:floating_point.SingleFormat.single): Prop := ((value x) < (value y))%R.
(* Why3 assumption *) (* Why3 assumption *)
Definition gt(x:floating_point.SingleFormat.single) Definition gt (x:floating_point.SingleFormat.single)
(y:floating_point.SingleFormat.single): Prop := ((value y) < (value x))%R. (y:floating_point.SingleFormat.single): Prop := ((value y) < (value x))%R.
...@@ -6,7 +6,7 @@ Require int.Int. ...@@ -6,7 +6,7 @@ Require int.Int.
Require map.Map. Require map.Map.
(* Why3 assumption *) (* Why3 assumption *)
Definition exchange {a:Type} {a_WT:WhyType a}(a1:(map.Map.map Z a)) Definition exchange {a:Type} {a_WT:WhyType a} (a1:(map.Map.map Z a))
(a2:(map.Map.map Z a)) (i:Z) (j:Z): Prop := ((map.Map.get a1 (a2:(map.Map.map Z a)) (i:Z) (j:Z): Prop := ((map.Map.get a1
i) = (map.Map.get a2 j)) /\ (((map.Map.get a2 i) = (map.Map.get a1 j)) /\ i) = (map.Map.get a2 j)) /\ (((map.Map.get a2 i) = (map.Map.get a1 j)) /\
forall (k:Z), ((~ (k = i)) /\ ~ (k = j)) -> ((map.Map.get a1 forall (k:Z), ((~ (k = i)) /\ ~ (k = j)) -> ((map.Map.get a1
......
...@@ -12,7 +12,7 @@ Require number.Parity. ...@@ -12,7 +12,7 @@ Require number.Parity.
(* Hack so that Why3 does not override the notation below. (* Hack so that Why3 does not override the notation below.
(* Why3 assumption *) (* Why3 assumption *)
Definition divides(d:Z) (n:Z): Prop := exists q:Z, (n = (q * d)%Z). Definition divides (d:Z) (n:Z): Prop := exists q:Z, (n = (q * d)%Z).
*) *)
...@@ -38,15 +38,15 @@ exact Zdivide_0. ...@@ -38,15 +38,15 @@ exact Zdivide_0.
Qed. Qed.
(* Why3 goal *) (* Why3 goal *)
Lemma divides_left : forall (a:Z) (b:Z) (c:Z), (divides a b) -> Lemma divides_left : forall (a:Z) (b:Z) (c:Z), (divides a b) -> (divides
(divides (c * a)%Z (c * b)%Z). (c * a)%Z (c * b)%Z).
Proof. Proof.
exact Zmult_divide_compat_l. exact Zmult_divide_compat_l.
Qed. Qed.
(* Why3 goal *) (* Why3 goal *)
Lemma divides_right : forall (a:Z) (b:Z) (c:Z), (divides a b) -> Lemma divides_right : forall (a:Z) (b:Z) (c:Z), (divides a b) -> (divides
(divides (a * c)%Z (b * c)%Z). (a * c)%Z (b * c)%Z).
Proof. Proof.
exact Zmult_divide_compat_r. exact Zmult_divide_compat_r.
Qed. Qed.
...@@ -160,8 +160,8 @@ ring. ...@@ -160,8 +160,8 @@ ring.
Qed. Qed.
(* Why3 goal *) (* Why3 goal *)
Lemma divides_mod_euclidean : forall (a:Z) (b:Z), (~ (b = 0%Z)) -> Lemma divides_mod_euclidean : forall (a:Z) (b:Z), (~ (b = 0%Z)) -> ((divides
((divides b a) -> ((int.EuclideanDivision.mod1 a b) = 0%Z)). b a) -> ((int.EuclideanDivision.mod1 a b) = 0%Z)).
Proof. Proof.
intros a b Zb H. intros a b Zb H.
assert (Zmod a b = Z0). assert (Zmod a b = Z0).
......
...@@ -5,10 +5,10 @@ Require BuiltIn. ...@@ -5,10 +5,10 @@ Require BuiltIn.
Require int.Int. Require int.Int.
(* Why3 assumption *) (* Why3 assumption *)
Definition even(n:Z): Prop := exists k:Z, (n = (2%Z * k)%Z). Definition even (n:Z): Prop := exists k:Z, (n = (2%Z * k)%Z).
(* Why3 assumption *) (* Why3 assumption *)
Definition odd(n:Z): Prop := exists k:Z, (n = ((2%Z * k)%Z + 1%Z)%Z). Definition odd (n:Z): Prop := exists k:Z, (n = ((2%Z * k)%Z + 1%Z)%Z).
Lemma even_is_Zeven : Lemma even_is_Zeven :
forall n, even n <-> Zeven n. forall n, even n <-> Zeven n.
......
...@@ -13,7 +13,7 @@ Require number.Divisibility. ...@@ -13,7 +13,7 @@ Require number.Divisibility.
Import Znumtheory. Import Znumtheory.
(* Why3 assumption *) (* Why3 assumption *)
Definition prime(p:Z): Prop := (2%Z <= p)%Z /\ forall (n:Z), ((1%Z < n)%Z /\ Definition prime (p:Z): Prop := (2%Z <= p)%Z /\ forall (n:Z), ((1%Z < n)%Z /\
(n < p)%Z) -> ~ (number.Divisibility.divides n p). (n < p)%Z) -> ~ (number.Divisibility.divides n p).
Lemma prime_is_Zprime : Lemma prime_is_Zprime :
...@@ -58,8 +58,8 @@ Qed. ...@@ -58,8 +58,8 @@ Qed.
(* Why3 goal *) (* Why3 goal *)
Lemma small_divisors : forall (p:Z), (2%Z <= p)%Z -> ((forall (d:Z), Lemma small_divisors : forall (p:Z), (2%Z <= p)%Z -> ((forall (d:Z),
(2%Z <= d)%Z -> ((prime d) -> (((1%Z < (d * d)%Z)%Z /\ (2%Z <= d)%Z -> ((prime d) -> (((1%Z < (d * d)%Z)%Z /\
((d * d)%Z <= p)%Z) -> ~ (number.Divisibility.divides d p)))) -> ((d * d)%Z <= p)%Z) -> ~ (number.Divisibility.divides d p)))) -> (prime
(prime p)). p)).
Proof. Proof.
intros p Hp H. intros p Hp H.
apply <- prime_is_Zprime. apply <- prime_is_Zprime.
......
...@@ -48,9 +48,9 @@ exact exp_ln. ...@@ -48,9 +48,9 @@ exact exp_ln.
Qed. Qed.
(* Why3 assumption *) (* Why3 assumption *)
Definition log2(x:R): R := (Rdiv (ln x) (ln 2%R))%R. Definition log2 (x:R): R := (Rdiv (ln x) (ln 2%R))%R.
(* Why3 assumption *) (* Why3 assumption *)
Definition log10(x:R): R := (Rdiv (ln x) (ln 10%R))%R. Definition log10 (x:R): R := (Rdiv (ln x) (ln 10%R))%R.
...@@ -35,7 +35,7 @@ Defined. ...@@ -35,7 +35,7 @@ Defined.
Hint Unfold mem. Hint Unfold mem.
(* Why3 assumption *) (* Why3 assumption *)
Definition infix_eqeq {a:Type} {a_WT:WhyType a}(s1:(set a)) (s2:(set Definition infix_eqeq {a:Type} {a_WT:WhyType a} (s1:(set a)) (s2:(set
a)): Prop := forall (x:a), (mem x s1) <-> (mem x s2). a)): Prop := forall (x:a), (mem x s1) <-> (mem x s2).
Notation "x == y" := (infix_eqeq x y) (at level 70, no associativity). Notation "x == y" := (infix_eqeq x y) (at level 70, no associativity).
...@@ -50,8 +50,8 @@ apply h1. ...@@ -50,8 +50,8 @@ apply h1.
Qed. Qed.
(* Why3 assumption *) (* Why3 assumption *)
Definition subset {a:Type} {a_WT:WhyType a}(s1:(set a)) (s2:(set a)): Prop := Definition subset {a:Type} {a_WT:WhyType a} (s1:(set a)) (s2:(set
forall (x:a), (mem x s1) -> (mem x s2). a)): Prop := forall (x:a), (mem x s1) -> (mem x s2).
(* Why3 goal *) (* Why3 goal *)
Lemma subset_refl : forall {a:Type} {a_WT:WhyType a}, forall (s:(set a)), Lemma subset_refl : forall {a:Type} {a_WT:WhyType a}, forall (s:(set a)),
...@@ -75,7 +75,7 @@ exact (fun _ => False). ...@@ -75,7 +75,7 @@ exact (fun _ => False).
Defined. Defined.
(* Why3 assumption *) (* Why3 assumption *)
Definition is_empty {a:Type} {a_WT:WhyType a}(s:(set a)): Prop := Definition is_empty {a:Type} {a_WT:WhyType a} (s:(set a)): Prop :=
forall (x:a), ~ (mem x s). forall (x:a), ~ (mem x s).
(* Why3 goal *) (* Why3 goal *)
......
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