1 / 18

L ogics for D ata and K nowledge R epresentation

L ogics for D ata and K nowledge R epresentation. Propositional Logic. Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese. Outline. Syntax Semantics Entailment and l ogical implication Reasoning Services. 2.

luther
Télécharger la présentation

L ogics for D ata and K nowledge R epresentation

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. Logics for Data and KnowledgeRepresentation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese

  2. Outline • Syntax • Semantics • Entailment and logical implication • Reasoning Services 2

  3. Logical Modeling Language L Theory T Data Knowledge Interpretation Modeling Entailment World Mental Model ⊨ I Realization Domain D Model M Meaning SEMANTIC GAP NOTE: the key point is that in logical modeling we have formal semantics 3

  4. Σ0 Descriptive Logical , , , … Variables they can be substituted by any proposition or formula P, Q, ψ … Constants one proposition only A, B, C … Language (Syntax) SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • The first step in setting up a formal language is to list the symbols of the alphabet • Auxiliary symbols: parentheses: ( ) • Defined symbols: ⊥ (falsehood symbol, false, bottom) ⊥=df P∧¬P T(truth symbol, true, top) T=df ¬⊥

  5. Yes, ψ is correct! PARSER ψ, PL No Formation Rules (FR): well formed formulas SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Well formed formulas (wff) in PL can be described by the following BNF grammar (codifying the rules): <Atomic Formula> ::= A | B | ... | P | Q | ... | ⊥ | ⊤ <wff> ::= <Atomic Formula> | ¬<wff> |<wff> ∧ <wff> | <wff> ∨ <wff> • Atomic formulas are also called atomic propositions • Wff are propositional formulas (or just propositions) • A formula is correct if and only if it is a wff • Σ0 + FR define a propositional language

  6. Propositional Theory SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Propositional (or sentential) theory • A set of propositions • It is a (propositional) knowledge base (true facts) • It corresponds to a TBox (terminology) only, where no meaning is specified yet: it is a syntactic notion

  7. Semantics: formal model SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Intensional interpretation We must make sure to assign the formal meanings out of our intended interpretation to the (symbols of the) language, so that formulas (propositions) really express what we intended. • The mental model: What we have in mind? In our mind (mental model) we have a set of properties that we associate to propositions. We need to make explicit (as much as possible) what we mean. • The formal model This is done by defining a formal model M. Technically: we have to define a pair (M,⊨) for our propositional language • Truth-values In PL a sentence A is true (false) iff A denotes a formal object which satisfies (does not satisfy) the properties of the object in the real world.

  8. Truth-values SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Definition: a truth valuation on a propositional language L is a mapping ν assigning to each formula A of L a truth value ν(A), namely in the domain D = {T, F} • ν(A) = T or F according to the modeler, with A atomic • ν(¬A) = T iff ν(A) = F • ν(A∧B) = T iff ν(A) = T and ν(B) = T • ν(A∨B) = T iff ν(A) = T or ν(B) = T • ν(⊥) = F (since ⊥=df P∧¬P) • ν(⊤) = T (since ⊤=df ¬⊥)

  9. Truth Relation (Satisfaction Relation) SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Let ν be a truth valuation on language L, we define the truth-relation (or satisfaction-relation) ⊨ and write ν⊨ A (read: ν satisfies A) iff ν(A) = True • Given a set of propositions Γ, we define ν ⊨ Γ iff if ν⊨ θ for all formulas θ ∈Γ

  10. Model, Satisfiability, truth and validity SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Let ν be a truth valuation on language L. • ν is a model of a proposition P (set of propositions Γ) iff ν satisfies P (Γ). • P (Γ) is satisfiable if there is some (at least one) truth valuation ν such that ν⊨ P (ν⊨Γ). • Let ν be a truth valuation on language L. • P is true under ν if ν⊨ P • P is valid if ν⊨ P for all ν (notation: ⊨ P). P is called a tautology

  11. Entailment and implication SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • Propositional entailment:  ⊨ψ where  = {θ1, ..., θn} is a finite set of propositions ν⊨θi for all θi in  implies ν⊨ ψ • Entailment can be seen as thelogical implication (θ1 ∧ θ2 ∧ ... ∧ θn) → ψ to be read θ1 ∧ θ2 ∧ ... ∧ θnlogically impliesψ → is a new symbol that we add to the language 11

  12. Implication and equivalence SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • We extend our alphabet of symbols with the following defined logical constants:→ (implication)↔ (double implication or equivalence) <Atomic Formula> ::= A | B | ... | P | Q | ... | ⊥ | ⊤ <wff> ::= <Atomic Formula> | ¬<wff> |<wff>∧ <wff> | <wff>∨ <wff> | <wff> →<wff> | <wff> ↔<wff> (new rules) • Let propositions ψ, θ, and finite set {θ1,...,θn} of propositions be given. We define: • ⊨θ → ψ iff θ⊨ψ • ⊨ (θ1∧...∧θn) → ψ iff {θ1,...,θn} ⊨ψ • ⊨θ ↔ψ iff θ → ψ and ψ → θ 12

  13. Reasoning Services Yes EVAL P , ν No ν SAT P No SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES Model Checking (EVAL) Is a proposition P true under a truth-valuation ν? Check ν⊨ P Satisfiability (SAT) Is there a truth-valuation ν where P is true? find ν such that ν⊨ P Unsatisfiability (UnSAT) the impossibility to find a truth-valuation ν 13

  14. Reasoning Services Yes Γ, ψ, ν ENT Yes VAL No P No SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES Validity (VAL) Is P true according to all possible truth-valuation ν? Check if ν⊨ P for all ν Entailment (ENT) All θ ∈Γ true in ν (in all ν) implies ψ true in ν (in all ν). check Γ⊨ψ in ν (in all ν ) by checking that: given that ν⊨θ for all θ∈Γ implies ν⊨ψ 14

  15. Reasoning Services: properties SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • EVAL is the easiest task. We just test one assignment. • SAT is NP complete. We need to test in the worst case all the assignments. We stop when we find one which is true. • UnSAT is CO-NP. We need to test in the worst case all the assignments. We stop when we find one which is true. • VAL is CO-NP. We need to test all the assignments and verify that they are all true. We stop when we find one which is false. • ENT is CO-NP. It can be computed using VAL (see next slide) 15

  16. Reasoning Services: properties (II) SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • VAL(ψ) iff UnSAT( ψ) • SAT(ψ)   VAL(ψ) iff SAT( ψ)   VAL( ψ) •  ⊨ ψ, where = {θ1, …, θn} iff VAL(θ1 … θn ψ) ψ = (A   A) is valid, while ( A  A) is unsatisfiable ψ = A is satisfiable in all models where ν(A) = T. Informally, the left side says that there is at least an assignment which makes A true and there is at least an assignment which makes A false; the right side says that there is at least an assignment which makes  A true (in other words it makes A false) and there is at least an assignment which makes  A false (in other words it makes A true). This means that not all assignments make A true (false). Take A ⊨ A  B. the formula (A  A  B) is valid. 16

  17. Reasoning Services: properties (III) SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • EVAL is easy. • ENT can be computed using VAL • VAL can be computed using UnSAT • UnSAT is the opposite of SAT • All reasoning tasks can be reduced to SAT!!! SAT is the most important reasoning service. 17

  18. Using DPLL for reasoning tasks SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES • DPLL solves the CNFSAT-problem by searching a truth-assignment that satisfies all clausesθi in the input proposition P = θ1 … θn • Model checking Does ν satisfy P? (ν⊨ P?) Check if ν(P) = true • Satisfiability Is there any ν such that ν⊨ P? Check that DPLL(P) succeeds and returns a ν • Unsatisfiability Is it true that there are no ν satisfying P? Check that DPLL(P) fails • Validity Is P a tautology? (true for all ν) Check that DPLL(P) fails 18

More Related