Skip to content

Commit f362d36

Browse files
committed
trying to fix smt instability
1 parent d041d90 commit f362d36

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

theories/algebra/ZModPCentered.ec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,16 @@ qed.
8080
8181
lemma to_crepr_id x :
8282
(p + 1) %/ 2 - p <= x < (p + 1) %/ 2 => to_crepr x = x.
83-
proof. smt(). qed.
83+
proof.
84+
move=> [Hl Hu]; rewrite /to_crepr /=.
85+
have Hp := ge2_p.
86+
case (0 <= x) => Hx.
87+
- have -> : x %% p = x by apply modz_small; smt().
88+
by rewrite ifF /#.
89+
- have Hxp : (x + p) %% p = x + p by apply modz_small; smt().
90+
have -> : x %% p = x + p by rewrite -(modzDr x) Hxp.
91+
by rewrite ifT 1:/# /#.
92+
qed.
8493
8594
lemma to_crepr_eq x y : to_crepr x = to_crepr y <=> zmodcgr x y.
8695
proof. rewrite /to_crepr /= /#. qed.

0 commit comments

Comments
 (0)