Automated Reasoning in Modal, Tense and Temporal Logics � Rajeev Gor´ c e Logic and Computation Group School of Computer Sciences Australian National University http://cecs.anu.edu.au/~rpg Rajeev.Gore@anu.edu.au March 7, 2011 Version 1 1 / 90
Contents Lecture 1: Modal logic and Tableaux Lecture 2: Description Logic with Converse and Tableaux Lecture 3: Complexity-optimal Tableaux Using and-or Graphs Lecture 4: Propositional Branching Temporal Logic 2 / 90
Lecture 1: Modal logic and modal tableaux 3 / 90
Syntax: atomic formulae, connectives and formulae Atomic Formulae: p 0 , p 1 , p 2 , p 3 , · · · meta-variables p , q , r Connectives: ¬ , ∧ , ∨ , → , [], �� Formulae: every atomic formula p is a formula Formulae: if ϕ and ψ are formulae then so are each of ϕ ∧ ψ , ϕ ∨ ψ , ϕ → ψ , [] ϕ , �� ϕ meta-variables ϕ , ψ Example: []( p 1 → p 2 ) → ([] p 1 → [] p 1 ) Example: [] p 4 → [][] p 2 Example: �� ( p 2 ∧ p 3 ) → ( �� p 2 ∧ �� p 3 ) 4 / 90
Semantics: worlds, accessibility relation, valuation Kripke frame: is a pair � W , R � where W is a non-empty set (of point/worlds/states) R ⊆ W × W is a binary (accessibility) relation over W Kripke model: is a triple � W , R , ϑ � where � W , R � is a Kripke frame ϑ : W × Atoms �→ { t , f } is a valuation mapping each world w and each atomic formula p to t or else to f Forcing: between worlds and formulae w � p if ϑ ( w , p ) = t p is true at w w � ¬ ϕ if ϑ ( w , ϕ ) = f ϕ is false at w w � ϕ ∧ ψ if ϑ ( w , ϕ ) = t and ϑ ( w , ψ ) = t w � ϕ ∨ ψ if ϑ ( w , ϕ ) = t or ϑ ( w , ψ ) = t w � ϕ → ψ if ϑ ( w , ϕ ) = f or ϑ ( w , ψ ) = t w � �� ϕ if ∃ v ∈ W . R ( w , v ) & ϑ ( v , ϕ ) = t i.e. some R -successor makes ϕ true w � [] ϕ if ∀ v ∈ W . R ( w , v ) ⇒ ϑ ( v , ϕ ) = t i.e. every R -successor makes ϕ true 5 / 90
Example W is the set of all students in this room R ( w , v ) holds if v ∈ W is one row in front of w ∈ W ϑ ( w , p 1 ) = t if student w has a brother ϑ ( w , p 2 ) = t if student w has a sister 6 / 90
Semantics of Logical Consequence Γ | = ϕ M is a Kripke model � W , R , ϑ � Γ is a finite set of formulae ϕ is a given formula M � ϕ if ∀ w ∈ W . w � ϕ ϕ is true everywhere in M M � Γ if ∀ ψ ∈ Γ . M � ψ every ψ in Γ is true everywhere in M Γ | = ϕ if ∀ M = � W , R , ϑ � . M � Γ ⇒ M � ϕ if Γ is true everywhere in M then ϕ is true everywhere in M ϕ is valid: if ∅ | = ϕ ϕ is true everywhere in all models ϕ is satisfiable: if ϕ is true in some world in some model Lemma: ϕ is valid iff ¬ ϕ is not satisfiable ϕ is satisfiable wrt Γ: if ϕ is true in some world in some model that forces Γ Lemma: Γ | = ϕ iff ¬ ϕ is not satisfiable wrt Γ 7 / 90
Negation Normal Form nnf: a formula ϕ is in negation normal form if the symbol ¬ appears only directly before atomic formulae Lemma: For every ϕ , there exists a formula nnf ( ϕ ) in negation normal form such that the length of nnf ( ϕ ) is only polynomially longer than that of ϕ , and ϕ ↔ nnf ( ϕ ) is valid Proof: Repeatedly distribute negation over subformulae using the following valid principles: | = ¬¬ ϕ ↔ ϕ | = ( ϕ 1 → ψ 1 ) ↔ ( ¬ ϕ 1 ∨ ψ 1 ) | = ¬ ( ϕ 1 → ψ 1 ) ↔ ( ϕ 1 ∧ ¬ ψ 1 ) | = ¬ ( ϕ ∧ ψ ) ↔ ( ¬ ϕ ∨ ¬ ψ ) | = ¬ ( ϕ ∨ ψ ) ↔ ( ¬ ϕ ∧ ¬ ψ ) | = ¬�� ϕ ↔ [] ¬ ϕ | = ¬ [] ϕ ↔ ��¬ ϕ Beware: if ↔ is a primitive connective then this blows up! 8 / 90
Examples of negation normal form | = ¬¬ ϕ ↔ ϕ | = ( ϕ 1 → ψ 1 ) ↔ ( ¬ ϕ 1 ∨ ψ 1 ) | = ¬ ( ϕ 1 → ψ 1 ) ↔ ( ϕ 1 ∧ ¬ ψ 1 ) | = ¬ ( ϕ ∧ ψ ) ↔ ( ¬ ϕ ∨ ¬ ψ ) | = ¬ ( ϕ ∨ ψ ) ↔ ( ¬ ϕ ∧ ¬ ψ ) | = ¬�� ϕ ↔ [] ¬ ϕ | = ¬ [] ϕ ↔ ��¬ ϕ Example: ¬ ([]( p 0 → p 1 ) → ([] p 0 → [] p 1 )) []( p 0 → p 1 ) ∧ ¬ ([] p 0 → [] p 1 ) []( p 0 → p 1 ) ∧ ([] p 0 ∧ ¬ [] p 1 ) []( ¬ p 0 ∨ p 1 ) ∧ ([] p 0 ∧ ��¬ p 1 ) Example: ¬ ([] p 0 → [][] p 0 ) ¬ ([] p 0 → p 0 ) ([] p 0 ) ∧ ( ¬ [][] p 0 ) ([] p 0 ) ∧ ( ¬ p 0 ) ([] p 0 ) ∧ ( ��¬ [] p 0 ) ([] p 0 ) ∧ ( ����¬ p 0 ) 9 / 90
Modal Tableaux as Or-trees Γ is a given finite set of global assumption formulae X , Y , Z are finite possibly empty sets of formulae ϕ ; X stands for a partition of the non-empty set { ϕ } ∪ X Z is saturated: if it contains no top level ∧ , ∨ , [] formulae Rules (id) p ; ¬ p ; X ( ∧ ) ϕ ∧ ψ ; X ( ∨ ) ϕ ∨ ψ ; X ϕ ; ψ ; X ϕ ; X | ψ ; X (K) �� ϕ ; [] X ; Z Z is saturated Γ; ϕ ; X A K-tableau for Y given global assumptions Γ is an inverted (or) tree of nodes with: 1. a root node nnf (Γ; Y ) 2. and such that all children nodes are obtained from their parent node by instantiating a rule of inference A K -tableau is closed if all leaves are (id), else it is open. 10 / 90
Examples of K -Tableau With Γ = ∅ (id) p ; ¬ p ; X ( ∧ ) ϕ ∧ ψ ; X ( ∨ ) ϕ ∨ ψ ; X ϕ ; ψ ; X ϕ ; X | ψ ; X (K) �� ϕ ; [] X ; Z Z is saturated Γ; ϕ ; X There is a closed K -tableau for ¬ ([]( p 0 → p 1 ) → ([] p 0 → [] p 1 )) 11 / 90
Examples of K -Tableau With Γ = ∅ (id) p ; ¬ p ; X ( ∧ ) ϕ ∧ ψ ; X ( ∨ ) ϕ ∨ ψ ; X ϕ ; X | ψ ; X ϕ ; ψ ; X (K) �� ϕ ; [] X ; Z Z is saturated Γ; ϕ ; X There is no closed K -tableau for ¬ ([] p 0 → p 0 ) There is no closed K -tableau for ¬ ([] p 0 → [][] p 0 ) How can we be sure, we only looked at one K -tableau for each ? 12 / 90
Examples (K) �� ϕ ; [] X ; Z Z is saturated Γ; ϕ ; X How many different K -tableaux for �� p 1 ; �� p 2 ; ��¬ p 1 ; [] p 1 ; [] ¬ p 3 ? 13 / 90
� � Loops! The tableau for Γ = {�� p } and ϕ := q loops! �� p ; q R p ; �� p p ; �� p Solution: check whether new node exists already on the current branch 14 / 90
Soundness (id) p ; ¬ p ; X ( ∧ ) ϕ ∧ ψ ; X ( ∨ ) ϕ ∨ ψ ; X (K) �� ϕ ; [] X ; Z Z is ϕ ; ψ ; X ϕ ; X | ψ ; X Γ; ϕ ; X saturated Theorem: If there is a closed K -tableau for Γ ∪{¬ ϕ 0 } then Γ | = ϕ 0 . Proof: For each rule we prove that if the premiss is K -satisfiable then so is at least one conclusion. ( id ): if p ; ¬ p ; X is satisfiable then ... ( ∨ ): if X ; ϕ ∨ ψ is K -satisfiable then so is X ; ϕ or X ; ψ ( ∧ ): if X ; ϕ ∧ ψ is K -satisfiable then so is X ; ϕ ; ψ ( K ): if �� ϕ ; [] X ; Z is K -satisfiable then so is ϕ ; X Each branch n 0 , n 1 , · · · , n k of nodes has n 0 = Γ ∪ {¬ ϕ 0 } and n k = { p , ¬ p } ∪ X for some set X and some atomic formula p . So, if n 0 is K -satisfiable then n 1 is K -satisfiable ... then p ; ¬ p ; X is K -satisfiable. Contradiction. This applies to every branch. So Γ ∪ {¬ ϕ 0 } is not K -satisfiable i.e. ∀ M . M � Γ ⇒ M � ϕ 0 15 / 90
Completeness Theorem: If Γ | = ϕ 0 then there is a closed K -tableau for Γ ∪{¬ ϕ 0 } . Proof: We prove the contra-positive: if there is no closed K -tableau for Γ ∪ {¬ ϕ 0 } then Γ �| = ϕ 0 . Assume: that every K -tableau for Γ ∪ {¬ ϕ 0 } is open Show: that Γ ∪ {¬ ϕ 0 } is K -satisfiable i.e. ∃ M = � W , R , ϑ � . ∃ w ∈ W . M � Γ& w � ¬ ϕ 0 16 / 90
Complexity and Optimisations 2 exptime : we can explore the same node on multiple branches Optimisations: practical implementations use many optimisations 17 / 90
Lecture 2: Description Logic with Inverse Roles 18 / 90
Syntax: concepts and roles Concept Names: A , B ::= a 0 | a 1 | a 2 | · · · Role Names: R , S ::= r 0 | r 1 | r 2 | · · · Concepts: C , D ::= ⊤ | ⊥ | A | ¬ C | C ⊓ D | C ⊔ D | ∀ R . C | ∃ R . C TBox: finite set of “axioms” of the form C ⊑ D or C = D . NNF: later assume that all formulae are in Negation Normal Form 19 / 90
Semantics of Description Logics Interpretation: I = � ∆ I , · I � consists of a non-empty (domain) set ∆ I and an interpretation function · I that maps every concept name A to a subset A I of ∆ I and maps every role name R to a binary relation R I on ∆ I Interpretation: of complex concepts is as follows ⊤ I ∆ I = ⊥ I ∅ = ∆ I \ C I ( ¬ C ) I = C I ∩ D I ( C ⊓ D ) I = C I ∪ D I ( C ⊔ D ) I = Intuition:: we have classical propositional logic at least 20 / 90
� � � � Semantics of Description Logics Interpretation: I = � ∆ I , · I � consists of a non-empty (domain) set ∆ I and an interpretation function · I that maps every concept name A to a subset A I of ∆ I and maps every role name R to a binary relation R I on ∆ I Interpretation: of complex concepts is as follows x ∈ ∆ I | ∀ y ( x , y ) ∈ R I implies y ∈ C I �� ( ∀ R . C ) I � � = x ∈ ∆ I | ∃ y ( x , y ) ∈ R I and y ∈ C I �� ( ∃ R . C ) I � � = ∀ R . C ∃ R . C � � R I S I � S I � R I � ������ � ������ � � � R I R I � � � � � C C C 21 / 90
Recommend
More recommend