We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d041d90 commit f362d36Copy full SHA for f362d36
1 file changed
theories/algebra/ZModPCentered.ec
@@ -80,7 +80,16 @@ qed.
80
81
lemma to_crepr_id x :
82
(p + 1) %/ 2 - p <= x < (p + 1) %/ 2 => to_crepr x = x.
83
-proof. smt(). qed.
+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.
93
94
lemma to_crepr_eq x y : to_crepr x = to_crepr y <=> zmodcgr x y.
95
proof. rewrite /to_crepr /= /#. qed.
0 commit comments