15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

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.

instrumental to the simplification of arithmetic mentioned above. When the arithmetical calculi<br />

were sufficiently well-understood and in principle a mechanical procedure, and when the art of<br />

clock-making was mature enough to design and build mechanical devices of an appropriate kind,<br />

the invention of calculating machines for arithmetic by Wilhelm Schickard (1623), Blaise Pascal<br />

(1642), and Gottfried Wilhelm Leibniz (1671) was only a natural consequence.<br />

We will see that it is not only possible to calculate with numbers, but also with representations<br />

of statements about the world (propositions). For this, we will use an extremely simple example;<br />

a fragment of propositional logic (we restrict ourselves to only one logical connective) and a small<br />

calculus that gives us a set of rules how to manipulate formulae.<br />

A simple System: Prop. Logic with Hilbert-Calculus<br />

Formulae: built from prop. variables: P, Q, R, . . . and implication: ⇒<br />

Semantics: Iϕ(P ) = ϕ(P ) and Iϕ(A ⇒ B) = T, iff Iϕ(A) = F or Iϕ(B) = T.<br />

K := P ⇒ Q ⇒ P , S := (P ⇒ Q ⇒ R) ⇒ (P ⇒ Q) ⇒ P ⇒ R<br />

A ⇒ B A<br />

MP<br />

B<br />

A<br />

[B/X](A) Subst<br />

Let us look at a H 0 theorem (with a proof)<br />

C ⇒ C (Tertium non datur)<br />

Proof:<br />

P.1 (C ⇒ (C ⇒ C) ⇒ C) ⇒ (C ⇒ C ⇒ C) ⇒ C ⇒ C<br />

(S with [C/P ], [C ⇒ C/Q], [C/R])<br />

P.2 C ⇒ (C ⇒ C) ⇒ C (K with [C/P ], [C ⇒ C/Q])<br />

P.3 (C ⇒ C ⇒ C) ⇒ C ⇒ C (MP on P.1 and P.2)<br />

P.4 C ⇒ C ⇒ C (K with [C/P ], [C/Q])<br />

P.5 C ⇒ C (MP on P.3 and P.4)<br />

P.6 We have shown that ∅ ⊢ H 0 C ⇒ C (i.e. C ⇒ C is a theorem) (is is also valid?)<br />

c○: Michael Kohlhase 178<br />

This is indeed a very simple logic, that with all of the parts that are necessary:<br />

• A formal language: expressions built up from variables and implications.<br />

• A semantics: given by the obvious interpretation function<br />

• A calculus: given by the two axioms and the two inference rules.<br />

The calculus gives us a set of rules with which we can derive new formulae from old ones. The<br />

axioms are very simple rules, they allow us to derive these two formulae in any situation. The<br />

inference rules are slightly more complicated: we read the formulae above the horizontal line as<br />

assumptions and the (single) formula below as the conclusion. An inference rule allows us to derive<br />

the conclusion, if we have already derived the assumptions.<br />

Now, we can use these inference rules to perform a proof. A proof is a sequence of formulae that<br />

can be derived from each other. The representation of the proof in the slide is slightly compactified<br />

to fit onto the slide: We will make it more explicit here. We first start out by deriving the formula<br />

(P ⇒ Q ⇒ R) ⇒ (P ⇒ Q) ⇒ P ⇒ R (2.1)<br />

93

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

Saved successfully!

Ooh no, something went wrong!