diff --git a/easycrypt.project b/easycrypt.project index 727e5f7819..eb800b8bb8 100644 --- a/easycrypt.project +++ b/easycrypt.project @@ -1,3 +1,3 @@ [general] -provers = CVC5@1.0 -provers = Z3@4.12 +provers = CVC5@1.1 +provers = Z3@4.16 diff --git a/examples/cramer-shoup/cramer_shoup.ec b/examples/cramer-shoup/cramer_shoup.ec index f852e4bcbb..b66255ee1d 100644 --- a/examples/cramer-shoup/cramer_shoup.ec +++ b/examples/cramer-shoup/cramer_shoup.ec @@ -868,8 +868,10 @@ section Security_Aux. (forall (x : 'a), mu1 dt x <= r) => mu dt (mem l) <= n%r * r. proof. move=> Hsize Hmu1;apply (ler_trans ((size l)%r * r)). - + by apply mu_mem_le_mu1. - apply ler_wpmul2r; 1: smt (mu_bounded). + + by apply: mu_mem_le_mu1. + apply: ler_wpmul2r. + + apply: (ler_trans (mu1 dt witness)); 1:exact: ge0_mu. + exact: Hmu1. by apply le_fromint. qed. diff --git a/examples/ehoare/adversary.ec b/examples/ehoare/adversary.ec index 6117ad1639..270ed0f29f 100644 --- a/examples/ehoare/adversary.ec +++ b/examples/ehoare/adversary.ec @@ -14,7 +14,11 @@ axiom dr_mu_test : 0%r < p. op eps : real. axiom dr_mu1 : forall (x:r), mu1 dr x <= eps. -lemma eps_ge0: 0%r <= eps. by smt(dr_mu1 mu_bounded). qed. +lemma eps_ge0: 0%r <= eps. +apply: (ler_trans (mu1 dr witness)). ++ exact: ge0_mu. +exact: dr_mu1. +qed. module type Oracle = { proc o () : unit diff --git a/theories/algebra/Bigalg.ec b/theories/algebra/Bigalg.ec index c6cacc944d..fee55788ac 100644 --- a/theories/algebra/Bigalg.ec +++ b/theories/algebra/Bigalg.ec @@ -324,7 +324,7 @@ elim: s => // x s IHs F_ge0; rewrite BMul.big_cons. have {IHs} IHs := IHs _; first by smt(). case: (P x) => [Px F_big_gt0 a a_x_s Pa| nPx /IHs]; 2:smt(). rewrite pmulr_gt0 in F_big_gt0; 1, 3:smt(). -apply: prodr_ge0_seq; smt(). +by apply: prodr_ge0_seq; smt(). qed. lemma ler_prod_seq (P : 'a -> bool) (F1 F2 : 'a -> t) s: diff --git a/theories/algebra/DynMatrix.eca b/theories/algebra/DynMatrix.eca index 3f813c4ec9..ba04eb0044 100644 --- a/theories/algebra/DynMatrix.eca +++ b/theories/algebra/DynMatrix.eca @@ -1939,7 +1939,11 @@ qed. lemma supp_dmatrix_full m d r c : 0 <= r => 0 <= c => is_full d => m \in dmatrix d r c <=> size m = (r,c). -proof. smt(supp_dmatrix). qed. +proof. +move=> ge0_r ge0_c d_fu. +rewrite supp_dmatrix //; split=> //. +by move=> -> /= i j _; rewrite d_fu. +qed. lemma dvector_rnd_funi (d : R distr) (v1 v2 : vector) l : is_funiform d => size v1 = size v2 => diff --git a/theories/datatypes/List.ec b/theories/datatypes/List.ec index 47e026db5f..7bfc7fbaef 100644 --- a/theories/datatypes/List.ec +++ b/theories/datatypes/List.ec @@ -858,7 +858,10 @@ proof. by rewrite /= lezNgt; case: (0 < n). qed. lemma size_drop n (s : 'a list): 0 <= n => size (drop n s) = max 0 (size s - n). -proof. by elim: s n => //= /#. qed. +proof. +elim: s n => //= [/#|x xs ih n ge0_n]. +smt(size_ge0). +qed. lemma drop_cat n (s1 s2 : 'a list): drop n (s1 ++ s2) = diff --git a/theories/distributions/Distr.ec b/theories/distributions/Distr.ec index c7f35b146e..8746e2c991 100644 --- a/theories/distributions/Distr.ec +++ b/theories/distributions/Distr.ec @@ -650,7 +650,8 @@ qed. lemma distr_0Vmem (d : 'a distr) : d = dnull \/ exists x, x \in d. proof. -have := pred_0Vmem (support d); smt(support_eq0 supportP). +have:= pred_0Vmem (support d); case: (exists x, x \in d)=> //=. +by rewrite negb_exists=> /support_eq0. qed. lemma pmax_dnull ['a] : p_max dnull<:'a> = 0%r.