Section fast_pow_pos.
Fixpoint Zfast_pow_pos (v : Z) (e : positive) : Z :=
match e with
| xH => v
| xO e' => Z.square (Zfast_pow_pos v e')
| xI e' => Zmult v (Z.square (Zfast_pow_pos v e'))
end.

Theorem Zfast_pow_pos_correct :
forall v e, Zfast_pow_pos v e = Zpower_pos v e.