Module docstring
{"# Definition and notation for positive natural numbers "}
{"# Definition and notation for positive natural numbers "}
PNat
definition
/-- `ℕ+` is the type of positive natural numbers. It is defined as a subtype,
and the VM representation of `ℕ+` is the same as `ℕ` because the proof
is not stored. -/
def PNat := { n : ℕ // 0 < n } deriving DecidableEq
termℕ+
definition
: Lean.ParserDescr✝
@[inherit_doc]
notation "ℕ+" => PNat
PNat.val
definition
: ℕ+ → ℕ
/-- The underlying natural number -/
@[coe]
def PNat.val : ℕ+ → ℕ := Subtype.val
coePNatNat
instance
: Coe ℕ+ ℕ
instance coePNatNat : Coe ℕ+ ℕ :=
⟨PNat.val⟩
instReprPNat
instance
: Repr ℕ+
instance : Repr ℕ+ :=
⟨fun n n' => reprPrec n.1 n'⟩