The positive natural numbers #
This file develops the type ℕ+ or PNat, the subtype of natural numbers that are positive.
It is defined in Data.PNat.Defs, but most of the development is deferred to here so
that Data.PNat.Defs can have very few imports.
We now define a long list of structures on ℕ+ induced by
similar structures on ℕ. Most of these behave in a completely
obvious way, but there are a few things to be said about
subtraction, division and powers.
coe promoted to an AddHom, that is, a morphism which preserves addition.
Instances For
The order isomorphism between ℕ and ℕ+ given by succ.
Instances For
An induction principle for ℕ+: it takes values in Sort*, so it applies also to Types,
not only to Prop.
Instances For
b is greater one if any a is less than b
Subtraction a - b is defined in the obvious way when a > b, and by a - b = 1 if a ≤ b.
If n : ℕ+ is different from 1, then it is the successor of some k : ℕ+.
Lemmas with div, dvd and mod operations