<< Chapter < Page | Chapter >> Page > |
The critical point of his interpretation of a non-Euclidean geometry is this:
it is embedded in Euclidean geometry! So we are able to prove (within the embedding Euclidean geometry) that
the disc-postulates hold (
A well-known problem in computer scienceP vs. NPasks whether (for a given problem) it is truly moredifficult to find a short solution (when one exists) (NP), than it is to verify a short purported solution handed to you(P). For example,Given a set of people and how strong person is, can you partition them into two tug-of-war teamswhich are exactly evenly matched?Certainly it seems easier to check that a pair of proposed rosters has equal strength(and, verify that everybody really is on one team or the other)than to have to come up with two perfectly-matched teams. But conceivably, the two tasks might be equally-difficultup to some acceptable (polynomial time) overhead. While every assumes that P is easier than NP,nobody has been able to prove it.
An interesting variant of the problem lets both the problem-solver and the purported-answer-verifier each have access toa particular oracle a program that will gives instant yes/no answers to some other problem (say,given any set of numbers, yes or no: is there an even-sized subsetwhose total is exactly the same as some odd sized subset?).
It has been shown that there is some oracle which makes theproblem-solver's job provably tougher than the proof-verifier's job, and also there is some other oracleproblem-solver's job provably no-tougher than the proof-verifier's job.
This means that any proof of P being different from NP has to be subtle enough so thatwhen P and NP are re-interpreted asP and NP with respect to a particular oracle, the proof will no longer go through.Unfortunately, this eliminates all the routine methods of proof; we know that solving this problem will take some new attack.
The Lwenheim-Skolem theorem of logic states that if a set of (countable) domain axioms has a model at all,then it has a countable model. This is a bit surprising when applied to the axioms ofarithmetic for the real numbers: even though the real numbers are uncountable,there is some countable model which meets all our (finite) axioms of the real numbers!
Note that object-oriented programming is founded on the
possibility for nonstandard interpretations:perhaps you have some code which is given a list of
Object
s,
and you proceed to call the method
toString
on each of them.
Certainly there is a standard interpretation for the function
Object.toString
,
but your code is built to work even when you call this function andsome nonstandard, custom, overridden method is called instead.
It can become very difficult to reason about programs when
the run-time method invoked might be different from the one being called.We're used to specifying
type constratins which
any interpretation must satisfy;wouldn't it be nice to specify more complicated constraints,
int
which is a valid index into [some array]?
And if we can describe the constraint
formally (rather than in English comments, which is how most code works),
then we could have the computer enforce that contract!(for every interpretation which gets executed, including non-static ones).
An obvious formal specification language is code itselfhave code which verifies pre-conditions before calling a function,and then runs code verifying the post-condition before leaving the function. Indeed,there are several such tools about ( Java , Scheme ). In the presence of inheritance, it's harder than you might initially think todo this correctly .
It is still a research goal to be able to (sometimes) optimize away such run-time verifications;this requires proving that some code is correct (at least, with respect to its post-condition).The fact that the code might call a function which will be later overridden (ournon-standard interpretations) exacerbates this difficulty.(And proving correctness in the presence of concurrency is even tougher!)
Even if not proving programs correct, being able to specify contracts in a formallanguage (code or logic) is a valuable skill.
Finally, it is worth noting that many rebuttles of real world arguments (see also some exercises ) amount to showing thatthe argument's form can't be valid since it doesn't hold under other interpretations, and thus there mustbe some unstated assumptions in the original.
Notification Switch
Would you like to follow the 'Intro to logic' conversation and receive update notifications?