Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions easycrypt.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[general]
provers = CVC5@1.0
provers = Z3@4.12
provers = CVC5@1.1
provers = Z3@4.16
6 changes: 4 additions & 2 deletions examples/cramer-shoup/cramer_shoup.ec
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 5 additions & 1 deletion examples/ehoare/adversary.ec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion theories/algebra/Bigalg.ec
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion theories/algebra/DynMatrix.eca
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down
5 changes: 4 additions & 1 deletion theories/datatypes/List.ec
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down
3 changes: 2 additions & 1 deletion theories/distributions/Distr.ec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading