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.
            commutative("*")
              ++ commutative("*") means multiplication is commutative : x*y = y*x
 == SubDomain(NonNegativeInteger,x+->(x > 0)) add
   x:%
   y:%
spad
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/408887470856718679-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| (< 0 |x|)))
****** level 1  ******
$x:= (+-> x (< (Zero) x))
$m:= (Boolean)
$f:=
((((|#1| #) (* #) (+ #) (< #) ...)))
>> Apparent user error: compLambda: signature needed (+-> x (< (Zero) x))

axiom
)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 recip : % -> Union(%,"failed") sample : () -> % smaller? : (%,%) -> Boolean ?~=? : (%,%) -> Boolean ?^? : (%,NonNegativeInteger) -> %




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