login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

# Edit detail for PositiveInteger revision 3 of 3

 1 2 3 Editor: test1 Time: 2013/07/26 17:59:20 GMT+0 Note:

```changed:
-            commutative("*")
-              ++ commutative("*") means multiplication is commutative : x*y = y*x
CommutativeStar
++ CommutativeStar means multiplication is commutative : x*y = y*x
```

```)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.
CommutativeStar
++ CommutativeStar means multiplication is commutative : x*y = y*x
x:%
y:%```
```   Compiling FriCAS source code from file
using old system compiler.
PI abbreviates domain PositiveInteger
------------------------------------------------------------------------
initializing NRLIB PI for PositiveInteger
compiling into NRLIB PI
****** comp fails at level 1 with expression: ******
((+-> |x| (> |x| 0)))
****** level 1  ******
\$x:= (+-> x (> x (Zero)))
\$m:= (Boolean)
\$f:=
((((|#1| #) (* #) (+ #) (< #) ...)))
>> Apparent user error:
compLambda: signature needed
(+-> x (> x (Zero)))```

fricas
```)show PositiveInteger
PositiveInteger  is a domain constructor
Abbreviation for PositiveInteger is PI
This constructor is exposed in this frame.
------------------------------- Operations --------------------------------
?*? : (%,%) -> %                      ?*? : (PositiveInteger,%) -> %
?+? : (%,%) -> %                      ?<? : (%,%) -> Boolean
?<=? : (%,%) -> Boolean               ?=? : (%,%) -> Boolean
?>? : (%,%) -> Boolean                ?>=? : (%,%) -> Boolean
1 : () -> %                           ?^? : (%,PositiveInteger) -> %
coerce : % -> OutputForm              gcd : (%,%) -> %
hash : % -> SingleInteger             latex : % -> String
max : (%,%) -> %                      min : (%,%) -> %
one? : % -> Boolean                   qcoerce : Integer -> %
recip : % -> Union(%,"failed")        sample : () -> %
smaller? : (%,%) -> Boolean           ?~=? : (%,%) -> Boolean
?^? : (%,NonNegativeInteger) -> %
hashUpdate! : (HashState,%) -> HashState```