Modal Logics

Connections

Modal logics are designed to express possibility, necessity, belief, knowledge, temporal progression and other modalities. It is customary to add the operator [] with the interpretation determined by the logic. A second operator 〈〉 is the dual of the first i.e. 〈〉A = ¬[]¬A and []A = ¬〈〉¬A. Figure 1 illustrates some readings of the formulas []A and 〈〉A.
 

Figure 1: Reading of []A and 〈〉A
[] A 〈〉A
Necessity A is necessary. Possibly A is possible.
Belief A is believed.
Knowledge A is known.
Time A is always true. Eventually A is eventually true.

There are modal logics that can be used to express ideas such as:

The concept of necessity can be understood in several different contexts: Propositional modal logics provide some of the expressive power of both first and second order logic and find applications in Temporal logic plays an important role in the specification, derivation, and verification of programs as programs may be viewed as progressing through a sequence of states, a new state after each event in the system.

The key notion in the semantics of modal logic is the notion of possible worlds.

Syntax

 
Figure 2: The Syntax
Symbols and Formulas: 
C = { ⊥, Τ} The propositional constants. 
L = { p0, p1, p2, ...} The propositional letters. 
P in C union L 
F ::= P | ¬F | ∧FF | ∨FF |  FF | []F | <>F {The set of formulas} 
Axioms and Inference Rules: 
    T = The tautologies are the axioms 
    A, A→B 


    B
    The inference rule, A & B are formulas
Additional information on syntax is available.

Semantics - Multiple Worlds (Saul Kripke)

Multiple structures can be used to model modal formulas.
 
Figure 3: Multiple world structure U = (W, A)
A set of relational structures: W = {w | w is a relational structure}
An accessibility relation:  Aa subset of  W×W

 The set of constants in each world is monotonic in the accessibility relation however, the worlds may differ in the atomic formulas that hold for each world. U is a graph whose edges are labeled with literal formulas (the formulas required to be true by the valuation function). A model M = (W, A, w, v) is a Kripke structure. A Kripke structure where |W| = 1 corresponds to traditional logics. A reachability relation that is symmetric (Axy implies Ayx) implies that the graph is nondirectional. A reachability relation that is transitive (Axy and Ayz implies Axz) can be used to model temporal phenomenon. A reachability relation that is reflexive (Axx), symmetric, and transitive, can be used to reason about finite state systems.

The propositional modal logics share with classical propositional logic the finite model property; if a collection of formulas is satisfiable, it is satisfiable in a finite graph.

There are many modal logics. The table that follows illustrates the approach to semantics for modal logics.
 

Figure 4: Model - M |=F 
where M = (U, w, v
M|=⊥ iff v(⊥)  = false
M|=Τ iff v(Τ) = true
M|= p iff v(p) in w
M|= ¬A iff not M |= A
M|= →AB iff M |= ¬A or M |= B
M|= ¬AB iff M |= A and M |= ¬B
M|= []A iff M' |= A for all u such that Awu and M' = (U, u, v)
M |= <>A iff M' |= A for some u such that Awu and M' = (U, u, v)
M|= ∀x.F iff M |= [F]xc for all c in C
M|= ¬∃x.F iff M |= [¬F]xc for some c in C

A formula F is valid (a tautology), |= F, iff for all w in W, M|= F i.e., F is true in all possible worlds.

A formula F is said to be valid ( |=F ) iff it is valid in all models M (M |= F for all M).  A valid formula is called a tautology. Predicate Logic (or Predicate Calculus or First-Order Logic) is a generalization of Propositional Logic. Generalization requires the introduction of variables.

Linear time temporal logic is an example of a logic that uses multiple world semantics. Each time increment is represented by a world. The accessibility relation is reflexive and transitive but not symmetric as we assume that time does not run backwards. For the formula []A, A holds in the current world and in all future worlds and for the formula <>A, A holds in either the current world or some future world.

Program specifications in temporal logic:

Additional temporal operators include Definition Proofs in classical logic concern truth in a single state while proofs in modal logics may involve several states.  Since a formula may refer to a state other than the one in which it appears, once the collection of states has been constructed, the states must be checked to determine that all such references are satisfied.

Tableau rules for modal logic are available.
An implementation for propositional modal logic is available.
An implementation for first-order modal logic is available.

Proof Theory

In classical logic, the idea was to systematically search for a structure agreeing with the starting sentences. The result being that we get such a structure or each possible analysis leads to a contradiction. In modal logic, we try to build a frame agreeing with the sentences or see that all attempts lead to contradictions.

The Accessibility Relation

Gore 1992 has a wonderful list of axioms, a naming scheme
 
Figure : Model operators and the accessibility relation
M|= []A iff M' |= A for all u such that Awu and M' = (U, u, v)
M |= <>A iff M' |= A for some u such that Awu and M' = (U, u, v)
 
Property Axiom Tableau rule
reflexive T:[]A => A  
symmetric B:A => []<>A  
transitive 4:[]A => [][]A  
serial D:[]A => <>A  

 
Temporal logic and the Next time operator
  Formula   Recursive definition
Always A
[]A
= A /\ 0[]A
Eventually A
<>A
= A \/ 0<>A
A Until B
A U B
= B \/ (A /\ 0(A U B))

Models

K(ripke) - minimal modal logic

Axioms
  1. All propositional tautologies
  2. [](p->q) -> ([]p->[]q)
Rules of inference
  1. from p and p->q, infer q.
A theorem prover for K is available.

B - self knowledge and knowledge of falsehoods

reflexive and symmetric

Axioms

  1. All propositional tautologies
  2. []p→p (reflexivity)
  3. [](p→q) → ([]p→[]q)
  4. []p→[][]p (transitivity)
The accessibility relation must be reflexive and transitive.

Rules of inference

  1. from p and p→q, infer q.
  2. from p, infer []p.

D, D4, K, K4, K5, KB

T - knowledge is true belief

reflexive

M

Axioms
  1. All propositional tautologies
  2. []p→p (reflexivity)
  3. [](p→q) → ([]p→[]q)
Rules of inference
  1. from p and p→q, infer q
  2. from p, infer []p

S4 - positive self reflection

reflexive and transitive

Axioms

  1. All propositional tautologies
  2. []p -> p
  3. [](p->q) -> ([]p->[]q)
  4. []p ->[][]p
Rules of Inference
  1. from p and p->q, infer q
  2. from p, infer []p

S5, E - knowledge of non-knowledge (complete awareness)

reflexive, symmetric, & transitive

Axioms

  1. All propositional tautologies
  2. []p -> p
  3. [](p->q) -> ([]p->[]q)
  4. []p ->[][]p
  5. <>p -> []<>p
Rules of Inference
  1. from p and p->q, infer q
  2. from p, infer []p

Belief, Knowledge and Self-Awareness

What kind of logic allows us to reason about our set of beliefs and our own self-awareness?

Connections

The following is adapted from Raymond Smullyan's book Forever Undecided.

Reasoning about beliefs requires a set of beliefs and a logic. The following is a description of a propositional belief logic based on propositional logic extended with the symbol B; BX is read `believes X' with the meaning that X is in the set of beliefs (See Figure N.1 and N.2).
 

Figure 1: Syntax
Symbols and Formulas: 
L = { p0, p1, p2, ...} The propositional letters. 
P in L 
F ::= P | ¬F |  ->FF | BF {The set of formulas}
The syntax was chosen to avoid the use of parentheses. Informally, we use the more common infix notation and additional logical operators. The semantics of Belief Logic include a set of beliefs and extend the valuation function of propositional logic to formulas containing the belief operator.  Since beliefs are collections of formulas, we map a formula to true iff it is in the list of beliefs (See Figure N.2).
 
Figure 5: Model theory: Semantics
Structure and Interpretation. <SB, v> 
    B = {false, true} The boolean values 
    V = F -> B, The set of valuation functions. 
    v in V 
    SB = a set of formulas called beliefs 
    P in L 
    A, B in F
A function v is a valuation function if it is a total 
function on L and with the structure <v, SB> satisfies 
the following properties:
<SB, v> |= P iff v(P) = true
<SB, v> |= ¬P iff v(P) = false
<SB, v> |= ¬¬A iff <SB, v> |= A
<SB, v> |= ¬->AB iff <SB, v>  |= A and <SB, v> |= ¬B
<SB, v> |= ->AB iff <SB, v> |= ¬A or <SB, v> |= B
<SB, v> |= B A iff SB |= A
<SB, v> |= ¬B A iff SB |= ¬A
 
A formula F is satisfiable iff it is true under some valuation function v and a set of beliefs SB, i.e., <v, SB> |= F. A formula F is a tautology iff it is true under all valuation functions. A tautology is said to be valid and is written |= F.
Figure 6: Proof theory: inference
Axioms A the tautologies
Rule of inference: Modus Ponens
A and A->B

B

A set of formulas is said to be logically closed iff it contains all tautologies and is closed under modus ponens (for any formulas A and B, if A and ->AB are in the set, then so is B).

A logically closed set of formulas is said to be inconsistent iff it contains both a formula and its negation, i.e., there is a formula A in the set such that both A and ¬A are in the set.  Equivalently, a set of formulas is said to be inconsistent iff it contains all formulas. A logically closed set of formulas is said to be consistent if it is not inconsistent.

Theorem: Prove that the two definitions of inconsistent are equivalent.
Proof: Clearly, the second definition implies the first. So, let F be a logically closed set of formulas that contains A and ¬A. Let Q be an arbitrary formula. The formulas, A->¬A->A/\¬A, and A/\¬A->Q, are tautologies and so are in F. By three applications of MP, Q is in F.

Definitions

A reasoner is called accurate if for any proposition A, if (s)he believes A, then A is true;
BA->A
A reasoner is called inaccurate if for some proposition A, if (s)he believes A, then ¬A is true.
BA->¬A
A reasoner is called consistent if the set of all propositions the (s)he believes is a consistent set.
¬(BA /\ B¬A)
A reasoner is called normal if for any proposition P, if (s)he believes A, then (s)he believes that (s)he believes A.
BA -> BBA
A reasoner is called peculiar if for some proposition A,  (s)he believes A and (s)he believes that (s)he doesn't believe A.
BA /\ B¬BA
A reasoner is called regular if for any propositions A and B, if (s)he believes A->B, then (s)he also believes (BA->BB).
 B(A->B)->B(BA->BB)
Observations: A reasoner  believes that (s)he is consistent if for all formulas, A,  (s)he believesB¬B(A/\¬A). A reasoner believes that (s)he is inconsistent if for some formula A, (s)he believes BB(A/\¬A).

Advancing stages of self-awareness

What does it mean for an individual to be self-aware? People are aware of some external and internal events (their thoughts) and are able to recognize their image. They are not aware of their atoms. We interpret the operator B to mean aware of.
 
Formula Means
BA
I am aware of A
BBA
I am aware of my beliefs.
BBBA
I am aware that I am aware of my beliefs

Now we define several types of reasoners.

  1. A reasoner is of type 0 if the set of beliefs are the tautologies.
    1. (S)he believes all tautologies, i.e., if |=X (X is a tautology), then <v, SB> |=BX.
  2. A reasoner is of type 1 if the reasoner is of type 0 and the set of the reasoner's beliefs are logically closed i.e.,
    1. If (s)he believes A and believes A->B then (s)he believes B i.e.,
    2. from 
      infer
      <SB, v> |=BA and <SB, v> |=B(A->B) 

       <SB, v> |=BB
      for any formulas A and B.
  3. A reasoner is of type 2 if the reasoner is of type 1 and believes that her/his set of beliefs is logically closed i.e.,
  4. <SB, v> |=B((BA /\ B(A->B))->BB)
    for any formulas A and B. Reasoners of type 2 know how they reason -- know their inference rule.
<SB, v> |=BA->BBA
for any formula A. Any reasoner that is aware of her/his beliefs is said to be normal.
<SB, v> |=B(BA->BBA)
for any proposition A.  A reasoner of type 4 knows that (s)he is normal.

Exercises/Theorems

  1. Explain:  Reasoners of type 2 know how they reason -- they know their inference rule.
  2. Explain:  A reasoner of type 4 knows that (s)he is normal.
  3. Prove that every reasoner of type 3 believes the proposition: (Bp/\B¬p)->B(p/\¬p).

  4. Proof: The following hold for type 3 reasoners: BA->BBA, B((BA /\ B(A->B))->BB). Assume ¬B[(Bp/\B¬p)->B(p/\¬p)] for some p. Bp/\B¬p, ¬B(p/\¬p)

Awareness of Self-Awareness

A reasoner believes that (s)he is of type 1 if (s)he believes all propositions of the form: BX where X is a tautology and believes all propositions of the form:  (BA /\ B(A->B))->BB
BBX - X is a tautology
B((BA /\ B(A->B))->BB)

A reasoner believes that (s)he is of type 2 if (s)he believes that (s)he is of type 1 and believes all propositions of the form: B((BA/\B(A->B))->BB

BBX - X is a tautology
B((BA /\ B(A->B))->BB)
BB((BA/\B(A->B))->BB)

A reasoner believes that (s)he is of type 3 if (s)he believes that (s)he is of type 2 and believes all propositions of the form: BA ->BBA

BBX - X is a tautology
B((BA /\ B(A->B))->BB)
BB((BA/\B(A->B))->BB)
B(BA -> BBA)

A reasoner believes that (s)he is of type 4 if (s)he believes that (s)he is of type 3 and believes all propositions of the form: B(BA ->BBA)

BBX - X is a tautology
B((BA /\ B(A->B))->BB)
BB((BA/\B(A->B))->BB)
B(BA -> BBA)
BB(BA -> BBA)

A reasoner knows that (s)he is of type X if (s)he is of type X and believes that (s)he is of that type.

Exercises/Theorems

  1. Prove that if a reasoner of type 4 knows that (s)he is regular.
  2. Prove that a reasoner of type 4 knows that (s)he is of type 4.
  3. Prove that if a reasoner of type 4 ever believes that (s)he cannot be inconsistent, (s)he will become inconsistent.
  4. Suppose a normal reasoner of type 1 believes a proposition of the form p<->¬Bp. Then:
    1. If (s)he ever believes p, then (s)he will become inconsistent.
    2. If (s)he is of type 4, then (s)he knows that if (s)he should ever believe p then (s)he will become inconsistent--i.e., (s)he will believe the proposition Bp->B_|_.
    3. If (s)he is of type 4 and believes that (s)he cannot be inconsistent, then (s)he will become inconsistent.


The following is based on a paper by Halpern.

Knowledge

A logic of knowledge is used as a tool for analyzing multi-agent systems - players in a poker game, processes in a computer network, or robots on an assembly line.

We introduce three new operators:

Common knowledge is defined as "everyone knows A, and everyone knows that everyone knows A, and ..."
 
Figure : Syntax and Semantics
Symbols and formulas: 
The propositional formulas 
L = { p0, p1, p2, ...}, P in L 
The set of formulas 
F ::= P | ¬F | ∧FF | KiF | EGF | CGF
M = (S, v, K1, ... , Kn) - A Kripke structure where
S - a set of states or possible worlds 
v in S×L -> {0,1} 
Ki an equivalence relation on S
(M, s) |= p iff v(s,p) = 1
(M, s) |= ¬A iff not (M, s) |= A
(M, s) |= A∧B iff (M, s) |= A and (M, s) |= B
(M, s) |= KiA iff (M, t) |= A for all t such that (s,t) in Ki
(M, s) |= EGA iff (M, s) |= KiA for all i in G
(M, s) |= CGA iff (M, s) |= EkGA for k=1, 2, ..., where E1GA = EGA and Ek+1GA = EGEkGA
 
The following axiom system is sound and complete.
 
Figure : Axioms
A1. All propositional tautologies 
A2. KiA ∧ Ki(A→B) Ki
A3. KiA
A4. KiA KiKi
A5. ¬KiA Ki¬Ki
R1. From A and AB infer B 
R2. From A infer Ki
C1. EGA i in GKi
C2. CGA EG(A/\CA) 
RC1. From A EG(A∧B) infer A CGB
A1 and R1 are a sound an complete axiom system of classical propositional logic. A2 says that an agent's knowledge is closed under implication. A3 says that an agent knows only things that are true. This axiom is usually taken to distinguish knowledge from belief i.e., false statements may be believed but not known. A4 and A5 are axioms of introspection; these are usually rejected by philosophers.

C2 (fixed point axiom) says that common knowledge of A holds exactly when everyone in the group knows A and that A is common knowledge.

Exercises

  1. Rewrite the following in English: K1K2A ∧ ¬K2K1K2A.
  2. Express symbolically, Dean doesn't know whether Nixon knows that Dean knows that Nixon knows that McCord burgled O'Brien's office at Watergate. Hint: let A be the statement "McCord burgled O'Brien's office at Watergate".
  3. Express symbolically, Everyone in G knows p, but p is not common knowledge.
  4. Construct a model for the situation where agent 1 does not know "it is sunny in San Francisco" but agent 2 does.
  5. Interpret axiom A4: KiA KiKiA
  6. Interpret axiom A5: ¬KiA Ki¬KiA.
  7. Show that A3 - A5 are valid.
  8. Show that C2 is necessary for agreement and coordination.
  9. Show that the theory is decideable and decidability is of exponential complexity.

Multi-Agent Systems

 

Logical Omniscience

An agent is logically omniscient iff it knows all tautologies and its knowledge is closed under modus ponens.

What is logically knowable is not realizable in practice since real agents are resource-bounded. Attempts to define knowledge in the presence of bounds include

Future Directions

References

Halpern, Joseph Y
Reasoning about Knowledge: A Survey (1995)
Gore Rajeev Prabharkar
Cut-free Sequent and Tableau Systems for Propositional Normal Modal Logics. (1992)
Smullyan, Raymond (1987)
Forever Undecided Alfred A. Knopf Inc.
Stanford Encylopedia of Philosophy
Modal Logic
Beckert, Bernhard and Gore, Rajeev
ModLeanTAP
Advances in Modal Logic


Content licensed under OPL Take One! Author: Anthony A. Aaby 

Comments and content invited aabyan@wwc.edu