Skip to content

Commit

Permalink
Fixing rewrite changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbbarbosa-lectures committed Apr 29, 2024
1 parent 17bc60e commit a82b8d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions common/JWordList.ec
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ move=> Hn; rewrite /chunk.
have ->: (size (take (size l %/ n * n) l) %/ n) = (size l %/ n).
rewrite size_take'; first smt(size_ge0).
by rewrite lez_floor 1:/# /= mulzK 1:/#.
apply eq_in_mkseq => x Hx /=.
rewrite -{1}(cat_take_drop (size l %/ n * n)).
apply eq_in_mkseq => x Hx /=.
rewrite -(cat_take_drop (size l %/ n * n) l).
rewrite drop_cat size_take'; first smt(size_ge0).
rewrite lez_floor 1:/# /= mulzC StdOrder.IntOrder.ltr_pmul2r 1:/#.
move: (Hx); move=> [? ->] /=.
Expand All @@ -86,7 +86,7 @@ have E: n <= size (drop (x * n) (take (size l %/ n * n) l)).
by rewrite -{1}mulz1 {1}mulzC StdOrder.IntOrder.ler_pmul2r // -ltzS /#.
rewrite size_take' 1:/# lez_floor 1:/# /=.
smt(size_ge0).
by rewrite take_cat' E.
by rewrite take_cat' E /= cat_take_drop /=.
qed.

lemma map_chunkK ['a] (f:'a list -> 'a list) n bs:
Expand Down
2 changes: 1 addition & 1 deletion ml-kem/properties/MLKEMLib.ec
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ by smt(from_int_floor).
lemma frac_halfP x:
frac x = inv 2%r => frac (2%r*x) = 0%r.
proof.
move => E; rewrite floor_frac_eq mulrDr.
move => E; rewrite (floor_frac_eq x) /= mulrDr.
by rewrite -fromintM fracDz E divrr // from_int_frac.
qed.

Expand Down

0 comments on commit a82b8d5

Please sign in to comment.