Section Of_Z.
Context {t : Type}{ops : Ops t}{specs : Specs ops}.
Notation "[| x |]" := (to_Z x)  (at level 0, x at level 99).
Definition of_Z z :=
match z with
| Zpos p => snd (of_pos p)
| _ => zero
end.

Theorem of_Z_correct:
forall p, 0 <= p < base digits -> [|of_Z p|] = p.