Propositional and First Order Logic

Total Page:16

File Type:pdf, Size:1020Kb

Propositional and First Order Logic Propositional and First Order Logic Propositional Logic First Order Propositional and First Order Logic Logic Background Knowledge Summary Propositional and First Order Logic Propositional Logic First Order Logic Propositional Logic [Chang-Lee Ch. 2] First Order Logic [Chang-Lee Ch. 3] Propositional Logic Propositional and First Order Logic Propositional Logic Summary First Order Logic Syntax Semantics Normal Forms Deduction and Refutation Basic Concepts Propositional and First Order Logic Propositional logic is the simplest logicillustrates basic ideas Propositional Logic using propositions First Order P Snow is whyte Logic 1 , P2 , Today it is raining P3 , This automated reasoning course is boring Pi is an atom or atomic formula Each Pi can be either true or false but never both The values true or false assigned to each proposition is called truth value of the proposition Syntax Propositional and First Recursive denition of well-formed formulas Order Logic 1 An atom is a formula Propositional 2 If S is a formula, :S is a formula Logic (negation) First Order Logic 3 If S1 and S2 are formulas, S1 ^ S2 is a formula (conjunction) 4 If S1 and S2 are formulas, S1 _ S2 is a formula (disjunction) 5 All well-formed formulas are generated by applying above rules Shortcuts: S1 ! S2 can be written as :S1 _ S2 S1 $ S2 can be written as (S1 ! S2) ^ (S2 ! S1) Semantics Propositional and First Order Logic Propositional Relationships between truth values of atoms and truth values of Logic formulas First Order Logic :S is true i S is false S1 ^ S2 is true i S1 is true and S2 is true S1 _ S2 is true i S1 is true or S2 is true S1 ! S2 is true i S1 is false or S2 is true i.e., is false i S1 is true and S2 is false S1 $ S2 is true i S1 ! S2 is true and S2 ! S1 is true Semantics: Example Propositional and First Order Logic Propositional Logic Example (Truth Tables for main logical connectives) First Order Logic P1 P2 :P1 P1 ^ P2 P1 _ P2 P1 ! P2 P1 $ P2 TTFTTTT TFFFTFF FTTFTTF FFTFFTT Propositional logic: Evaluation of Formula Propositional and First Order Logic Recursive Evaluation Propositional Consider the formula G :P1 ^ (P2 _ P3) Logic , Suppose we know that P1 = F ; P2 = F ; P3 = T First Order Logic Then we have :P1 ^ (P2 _ P3) = true ^ (false _ true) = true ^ true = true Note We evaluate :P1 before P1 ^ P2, this is because the following decreasing rank for connectives operator holds: $ ! _ ^ : Sol. PQP _ QP ^ Q :(P ^ Q) G TTTTFF TFTFTT FTTFTT FFFFTF Exercise: Truth Tables Propositional and First Order Logic Example (XOR) Propositional Write the truth table for the formula: Logic First Order Logic G , (P _ Q) ^ :(P ^ Q) Exercise: Truth Tables Propositional and First Order Logic Example (XOR) Propositional Write the truth table for the formula: Logic First Order Logic G , (P _ Q) ^ :(P ^ Q) Sol. PQP _ QP ^ Q :(P ^ Q) G TTTTFF TFTFTT FTTFTT FFFFTF Interpretation Propositional and First Order Logic Denition Propositional Logic Interpretation: Given a propositional formula G, let First Order fA1; ··· ; Ang be the set of atoms which occur in the formula, Logic an Interpretation I of G is an assignment of truth values to fA1; ··· ; Ang. Example Consider the formula: G , (P _ Q) ^ :(P ^ Q) Set of atoms: fP; Qg Interpretation for G: I = fP = T; Q = Fg Interpretation contd. Propositional and First Order Logic Each atom Ai can be assigned either True or False but never both. Propositional Logic Given an interpretation I a formula G is said to be true in First Order Logic I i G is evaluated to True in the interpretation Given a formula G with n distinct atoms there will be 2n distinct interpretations for the atoms in G. Convention: fP; :Q; :R; Sg represents an interpretation I : fP = T ; Q = F ; R = F ; S = T g. Given a formula G and an interpretation I , if G is true under I we say that I is a model for G.and we can write I j= G Validity Propositional and First Denition Order Logic Valid Formula: A formula F is valid i it is true in all its interpretation Propositional Logic First Order A valid formula can be also called a Tautology Logic A formula which is not valid is invalid If F is valid we can write j= F Example (de Morgan's Law) (:(P ^ Q) $ (:P _:Q)) is a valid formula PQ :(P ^ Q) :P _:Q (:(P ^ Q) $ (:P _:Q)) TTFFT TFTTT FTTTT FFTTT Inconsistency Propositional and First Denition Order Logic Inconsistent Formula: A formula F is inconsistent i it is false in all its interpretation Propositional Logic First Order An inconsistent formula is said to be unsatisable Logic A formula which is not inconsistent is consistent or satisable Invalid is dierent from Inconsistent Example :((:(P ^ Q) $ (:P _:Q))) is inconsistent PQ (:(P ^ Q) $ (:P _:Q)) :(:(P ^ Q) $ (:P _:Q)) TTTF TFTF FTTF FFTF Inconsistency and Validity Propositional and First A formula is valid i its negation is inconsistent (and vice Order Logic versa) A formula is invalid (consistent) i there is at least an Propositional Logic interpretation in which the formula is false (true) First Order Logic An inconsistent formula is invalid but the opposite does not hold A valid formula is consistent but the opposite does not hold Example The formula G , P _ Q is invalid (e.g., it is false when P and Q are false) but is not inconsistent because it is true in all other cases. Moreover, G is consistent (e.g., it is true whenever P or Q are false) but is not valid because it is false when both P and Q are false. Decidability Propositional and First Order Logic Property Propositional Propositional Logic is decidable: there is a terminating method Logic to decide whether a formula is valid. First Order Logic To decide whether a formula is valid: 1 we can enumerate all possible interpretations 2 for each interpretation evaluate the formula Number of interpretations for a formula are nite (2n) Decidability is a very strong and desirable property for a Logical System Trade o between representational power and decidability Logical Equivalence Propositional and First Denition Order Logic Logical Equivalence: Two formulas F and G are logically equivalent F ≡ G i the truth values of F and G are the same Propositional Logic under every interpretation of F and G. First Order Logic Useful equivalence rules (P ^ Q) ≡ (Q ^ P) commutativity of ^ (P _ Q) ≡ (Q _ P) commutativity of _ ((P ^ Q) ^ R) ≡ (P ^ (Q ^ R)) associativity of ^ ((P _ Q) _ R) ≡ (P _ (Q _ R)) associativity of _ :(:P) ≡ P double-negation elimination (P ! Q) ≡ (:Q !:P) contraposition (P ! Q) ≡ (:P _ Q) implication elimination (P $ Q) ≡ ((P ! Q) ^ (Q ! P)) biconditional elimination :(P ^ Q) ≡ (:P _:Q) de Morgan :(P _ Q) ≡ (:P ^ :Q) de Morgan (P ^ (Q _ R)) ≡ ((P ^ Q) _ (P ^ R)) distributivity of ^ over _ (P _ (Q ^ R)) ≡ ((P _ Q) ^ (P _ R)) distributivity of _ over ^ Normal Forms Propositional and First Order Logic Standard ways of writing formulas Two main normal forms: Propositional Logic Conjunctive Normal Form (CNF) First Order Logic Disjunctive Normal Form (DNF) Denition Literal: a literal is an atom or the negation of an atom Denition Negation Normal Form: A formula is in Negation Normal Form (NNF) i negations appears only in front of atoms CNF Propositional and First Denition Order Logic Conjunctive Normal Form: A formula F is in Conjunctive Normal Form (CNF) i it is in Negation Normal Form and it Propositional has the form F F F F , where each F is a Logic , 1 ^ 2 ^ · · · ^ n i First Order disjunction of literals. Logic If F is in CNF Each Fi is called a clause CNF is also refered to as Clausal Form Example The formula G , (:P _ Q) ^ (:P _ R) is in CNF. We can write G as a set of clauses fC1; C2g where C1 = :P _ Q and C2 = :P _ R. The formula G , :(P _ Q) ^ (:P _ R) is not in CNF because negation appears in front of a formula and not only in front of atoms. DNF Propositional and First Order Logic Denition Propositional Logic Disjunctive Normal Form: A formula F is in Disjunctive Normal First Order Form (DNF) i it is in Negation Normal Form and it has the Logic form F , F1 _ F2 _···_ Fn, where each Fi is a conjunction of literals. Example The formula G , (:P ^ R) _ (Q ^ :P) _ (Q ^ P) is in DNF. Any formula can be transformed into a normal form by using the equivalence rules given above. Sol. Given P _ Q ^ :(P ^ Q) apply de Morgan's law on the second part and directly obtain (P _ Q) ^ (:P _:Q) For more examples see Examples 2.8, 2.9 [Chang and Lee Ch. 2] Try to prove the other equivalence Transforming Formulas Propositional and First Order Logic Example (Formula transformations) Propositional Logic Prove that the following logical equivalences hold by First Order transforming formulas: Logic P _Q ^:(P ^Q) $ (P _Q)^(:P _:Q) $ (:P ^Q)_(P ^:Q) Transforming Formulas Propositional and First Order Logic Example (Formula transformations) Propositional Logic Prove that the following logical equivalences hold by First Order transforming formulas: Logic P _Q ^:(P ^Q) $ (P _Q)^(:P _:Q) $ (:P ^Q)_(P ^:Q) Sol. Given P _ Q ^ :(P ^ Q) apply de Morgan's law on the second part and directly obtain (P _ Q) ^ (:P _:Q) For more examples see Examples 2.8, 2.9 [Chang and Lee Ch.
Recommended publications
  • CS 512, Spring 2017, Handout 10 [1Ex] Propositional Logic: [2Ex
    CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms Assaf Kfoury 5 February 2017 Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 1 of 28 CNF L ::= p j :p literal D ::= L j L _ D disjuntion of literals C ::= D j D ^ C conjunction of disjunctions DNF L ::= p j :p literal C ::= L j L ^ C conjunction of literals D ::= C j C _ D disjunction of conjunctions conjunctive normal form & disjunctive normal form Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 2 of 28 DNF L ::= p j :p literal C ::= L j L ^ C conjunction of literals D ::= C j C _ D disjunction of conjunctions conjunctive normal form & disjunctive normal form CNF L ::= p j :p literal D ::= L j L _ D disjuntion of literals C ::= D j D ^ C conjunction of disjunctions Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 3 of 28 conjunctive normal form & disjunctive normal form CNF L ::= p j :p literal D ::= L j L _ D disjuntion of literals C ::= D j D ^ C conjunction of disjunctions DNF L ::= p j :p literal C ::= L j L ^ C conjunction of literals D ::= C j C _ D disjunction of conjunctions Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 4 of 28 I A disjunction of literals L1 _···_ Lm is valid (equivalently, is a tautology) iff there are 1 6 i; j 6 m with i 6= j such that Li is :Lj.
    [Show full text]
  • Propositional Logic, Modal Logic, Propo- Sitional Dynamic Logic and first-Order Logic
    A I L Madhavan Mukund Chennai Mathematical Institute E-mail: [email protected] Abstract ese are lecture notes for an introductory course on logic aimed at graduate students in Com- puter Science. e notes cover techniques and results from propositional logic, modal logic, propo- sitional dynamic logic and first-order logic. e notes are based on a course taught to first year PhD students at SPIC Mathematical Institute, Madras, during August–December, . Contents Propositional Logic . Syntax . . Semantics . . Axiomatisations . . Maximal Consistent Sets and Completeness . . Compactness and Strong Completeness . Modal Logic . Syntax . . Semantics . . Correspondence eory . . Axiomatising valid formulas . . Bisimulations and expressiveness . . Decidability: Filtrations and the finite model property . . Labelled transition systems and multi-modal logic . Dynamic Logic . Syntax . . Semantics . . Axiomatising valid formulas . First-Order Logic . Syntax . . Semantics . . Formalisations in first-order logic . . Satisfiability: Henkin’s reduction to propositional logic . . Compactness and the L¨owenheim-Skolem eorem . . A Complete Axiomatisation . . Variants of the L¨owenheim-Skolem eorem . . Elementary Classes . . Elementarily Equivalent Structures . . An Algebraic Characterisation of Elementary Equivalence . . Decidability . Propositional Logic . Syntax P = f g We begin with a countably infinite set of atomic propositions p0, p1,... and two logical con- nectives : (read as not) and _ (read as or). e set Φ of formulas of propositional logic is the smallest set satisfying the following conditions: • Every atomic proposition p is a member of Φ. • If α is a member of Φ, so is (:α). • If α and β are members of Φ, so is (α _ β). We shall normally omit parentheses unless we need to explicitly clarify the structure of a formula.
    [Show full text]
  • An Algorithm for the Satisfiability Problem of Formulas in Conjunctive
    Journal of Algorithms 54 (2005) 40–44 www.elsevier.com/locate/jalgor An algorithm for the satisfiability problem of formulas in conjunctive normal form Rainer Schuler Abt. Theoretische Informatik, Universität Ulm, D-89069 Ulm, Germany Received 26 February 2003 Available online 9 June 2004 Abstract We consider the satisfiability problem on Boolean formulas in conjunctive normal form. We show that a satisfying assignment of a formula can be found in polynomial time with a success probability − − + of 2 n(1 1/(1 logm)),wheren and m are the number of variables and the number of clauses of the formula, respectively. If the number of clauses of the formulas is bounded by nc for some constant c, − + this gives an expected run time of O(p(n) · 2n(1 1/(1 c logn))) for a polynomial p. 2004 Elsevier Inc. All rights reserved. Keywords: Complexity theory; NP-completeness; CNF-SAT; Probabilistic algorithms 1. Introduction The satisfiability problem of Boolean formulas in conjunctive normal form (CNF-SAT) is one of the best known NP-complete problems. The problem remains NP-complete even if the formulas are restricted to a constant number k>2 of literals in each clause (k-SAT). In recent years several algorithms have been proposed to solve the problem exponentially faster than the 2n time bound, given by an exhaustive search of all possible assignments to the n variables. So far research has focused in particular on k-SAT, whereas improvements for SAT in general have been derived with respect to the number m of clauses in a formula [2,7].
    [Show full text]
  • On Basic Probability Logic Inequalities †
    mathematics Article On Basic Probability Logic Inequalities † Marija Boriˇci´cJoksimovi´c Faculty of Organizational Sciences, University of Belgrade, Jove Ili´ca154, 11000 Belgrade, Serbia; [email protected] † The conclusions given in this paper were partially presented at the European Summer Meetings of the Association for Symbolic Logic, Logic Colloquium 2012, held in Manchester on 12–18 July 2012. Abstract: We give some simple examples of applying some of the well-known elementary probability theory inequalities and properties in the field of logical argumentation. A probabilistic version of the hypothetical syllogism inference rule is as follows: if propositions A, B, C, A ! B, and B ! C have probabilities a, b, c, r, and s, respectively, then for probability p of A ! C, we have f (a, b, c, r, s) ≤ p ≤ g(a, b, c, r, s), for some functions f and g of given parameters. In this paper, after a short overview of known rules related to conjunction and disjunction, we proposed some probabilized forms of the hypothetical syllogism inference rule, with the best possible bounds for the probability of conclusion, covering simultaneously the probabilistic versions of both modus ponens and modus tollens rules, as already considered by Suppes, Hailperin, and Wagner. Keywords: inequality; probability logic; inference rule MSC: 03B48; 03B05; 60E15; 26D20; 60A05 1. Introduction The main part of probabilization of logical inference rules is defining the correspond- Citation: Boriˇci´cJoksimovi´c,M. On ing best possible bounds for probabilities of propositions. Some of them, connected with Basic Probability Logic Inequalities. conjunction and disjunction, can be obtained immediately from the well-known Boole’s Mathematics 2021, 9, 1409.
    [Show full text]
  • Propositional Logic - Basics
    Outline Propositional Logic - Basics K. Subramani1 1Lane Department of Computer Science and Electrical Engineering West Virginia University 14 January and 16 January, 2013 Subramani Propositonal Logic Outline Outline 1 Statements, Symbolic Representations and Semantics Boolean Connectives and Semantics Subramani Propositonal Logic (i) The Law! (ii) Mathematics. (iii) Computer Science. Definition Statement (or Atomic Proposition) - A sentence that is either true or false. Example (i) The board is black. (ii) Are you John? (iii) The moon is made of green cheese. (iv) This statement is false. (Paradox). Statements, Symbolic Representations and Semantics Boolean Connectives and Semantics Motivation Why Logic? Subramani Propositonal Logic (ii) Mathematics. (iii) Computer Science. Definition Statement (or Atomic Proposition) - A sentence that is either true or false. Example (i) The board is black. (ii) Are you John? (iii) The moon is made of green cheese. (iv) This statement is false. (Paradox). Statements, Symbolic Representations and Semantics Boolean Connectives and Semantics Motivation Why Logic? (i) The Law! Subramani Propositonal Logic (iii) Computer Science. Definition Statement (or Atomic Proposition) - A sentence that is either true or false. Example (i) The board is black. (ii) Are you John? (iii) The moon is made of green cheese. (iv) This statement is false. (Paradox). Statements, Symbolic Representations and Semantics Boolean Connectives and Semantics Motivation Why Logic? (i) The Law! (ii) Mathematics. Subramani Propositonal Logic (iii) Computer Science. Definition Statement (or Atomic Proposition) - A sentence that is either true or false. Example (i) The board is black. (ii) Are you John? (iii) The moon is made of green cheese. (iv) This statement is false.
    [Show full text]
  • Logic in Computer Science
    P. Madhusudan Logic in Computer Science Rough course notes November 5, 2020 Draft. Copyright P. Madhusudan Contents 1 Logic over Structures: A Single Known Structure, Classes of Structures, and All Structures ................................... 1 1.1 Logic on a Fixed Known Structure . .1 1.2 Logic on a Fixed Class of Structures . .3 1.3 Logic on All Structures . .5 1.4 Logics over structures: Theories and Questions . .7 2 Propositional Logic ............................................. 11 2.1 Propositional Logic . 11 2.1.1 Syntax . 11 2.1.2 What does the above mean with ::=, etc? . 11 2.2 Some definitions and theorems . 14 2.3 Compactness Theorem . 15 2.4 Resolution . 18 3 Quantifier Elimination and Decidability .......................... 23 3.1 Quantifiier Elimination . 23 3.2 Dense Linear Orders without Endpoints . 24 3.3 Quantifier Elimination for rationals with addition: ¹Q, 0, 1, ¸, −, <, =º ......................................... 27 3.4 The Theory of Reals with Addition . 30 3.4.1 Aside: Axiomatizations . 30 3.4.2 Other theories that admit quantifier elimination . 31 4 Validity of FOL is undecidable and is r.e.-hard .................... 33 4.1 Validity of FOL is r.e.-hard . 34 4.2 Trakhtenbrot’s theorem: Validity of FOL over finite models is undecidable, and co-r.e. hard . 39 5 Quantifier-free theory of equality ................................ 43 5.1 Decidability using Bounded Models . 43 v vi Contents 5.2 An Algorithm for Conjunctive Formulas . 44 5.2.1 Computing ¹º ................................... 47 5.3 Axioms for The Theory of Equality . 49 6 Completeness Theorem: FO Validity is r.e. ........................ 53 6.1 Prenex Normal Form .
    [Show full text]
  • Axiomatic Set Teory P.D.Welch
    Axiomatic Set Teory P.D.Welch. August 16, 2020 Contents Page 1 Axioms and Formal Systems 1 1.1 Introduction 1 1.2 Preliminaries: axioms and formal systems. 3 1.2.1 The formal language of ZF set theory; terms 4 1.2.2 The Zermelo-Fraenkel Axioms 7 1.3 Transfinite Recursion 9 1.4 Relativisation of terms and formulae 11 2 Initial segments of the Universe 17 2.1 Singular ordinals: cofinality 17 2.1.1 Cofinality 17 2.1.2 Normal Functions and closed and unbounded classes 19 2.1.3 Stationary Sets 22 2.2 Some further cardinal arithmetic 24 2.3 Transitive Models 25 2.4 The H sets 27 2.4.1 H - the hereditarily finite sets 28 2.4.2 H - the hereditarily countable sets 29 2.5 The Montague-Levy Reflection theorem 30 2.5.1 Absoluteness 30 2.5.2 Reflection Theorems 32 2.6 Inaccessible Cardinals 34 2.6.1 Inaccessible cardinals 35 2.6.2 A menagerie of other large cardinals 36 3 Formalising semantics within ZF 39 3.1 Definite terms and formulae 39 3.1.1 The non-finite axiomatisability of ZF 44 3.2 Formalising syntax 45 3.3 Formalising the satisfaction relation 46 3.4 Formalising definability: the function Def. 47 3.5 More on correctness and consistency 48 ii iii 3.5.1 Incompleteness and Consistency Arguments 50 4 The Constructible Hierarchy 53 4.1 The L -hierarchy 53 4.2 The Axiom of Choice in L 56 4.3 The Axiom of Constructibility 57 4.4 The Generalised Continuum Hypothesis in L.
    [Show full text]
  • Propositional Logic
    Propositional Logic - Review Predicate Logic - Review Propositional Logic: formalisation of reasoning involving propositions Predicate (First-order) Logic: formalisation of reasoning involving predicates. • Proposition: a statement that can be either true or false. • Propositional variable: variable intended to represent the most • Predicate (sometimes called parameterized proposition): primitive propositions relevant to our purposes a Boolean-valued function. • Given a set S of propositional variables, the set F of propositional formulas is defined recursively as: • Domain: the set of possible values for a predicate’s Basis: any propositional variable in S is in F arguments. Induction step: if p and q are in F, then so are ⌐p, (p /\ q), (p \/ q), (p → q) and (p ↔ q) 1 2 Predicate Logic – Review cont’ Predicate Logic - Review cont’ Given a first-order language L, the set F of predicate (first-order) •A first-order language consists of: formulas is constructed inductively as follows: - an infinite set of variables Basis: any atomic formula in L is in F - a set of predicate symbols Inductive step: if e and f are in F and x is a variable in L, - a set of constant symbols then so are the following: ⌐e, (e /\ f), (e \/ f), (e → f), (e ↔ f), ∀ x e, ∃ s e. •A term is a variable or a constant symbol • An occurrence of a variable x is free in a formula f if and only •An atomic formula is an expression of the form p(t1,…,tn), if it does not occur within a subformula e of f of the form ∀ x e where p is a n-ary predicate symbol and each ti is a term.
    [Show full text]
  • Boolean Algebra
    Boolean Algebra Definition: A Boolean Algebra is a math construct (B,+, . , ‘, 0,1) where B is a non-empty set, + and . are binary operations in B, ‘ is a unary operation in B, 0 and 1 are special elements of B, such that: a) + and . are communative: for all x and y in B, x+y=y+x, and x.y=y.x b) + and . are associative: for all x, y and z in B, x+(y+z)=(x+y)+z, and x.(y.z)=(x.y).z c) + and . are distributive over one another: x.(y+z)=xy+xz, and x+(y.z)=(x+y).(x+z) d) Identity laws: 1.x=x.1=x and 0+x=x+0=x for all x in B e) Complementation laws: x+x’=1 and x.x’=0 for all x in B Examples: • (B=set of all propositions, or, and, not, T, F) • (B=2A, U, ∩, c, Φ,A) Theorem 1: Let (B,+, . , ‘, 0,1) be a Boolean Algebra. Then the following hold: a) x+x=x and x.x=x for all x in B b) x+1=1 and 0.x=0 for all x in B c) x+(xy)=x and x.(x+y)=x for all x and y in B Proof: a) x = x+0 Identity laws = x+xx’ Complementation laws = (x+x).(x+x’) because + is distributive over . = (x+x).1 Complementation laws = x+x Identity laws x = x.1 Identity laws = x.(x+x’) Complementation laws = x.x +x.x’ because + is distributive over .
    [Show full text]
  • Normal Forms
    Propositional Logic Normal Forms 1 Literals Definition A literal is an atom or the negation of an atom. In the former case the literal is positive, in the latter case it is negative. 2 Negation Normal Form (NNF) Definition A formula is in negation formal form (NNF) if negation (:) occurs only directly in front of atoms. Example In NNF: :A ^ :B Not in NNF: :(A _ B) 3 Transformation into NNF Any formula can be transformed into an equivalent formula in NNF by pushing : inwards. Apply the following equivalences from left to right as long as possible: ::F ≡ F :(F ^ G) ≡ (:F _:G) :(F _ G) ≡ (:F ^ :G) Example (:(A ^ :B) ^ C) ≡ ((:A _ ::B) ^ C) ≡ ((:A _ B) ^ C) Warning:\ F ≡ G ≡ H" is merely an abbreviation for \F ≡ G and G ≡ H" Does this process always terminate? Is the result unique? 4 CNF and DNF Definition A formula F is in conjunctive normal form (CNF) if it is a conjunction of disjunctions of literals: n m V Wi F = ( ( Li;j )), i=1 j=1 where Li;j 2 fA1; A2; · · · g [ f:A1; :A2; · · · g Definition A formula F is in disjunctive normal form (DNF) if it is a disjunction of conjunctions of literals: n m W Vi F = ( ( Li;j )), i=1 j=1 where Li;j 2 fA1; A2; · · · g [ f:A1; :A2; · · · g 5 Transformation into CNF and DNF Any formula can be transformed into an equivalent formula in CNF or DNF in two steps: 1. Transform the initial formula into its NNF 2.
    [Show full text]
  • First Order Logic and Nonstandard Analysis
    First Order Logic and Nonstandard Analysis Julian Hartman September 4, 2010 Abstract This paper is intended as an exploration of nonstandard analysis, and the rigorous use of infinitesimals and infinite elements to explore properties of the real numbers. I first define and explore first order logic, and model theory. Then, I prove the compact- ness theorem, and use this to form a nonstandard structure of the real numbers. Using this nonstandard structure, it it easy to to various proofs without the use of limits that would otherwise require their use. Contents 1 Introduction 2 2 An Introduction to First Order Logic 2 2.1 Propositional Logic . 2 2.2 Logical Symbols . 2 2.3 Predicates, Constants and Functions . 2 2.4 Well-Formed Formulas . 3 3 Models 3 3.1 Structure . 3 3.2 Truth . 4 3.2.1 Satisfaction . 5 4 The Compactness Theorem 6 4.1 Soundness and Completeness . 6 5 Nonstandard Analysis 7 5.1 Making a Nonstandard Structure . 7 5.2 Applications of a Nonstandard Structure . 9 6 Sources 10 1 1 Introduction The founders of modern calculus had a less than perfect understanding of the nuts and bolts of what made it work. Both Newton and Leibniz used the notion of infinitesimal, without a rigorous understanding of what they were. Infinitely small real numbers that were still not zero was a hard thing for mathematicians to accept, and with the rigorous development of limits by the likes of Cauchy and Weierstrass, the discussion of infinitesimals subsided. Now, using first order logic for nonstandard analysis, it is possible to create a model of the real numbers that has the same properties as the traditional conception of the real numbers, but also has rigorously defined infinite and infinitesimal elements.
    [Show full text]
  • CS245 Logic and Computation
    CS245 Logic and Computation Alice Gao December 9, 2019 Contents 1 Propositional Logic 3 1.1 Translations .................................... 3 1.2 Structural Induction ............................... 8 1.2.1 A template for structural induction on well-formed propositional for- mulas ................................... 8 1.3 The Semantics of an Implication ........................ 12 1.4 Tautology, Contradiction, and Satisfiable but Not a Tautology ........ 13 1.5 Logical Equivalence ................................ 14 1.6 Analyzing Conditional Code ........................... 16 1.7 Circuit Design ................................... 17 1.8 Tautological Consequence ............................ 18 1.9 Formal Deduction ................................. 21 1.9.1 Rules of Formal Deduction ........................ 21 1.9.2 Format of a Formal Deduction Proof .................. 23 1.9.3 Strategies for writing a formal deduction proof ............ 23 1.9.4 And elimination and introduction .................... 25 1.9.5 Implication introduction and elimination ................ 26 1.9.6 Or introduction and elimination ..................... 28 1.9.7 Negation introduction and elimination ................. 30 1.9.8 Putting them together! .......................... 33 1.9.9 Putting them together: Additional exercises .............. 37 1.9.10 Other problems .............................. 38 1.10 Soundness and Completeness of Formal Deduction ............... 39 1.10.1 The soundness of inference rules ..................... 39 1.10.2 Soundness and Completeness
    [Show full text]