1 / 14

Logic Logic in general is a subfield of philosophy and its development is

Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In symbolic logic rules and procedures are used to draw conclusions using various logical techniques. Logical Process (using logic to

veda-miles
Download Presentation

Logic Logic in general is a subfield of philosophy and its development is

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In symbolic logic rules and procedures are used to draw conclusions using various logical techniques.

  2. Logical Process (using logic to Reason) Inferences OR Conclusions Premises Or Facts The general form of a logical process Inference is a process that is used to derive new facts from the ones that are known.

  3. Logic A system of computing Not differential or integral calculus Propositional Logic A^B <-> C First Order Logic (Predicate Logic or Predicate Calculus) \/ x (ODD(x)→EVEN(add(x,1))) Higher order Logics \/ P (P(x)) \/ f (P(f(x)))

  4. Propositional Logic and Automated Reasoning A proposition is a declaration: New Zealand is beautiful. The sun is made of chocolate. Symbols like A,B,C,… are used to denote propositions. These are called atoms. A: Today is Monday. B: It is raining now. Not A: Today is not Monday. Not B: It is not raining now. A proposition can either be true or false but not both. This is called its truth value and it is assigned not inherent to the proposition.

  5. A Formula A formula is built with atoms, parantheses and the following five logical operators: Negation ~ not Conjunction /\ and Disjunction \/ or Implication -> if…then Double implication <-> if and only if Example formulae Order of precedence ~ /\ \/ -> <-> (((~A)/\B) -> (C\/D)) ≡ ~A /\ B -> C \/ D A (~A) (( B \/ C) /\ ~D ) ((( A -> B) /\ C) /\ D)

  6. A Recursive Definition of Formulae in Propositional Logic An atom is a formula. If F is a formula then ~F is a formula. If F and G are formlae then F /\ G F \/ G F -> G F <-> G Are formulae. There are no formulae other than these just defined

  7. Interpretation of Formulae An interpretation of a formula F is an assignment of truth values to every atom. A formula having n atoms has 2^n interpretations (a table with 2^n rows). Formulae have truth values. Truth value of a formula can be obtained from its atoms and logical operators. B C D (B\/C) (~C) ((B\/C)/\~C) (((B\/C)/\~C)\/D) true true true true false false true true true false true false false false true false true true true true true true false false true true true true false true true true false false true false true false true false false false false false true false true false true false false false false true false false

  8. A formula is a tautology (or a valid formula) if and only if it is true under all interpretations. B \/ ~B A formula is an inconsistency if and only if it is false under all interpretations. A formula is a tautology if and only if its negation is an inconsistency (or unsatisfiable formula). (~B /\ B) A formula is consistent (or satisfiable) if it is not inconsistent. In other words, a formula is consistent if it is true under at least one interpretation. If a formula is a tautology it is consistent but the converse may not hold. A formula F is equivalent to formula G if and only if the truth value of F is equivalent to the truth value of G under all interpretations.

  9. A Proof Formula G is said to be the logical consequence of formulae F1, F2,…, Fn if and only if every interpretation that satisfies (F1/\F2/\…/\Fn) also satisfies G. We may also say, F1, F2,…,Fn imply G. G is called the Goal and the Fi are called the premisses. To demonstrate that G is a logical consequence of the Fs is to prove that ((F1/\F2/\…/\Fn) -> G) is a theorem. The demonstartion is the proof. The formulae we will work on will be the ones that are consistent.

  10. A proof may be a direct proof a refutation proof Direct method: ((F1/\F2/\…/\Fn) -> G) is a tautology. Refutation method: ~((F1/\F2/\…/\Fn) -> G) is an inconsistency. Since the negation of a tautology is an inconsistency these are equivalent. ~((F1/\F2/\…/\Fn) -> G) ≡ ~(~(F1/\F2/\…/\Fn) \/ G ) ≡((F1/\F2/\…/\Fn) /\ ~G)

  11. Example Prove by both methods that G is a logical consequence of F and F-> G We need 4 rows because we have 2 atoms. F G ~G F->GF/\(F->G)(F/\(F -> G)) ->G(F/\(F -> G)) /\ ~G true true false true true true false true false true false false true false false true false true false true false false false true true false true false This is known as modus ponens. This shows that there exists a finite procedure in propositional logic to decide whether a given goal is a theorem or not. Propositional logic is thus decidable.

  12. As the number of atoms (n) increases the number of rows in the table increases exponentially which makes the use of truth table for proving theorems impractical. There are other methods that may be used. Rules of inference What we proved using the table (modus ponens) is called a rule of inference and is written as, if F and (F-> G) then G A rule of inference applied to a set of premises produces a formula. In the case of modus ponens above we can say that G is deduced from F and F-> G by modus ponens. There are other rules of inference and these rules are used in a theorem proving method called the natural deduction.

  13. Natural Deduction A rule of inference is applied to a set of given premises to deduce the Logical consequence formula which is added to the set of premises. New formulae is deduced and added to a set by applying various rules of inference until we deduce a formula that is identical to the goal or we can no longer deduce new formulae. One of these cases occurs in finite time. Natural deduction is a direct method. Using this method of Proof we may produce formulae that are not useful in reaching the goal. This is not a computationally desirable method There is a refutation proof method called the resolution principle which Uses one rule of inference called the resolution which is effective enough to make other rules secondary. We will look at this rule and its theorem proving procedure.

  14. Example Proving D Given • A • B • A/\C -> D • B->C • C modus ponens on 2 and 4 • A/\C introducing conjunction on 1 and 5 • D modus ponens on 3 and 6 • The goal has been deduce as a logical consequence of the premises. • The goal has been proved to be a theorem.

More Related