Modal Logic for Lean #
This module develops the interplay between modal logic and Lean's propositional language, in order
to enable the use of modal logic to reason about standard Lean relations using Prop.
Given a relation r on α, constructs the modal model whose worlds are elements of α
and whose atoms are Lean predicates on α (α → Prop).
Valuation checks that a world satisfies a predicate. For example, under Model.ofPredicates r, □P
at a : α means that P a' holds at every a' such that r a a'.
Equations
- Cslib.Logic.Modal.Model.ofPredicates r = { r := r, v := fun (w : α) (P : α → Prop) => P w }
Instances For
Given a relation r on α and a container type β for α (Membership α β), constructs the
modal model whose worlds are elements of α and whose atoms are of type β.
Valuation is membership. For example, under Model.ofContainers r, □b at a : α means that
a' ∈ b holds for every a' such that r a a'.
Equations
- Cslib.Logic.Modal.Model.ofContainers r = { r := r, v := fun (w : α) (p : β) => w ∈ p }
Instances For
Abbreviation for Model.ofContainers where the container type is a Set.
Instances For
The set model and predicate model of a relation are definitionally equal.
Models of Lean predicates #
Under Model.ofPredicates r, an atomic proposition P holds at a iff P a.
Under Model.ofPredicates r, P → □P is an axiom iff r preserves P.
Logical equivalence under Model.ofPredicates r.
Equations
Instances For
Logical equivalence under Model.ofContainers r.
Equations
Instances For
Logically equivalent propositions under Equiv.OfPredicates r have the same denotation in the
Lean modal model induced by ofPredicates r.
Logically equivalent propositions under Equiv.OfContainers r have the same denotation in the
Lean modal model induced by ofContainers r.
Pointwise conjunction of Lean predicates is logically equivalent to their modal conjunction in
the Lean modal model induced by r.
Under Equiv.OfContainers r, if membership in the infimum of two containers is equivalent to
membership in both containers, then atomic infimum is logically equivalent to modal conjunction.
Invariants are preserved by the reflexive and transitive closure of the accessibility relation.