Introduction to Formal Logic Syntax

Introduction to Formal Logic Syntax

Introduction to Formal Logic Syntax Greg O’Keefe 15th January 2007 This handout gives a summary and example exercises for the technical content of the first part of the course: syntax of PL and QL, and translation between English and these formal languages. This little note is not a substitute for the relevant sections of course text Logic by Paul Tomassi [Tom99]. This is just to emphasise the main points, and give a written form of my examples and explanations from the lectures. The first section outlines the syntax of propositional logic PL. The second discusses formal syntax more generally, and the third section introduces the syntax of quantified logic QL. 1 PL and Compound Statements in English Some English statements are made up of smaller English statements joined by words or phrases such as “and,” “or,” “if ... then ...” and “It is not the case that ...”. Sometimes the same logical structure is expressed less directly. For example, we would say “My car is not red” rather than “It is not the case that my car is red” and we might say “I have one but she has three” rather than “I have one and she has three.” The language of PL models the structure of these compound statements. The connectives of PL and their intuitive meaning are shown in Table 1. A & BA and B A ∨ BA or B A → B If A then B A ↔ BA if and only if B ∼A It is not the case that A Table 1: Connectives of PL Note that A and B here are not sentence letters, but metalinguistic variables which stand for complete PL formulae. To translate some English statements into PL, we first identify the smallest com- plete statements within the text, we assign statement letters P , Q, R, ... to these state- ments, then use the PL connectives to build the same structure as the English. Often 1 the smallest complete statements are not explicit in the text, because they inherit some information from their context. In these cases, we must paraphrase to make the sub- statements explicit. Consider the following example. If you go to university and do not study logic, then you are either foolish or ignorant. “You are either foolish or ignorant” is one sub-statement here connected by an “if ... then ...”, but we should be able to decompose it further. We paraphrase it (preserving the meaning) to “You are foolish or you are ignorant” and now we have two complete statements connected by an “or”. We therefore see that a translation into PL is as shown in Table 2. Key: U = You go to university. L = You study logic. F = You are foolish. I = You are ignorant. Formula: (U & ∼L) → (F ∨ I) Table 2: PL translation example Notice that we use letters which suggest the English sentences they stand for. This helps to make the formula readable. As with computer programming, the readabil- ity of the code or formula can be as important as its formal correctness in practical applications. 2 Formal Syntax in General Syntax is just another word for grammar. Grammar describes the rules for making sentences, but grammars for natural languages such as English are debatable and vague. The syntax for a formal language is perfectly precise what the formulae are, and what their structure is. Definition of a formal language begins with a collection of symbols. For PL it is the statement letters P, Q, R, S, ... the connectives & , ∨ , →, ↔ and ∼, and the brackets ( and ). Notice that each formula P → (Q ∨ R), (Q & ∼Q) ∨ S, . , is a string, that is, a list of these symbols, but not every string of these symbols is a formula: )& P QR, ∼QR∨, . That is, the formulae of a language are a subset of the strings of the languages symbols. The formulae are defined by a collection of formation rules. Usually there will be base rules, which say that certain strings are formulae, and recursive rules which make new formulae out of existing ones. For example, in PL, the base rule says that the 2 sentence letters P, Q, R, S, ... are formulae. Each connective has a recursive rule, so that for example, if A and B are formulae, then so is A & B. In fact, the language of PL is very similar to the expressions of ordinary arithmetic. In arithmetic, we have atomic expressions, the numerals, we have a unary connective, -, and we have several binary connectives, + × . (The - symbol is both a unary and binary connective, but we can determine which is intended from the context.) The formula (P & Q) ∨ (∼P ∨ ∼Q) has the same structure as (3 × 5) + (−3 + −5) . When we look at a formula, we can see which rules have been used to form it. This is the same as seeing what order to perform the operations to evaluate the expression. This structure is sometimes represented as a syntax tree. The structure of the formula determines how its meaning is built up from that of its basic elements, and determines which rules apply to it when doing deduction or semantic analysis. Do not panic about this. If you are able to evaluate the arithtmetic expression above, then you already have an intuitive understanding of the structure of the PL formula. The main connective is the symbol introduced in the last step of formation, or equivalently, the connective that you would evaluate last. In the formula above, the ∨ between the ) and the ( is the main connective. The scope of a connective is that connective and the formulae it connects. So, for example, the scope of the other ∨ (not the main connective) in the above formula is (∼P ∨ ∼Q). 3 QL and the Analysis of English Statements In PL, the simplest formulae are the statement letters, which stand for complete English statements. It is often necessary to analyse these sentences to show that an argument is valid. For example, in class, we discussed the argument in Figure 1. The drums are louder than the bass. The guitar is louder than the drums. Therefore, the guitar is louder than the bass. Figure 1: An example argument We agreed that the argument was valid, however, if we translate it into the lan- guage of PL, we obtain the sequent P, Q : R, which is clearly not valid, because P = true, Q = true, R = false is a counter-example. The validity of the English argument lies in details overlooked by PL. The language of QL allows us to exhibit the internal structure of sentences in terms of what individuals we are talking about, and what properties or relations are being asserted about them. A domain specific vocabulary, or key, for PL consists of assigning a sentence letter to each of the smallest complete sentences in the text we are translating. With QL, a key consists of three things: 3 • the domain - a description of the collection of individuals being discussed • name letters from a, b, c, ..., each assigned to an individual from the domain • Property and Relation letters P, Q, R, ..., each assigned to a property or relation used in the text Thus, we begin a translation into QL by identifying the kind of individuals be- ing talked about, the particular individuals named in the text, and the properties and relationships being asserted about them. In this example, the domain is the musical instraments in a band. The named individuals are the drums, the bass and the guitar. The only property or relation used is the relation “... is louder than ...” This is a two- place relation, or in other words, it is a statement with two holes in it, where names must be inserted. Each property and relation letter has a fixed arity, that is number of arguments. You must write exactly this number of names after it to make a well formed formula. A key for this translation is shown in Table 2. Domain = musical instruments in a band d = the drums b = the bass g = the guitar Lxy = x is louder than y Figure 2: Key for translation of the band example Given this key, the argument can be represented by the sequent Ldb, Lgd : Lgb. We do not yet have a clear enough notion of the semantics of QL to assess the validity of this sequent. In fact it is not valid until we add further axioms about the relation “... is louder than ...” This is as we should expect. To see this, consider the argument of the same form: Dianne loves Bill; George loves Dianne; Therefore George loves Bill. This one is not valid, because the relation is different. We will study properties of relations later in the course. The “Q” in QL stands for quantification, which means ideas like “some” and “all.” Let’s use an alternative key, as we did above with our “George loves Bill” argument. The domain is people, and L represents ...loves..., and b stands for “Bill.” Then we write “everybody loves Bill” as ∀x[Lxb]. Inside the square brackets, we have an unquantified formula, with a variable (x, y, z, ...) in place of a name. We could re- paraphrase the full formula into English as “For each person, that person loves Bill” or “For each person, who we temporarily name x, x loves Bill”. We can have compound formula inside the square brackets, and the variable can occur more than once. For example, if Gx means “x is a girl,” then we may write “All the girls love Bill” as ∀x[Gx → Lxb]. Translating this back into English, we get the awkward but equivalent statement “For each person, if that person is a girl then she loves Bill.” Formulae like this occur often, because we quite often make statements of the form “every something-or-other is a what-do-you-call-it.” 4 There is also an existential quantifier, which we use to formulate statements about “some” things, or “there exists” a such-and-such.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us