Skip to content

Commit 80df3e2

Browse files
committed
Use by on closing tactics and bullet branches for maintainability
1 parent df28c85 commit 80df3e2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

theories/modules/TotalProb.ec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ have -> /= :
117117
0%r
118118
0%r
119119
1%r => //.
120-
+ hoare; call (_ : true); auto; smt().
121-
rnd pred0; auto; smt(mu0).
122-
congr; apply fun_ext => x'; by rewrite RandAux_partition_eq.
120+
+ by hoare; call (_ : true); auto; smt().
121+
by rnd pred0; auto; smt(mu0).
122+
by congr; apply fun_ext => x'; rewrite RandAux_partition_eq.
123123
qed.
124124
125125
end section.
@@ -152,7 +152,7 @@ lemma total_prob_bool (M <: T) (i : input) &m :
152152
Pr[M.main(i, false) @ &m : res] / 2%r.
153153
proof.
154154
rewrite (total_prob M DBool.dbool [true; false]) //.
155-
+ smt(supp_dbool).
155+
+ by smt(supp_dbool).
156156
by rewrite 2!big_cons big_nil /= /predT /predF /= 2!dbool1E.
157157
qed.
158158

@@ -177,7 +177,7 @@ lemma total_prob_drange (M <: T) (m n : int, i : input) &m :
177177
proof.
178178
move => lt_m_n.
179179
rewrite (total_prob M (drange m n) (range m n)).
180-
+ rewrite /is_finite_for; smt(range_uniq mem_range supp_drange).
180+
+ by rewrite /is_finite_for; smt(range_uniq mem_range supp_drange).
181181
apply eq_big_seq => x x_in_range_m_n /=.
182182
by rewrite drange1E (_ : m <= x < n) 1:-mem_range.
183183
qed.
@@ -207,7 +207,7 @@ lemma total_prob_uniform (M <: T) (xs : t list, i : input) &m :
207207
proof.
208208
move => uniq_xs xs_ne_nil.
209209
rewrite (total_prob M (duniform xs) xs).
210-
+ smt(supp_duniform).
210+
+ by smt(supp_duniform).
211211
apply eq_big_seq => y y_in_xs /=.
212212
by rewrite duniform1E_uniq // (_ : y \in xs).
213213
qed.

0 commit comments

Comments
 (0)