<< Chapter < Page | Chapter >> Page > |
You might have noticed something funny: we said depended on the board, but that was false. Why are some some relations different than others?To add to the puzzling, there was a caveat in some fine-print from the previous section:
is false under the standard interpretation of prime. Why these weasel-words? Everybody knows what prime is, don't they?Well, if our domain is matrices of integers (instead of just integers), we might suddenly want a different idea
prime.
Consider the formula true for all in a domain? Well, it depends not only on the domain,but also on the specific binary relation actually stands for:
both are even numbers, is false for some .
sum to an even number, is true for every .
greater than, is false for some (indeed, it's false for every ).
is at least as tall as, is true for every .
Thus a formula's truth depends on the interpretation of the (syntactic, meaning-free) relation symbols in the formula.
Programs are to data, as formulas are to interpretations. (In particular, the formula is a like a boolean function:it takes its input (interpretation), and returns or .)
Consider the formula . As yet, we haven't said anything about the interpretations of thesethree relations. But, we do know that each of , , and can either be true or false. Thus, treating each of those as a proposition, we can describe the formula'struth under different interpretations.
ϕ | |||
---|---|---|---|
In the previous section , having a formula was rather useless until we had a particularinterpretation for it. But we can view that same idea backwards:Given a formula, what are all the interpretations for which the formula is true?
For instance, consider a formula expressing that an array is sorted ascendingly:For all numbers , , .But if we now broaden our mind about what relations/functionsthe symbols , , and represent and then wonder about the set of all structures/interpretationswhich make this formula true, we might find that our notion of sorting is broader than we first thought.Or equivalently, we might decide that the notion
ascendingapplies to more structures than we first suspected.
Similarly, mathematicians create some formulas about functions being associative, having an identity element, and such,and then look at all structures which have those properties; this is how they define notions such as groups, rings, fields, andalgebras.
What about adding functions, to our language, in addition to relations? Well, functions are just a way of relating input(s) to an output.For example, 3 and 9 are related by the square function, as are 9 and 81, and 0,0.Is any binary relation a function? No, for instance is not a function, because there is no unique output related to the input 9.
How can we enforce uniqueness? The following sentence asserts that for each element of the domain, associates at most one value with : For all , and of the domain,
We just used a binary relation to model a unary function. Carry on this idea, by using a ternary relation tostart to model a binary function. In particular, write a formula stating thatfor every pair of elements , in the domain, the relation associates at most one value with that pair.
For all , , , and of the domain,
Notification Switch
Would you like to follow the 'Intro to logic' conversation and receive update notifications?