1 / 14

Classical propositional logic (quick review)

Episode 4. Classical propositional logic (quick review). What logic is or should be Propositions Boolean operations The language of classical propositional logic Interpretation and truth Validity (tautologicity) Truth tables The NP-completeness of the nontautologicity problem

liam
Download Presentation

Classical propositional logic (quick review)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Episode 4 Classical propositional logic(quick review) • What logic is or should be • Propositions • Boolean operations • The language of classical propositional logic • Interpretation and truth • Validity (tautologicity) • Truth tables • The NP-completeness of the nontautologicity problem • Gentzen-style axiomatizations (sequent calculus systems) 0

  2. 4.1 Below are a few theses about what your lecturer believes logic is or should be: What logic is or should be 1. Logic is the most basic, general-purpose, universal-utility tool for reasoning and acting rationally. 2. All intellectual activities (sciences, engineering, politics, everyday life) are or should be based on logic, while logic, in turn, is self-sufficient and needs none of those. 3. Logic makes no ontological commitments, and is focused on form rather than content. It is exactly this full abstraction from content that makes logic general-purpose and universal-utility. 4. All other sciences can be seen as applications of logic to some particular domains. For this very reason, such sciences are special- rater than general-purpose tools, applicable only to limited parts of the world. 5. Logic is the same to (all other) intellectual activities as programming languages are to (all other) application programs.

  3. 4.2 Propositions There are only two propositions: ⊤(true) and⊥(false). Classical logic sees no difference between two true or two false propositions, so we have “2+2=4” = “snow is white” = ⊤ and “2+2=5” = “snow is black” = ⊥. If you find this strange or confusing, remember that, from the point of view of set theory, we similarly have {x | x>(x+1)} = {x | x is an elephant that can fly} =

  4. 4.3 pq pq pq pq pp ⊥ ⊥ ⊥ ⊥ ⊤ ⊥ ⊤ ⊥ ⊤ ⊥ ⊤ ⊤ ⊤ ⊥ ⊤ ⊥ ⊥ ⊤ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ Boolean operations Symbol Name Translation Type Negation “Not” {⊤, ⊥}  {⊤, ⊥} Conjunction “And” {⊤, ⊥}{⊤, ⊥} {⊤, ⊥} Disjunction “Or” {⊤, ⊥}{⊤, ⊥} {⊤, ⊥} Implication “If ... then” {⊤, ⊥}{⊤, ⊥} {⊤, ⊥} Note that: p = p pq =  pq (pq) = pq (pq) = pq

  5. 4.4 The language of classical propositional logic The language of classical propositional logic is built from: 1. Two logical atoms: ⊤and⊥. 2. Infinitely many nonlogical atoms: p, q, r, s, p1, p2, p3, ... 3. Propositionalconnectives: , , , . 4. Parentheses: (, ). Formulas are defined inductively by: 1. Atoms (logical or nonlogical) are formulas. 2. If F is a formula, then so is (F). 3. If E and F are formulas, then so are (E)(F), (E)(F), (E)(F). For readability, we will be typically omitting certain parentheses, whenever this does not create ambiguity.  has the highest precedence, so that, say, pqshould be understood as(p)qrather than as (pq).And has thelowest precedence, so that, say,pqr should be understood as(pq)rrather than asp(qr).

  6. 4.5 Interpretation and truth An interpretation is a function * that assigns a particular proposition p* (Τ or ) to each nonlogical atom p. Synonyms of “interpretation” are model and truth assignment. Every interpretation * extends from nonlogical atoms to all formulas by stipulating that: ⊤*=⊤ ⊥* = ⊥ (F)* = (F*) (EF)* = (E*)(F*) (EF)* = (E*)(F*) (EF)* = (E*)(F*) We say that formula F is true under interpretation *, or simply that F* is true, if F*= ⊤. Otherwise we say that it is false.

  7. 4.6 p q r[(pq)  r]  [ (p  q)  (p  r)] ⊥ ⊥ ⊥ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ ⊥ ⊥ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊥ ⊥ ⊤ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ ⊥ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊥ ⊤ ⊥ ⊥ ⊤ ⊤ ⊥ ⊤ ⊥ ⊥ ⊤ ⊥ ⊤ ⊤ ⊤ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ ⊥ ⊥ ⊤ ⊤ ⊥ ⊥ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ We say that a formula F is valid (or is a tautology) if F is true under every interpretation. Validity; truth tables; NP-completeness of the nonvalidity problem Examples of tautologies: ⊤; ⊥; pp; p(qp);⊥p. How about this one?[(pq)r]  [(pq)(pr)] There is a brute force method, called the truth table method, that allows us to get answers to such questions. It consists of going through all possible interpretations to see if all of them make the formula true. What is the trouble with the truth table method? Inefficiency. The truth table for a formula with a couple of hundred atoms would have more rows than the number of particles in the Universe! Deductive methods (the following slides) are more practical, even though, generally, we have: Theorem 4.1. The problem of telling whether a formula is tautological is coNP-complete, meaning that no truly efficient algorithms are known for it.

  8. 4.7 There are various deductive systems for classical propositional logic. They can be divided into two major classes: Hilbert-style and Gentzen-style. Hilbert-style systems are axiom-based while Gentzen-style systems are rule-based. Gentzen-style systems have a number of advantages, including existence of straightforward proof search algorithms. In this course we will deal only with Gentzen-style systems. Another name for such systems is sequent calculi. From now on we will consider the version of the language of classical propositional logic where formulas are not allowed to contain logical atoms or implication. This does not mean diminishing the expressive power of the language, as ⊤ can be considered an abbreviation of pp, ⊥considered an abbreviation ofpp, and EFan abbreviation ofEF. Furthermore, officially will only be allowed on atoms. When applied to non-atomic formulas,is considered an abbreviation defined by: E = E (EF) = EF (EF) = EF Deductive systems

  9. 4.8 A sequent is any finite sequence of formulas (in the sense of Slide 4.7). Here are the rules of one of several equivalent sequent calculus systems for classical propositional logic. Let us call it G1. In the following rules, E,F stand for any formulas, and G,H stand for any sequents. Above the horizontal line is (are) the premise(s), and below the line is the conclusion. A proof in such a system is a tree of sequents, where each node is the conclusion of some rule, and the children of the node are the premises of that rule. Such a tree is a proof of the sequent at its root. A formula F is considered provable if the sequent F is provable (of course, “provable” means “has a proof”). A sequent calculus system for classical propositional logic Identity Exchange Weakening Contraction [no premises] G,E,F,H G G,E,E I E W C E,E G,F,E,H G,E G,E -Introduction -Introduction G, E, F G, E H, F   G, EF G, H, EF

  10. 4.9 I I r, pr p, pr q, qs s, qs   I I p, p, r p, p r, r, p r, r r, p, r s, q, s q, q, s q, q s, s, q s, s (pr)(qs), p, q (pr)(qs), r, s     W W E W W E   (pr)(qs), (pr)(qs), (pq)(rs) (pr)(qs), pq (pr)(qs), rs E (twice)  p, q, (pr)(qs) r, s, (pr)(qs) E (twice) E (twice) (pq)(rs), (pr)(qs), (pr)(qs) C Example.Find a proof of (pq)(r s)  (pr)(qs). An example of a proof in sequent calculus First, we rewrite the formula as [(pq)(rs)][(pr)(qs)]. Next, we construct a proof of it in the bottom-up fashion as follows: (pq)(rs), (pr)(qs)  [(pq)(rs)][(pr)(qs)]

  11. 4.10 Soundness and completeness Theorem 4.2. For any formula F, we have: 1. (Soundness) If F is provable in G1, then F is a tautology. 2. (Completeness) If F is a tautology, then F is provable in G1. Soundness: Completeness: “Good” formulas Provable formulas Provable formulas “Good” formulas In our present case, “good” = “tautological”.

  12. 4.11 A sequent calculus system without structural rules • The Identity rule of G1 can be called an axiom, as it takes no premises. • The rules -Introduction and -Introduction are called logical rules as they “explain” • the logical meanings of connectives. • The remaining rules of Exchange, Weakening and Contraction are called structural • rules, as they only restructure sequents and otherwise are not related to any logical • connectives. Below comes a simpler system --- let us call it G2 --- that has no structural rules at all. A significant change, however, is that in G2sequents are seen as sets rather than sequences of formulas. G2 only has the following three rules, where E,F are any formulas and G is any “sequent”, i.e. any set of formulas. Axiom -Introduction -Introduction [no premises] G, E G, F G, E, F A   G,E,E G, EF G, EF In view of Theorems 4.2 and 4.4, system G2 is equivalent, in its deductive power, to our old friend G1.

  13. 4.12 Example.Find a proof of [(pq)(rs)][(pr)(qs)] in G2. Another example We use a standard proof search method, which can be applied to any formula. The method is to start with the target formula, and keep applying, in the bottom-up sense, the two logical rules (in whatever order you like) as long as there are conjunctions or disjunctions in the sequent: p, q, p, r A p, q, q, s A r, s, p, r A r, s, q, s A     p, q, pr p, q, qs r, s, pr r, s, qs   p, q, (pr)(qs) r, s, (pr)(qs)   pq,(pr)(qs) rs,(pr)(qs)  (pq)(rs), (pr)(qs)  [(pq)(rs)][(pr)(qs)] You will end up with a tree where all leaves are sequents containing only atoms and negated atoms. Such a tree is a G2-proof if (and only if) every leaf contains some atom together with the negation of the same atom. One can show (see next slide) that the target formula is provable iff this method generates a proof tree.

  14. 4.13 We extend the concepts of truth and validity (tautologicity) from formulas to sequents by understanding each sequent F1,...,Fn as the formula F1...Fn. Soundness and completeness proof Lemma 4.3. (a) Every sequent which is (the conclusion of) an axiom of G2 is valid. (b) The two logical rules of G2 preserve validity in both top-down and bottom-up directions. That is, the premise(s) is (are) valid iff so is the conclusion. Proof:Obvious.  Theorem 4.4. (Soundness and completeness of G2:) A sequent is provable in G2 iff it is valid (tautological). Proof.The Soundness of G2 is an immediate consequence of Lemma 4.3: Axioms are valid and the rules preserve validity, so every sequent in a proof tree will be valid. As for completeness, assume a given formula is valid. Apply to it the method of Slide 4.12. In view of Lemma 4.3, all sequents in the tree generated by this method will be valid. This includes the leaves of the tree.But leaves only contain sequents where every formula is an atom or a negated atom. Obviously such a sequent is valid iff it is an axiom. Thus, the tree will be a proof tree. 

More Related