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

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.
            CommutativeStar
              ++ CommutativeStar means multiplication is commutative : x*y = y*x
 == SubDomain(NonNegativeInteger,x+->(x > 0)) add
   x:%
   y:%
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2005619913106366479-25px001.spad
      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




  Subject:   Be Bold !!
  ( 12 subscribers )  
Please rate this page: