- 121 Views
- Uploaded on
- Presentation posted in: General

Chapter 7 Propositional and Predicate Logic

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Chapter 7

Propositional and Predicate Logic

- What is Logic?
- Logical Operators
- Translating between English and Logic
- Truth Tables
- Complex Truth Tables
- Tautology
- Equivalence
- Propositional Logic

- Deduction
- Predicate Calculus
- Quantifiers and
- Properties of logical systems
- Abduction and inductive reasoning
- Modal logic

- Reasoning about the validity of arguments.
- An argument is valid if its conclusions follow logically from its premises – even if the argument doesn’t actually reflect the real world:
- All lemons are blue
- Mary is a lemon
- Therefore, Mary is blue.

- AndΛ
- OrV
- Not¬
- Implies→(if… then…)
- Iff↔(if and only if)

- What is a Logic?
- _ A logic consists of three components:
- 1. Syntax: A language for stating
- propositions/sentences.
- 2. Semantics: A way of determining whether a
- given proposition/sentence is true or false.
- (Model theory)
- 3. Inference system: Rules for
- inferring/deducing theorems from other
- theorems.

- Facts and rules need to be translated into logical notation.
- For example:
- It is Raining and it is Thursday:
- R Λ T
- R means “It is Raining”, T means “it is Thursday”.

- More complex sentences need predicates. E.g.:
- It is raining in New York:
- R(N)
- Could also be written N(R), or even just R.

- It is important to select the correct level of detail for the concepts you want to reason about.

- Tables that show truth values for all possible inputs to a logical operator.
- For example:

- A truth table shows the semantics of a logical operator.

- We can produce truth tables for complex logical expressions, which show the overall value of the expression for all possible combinations of variables:

- The expression A v ¬A is a tautology.
- This means it is always true, regardless of the value of A.
- A is a tautology: this is written
╞ A

- A tautology is true under any interpretation.
- Example: A A
- A V ¬A
- An expression which is false under any interpretation is contradictory.
- Example: A Λ ¬ A

- Two expressions are equivalent if they always have the same logical value under any interpretation:
- A Λ B B Λ A

- Equivalences can be proven by examining truth tables.

- A v A A
- A Λ A A
- A Λ (B Λ C) (A Λ B) Λ C
- A v (B v C) (A v B) v C
- A Λ (B v C) (A Λ B) v (A Λ C)
- A Λ (A v B) A
- A v (A Λ B) A
- A Λ true AA Λ false false
- A v true trueA v false A

- Propositional logic is a logical system.
- It deals with propositions.
- Propositional Calculus is the language we use to reason about propositional logic.
- A sentence in propositional logic is called a well-formed formula (wff).

- The following are wff’s:
- P, Q, R…
- true, false
- (A)
- ¬A
- A Λ B
- A v B
- A → B
- A ↔ B

- The process of deriving a conclusion from a set of assumptions.
- Use a set of rules, such as:
AA → B

B

If A is true, and A implies B is true, then we know B is true.

- (Modus Ponens)
- If we deduce a conclusion C from a set of assumptions, we write:
- {A1, A2, …, An} ├ C

- The first of these, predicate logic, involves using standard forms of logical symbolism which have been familiar to philosophers and mathematicians for many decades.

- Most simple sentences,
- for example, ``Peter is generous'' or ``Jane gives a painting to Sam,''
- can be represented in terms of logical formulae in which a predicate is applied to one or more arguments

- Predicate Calculus extends the syntax of propositional calculus with predicates and quantifiers:
- P(X) – P is a predicate.

- First Order Predicate Calculus (FOPC) allows predicates to apply to objects or terms, but not functions or predicates.

- - For all:
- xP(x) is read “For all x’es, P (x) is true”.

- - There Exists:
- x P(x) is read “there exists an x such that P(x) is true”.

- Relationship between the quantifiers:
- xP(x) ¬(x)¬P(x)
- “If There exists an x for which P holds, then it is not true that for all x P does not hold”.

- There are times when, rather than claim that something is true about all things, we only want to claim that it is true about at least one thing.
- For example, we might want to make the claim that "some politicians are honest," but we would probably not want to claim this universally.

- A way that mathematicians often phrase this is "there exists a politician who is honest."
- Our abbreviation for "there exists" is " ", which is called the existential quantifier because it claims the existence of something.
- If we use P for the predicate "is a politician" and H for the predicate "is honest," we can write "some politicians are honest" as:
- x[Px Hx].

- Soundness: Is every theorem valid?
- Completeness: Is every tautology a theorem?
- Decidability: Does an algorithm exist that will determine if a wff is valid?
- Monotonicity: Can a valid logical proof be made invalid by adding additional premises or assumptions?

- Abduction:
BA → B

A

- Not logically valid, BUT can still be useful.
- In fact, it models the way humans reason all the time:
- Every non-flying bird I’ve seen before has been a penguin; hence that non-flying bird must be a penguin.

- Not valid reasoning, but likely to work in many situations.

- Inductive Reasoning enable us to make predictions based on what has happened in the past.
- Example: “The Sun came up yesterday and the day before, and everyday I know before that, so it will come up again tomorrow.”

- Broadly speaking there are 3 kinds of reasoning:
- deductive – Based on the use of modus ponens and other deductive rules and reasoning.
- abductive – Based on common fallacy.
- inductive – Based on history (what has happened in the past)

- A deductive argument consists of n premisses and a conclusion.
- If the argument is valid, then if the premisses are true the conclusion must be true:
- Premiss 1: If it's raining then the streets are wet Premiss 2: It's raining ----------------- Therefore the streets are wet

- All horses have brains Herman is a horse -------------- Therefore Herman has a brain

- The following are invalid:
- If it's raining then the streets are wet The streets are wet --------------- Therefore it's raining
- All horses have brains Herman has a brain --------------- Therefore Herman is a horse

- The following two arguments are invalid:
- If it's raining then the streets are wet The streets are wet -------------- Therefore it's raining
- All horses have brains Herman has a brain -------------- Therefore Herman is a horse

- An argument can have any number of premisses:
- If p then q If q then r If r then s If s then t p -------
- Therefore t

- Abduction is "reasoning backwards". We start with some facts and reason back to a hypothesis. E.g.
- If someone has measles they have spots and a sore throat Jimmy has spots and a sore throat ------------------------ Therefore Jimmy has measles
- This isn't formally valid, of course. In fact it is a famous fallacy, called "confirming the consequent".

- If it's raining then the streets are wet The streets are wet -------------- Therefore it's raining
- Nevertheless this does seem to be how doctors work.
- They use abduction to generate hypotheses, which they then test (for instance, by doing a blood test).

- Inductive reasoning is reasoning from particular cases or facts to a general conclusion:
- raven 1 is black raven 2 is black . . raven n is black ----------- Therefore all ravens are black

- horse 1 has a brain horse 2 has a brain . . horse n has a brain ------------- Therefore all horses have brains
- These go from SOME to ALL:
- All observed (i.e. some) Xs have property P ------------------------------- Therefore all Xs have P

- This isn't formally valid.
- The conclusion does not formally follow from the observed facts.
- At one time people believed that all observed swans are white, therefore all swans are white.
- This is false, of course, because there are black swans in Western Australia!

- Modal logic is a higher order logic.
- Allows us to reason about certainties, and possible worlds.
- If a statement A is contingent then we say that A is possibly true, which is written:
◊A

- If A is non-contingent, then it is necessarily true, which is written:
A

- The following rules are examples of the axioms that can be used to reason in modus logic:
- A ◊A
- ¬A ¬◊A
- ◊A ¬A
- We cannot draw truth tables to prove them; however, you can reason by your understanding of the meaning of the operators.

- Draw a truth table for the following expressions:
- 1. ¬AΛ(AVB)Λ(BVC)
- 2. ¬AΛ(AVB)Λ(BVC)Λ¬D