aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/algebra/zmodp.v
diff options
context:
space:
mode:
authorGeorges Gonthier2018-12-13 12:55:43 +0100
committerGeorges Gonthier2018-12-13 12:55:43 +0100
commit0b1ea03dafcf36880657ba910eec28ab78ccd018 (patch)
tree60a84ff296299226d530dd0b495be24fd7675748 /mathcomp/algebra/zmodp.v
parentfa9b7b19fc0409f3fdfa680e08f40a84594e8307 (diff)
Adjust implicits of cancellation lemmas
Like injectivity lemmas, instances of cancellation lemmas (whose conclusion is `cancel ? ?`, `{in ?, cancel ? ?}`, `pcancel`, or `ocancel`) are passed to generic lemmas such as `canRL` or `canLR_in`. Thus such lemmas should not have trailing on-demand implicits _just before_ the `cancel` conclusion, as these would be inconvenient to insert (requiring essentially an explicit eta-expansion). We therefore use `Arguments` or `Prenex Implicits` directives to make all such arguments maximally inserted implicits. We don’t, however make other arguments implicit, so as not to spoil direct instantiation of the lemmas (in, e.g., `rewrite -[y](invmK injf)`). We have also tried to do this with lemmas whose statement matches a `cancel`, i.e., ending in `forall x, g (E[x]) = x` (where pattern unification will pick up `f = fun x => E[x]`). We also adjusted implicits of a few stray injectivity lemmas, and defined constants. We provide a shorthand for reindexing a bigop with a permutation. Finally we used the new implicit signatures to simplify proofs that use injectivity or cancellation lemmas.
Diffstat (limited to 'mathcomp/algebra/zmodp.v')
-rw-r--r--mathcomp/algebra/zmodp.v5
1 files changed, 4 insertions, 1 deletions
diff --git a/mathcomp/algebra/zmodp.v b/mathcomp/algebra/zmodp.v
index ba6c1b3..5e931ef 100644
--- a/mathcomp/algebra/zmodp.v
+++ b/mathcomp/algebra/zmodp.v
@@ -180,7 +180,8 @@ End ZpDef.
Arguments Zp0 {p'}.
Arguments Zp1 {p'}.
-Arguments inZp {p'}.
+Arguments inZp {p'} i.
+Arguments valZpK {p'} x.
Lemma ord1 : all_equal_to (0 : 'I_1).
Proof. by case=> [[] // ?]; apply: val_inj. Qed.
@@ -259,6 +260,8 @@ Notation "''Z_' p" := 'I_(Zp_trunc p).+2
Notation "''F_' p" := 'Z_(pdiv p)
(at level 8, p at level 2, format "''F_' p") : type_scope.
+Arguments natr_Zp {p'} x.
+
Section Groups.
Variable p : nat.