nLab dynamic logic

Context

(0,1)(0,1)-Category theory

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
propositional equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Contents

Idea

(Propositional) dynamic logic is an extension of propositional logic where propositions can be annotated by modal constructions in order to reason about computer programs.

If aa ranges over (possibly non-deterministic) actions and pp over propositions, then

  • [a]p[a]p means ‘pp always holds after executing aa’, and
  • ap\langle a \rangle p dually means ‘pp sometimes holds after executing aa’.

In particular, an implication of the form p[a]qp \to [a]q states that whenever a precondition pp holds, then after executing an action aa, the postcondition qq will also hold, and is therefore similar to the Hoare triple {p}a{q}\{p\} a \{q\}.

Syntax

a,b,::=α|0|1|a;b|a+b|a*|p? a, b, \dots ::= \alpha | 0 | 1 | a \mathop{;} b | a + b | a{\ast} | p{?}

The base actions include fail and skip, also written 00 and 11, respectively, and are axiomatized as follows: [0]p[0]p and [1]pp[1]p \leftrightarrow p.

For any two actions aa and bb, their sequential composition a;ba \mathop{;} b satisfies [a;b]p[a][b]p[a \mathrel{;} b]p \leftrightarrow [a][b]p and the non-deterministic choice a+ba + b satisfies [a+b]p[a]p[b]p[a+b]p \leftrightarrow [a]p \wedge [b]p. Moreover, a*a{\ast} is the unbounded iteration of aa and it satisfies [a*]pp[a][a*]p[a{\ast}]p \leftrightarrow p \wedge [a][a{\ast}]p (fixpoint) and p[a*](p[a]p)[a*]pp \wedge [a{\ast}] (p \to [a]p) \to [a{\ast}]p (induction).

To each proposition pp is associated a test p?p{?} which is used to write conditional expressions, i.e., if-statements, and such that [p?]q(pq)[p{?}]q \leftrightarrow (p \to q).

In first-order dynamic logic, actions also include assignments of the form x:=ex := e such that [x:=e]p(x)p(e)[x := e]p(x) \leftrightarrow p(e).

Semantics

Propositional dynamic logic is typically given a relational semantics via Kripke structures? (labeled transition systems): propositions are interpreted as sets of states and actions as relations.

References

  • Vaughan R. Pratt, Semantical considerations on Floyd-Hoare logic, 17th Annual IEEE Symposium on Foundations of Computer Science (1976). [pdf]
  • David Harel, Dexter Kozen, and Jerzy Tiuryn, Dynamic Logic, MIT Press (2000).

Last revised on March 28, 2026 at 16:51:42. See the history of this page for a list of all contributions to it.