Modal Logic #
@cite{rotter-liu-2025}
Kripke semantics for normal modal logics. Formalizes frames, frame conditions, correspondence theorems, and the lattice of normal modal logics.
Modal typological types (ModalForce, ModalFlavor, ForceFlavor, etc.)
live in Core.Modality (Core/Modality/ModalTypes.lean).
Linguistic interpretations belong in Theories/Semantics/Modality/.
Frames and Accessibility #
@[reducible, inline]
Agent-indexed accessibility relation: each agent has their own AccessRel.
Equations
- Core.ModalLogic.AgentAccessRel W E = (E → Core.ModalLogic.AccessRel W)
Instances For
def
Core.ModalLogic.kripkeEval
{W : Type u_1}
[Proposition.FiniteWorlds W]
(R : AccessRel W)
(force : Modality.ModalForce)
(p : BProp W)
(w : W)
:
Kripke evaluation of modal formulas.
Equations
- Core.ModalLogic.kripkeEval R Core.Modality.ModalForce.necessity p w = (List.filter (R w) Core.Proposition.FiniteWorlds.worlds).all p
- Core.ModalLogic.kripkeEval R Core.Modality.ModalForce.weakNecessity p w = (List.filter (R w) Core.Proposition.FiniteWorlds.worlds).all p
- Core.ModalLogic.kripkeEval R Core.Modality.ModalForce.possibility p w = (List.filter (R w) Core.Proposition.FiniteWorlds.worlds).any p
Instances For
theorem
Core.ModalLogic.duality
{W : Type u_1}
[Proposition.FiniteWorlds W]
(R : AccessRel W)
(p : BProp W)
(w : W)
:
kripkeEval R Modality.ModalForce.necessity p w = !kripkeEval R Modality.ModalForce.possibility (fun (v : W) => !p v) w
Frame Conditions #
Equations
- Core.ModalLogic.Refl R = ∀ (w : W), R w w = true
Instances For
Equations
- Core.ModalLogic.Serial R = ∀ (w : W), ∃ (v : W), R w v = true
Instances For
Frame Correspondence #
theorem
Core.ModalLogic.T_of_refl
{W : Type u_1}
[Proposition.FiniteWorlds W]
{R : AccessRel W}
(hR : Refl R)
(p : BProp W)
(w : W)
(h : kripkeEval R Modality.ModalForce.necessity p w = true)
:
T axiom: □p → p
theorem
Core.ModalLogic.D_of_serial
{W : Type u_1}
[Proposition.FiniteWorlds W]
{R : AccessRel W}
(hS : Serial R)
(p : BProp W)
(w : W)
(h : kripkeEval R Modality.ModalForce.necessity p w = true)
:
D axiom: □p → ◇p
theorem
Core.ModalLogic.K_axiom
{W : Type u_1}
[Proposition.FiniteWorlds W]
(R : AccessRel W)
(p q : BProp W)
(w : W)
(hImp : kripkeEval R Modality.ModalForce.necessity (fun (v : W) => !p v || q v) w = true)
(hP : kripkeEval R Modality.ModalForce.necessity p w = true)
:
K axiom: □(p → q) → □p → □q
theorem
Core.ModalLogic.four_of_trans
{W : Type u_1}
[Proposition.FiniteWorlds W]
{R : AccessRel W}
(hT : Trans R)
(p : BProp W)
(w : W)
(h : kripkeEval R Modality.ModalForce.necessity p w = true)
:
4 axiom: □p → □□p
theorem
Core.ModalLogic.B_of_symm
{W : Type u_1}
[Proposition.FiniteWorlds W]
{R : AccessRel W}
(hS : Symm R)
(p : BProp W)
(w : W)
(hP : p w = true)
:
B axiom: p → □◇p
theorem
Core.ModalLogic.five_of_eucl
{W : Type u_1}
[Proposition.FiniteWorlds W]
{R : AccessRel W}
(hE : Eucl R)
(p : BProp W)
(w : W)
(h : kripkeEval R Modality.ModalForce.possibility p w = true)
:
5 axiom: ◇p → □◇p
Lattice of Normal Modal Logics #
Equations
Equations
- Core.ModalLogic.instBEqAxiom.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Core.ModalLogic.instReprAxiom.repr Core.ModalLogic.Axiom.M prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.ModalLogic.Axiom.M")).group prec✝
- Core.ModalLogic.instReprAxiom.repr Core.ModalLogic.Axiom.D prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.ModalLogic.Axiom.D")).group prec✝
- Core.ModalLogic.instReprAxiom.repr Core.ModalLogic.Axiom.B prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.ModalLogic.Axiom.B")).group prec✝
Instances For
Equations
Equations
Instances For
Equations
Equations
- Core.ModalLogic.instHashableAxiom.hash Core.ModalLogic.Axiom.M = 0
- Core.ModalLogic.instHashableAxiom.hash Core.ModalLogic.Axiom.D = 1
- Core.ModalLogic.instHashableAxiom.hash Core.ModalLogic.Axiom.B = 2
- Core.ModalLogic.instHashableAxiom.hash Core.ModalLogic.Axiom.four = 3
- Core.ModalLogic.instHashableAxiom.hash Core.ModalLogic.Axiom.five = 4
Instances For
Equations
- One or more equations did not get rendered due to their size.
A normal modal logic is K plus axiom schemas.
Instances For
Equations
- Core.ModalLogic.Logic.K = { axioms := ∅ }
Instances For
Equations
- Core.ModalLogic.Logic.T = { axioms := {Core.ModalLogic.Axiom.M} }
Instances For
Equations
- Core.ModalLogic.Logic.D = { axioms := {Core.ModalLogic.Axiom.D} }
Instances For
Equations
- Core.ModalLogic.Logic.KB = { axioms := {Core.ModalLogic.Axiom.B} }
Instances For
Equations
- Core.ModalLogic.Logic.K4 = { axioms := {Core.ModalLogic.Axiom.four} }
Instances For
Equations
- Core.ModalLogic.Logic.K5 = { axioms := {Core.ModalLogic.Axiom.five} }
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
L₁ ≤ L₂ means L₁ is weaker (fewer axioms).
Equations
- Core.ModalLogic.Logic.instLE = { le := fun (L₁ L₂ : Core.ModalLogic.Logic) => L₁.axioms ⊆ L₂.axioms }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
Equations
- Core.ModalLogic.Logic.instBoundedOrder = { toOrderTop := Core.ModalLogic.Logic.instOrderTop, toOrderBot := Core.ModalLogic.Logic.instOrderBot }
Standard Frames #
Equations
- Core.ModalLogic.universalR x✝¹ x✝ = true
Instances For
Equations
- Core.ModalLogic.emptyR x✝¹ x✝ = false
Instances For
Equations
- Core.ModalLogic.identityR w v = (w == v)