Propositional Logic

Total Page:16

File Type:pdf, Size:1020Kb

Propositional Logic CSCE 222! Discrete Structures for Computing! ! Propositional Logic" Dr. Hyunyoung Lee" " " " " " " Based on slides by Andreas Klappenecker" 1 Propositions" A proposition is a declarative sentence that is either true or false (but not both)." " Examples: " "• College Station is the capital of the USA." • There are fewer politicians in College Station than in Washington, D.C. " • 1+1=2" • 2+2=5 2 Propositional Variables" A variable that represents propositions is called a propositional variable. " For example: p, q, r, ..." " [Propositional variables in logic play the same role as numerical variables in arithmetic.] " 3 Propositional Logic" The area of logic that deals with propositions is called propositional logic." " In addition to propositional variables, we have logical connectives (or operators) such as not (for negation), and (for conjunction), or (for disjunction), exclusive or (for exclusive disjunction), conditional (for implication), and biconditional. " 4 Formation Tree" Each logical connective is enclosed in parentheses, except for the negation connective ¬. Thus, we can associate a unique binary tree to each proposition, called the formation tree. " The formation tree contains all subformulas of a formula, starting with the formula at its root and breaking it down into its subformulas until you reach the propositional variables at its leafs. " 5 Formation Tree" A formation tree of a proposition p has a root labeled with p and satisfies the following rules:" T1. Each leaf is an occurrence of a propositional variable in p. " T2. Each internal node with a single successor is labeled by a subformula ¬q of p and has q as a successor. " T3. Each internal node with two successors is labeled by a subformula aXb of p with X in {∧,∨,⊕,→, } and has a as a left successor and b as a right successor." 6 The start symbol is formula . The terminal symbols are the elements in S, the connectives, and the parentheses.⌦ We will refer to the elements in S as propositional variables or variables for short. Remark. We could have used any other countable set S to name the variables, as long as it does not contain the parentheses and the connectives. Example 3. The formula ((a b) c) ⇧ ⌃ ¬ belongs to the language of propositional logic. Indeed, this can be seen as follows: formula yields ( formula formula ) ⌦ yields (( formula⌦⌃ formula⌦ ) formula ) yields (( formula ⌦⇧ formula ⌦) ⌃ formula⌦ ). ⌦⇧ ⌦ ⌃ ¬ ⌦ By applying the last rule three times, we get (( symbol symbol ) symbol ), ⌦⇧ ⌦ ⌃ ¬ ⌦ and the symbols can be chosen to be a, b and c,respectively. You might have wondered why each logical connective is enclosed in paren- theses, except for the negation connective . This ensures that we can associate a unique binary tree to each proposition,¬ called the formation tree. The for- mation tree contains all subformulas of a proposition. A formation tree of a proposition p has a root labeled with p and satisfies the following rules: T1. Each leaf is an occurrence of a propositional variable in p. T2. Each internal node with a single successor is labeled by a subformula q of p and has q as a successor. ¬ T3. Each internal node with two successorsExample is labeled" by a subformula aXb of p with X in , , , , and has a as a left successor and b as a right successor. {⇧ ⌃ ⊕ ⇥ ⇤} Example 4. The formation tree of the formula ((a b) c) is given by ⇧ ⌃ ¬ ((a b) c) ⇧ ⌃ ¬ ΩΩZZ (a b) c ⇧ ¬ ≠≠JJ ab c Remark. In a course on compiler construction, you will learn how to write a parser for languages such as the one that we have specified for propositional logic. You can check out lex and yacc if you want to write a parser for propo- sitional logic in C or C++ now. In Haskell,7 you can use for example the parser generator Happy. 4 Assigning Meanings to Formulas We know that each formula corresponds to a unique binary tree. We can evaluate the formula by - giving each propositional variable a truth value - defining the meaning of each logical connective - propagate the truth values from the leafs to the root in a unique way, so that we get an unambiguous evaluation of each formula. 8 4 The Semantics of Propositional Logic Let B = t, f denote the set of truth values, where t and f represent true and false,{ respectively.} We associateSemantics to the logical connective the function M : B B given by ¬ ¬ ⌅ P M (P ) 4 The Semantics of Propositional¬ Logic f t LetLetB =B={t,t,ff }.denote Assign the setto ofeacht truth connective values,f where xt aand functionf represent true and false,{ respectively.} We associate to the logical connective the function Thus,MMx: (B->BP ) is truethat if anddetermines only if P isthe false. semantics This justifies of thex¬. name negation M : B¬ B given by for this¬ connective.⌅ The graph of the function M given above is called the P M (P ) ¬ ¬ truth table of the negation connective.f t Similarly, we associate to a connective X in the set , , , , a binaryt functionf MX : B B B.Thetruth tables of these{⌥ connectives∨ ⇥ ⌅ ⇧ are} as follows: × ⌅ Thus, M (P ) is true if and only if P is false. This justifies the name negation for thisPQ connective.¬ M (P, Q The) M graph(P, ofQ) theM function(P, Q)MMgiven(P, Q above) M is called(P, Q) the ⇧ ⌃ ⊕ ¬ ⇥ ⇤ truth ff table of thef negation connective.f Similarly,f we associatet to a connectivet X inft the set , f , , , ta binary functiont MX : Bt B B.Thetruthf {⌥ ∨ ⇥ ⌅ ⇧} × ⌅ tables tf of these connectivesf aret as follows: t f f ttPQM t(P, Q) M (tP, Q) M (P,f Q) M (P,t Q) M (P,t Q) ⇧ ⌃ ⊕ ⇥ ⇤ You shouldff very carefullyf inspectf this table!f It is criticalt that yout memorize ft f t t t f and fully understand the meaning of each9 connective. tf f t t f f The semantics of the language Prop is given by assigning truth values to tt t t f t t each proposition in Prop. Clearly, an arbitrary assignment of truth values is notYou interesting, should very since carefully we would inspect like everything this table! to It be is critical consistent that with you the memorize meaning ofand the fullyconnectives understand that the we meaning have just of learned. each connective. For example, if the propositions a and bThehave semantics been assigned of the languagethe valuePropt, thenis given it is reasonable by assigning to truth insist values that a to b beeach assigned proposition the value in Propt as. well. Clearly, Therefore, an arbitrary we will assignment introduce of truth the concept values is of⌥ a valuation,not interesting, which since models we thewould semantics like everything of Prop to bein consistent an appropriate with the way. meaning ofA thevaluation connectivesv : thatProp we haveB is just a functionlearned. For that example, assigns if a the truth propositions value to eacha propositionand b have in beenProp assignedsuch that⌅ the value t, then it is reasonable to insist that a b be assigned the value t as well. Therefore, we will introduce the concept of⌥ a V1.valuation,v a = whichM ( modelsv a ) the semantics of Prop in an appropriate way. V2. v (¬a b) =¬ M (v a ,v b ) A valuation⌥ v :⇧Prop B is a function that assigns a truth value to each V3.propositionvJ(a K b) in=PropMJ (Ksuchv a that,v⌅ b ) V4. v (a ∨ b) = M⌃ (v a ,v b ) V1. Jv ⇥a =K M (v⊕a J) K J K V5. v (a¬ b) =¬ M (v a ,v b ) V2. Jv (a⌅ bK) = M⇥(vJ aK ,vJ bK) V6. v (a ⌥b) = M⇧ (v a ,v b ) V3. Jv (a bK) = M⇤(vJaK ,vJbK) J ⇧∨K J⌃ K holdsV4. forJvJ(a allb propositions)KK = M (vJJaKaK,vandJ JbK )K b in Prop. The properties V1–V6 ensure thatV5. theJv ( valuationa ⇥ bK) = respectsM⊕ (vJ aK the,vJb meaningK) of the connectives. We can restrict a J ⌅ K ⇥ J K J K valuationV6. v (av tob) a subset= M (v ofa the,v b set) of proposition. If A and B are subsets of J ⇧ K ⇤ J K J K Propholdssuch forJ that all propositionsKA B, andJ aK vandAJ :KAb in PropB and.v TheB : B propertiesB areV1 valuations,–V6 ensure then ⇤ ⌅ ⌅ vBthatis called theJ valuation an extensionK respectsJ ofK the theJ meaningK valuation of thevA connectives.if and only if WevB cancoincides restrict with a vAvaluationwhen restrictedv to a subset to A. of the set of proposition. If A and B are subsets of PropThe consistencysuch that A conditionsB, and vAV1: A-V6 Bareand quitevB : stringent,B B are as valuations, the next theorem then ⇤ ⌅ ⌅ shows.vB is called an extension of the valuation vA if and only if vB coincides with vA when restricted to A. The consistency conditions V1-V6 are quite stringent, as the next theorem shows. 5 5 Summary Informally, we can summarize the meaning of the connectives in words as follows: 1. The and connective (a ⋀ b) is true if and only if both a and b are true. 2. The or connective (a ⋁ b) is true if and only if at least one of a, b is true. 3. The exclusive or (a ⊕ b) is true if and only if precisely one of a, b is true. 4. The implication (a → b) is false if and only if the premise a is true and the conclusion b is false. 5. The biconditional (a ︎ b) is true if and only if the truth values of a and b are the same. 10 Equivalences and Applications 11 Remarks • In our formal introduction of propositional logic, we used a strict syntactic structure with full parenthesizing (except negations).
Recommended publications
  • Reasoning with Ambiguity
    Noname manuscript No. (will be inserted by the editor) Reasoning with Ambiguity Christian Wurm the date of receipt and acceptance should be inserted later Abstract We treat the problem of reasoning with ambiguous propositions. Even though ambiguity is obviously problematic for reasoning, it is no less ob- vious that ambiguous propositions entail other propositions (both ambiguous and unambiguous), and are entailed by other propositions. This article gives a formal analysis of the underlying mechanisms, both from an algebraic and a logical point of view. The main result can be summarized as follows: sound (and complete) reasoning with ambiguity requires a distinction between equivalence on the one and congruence on the other side: the fact that α entails β does not imply β can be substituted for α in all contexts preserving truth. With- out this distinction, we will always run into paradoxical results. We present the (cut-free) sequent calculus ALcf , which we conjecture implements sound and complete propositional reasoning with ambiguity, and provide it with a language-theoretic semantics, where letters represent unambiguous meanings and concatenation represents ambiguity. Keywords Ambiguity, reasoning, proof theory, algebra, Computational Linguistics Acknowledgements Thanks to Timm Lichte, Roland Eibers, Roussanka Loukanova and Gerhard Schurz for helpful discussions; also I want to thank two anonymous reviewers for their many excellent remarks! 1 Introduction This article gives an extensive treatment of reasoning with ambiguity, more precisely with ambiguous propositions. We approach the problem from an Universit¨atD¨usseldorf,Germany Universit¨atsstr.1 40225 D¨usseldorf Germany E-mail: [email protected] 2 Christian Wurm algebraic and a logical perspective and show some interesting surprising results on both ends, which lead up to some interesting philosophical questions, which we address in a preliminary fashion.
    [Show full text]
  • A Computer-Verified Monadic Functional Implementation of the Integral
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Theoretical Computer Science 411 (2010) 3386–3402 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs A computer-verified monadic functional implementation of the integral Russell O'Connor, Bas Spitters ∗ Radboud University Nijmegen, Netherlands article info a b s t r a c t Article history: We provide a computer-verified exact monadic functional implementation of the Riemann Received 10 September 2008 integral in type theory. Together with previous work by O'Connor, this may be seen as Received in revised form 13 January 2010 the beginning of the realization of Bishop's vision to use constructive mathematics as a Accepted 23 May 2010 programming language for exact analysis. Communicated by G.D. Plotkin ' 2010 Elsevier B.V. All rights reserved. Keywords: Type theory Functional programming Exact real analysis Monads 1. Introduction Integration is one of the fundamental techniques in numerical computation. However, its implementation using floating- point numbers requires continuous effort on the part of the user in order to ensure that the results are correct. This burden can be shifted away from the end-user by providing a library of exact analysis in which the computer handles the error estimates. For high assurance we use computer-verified proofs that the implementation is actually correct; see [21] for an overview. It has long been suggested that, by using constructive mathematics, exact analysis and provable correctness can be unified [7,8]. Constructive mathematics provides a high-level framework for specifying computations (Section 2.1).
    [Show full text]
  • Edinburgh Research Explorer
    Edinburgh Research Explorer Propositions as Types Citation for published version: Wadler, P 2015, 'Propositions as Types', Communications of the ACM, vol. 58, no. 12, pp. 75-84. https://doi.org/10.1145/2699407 Digital Object Identifier (DOI): 10.1145/2699407 Link: Link to publication record in Edinburgh Research Explorer Document Version: Peer reviewed version Published In: Communications of the ACM General rights Copyright for the publications made accessible via the Edinburgh Research Explorer is retained by the author(s) and / or other copyright owners and it is a condition of accessing these publications that users recognise and abide by the legal requirements associated with these rights. Take down policy The University of Edinburgh has made every reasonable effort to ensure that Edinburgh Research Explorer content complies with UK legislation. If you believe that the public display of this file breaches copyright please contact [email protected] providing details, and we will remove access to the work immediately and investigate your claim. Download date: 28. Sep. 2021 Propositions as Types ∗ Philip Wadler University of Edinburgh [email protected] 1. Introduction cluding Agda, Automath, Coq, Epigram, F#,F?, Haskell, LF, ML, Powerful insights arise from linking two fields of study previously NuPRL, Scala, Singularity, and Trellys. thought separate. Examples include Descartes’s coordinates, which Propositions as Types is a notion with mystery. Why should it links geometry to algebra, Planck’s Quantum Theory, which links be the case that intuitionistic natural deduction, as developed by particles to waves, and Shannon’s Information Theory, which links Gentzen in the 1930s, and simply-typed lambda calculus, as devel- thermodynamics to communication.
    [Show full text]
  • A Multi-Modal Analysis of Anaphora and Ellipsis
    University of Pennsylvania Working Papers in Linguistics Volume 5 Issue 2 Current Work in Linguistics Article 2 1998 A Multi-Modal Analysis of Anaphora and Ellipsis Gerhard Jaeger Follow this and additional works at: https://repository.upenn.edu/pwpl Recommended Citation Jaeger, Gerhard (1998) "A Multi-Modal Analysis of Anaphora and Ellipsis," University of Pennsylvania Working Papers in Linguistics: Vol. 5 : Iss. 2 , Article 2. Available at: https://repository.upenn.edu/pwpl/vol5/iss2/2 This paper is posted at ScholarlyCommons. https://repository.upenn.edu/pwpl/vol5/iss2/2 For more information, please contact [email protected]. A Multi-Modal Analysis of Anaphora and Ellipsis This working paper is available in University of Pennsylvania Working Papers in Linguistics: https://repository.upenn.edu/pwpl/vol5/iss2/2 A Multi-Modal Analysis of Anaphora and Ellipsis Gerhard J¨ager 1. Introduction The aim of the present paper is to outline a unified account of anaphora and ellipsis phenomena within the framework of Type Logical Categorial Gram- mar.1 There is at least one conceptual and one empirical reason to pursue such a goal. Firstly, both phenomena are characterized by the fact that they re-use semantic resources that are also used elsewhere. This issue is discussed in detail in section 2. Secondly, they show a striking similarity in displaying the characteristic ambiguity between strict and sloppy readings. This supports the assumption that in fact the same mechanisms are at work in both cases. (1) a. John washed his car, and Bill did, too. b. John washed his car, and Bill waxed it.
    [Show full text]
  • Topics in Philosophical Logic
    Topics in Philosophical Logic The Harvard community has made this article openly available. Please share how this access benefits you. Your story matters Citation Litland, Jon. 2012. Topics in Philosophical Logic. Doctoral dissertation, Harvard University. Citable link http://nrs.harvard.edu/urn-3:HUL.InstRepos:9527318 Terms of Use This article was downloaded from Harvard University’s DASH repository, and is made available under the terms and conditions applicable to Other Posted Material, as set forth at http:// nrs.harvard.edu/urn-3:HUL.InstRepos:dash.current.terms-of- use#LAA © Jon Litland All rights reserved. Warren Goldfarb Jon Litland Topics in Philosophical Logic Abstract In “Proof-Theoretic Justification of Logic”, building on work by Dummett and Prawitz, I show how to construct use-based meaning-theories for the logical constants. The assertability-conditional meaning-theory takes the meaning of the logical constants to be given by their introduction rules; the consequence-conditional meaning-theory takes the meaning of the log- ical constants to be given by their elimination rules. I then consider the question: given a set of introduction (elimination) rules , what are the R strongest elimination (introduction) rules that are validated by an assertabil- ity (consequence) conditional meaning-theory based on ? I prove that the R intuitionistic introduction (elimination) rules are the strongest rules that are validated by the intuitionistic elimination (introduction) rules. I then prove that intuitionistic logic is the strongest logic that can be given either an assertability-conditional or consequence-conditional meaning-theory. In “Grounding Grounding” I discuss the notion of grounding. My discus- sion revolves around the problem of iterated grounding-claims.
    [Show full text]
  • Negation” Impedes Argumentation: the Case of Dawn
    When “Negation” Impedes Argumentation: The Case of Dawn Morgan Sellers Arizona State University Abstract: This study investigates one student’s meanings for negations of various mathematical statements. The student, from a Transition-to-Proof course, participated in two clinical interviews in which she was asked to negate statements with one quantifier or logical connective. Then, the student was asked to negate statements with a combination of quantifiers and logical connectives. Lastly, the student was presented with several complex mathematical statements from Calculus and was asked to determine if these statements were true or false on a case-by- case basis using a series of graphs. The results reveal that the student used the same rule for negation in both simple and complex mathematical statements when she was asked to negate each statement. However, when the student was asked to determine if statements were true or false, she relied on her meaning for the mathematical statement and formed a mathematically convincing argument. Key words: Negation, Argumentation, Complex Mathematical Statements, Calculus, Transition- to-Proof Many studies have noted that students often interpret logical connectives (such as and and or) and quantifiers (such as for all and there exists) in mathematical statements in ways contrary to mathematical convention (Case, 2015; Dawkins & Cook, 2017; Dawkins & Roh, 2016; Dubinsky & Yiparki, 2000; Epp,1999, 2003; Selden & Selden, 1995; Shipman, 2013, Tall, 1990). Recently, researchers have also called for attention to the logical structures found within Calculus theorems and definitions (Case, 2015; Sellers, Roh, & David, 2017) because students must reason with these logical components in order to verify or refute mathematical claims.
    [Show full text]
  • Logical Connectives in Natural Languages
    Logical connectives in natural languages Leo´ Picat Introduction Natural languages all have common points. These shared features define and constrain them. A key property of all natural languages is their learnability. As long as children are exposed to it, they can learn any spoken or signed language. This process takes place in environments in which children are not exposed to the full diversity of their mother tongue: it is with only few evidences that they master the ability to express themselves through language. As children are not exposed to negative evidences, learning a language would not be possible if con- straints were not present to limit the space of possible languages. Input-based theories predict that these constraints result from general cognition mechanisms. Knowledge-based theories predict that they are language specific and are part of a Universal Grammar [1]. Which approach is the right one is still a matter of debate and the implementation of these constraints within our brain is still to be determined. Yet, one can get a taste of them as they surface in linguistic universals. Universals have been formulated for most domains of linguistics. The first person to open the way was Greenberg [2] who described 50 statements about syntax and morphology across languages. In the phono- logical domain, all languages have stops for example [3]. Though, few universals are this absolute; most of them are more statistical truth or take the form of conditional statements. Universals have also been defined for semantics with more or less success [4]. Some of them shed light on non-linguistic abilities.
    [Show full text]
  • Part 2 Module 1 Logic: Statements, Negations, Quantifiers, Truth Tables
    PART 2 MODULE 1 LOGIC: STATEMENTS, NEGATIONS, QUANTIFIERS, TRUTH TABLES STATEMENTS A statement is a declarative sentence having truth value. Examples of statements: Today is Saturday. Today I have math class. 1 + 1 = 2 3 < 1 What's your sign? Some cats have fleas. All lawyers are dishonest. Today I have math class and today is Saturday. 1 + 1 = 2 or 3 < 1 For each of the sentences listed above (except the one that is stricken out) you should be able to determine its truth value (that is, you should be able to decide whether the statement is TRUE or FALSE). Questions and commands are not statements. SYMBOLS FOR STATEMENTS It is conventional to use lower case letters such as p, q, r, s to represent logic statements. Referring to the statements listed above, let p: Today is Saturday. q: Today I have math class. r: 1 + 1 = 2 s: 3 < 1 u: Some cats have fleas. v: All lawyers are dishonest. Note: In our discussion of logic, when we encounter a subjective or value-laden term (an opinion) such as "dishonest," we will assume for the sake of the discussion that that term has been precisely defined. QUANTIFIED STATEMENTS The words "all" "some" and "none" are examples of quantifiers. A statement containing one or more of these words is a quantified statement. Note: the word "some" means "at least one." EXAMPLE 2.1.1 According to your everyday experience, decide whether each statement is true or false: 1. All dogs are poodles. 2. Some books have hard covers. 3.
    [Show full text]
  • Monads and E Ects
    Monads and Eects Nick Benton John Hughes and Eugenio Moggi Microsoft Research Chalmers Univ DISI Univ di Genova Genova Italy moggidisiunigeit Abstract A tension in language design has b een b etween simple se mantics on the one hand and rich p ossibilities for sideeects exception handling and so on on the other The intro duction of monads has made a large step towards reconciling these alternatives First prop osed by Moggi as a way of structuring semantic descriptions they were adopted by Wadler to structure Haskell programs and now oer a general tech nique for delimiting the scop e of eects thus reconciling referential trans parency and imp erative op erations within one programming language Monads have b een used to solve longstanding problems such as adding p ointers and assignment interlanguage working and exception handling to Haskell without compromising its purely functional semantics The course will intro duce monads eects and related notions and exemplify their applications in programming Haskell and in compilation MLj The course will present typ ed metalanguages for monads and related categorical notions and describ e how they can b e further rened by in tro ducing eects Research partially supp orted by MURST and ESPRIT WG APPSEM Monads and Computational Typ es Monads sometimes called triples have b een considered in Category Theory CT relatively late only in the late fties Monads and comonads the dual of monads are closely related to adjunctions probably the most p ervasive no tion in CT The connection b etween monads
    [Show full text]
  • Handout 5 – the Semantics of Predicate Logic LX 502 – Semantics I October 17, 2008
    Handout 5 – The Semantics of Predicate Logic LX 502 – Semantics I October 17, 2008 1. The Interpretation Function This handout is a continuation of the previous handout and deals exclusively with the semantics of Predicate Logic. When you feel comfortable with the syntax of Predicate Logic, I urge you to read these notes carefully. The business of semantics, as I have stated in class, is to determine the truth-conditions of a proposition and, in so doing, describe the models in which a proposition is true (and those in which it is false). Although we’ve extended our logical language, our goal remains the same. By adopting a more sophisticated logical language with a lexicon that includes elements below the sentence-level, we now need a more sophisticated semantics, one that derives the meaning of the proposition from the meaning of its constituent individuals, predicates, and variables. But the essentials are still the same. Propositions correspond to states of affairs in the outside world (Correspondence Theory of Truth). For example, the proposition in (1) is true if and only if it correctly describes a state of affairs in the outside world in which the object corresponding to the name Aristotle has the property of being a man. (1) MAN(a) Aristotle is a man The semantics of Predicate Logic does two things. It assigns a meaning to the individuals, predicates, and variables in the syntax. It also systematically determines the meaning of a proposition from the meaning of its constituent parts and the order in which those parts combine (Principle of Compositionality).
    [Show full text]
  • Statement Negation All Do
    9/11/2013 Chapter 3 Introduction to Logic 2012 Pearson Education, Inc. Slide 3-1-1 Chapter 3: Introduction to Logic 3.1 Statements and Quantifiers 3.2 Truth Tables and Equivalent Statements 3.3 The Conditional and Circuits 3.4 More on the Conditional 3.5 Analyzing Arguments with Euler Diagrams 3.6 Analyzing Arguments with Truth Tables 2012 Pearson Education, Inc. Slide 3-1-2 1 9/11/2013 Section 3-1 Statements and Quantifiers 2012 Pearson Education, Inc. Slide 3-1-3 Statements and Qualifiers • Statements • Negations • Symbols • Quantifiers • Sets of Numbers 2012 Pearson Education, Inc. Slide 3-1-4 2 9/11/2013 Statements A statement is defined as a declarative sentence that is either true or false, but not both simultaneously. 2012 Pearson Education, Inc. Slide 3-1-5 Compound Statements A compound statement may be formed by combining two or more statements. The statements making up the compound statement are called the component statements . Various connectives such as and , or , not , and if…then , can be used in forming compound statements. 2012 Pearson Education, Inc. Slide 3-1-6 3 9/11/2013 Example: Compound Statements Decide whether each statement is compound. a) If Amanda said it, then it must be true. b) The gun was made by Smith and Wesson. Solution a) This statement is compound. b) This is not compound since and is part of a manufacturer name and not a logical connective. 2012 Pearson Education, Inc. Slide 3-1-7 Negations The sentence “Max has a valuable card” is a statement; the negation of this statement is “Max does not have a valuable card.” The negation of a true statement is false and the negation of a false statement is true.
    [Show full text]
  • 9 Logical Connectives
    9 Logical Connectives Like its built-in programming language, Coq’s built-in logic is extremely small: universal quantification (forall) and implication ( ) are primitive, but all the other familiar logical connectives—conjunction, disjunction, nega- tion, existential quantification, even equality—can be defined! using just these and Inductive. 9.1 Conjunction The logical conjunction of propositions A and B is represented by the follow- ing inductively defined proposition. Inductive and (A B : Prop) : Prop := conj : A B (and A B). ev Note that, like! the definition! of , this definition is parameterized; however, in this case, the parameters are themselves propositions. The intuition behind this definition is simple: to construct evidence for and A B, we must provide evidence for A and evidence for B. More precisely: 1. conj e1 e2 can be taken as evidence for and A B if e1 is evidence for A and e2 is evidence for B; and 2. this is the only way to give evidence for and A B—that is, if someone gives us evidence for and A B, we know it must have the form conj e1 e2, where e1 is evidence for A and e2 is evidence for B. 9.1.1 EXERCISE [F]: What does the induction principle and_ind look like? Since we’ll be using conjunction a lot, let’s introduce a more familiar- looking infix notation for it. Notation "A ^ B" := (and A B) : type_scope. 9.2 Bi-implication (Iff) 69 (The type_scope annotation tells Coq that this notation will be appearing in propositions, not values.) Besides the elegance of building everything up from a tiny foundation, what’s nice about defining conjunction this way is that we can prove state- ments involving conjunction using the tactics that we already know.
    [Show full text]