OpenMath Content Dictionary: nums1

Canonical URL:
http://www.openmath.org/cd/nums1.ocd
CD File:
nums1.ocd
CD as XML Encoded OpenMath:
nums1.omcd
Defines:
based_integer, e, gamma, i, infinity, NaN, pi, rational
Date:
2001-03-12
Version:
2
Review Date:
2003-04-01
Status:
official
Uses CD:
alg1, arith1, relation1, logic1, transc1, setname1, set1, interval1, fns1, integer1, limit1

This CD is intended to be `compatible' with the MathML view of constructors for numbers (integers to an arbitrary base, rationals) and symbols for some common numerical constants.

This CD holds a set of symbols for creating numbers, including some defined constants (i.e. nullary constructors).


based_integer

This symbol represents the constructor function for integers, specifying the base. It takes two arguments, the first is a positive integer to denote the base to which the number is represented, the second argument is a string which contains an optional sign and the digits of the integer, using 0-9a-z (as a consequence of this no radix greater than 35 is supported). Base 16 and base 10 are already covered in the encodings of integers.

Example:
A representation of 8 (radix 10) base 8
<OMOBJ><OMA>
  <OMS cd="relation1" name="eq"/>
  <OMI> 8 </OMI>
  <OMA>
    <OMS cd="nums1" name="based_integer"/>
    <OMI> 8 </OMI>
    <OMSTR> 10 </OMSTR>
  </OMA>

</OMA></OMOBJ>

eq ( 8 , based_integer ( 8 , " 10 " ) )

Signatures:
sts


[Next: rational] [Last: NaN] [Top]

rational

This symbol represents the constructor function for rational numbers. It takes two arguments, the first is an integer p to denote the numerator and the second a nonzero integer q to denote the denominator of the rational p/q.

Example:
A representation of the rational number 1/2
<OMOBJ><OMA>
  <OMS cd="nums1" name="rational"/>
  <OMI> 1 </OMI>
  <OMI> 2 </OMI>
</OMA></OMOBJ>

rational ( 1 , 2 )

Signatures:
sts


[Next: infinity] [Previous: based_integer] [Top]

infinity

A symbol to represent the notion of infinity.

Commented Mathematical property (CMP):
if x is a real number then x < infinity
Formal Mathematical property (FMP):
<OMOBJ>
<OMA>
  <OMS cd="logic1" name="implies"/>
  <OMA>
    <OMS cd="set1" name="in"/>
    <OMV name="x"/>
    <OMS cd="setname1" name="R"/>
  </OMA>
  <OMA>
    <OMS cd="relation1" name="lt"/>
    <OMV name="x"/>
    <OMS cd="nums1" name="infinity"/>
  </OMA>
</OMA>
</OMOBJ>

implies (in ( x, R) , lt ( x, infinity) )

Signatures:
sts


[Next: e] [Previous: rational] [Top]

e

This symbol represents the base of the natural logarithm, approximately 2.718. See Abramowitz and Stegun, Handbook of Mathematical Functions, section 4.1.

Commented Mathematical property (CMP):
e = the sum as j ranges from 0 to infinity of 1/(j!)
Formal Mathematical property (FMP):
<OMOBJ>
<OMA>
  <OMS cd="relation1" name="eq"/>
  <OMS cd="nums1" name="e"/>
  <OMA>
    <OMS cd="arith1" name="sum"/>
    <OMA>
      <OMS cd="interval1" name="integer_interval"/>
      <OMS cd="alg1" name="zero"/>
      <OMS cd="nums1" name="infinity"/>
    </OMA>
    <OMBIND>
      <OMS cd="fns1" name="lambda"/>
      <OMBVAR>
        <OMV name="j"/>
      </OMBVAR>
      <OMA>
        <OMS cd="arith1" name="divide"/>
	<OMS cd="alg1" name="one"/>
	<OMA>
	  <OMS cd="integer1" name="factorial"/>
	  <OMV name="j"/>
	</OMA>
      </OMA>
    </OMBIND>
  </OMA>
</OMA>
</OMOBJ>

eq (e, sum (integer_interval (zero, infinity) , lambda [ j ] . (divide (one, factorial ( j) ) ) ) )

Example:
2.718 = The decimal approximation to 3 significant places of e
<OMOBJ>
    <OMA>
      <OMS cd="relation1" name="approx"/>
      <OMF dec="2.718"/>
      <OMS cd="nums1" name="e"/>
    </OMA>
  </OMOBJ>

approx ( 2.718 , e)

Signatures:
sts


[Next: i] [Previous: infinity] [Top]

i

This symbol represents the square root of -1.

Commented Mathematical property (CMP):
i^2 = -1
Formal Mathematical property (FMP):
<OMOBJ>
    <OMA>
      <OMS cd="relation1" name="eq"/>
      <OMA>
        <OMS cd="arith1" name="power"/>
        <OMS cd="nums1" name="i"/>
        <OMI> 2 </OMI>
      </OMA>
      <OMA>
        <OMS cd="arith1" name="unary_minus"/>
        <OMS cd="alg1" name="one"/>
      </OMA>
    </OMA>
  </OMOBJ>

eq (power (i, 2 ) , unary_minus (one) )

Signatures:
sts


[Next: pi] [Previous: e] [Top]

pi

A symbol to convey the notion of pi, approximately 3.142. The ratio of the circumference of a circle to its diameter.

Commented Mathematical property (CMP):
pi = 4 * the sum as j ranges from 0 to infinity of ((1/(4j+1))-(1/(4j+3)))
Formal Mathematical property (FMP):
<OMOBJ>
<OMA>
  <OMS cd="relation1" name="eq"/>
  <OMS cd="nums1" name="pi"/>
  <OMA>
    <OMS cd="arith1" name="times"/>
    <OMI> 4 </OMI>
    <OMA>
      <OMS cd="arith1" name="sum"/>
      <OMA>
        <OMS cd="interval1" name="integer_interval"/>
        <OMS cd="alg1" name="zero"/>
        <OMS cd="nums1" name="infinity"/>
      </OMA>
      <OMBIND>
        <OMS cd="fns1" name="lambda"/>
        <OMBVAR>
          <OMV name="j"/>
        </OMBVAR>
        <OMA>
          <OMS cd="arith1" name="minus"/>
	  <OMA>
	    <OMS cd="arith1" name="divide"/>
	    <OMS cd="alg1" name="one"/>
	    <OMA>
	      <OMS cd="arith1" name="plus"/>
	      <OMA>
	        <OMS cd="arith1" name="times"/>
	        <OMI> 4 </OMI>
	        <OMV name="j"/>
	      </OMA>
	      <OMS cd="alg1" name="one"/>
	    </OMA>
	  </OMA>
	  <OMA>
	    <OMS cd="arith1" name="divide"/>
	    <OMS cd="alg1" name="one"/>
	    <OMA>
	      <OMS cd="arith1" name="plus"/>
	      <OMA>
	        <OMS cd="arith1" name="times"/>
  	        <OMI> 4 </OMI>
	        <OMV name="j"/>
	      </OMA>
	      <OMI> 3 </OMI>
	    </OMA>
	  </OMA>
        </OMA>
      </OMBIND>
    </OMA>
  </OMA>
</OMA>
</OMOBJ>

eq (pi, times ( 4 , sum (integer_interval (zero, infinity) , lambda [ j ] . (minus (divide (one, plus (times ( 4 , j) , one) ) , divide (one, plus (times ( 4 , j) , 3 ) ) ) ) ) ) )

Example:
3.142 = The decimal approximation to 3 significant places of pi
<OMOBJ>
    <OMA>
      <OMS cd="relation1" name="approx"/>
      <OMF dec="3.142"/>
      <OMS cd="nums1" name="pi"/>
    </OMA>
  </OMOBJ>

approx ( 3.142 , pi)

Signatures:
sts


[Next: gamma] [Previous: i] [Top]

gamma

A symbol to convey the notion of the gamma constant as defined in Abramowitz and Stegun, Handbook of Mathematical Functions, section 6.1.3. It is the limit of 1 + 1/2 + 1/3 + ... + 1/m - ln m as m tends to infinity, this is approximately 0.5772 15664.

Commented Mathematical property (CMP):
gamma = limit_(m -> infinity)(sum_(j ranges from 1 to m)(1/j) - ln m)
Formal Mathematical property (FMP):
<OMOBJ>
<OMA>
  <OMS cd="relation1" name="eq"/>
  <OMS cd="nums1" name="gamma"/>
  <OMA>
    <OMS cd="limit1" name="limit"/>
    <OMS cd="nums1" name="infinity"/>
    <OMS cd="limit1" name="below"/>
    <OMBIND>
      <OMS cd="fns1" name="lambda"/>
      <OMBVAR>
        <OMV name="m"/>
      </OMBVAR>
      <OMA>
        <OMS cd="arith1" name="minus"/>
        <OMA>
          <OMS cd="arith1" name="sum"/>
	  <OMA>
	    <OMS cd="interval1" name="integer_interval"/>
	    <OMS cd="alg1" name="one"/>
	    <OMV name="m"/>
	  </OMA>
	  <OMBIND>
            <OMS cd="fns1" name="lambda"/>
            <OMBVAR>
              <OMV name="j"/>
            </OMBVAR>
	    <OMA>
              <OMS cd="arith1" name="divide"/>
              <OMI> 1 </OMI>
              <OMV name="j"/>
	    </OMA>
	  </OMBIND>
        </OMA>
        <OMA>
          <OMS cd="transc1" name="ln"/>
          <OMV name="m"/>
        </OMA>
      </OMA>
    </OMBIND>
  </OMA>
</OMA>
</OMOBJ>

eq (gamma, limit (infinity, below, lambda [ m ] . (minus (sum (integer_interval (one, m) , lambda [ j ] . (divide ( 1 , j) ) ) , ln ( m) ) ) ) )

Example:
0.577 = The decimal approximation to 3 significant places of gamma
<OMOBJ>
    <OMA>
      <OMS cd="relation1" name="approx"/>
      <OMF dec="0.577"/>
      <OMS cd="nums1" name="gamma"/>
    </OMA>
  </OMOBJ>

approx ( 0.577 , gamma)

Signatures:
sts


[Next: NaN] [Previous: pi] [Top]

NaN

A symbol to convey the notion of not-a-number. The result of an ill-posed floating computation. See IEEE standard for floating point representations.

Commented Mathematical property (CMP):
NaN is not equal to NaN
Formal Mathematical property (FMP):
<OMOBJ>
  <OMA>
    <OMS cd="relation1" name="neq"/>
    <OMS cd="nums1" name="NaN"/>
    <OMS cd="nums1" name="NaN"/>
  </OMA>
</OMOBJ>

neq (NaN, NaN)

Signatures:
sts


[First: based_integer] [Previous: gamma] [Top]