aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/algebra
diff options
context:
space:
mode:
authorCyril Cohen2020-04-10 11:45:05 +0200
committerCyril Cohen2020-09-27 15:09:15 +0200
commit4241f07301e8d84186ae2c80d5c32118a90f6847 (patch)
tree2d0ee7af9c7ef40c67e57b243dc1f84715635a2b /mathcomp/algebra
parent6d8f919bbc6a103378005d282fb6018bb63c5026 (diff)
Putting ord1 in fintype
ord1 is in zmodp, but it does not really require the zmodType structure of 'I_n to be stated and proven if we state it with ord0. We still keep the variant in zmodp with 0 instead of ord0 (for readability purposes).
Diffstat (limited to 'mathcomp/algebra')
-rw-r--r--mathcomp/algebra/zmodp.v4
1 files changed, 3 insertions, 1 deletions
diff --git a/mathcomp/algebra/zmodp.v b/mathcomp/algebra/zmodp.v
index 4d92e26..015d971 100644
--- a/mathcomp/algebra/zmodp.v
+++ b/mathcomp/algebra/zmodp.v
@@ -181,8 +181,10 @@ Arguments Zp1 {p'}.
Arguments inZp {p'} i.
Arguments valZpK {p'} x.
+(* We redefine fintype.ord1 to specialize it with 0 instead of ord0 *)
+(* since 'I_n is now canonically a zmodType *)
Lemma ord1 : all_equal_to (0 : 'I_1).
-Proof. by case=> [[] // ?]; apply: val_inj. Qed.
+Proof. exact: ord1. Qed.
Lemma lshift0 m n : lshift m (0 : 'I_n.+1) = (0 : 'I_(n + m).+1).
Proof. exact: val_inj. Qed.