See also NonNegativeInteger
spad
)abbrev domain PI PositiveInteger
++ Author:
++ Date Created:
++ Change History:
++ Basic Operations:
++ Related Constructors:
++ Keywords: positive integer
++ Description: \spadtype{PositiveInteger} provides functions for
++ positive integers.
PositiveInteger: Join(AbelianSemiGroup,OrderedSet,Monoid) with
gcd: (%,%) -> %
++ gcd(a,b) computes the greatest common divisor of two
++ positive integers \spad{a} and b.
commutative("*")
++ commutative("*") means multiplication is commutative : x*y = y*x
== SubDomain(NonNegativeInteger,#1 > 0) add
x:%
y:%
spad
Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/8833918516811102525-25px001.spad using
old system compiler.
PI abbreviates domain PositiveInteger
------------------------------------------------------------------------
initializing NRLIB PI for PositiveInteger
compiling into NRLIB PI
(time taken in buildFunctor: 0)
;;; *** |PositiveInteger| REDEFINED
;;; *** |PositiveInteger| REDEFINED
Time: 0.07 SEC.
Cumulative Statistics for Constructor PositiveInteger
Time: 0.07 seconds
--------------non extending category----------------------
.. PositiveInteger of cat
(|Join| (|AbelianSemiGroup|) (|OrderedSet|) (|Monoid|)
(CATEGORY |domain| (SIGNATURE |gcd| ($ $ $))
(ATTRIBUTE (|commutative| "*")))) has no
(|OrderedAbelianMonoidSup|) finalizing NRLIB PI
Processing PositiveInteger for Browser database:
--------(gcd (% % %))---------
--------(commutative (attribute *))---------
--------constructor---------
------------------------------------------------------------------------
PositiveInteger is now explicitly exposed in frame initial
PositiveInteger will be automatically loaded when needed from
/var/zope2/var/LatexWiki/PI.NRLIB/code
axiom
)show PositiveInteger
PositiveInteger is a domain constructor
Abbreviation for PositiveInteger is PI
This constructor is exposed in this frame.
Issue )edit /var/zope2/var/LatexWiki/8833918516811102525-25px001.spad to see algebra source
code for PI
------------------------------- Operations --------------------------------
?*? : (%,%) -> % ?*? : (PositiveInteger,%) -> %
?**? : (%,PositiveInteger) -> % ?+? : (%,%) -> %
?<? : (%,%) -> Boolean ?<=? : (%,%) -> Boolean
?=? : (%,%) -> Boolean ?>? : (%,%) -> Boolean
?>=? : (%,%) -> Boolean 1 : () -> %
?^? : (%,PositiveInteger) -> % coerce : % -> OutputForm
gcd : (%,%) -> % hash : % -> SingleInteger
latex : % -> String max : (%,%) -> %
min : (%,%) -> % one? : % -> Boolean
recip : % -> Union(%,"failed") sample : () -> %
?~=? : (%,%) -> Boolean
?**? : (%,NonNegativeInteger) -> %
?^? : (%,NonNegativeInteger) -> %