Cardinal

Cardinal[arbitraryLengthBinary] is the data-format for a counting number of arbitrary size.

For the purposes of human I/O, Cardinals are represented as digit strings (without decimal points).

If n is a Cardinal, Not[n] represents negative n.  See NegativeCardinal.


If construct is a List, Set, or String, then...

Cardinal[construct]

...returns the number of elements in construct.


Expression[Cardinal][expr] returns the ExpressionSize.

Type[Cardinal][(streamObject/dataType)] returns the TypeSize.

If n is a Cardinal, then...

Cardinal[Sequence][n]

...returns a Sequence of Cardinals beginning with 1 and ending with n.

Cardinal[Sequence][n1, n2]

...returns the Cardinal Sequence between n1 and n2.


If "body" is Loop's body, then...

Cardinal[Loop][body]

...is the same as Loop[body], except the Cardinal number of loops is returned.

Cardinal[Expression][expr]
...evaluates expr and returns the result followed by the bracketed sequence of cardinal machine instructions...
result[machinInstr1, machinInstr2, ..., machinInstrN]




See English definition of "cardinal".

Cardinal is used in counting to indicate quantity but not order.

 

The Set of all Cardinalsis zero plus all positive integers.

The Cardinal Head is rarely displayed since a number's Type is understood by its numeric representation.

The Standard ASCII RuleList submerges the Cardinal Head of an expression-string composed of just decimal Digits.

A Character sequence of Digits, unseparated by empty space, is interpreted as a Cardinal Number


 



NegativeCardinal

 

If n is a Cardinal, its Negative value is represented by...
 

(1)                    Not[n]

The above negation is sometimes called the "unary minus".


    
                      Compute[Plus[Not[n] + n]]


...evaluates to Zero (0).


Zero is the only Cardinal that is equal to its negation.

 

The Set of all Cardinals and their negation comprises the (signed) Integers.

 



Cardinal as Construct Counter

 

Suppose construct is a List, Set, or String, then...

 

(2)                    Cardinal[construct]

 

...returns the number of elements in construct.

See Tally.

 



Cardinal[Sequence]

 

If n is a Cardinal, then...

 

(3)                    Cardinal[Sequence][n]

 

...returns a Sequence of Cardinals beginning with 1 and ending with n.

If n is negative, the Sequence begins with Not[1] and ends with Not[n]. 

 

If n1 and n2 are both Cardinals, then...

 

(4)                    Cardinal[Sequence][n1, n2]

 

...returns the Cardinal Sequence between n1 and n2.

 

 



ExpressionSize

 

(5)                    Expression[Cardinal][expr]

...where expr is any valid Expression, returns the number of bytes used to store expr.




TypeSize


(6)                    Type[Cardinal][streamObject]

...returns the number of bytes in the current element of StreamObject, streamObject.

Similarly, if dataType is a DataType,

                        Type[Cardinal][dataType]


...returns the number of bytes in the StreamObject, dataType.




Cardinal[`Logic`word]

 

All of the `Logic` Keywords, (except Xor), progress from left to right through their arguments until a boolean value ends their reckoning.  These are called the Cardinal[`Logic`word][arg1, arg2,...] elicitations.

 

 Here is the "CardinalAnd" elicitation:

 

(7)                    Cardinal[And][arg1, arg2,...]

 

The above returns the position of the first False element.


There is also the "CardinalNotAnd":

 

(8)                    Cardinal[Not[And]][arg1, arg2,...]

The above returns the position of the first True element.


Here is the "CardinalOr" elicitation:

 

(9)                    Cardinal[Or][arg1, arg2,...]

The above returns the position of the first True element.


There is also the "CardinalNotOr":

 

(10)                  Cardinal[Not[Or]][arg1, arg2,...]

...returns the position where Not[Or] first encounters a False element.

 



Cardinal[Loop][body]

 

If body is Loop's body, then...

 

(11)                  Cardinal[Loop][body]

 

...evaluates body in the same way that Loop would, but returns the Cardinal number of loops executed.

The result of the last Loop iteration of body is not returned.

If Noop[Loop] is encountered, it terminates the Loop and (11) returns Noop rather then a Cardinal.

 

  



Cardinal[Expression][expr]


 
If expr is any unevaluated Expression, then...
 
(12)                    Cardinal[Expression][expr]
 
...evaluates expr to its result returning the form...
 
(13)                        result[machinInstr1, machinInstr2, ..., machinInstrN]
 
...where each machinInstr is a Cardinal number which designates a machine instruction.

Immediately after result, in the square brackets, is the cardinal-coded sequence of machine instructions (13) required to evaluate expr.

A reference for this algorithm is CONSTRUCTING INSTRUCTION TRACES from CACHE-FILTERED ADDRESS TRACES (CITCAT).


Expression[Cardinal][expr

is the number of bytes in expr, whereas 

Cardinal[Expression][ expr
...evaluates expr and returns the result followed by the bracketed sequence of cardinal machine instructions...
 
result[machinInstr1, machinInstr2, ..., machinInstrN]

  

 



"cardinal" English Definition

 

cardinal number Math.

a A primary number used in simple counting, etc.; one answering the question, how many.. as, one, two,  three, etc. A cardinal number is the symbol of abstraction of everything but mere repetition in any assemblage, that is, the elements of the assemblage for a process of counting.  This consideration involves double disregard (or abstraction); first, of the character of the elements (either as like or unlike) and, second, of their order.

b The power of an aggregate of two equivalent aggregates.  Cf. POWER OF AN AGGREGATE


Cardinal adj.

1. Of basic importance; underlying; hence, pre-eminent in importance; superior; chief; principal; as, cardinal principles, virtues, etc.

2. Zool.  a Of or pertaining to the hinge of a bivalve shell.

b Of or pertaining to the cardo of an insect.

3. Of or pertaining to a cardinal or the cardinals.

Syn -- See RADICAL.



Cardinal n.

1. R. C. Ch.  On of the ecclesiastical princes who constitute the Pope's council, or the college of cardinals, and who are appointed by the Pope.  Since the time of Sixtus V, their number can never exceed 70 (6 of episcopal rank, 50 priests, 14 deacons), and the number of cardinal priests and deacons is seldom full.  When the papal cair is vacant a pope is elected by the college of cardinals.  See POPE.  The cardinals take precedence of all dignitaries except the Pope.   The principal parts of a cardinal's costume are a red cassock, a rocet, a short purple mantle, and a red hat with a small crown and broad brim, with cord ...

                                                 [From Websters1949Unabridged.]

 



Grok32`

(c) 2004-2007 by
John Van Wie Bergamini.

All rights reserved.



Hosted by www.Geocities.ws

1