Library Coq.Numbers.DecimalN


Proofs that conversions between decimal numbers and N are bijections
Conversion from/to signed decimal numbers

Module Signed.

Lemma of_to (n:N) : N.of_int (N.to_int n) = Some n.

Lemma to_of (d:int)(n:N) : N.of_int d = Some n -> N.to_int n = norm d.

Lemma to_int_inj n n' : N.to_int n = N.to_int n' -> n = n'.

Lemma to_int_pos_surj d : exists n, N.to_int n = norm (Pos d).

Lemma of_int_norm d : N.of_int (norm d) = N.of_int d.

Lemma of_inj_pos d d' :
 N.of_int (Pos d) = N.of_int (Pos d') -> unorm d = unorm d'.

End Signed.