AI Principles, Semester 2, Week 2, Lecture 4 Introduction to Logic Thinking, reasoning and deductive logic Validity of arguments, Soundness of arguments Formal systems Axioms, Inference, and Proof Propositional Logic and Predicate Logic are formal systems Semantics 1
Review of logic from last semester What did you learn about logic in last semesters lectures, (or know from elsewhere)? 2
Different kinds of movement of thought (from Guttenplan 1986, chapter 1) Three descriptions of an episode of thinking. One could characterise them as movements of thought. The subject in each case has one, and then other thoughts, which together form a series through which there is a kind of motion. Logic could be seen as containing laws of this sort of motion. Not all movements of thought of thought are the concern of logic 3
How do thoughts differ? (from Guttenplan 1986, chapter 1) Example 1: Brown is sitting at his desk gazing out of the window. He notices that the buds are just beginning to open on the trees. This reminds him of the unusually warm weather which was experienced last year at this time. That thought prompts the further thought that he must have his central heating boiler seen to as soon as possible. 4
How do thoughts differ? (from Guttenplan 1986, chapter 1) Example 2: Smith finds that her car won t start. She remembers that when Jones s car failed to start, it was because the distributor was wet. She also recalls reading that distributor problems are common in the sort of car she has. She is aware of how damp it is today. She concludes, therefore, that a wet distributor is the cause of the trouble. 5
How do thoughts differ? (from Guttenplan 1986, chapter 1) Example 3: Green is planning his summer holiday. He knows that he can go by aeroplane or car. If he goes by aeroplane, he will get there faster, but will be unable to take much luggage. If he goes by car, he can take much more. He recognises that the success of his holiday depends on his having the right sort of clothing for the unpredictable weather. He could not take the needed clothing on the aeroplane. He concludes that if the holiday is to be successful, he will have to go by car. 6
Questions to ponder about the three descriptions of thought What is the difference between Brown s thoughts, and the other two kinds of thoughts? Which thoughts might be described as making arguments? How do Smith and Green s thoughts differ? Which of these three kinds of thought shows reasoning? Which of these kinds of thought shows deductive reasoning? 7
Describing the three styles of thought Brown s thoughts. We might describe Brown s thoughts as associative thinking or thought by spreading activation. Patterns in his perceptual stimuli gives rise to a chain of thoughts which activate further thoughts. This kind of pattern recognition is not usually studied as part of logic reasoning, but may be studied with other AI representations, such as Semantic Networks or Artificial Neural Networks. Smith s thoughts. We might describe Smith s thoughts as a form of inductive reasoning. Smith relies upon past events and consideration of probabilities to inform her decisions. This kind of thought is termed inductive logic. Green s thoughts. Green s thoughts might be described as using deductive reasoning. In the description of Green s thought has Ifthen statements and facts, and makes conclusions after reasoning about these conditional statements and facts. 8
Inductive and deductive reasoning both share the concept of truth and falsity that may not be shared by other types of thinking. Inductive reasoning is going from true statements to true statements but it is a shaky process Deductive reasoning assumes the premises to true. Then if the premises are true the conclusions have to be true. There is nothing shaky about the transition. For deductive reasoning we can see that the process of going from premise to conclusions is independent of the truth of any assumptions. Arguments have premises and conclusions that may be true or false. When reasoning is deductive there is only one case that can be ruled out: that is when the premises for the argument are all true and the conclusion is false. 9
Valid and invalid deductive arguments Validity = An argument is VALID if and only if it is necessary that if all it premises are true, its conclusion is true The intuitive idea captured by this definition is this: If it is possible for the conclusion of an argument to be false when its premises are all true, then the argument is not reliable (that is, it is invalid) If true premises guarantee a true conclusion then the argument is valid. Alternatively, an argument is VALID if and only if it is impossible for all the premises to be true while the conclusion is false. When an argument is valid its premises ENTAIL its conclusion. 10
Examples of deductive arguments? The sun has shone every day for thousands of years, therefore the sun will shine tomorrow The sun is using up fuel which has a finite supply, therefore one day the sun will no longer shine If he is Napolean Bonaparte, then he is the Emperor of France He believes he is Napolean Bonaparte, therefore he believes he is Emperor of France (modal logic for reasoning about beliefs in 4 th logic lecture) 11
Sound arguments An argument is SOUND if and only if it is valid and all its premises are true. All sound arguments have true conclusions. An argument may be unsound in two ways: if it is invalid, or it has one or more false premises. 12
More on validity and soundness of arguments Why are the concepts of validity and soundness important in automated reasoning? If you have a reasoning system where all the arguments it produces are valid, how can you ensure that they are also sound? 13
Representing arguments in formal systems Logical deductive arguments have been represented in natural language since the time of Classical Greek philosophers. However, what drawbacks are there in using natural language to automate reasoning? 14
Representing arguments in formal systems Logical deductive arguments have been represented in natural language since the time of Classical Greek philosophers. However, what drawbacks are there in using natural language to automate reasoning? Natural language is ambigous, the automated processing of natural language is a difficult challenge in its own right. An answer is to represent argument and reasoning within formal systems 15
Formal Systems Formal systems in mathematics possess a number of elements: 1. A finite set of symbols 2. A grammar (syntax), that is a way of constructing well-formed formulae (wff) out of the symbols. (There should exist a decision procedure that can always tell whether a formulae is a wff) 3. A set of axioms 4. A set of inference rules 5. A set of theorems. This set includes all the axioms, plus all wffs which can be derived from previous-derived theorems by means of rules of inference. (There may not exist a decision procedure for deciding whether a wff is a theorem or not) *a formal system does not require any axioms to start with 16
The MU Puzzle In the MU puzzle, what were the: 1. set of symbols 2. grammar, 3. set of axioms 4. set of inference rules 5. set of theorems. 17
Definition of Proof within a formal system A sequence of wffs [ω 1, ω 2,...ω n is called a proof (or a deduction) of ω n from a set of wffs iff each ω i in the sequence is either in or can be inferred from a wff (or wffs) earlier in the sequence by using one of the rules of inference. If there is a proof of ω n from, we say that ω n is a theorem of the set ω n (ω n can be proved from ) R ω n (ω n can be proved from using the inference rules in R) (Nilsson page 221) 18
Definition of Proof within a formal system and linking inference with entailment A proof in a formal system is a sequence of well formed formulas leading from the initial set of well formed formulae to the new well formed formulae that is the subject of the proof 19
Propositional Logic and Predicate Logic are formal systems Both Propositional Logic and Predicate Logic are types of formal system, and we will spend the next few lectures learning how to form and use expressions in these logics. In the final lecture we will take a brief look at how to automate reasoning in Propositional Logic, and look at some other logics, which include Modal Logic, Temporal Logic, and Fuzzy Logic. What all these different logics possess in addition to syntax and rules of inference is semantics 20
Semantics Semantics has to do with associating elements of a logical language with aspects of the real world. In propositional logic, logical atoms are associated with propositions about the world. An association of atoms with propositions is called an interpretation. (Russel and Norvig page 203, Nilsson page 222) 21
Sentences Entails Sentences Semantics Representation World Semantics Aspect of the real world Follows Aspect of the real world 22
Conclusion Different kinds of thought and reasoning Whats it got to do with the MU puzzle Propositional Logic and Predicate Logic are formal systems Semantics 23