20.03.2013 Views

II. Notes on Data Structuring * - Cornell University

II. Notes on Data Structuring * - Cornell University

II. Notes on Data Structuring * - Cornell University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NOTES ON DATA STRUCTURING 167<br />

The axioms applicable to a given type depend <strong>on</strong> how that type has been<br />

defined. Thus it is not possible to give in each case a fixed set of axioms<br />

like those for integers; instead we give a pattern or schema which shows how<br />

a particular axiom set may be derived from the general form of the corres-<br />

p<strong>on</strong>ding type definiti<strong>on</strong>.<br />

12.1. ENUMERATIONS AND SUBRANGES<br />

The following axioms are comm<strong>on</strong> to both enumerati<strong>on</strong>s and subranges.<br />

They are modelled <strong>on</strong> the familiar axioms for natural numbers. The type<br />

name is assumed to be T, and all variables are assumed to be of this type.<br />

(1) T.min is a T<br />

(2) If x is a T, and x 4: T. max<br />

then succ (x) is a T<br />

(3) The <strong>on</strong>ly elements of T are as specified in (1) and (2)<br />

(4) succ (x) = succ (y) ~ x = y<br />

(5) succ (x) -¢ T. min<br />

(6) pred (succ (x)) = x<br />

The following three axioms apply <strong>on</strong>ly to ordered types<br />

(7) T.min

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!