diff options
author | Andres Erbsen <andreser@mit.edu> | 2016-08-04 13:07:16 -0400 |
---|---|---|
committer | Andres Erbsen <andreser@mit.edu> | 2016-08-04 13:07:16 -0400 |
commit | d6770f633286d3292ad3a700c9af89e2704901d0 (patch) | |
tree | 3ee75fa83e238156c11b4cb910a3e67c20b04aa3 /src/Algebra.v | |
parent | 391fd7661eb7a48cd436c2375a4fa99978ebecd3 (diff) |
address code review comments
Diffstat (limited to 'src/Algebra.v')
-rw-r--r-- | src/Algebra.v | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Algebra.v b/src/Algebra.v index adbf5b86b..5601b9d28 100644 --- a/src/Algebra.v +++ b/src/Algebra.v @@ -365,12 +365,14 @@ Module ScalarMult. Global Instance Proper_scalarmult_ref : Proper (Logic.eq==>eq==>eq) scalarmult_ref. Proof. - repeat intro; subst. - match goal with [n:nat |- _ ] => induction n; simpl @scalarmult_ref; [reflexivity|] end. - repeat match goal with [H:_ |- _ ] => rewrite H end; reflexivity. + repeat intro; subst; + match goal with [n:nat |- _ ] => + solve [induction n; simpl scalarmult_ref; rewrite_hyp ?*; reflexivity] + end. Qed. Lemma scalarmult_ext : forall n P, mul n P = scalarmult_ref n P. + Proof. induction n; simpl @scalarmult_ref; intros; rewrite <-?IHn; (apply scalarmult_0_l || apply scalarmult_S_l). Qed. |