diff options
Diffstat (limited to 'src/Util/AdditionChainExponentiation.v')
-rw-r--r-- | src/Util/AdditionChainExponentiation.v | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Util/AdditionChainExponentiation.v b/src/Util/AdditionChainExponentiation.v index e03b2e36f..f35c4e9ea 100644 --- a/src/Util/AdditionChainExponentiation.v +++ b/src/Util/AdditionChainExponentiation.v @@ -39,7 +39,7 @@ Section AddChainExp. (Hl:Logic.eq (length acc) (length ref)), fold_chain id op is acc = (fold_chain 0 N.add is ref) * x. Proof using Type*. - induction is; intros; simpl @fold_chain. + intro x; induction is; intros acc ref H Hl; simpl @fold_chain. { repeat break_match; specialize (H 0%nat); rewrite ?nth_default_cons, ?nth_default_cons_S in H; solve [ simpl length in *; discriminate | apply H | rewrite scalarmult_0_l; reflexivity ]. } { repeat break_match. eapply IHis; intros; [|auto with distr_length]; []. @@ -52,8 +52,8 @@ Section AddChainExp. Lemma fold_chain_exp x is: fold_chain id op is [x] = (fold_chain 0 N.add is [1]) * x. Proof using Type*. - eapply fold_chain_exp'; intros; trivial. - destruct i; try destruct i; rewrite ?nth_default_cons_S, ?nth_default_cons, ?nth_default_nil; + eapply fold_chain_exp'; trivial; intros i. + destruct i as [|i]; try destruct i; rewrite ?nth_default_cons_S, ?nth_default_cons, ?nth_default_nil; rewrite ?scalarmult_1_l, ?scalarmult_0_l; reflexivity. Qed. End AddChainExp. |