History
In his 1952 text Introduction to Metamathematics, Stephen Kleene formally proved that the CASE function (the IF-THEN-ELSE function being its simplest form) is a primitive recursive function, where he defines the notion definition by cases
in the following manner:
- "#F. The function φ defined thus
- φ(x1, ..., xn ) =
-
- φ1(x1, ..., xn ) if Q1(x1, ..., xn ),
- . . . . . . . . . . . .
- φm(x1, ..., xn ) if Qm(x1, ..., xn ),
- φm+1(x1, ..., xn ) otherwise,
-
- φ(x1, ..., xn ) =
- where Q1, ..., Qm are mutually exclusive predicates (or φ(x1, ..., xn) shall have the value given by the first clause which applies) is primitive recursive in φ1, ..., φm+1, Q1, ..., Qm+1.
Kleene provides a proof of this in terms of the Boolean-like recursive functions "sign-of" sg( ) and "not sign of" ~sg( ) (Kleene 1952:222-223); the first returns 1 if its input is positive and −1 if its input is negative.
Boolos-Burgess-Jeffrey make the additional observation that "definition by cases" must be both mutually exclusive and collectively exhaustive. They too offer a proof of the primitive recursiveness of this function (Boolos-Burgess-Jeffrey 2002:74-75).
The IF-THEN-ELSE is the basis of the McCarthy formalism: its usage replaces both primitive recursion and the mu-operator.
Read more about this topic: Switch Statement
Famous quotes containing the word history:
“Its a very delicate surgical operationto cut out the heart without killing the patient. The history of our country, however, is a very tough old patient, and well do the best we can.”
—Dudley Nichols, U.S. screenwriter. Jean Renoir. Sorel (Philip Merivale)
“Free from public debt, at peace with all the world, and with no complicated interests to consult in our intercourse with foreign powers, the present may be hailed as the epoch in our history the most favorable for the settlement of those principles in our domestic policy which shall be best calculated to give stability to our Republic and secure the blessings of freedom to our citizens.”
—Andrew Jackson (17671845)
“I am ashamed to see what a shallow village tale our so-called History is. How many times must we say Rome, and Paris, and Constantinople! What does Rome know of rat and lizard? What are Olympiads and Consulates to these neighboring systems of being? Nay, what food or experience or succor have they for the Esquimaux seal-hunter, or the Kanaka in his canoe, for the fisherman, the stevedore, the porter?”
—Ralph Waldo Emerson (18031882)