We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aaab06 commit d041d90Copy full SHA for d041d90
1 file changed
theories/algebra/ZModPCentered.ec
@@ -71,7 +71,12 @@ lemma rg_to_crepr x :
71
proof. smt(ge2_p rg_asint). qed.
72
73
lemma to_crepr_zmodcgr x : zmodcgr x (to_crepr x).
74
-proof. smt(ge2_p). qed.
+proof.
75
+rewrite /to_crepr /=; case ((p + 1) %/ 2 <= x %% p) => _.
76
+- have -> : x %% p - p = x %% p + (-1) * p by ring.
77
+ by rewrite /zmodcgr modzMDr modz_mod.
78
+- by rewrite /zmodcgr modz_mod.
79
+qed.
80
81
lemma to_crepr_id x :
82
(p + 1) %/ 2 - p <= x < (p + 1) %/ 2 => to_crepr x = x.
0 commit comments