Modal logic: axioms, the lattice of normal logics, and the modal square #
[dowty-wall-peters-1981] [Kra81] [Kri63]
Builds on the polymorphic Kripke foundation in Defs.lean. This file adds:
Modal axiom correspondence (T, D, 4, B, 5): which frame conditions on
Rvalidate which modal axioms when interpreted viabox/diamond. The K axiom holds for anyR.Monotonicity, distribution, restriction: standard properties of normal modal operators. Restriction (
box_restrict) is Kratzer's insight that conversational backgrounds strengthen necessity.Decidable instances:
box R p w,diamond R p ware decidable over finite worlds with decidable accessibility and propositions.Logic lattice:
Axiom,Logic, named logics (K, T, D, S4, S5, KD45), lattice instances,frameConditionspredicate.Gallin hierarchy ([Gal75]):
PropOp(general propositional operators),indicialNec/indicialPoss(Kripke-type),s5Nec/s5Poss(universal-accessibility = classical IL S5). The architectural anchor showing that classical IL S5 = the universal-accessibility special case of the polymorphic theory, and that non-Kripke operators (tense, progressive) live outsideIsIndicial.Modal square of opposition (
modalSquare, [CP08a]): under seriality thebox/diamondcorners satisfy all six Aristotelian relations —subalternAIis the D axiom,contradEIthe box–diamond duality.
Connection to Kratzer semantics #
Kratzer's conversational backgrounds derive accessibility from a modal base:
R_f(w, w') ≡ w' ∈ ⋂f(w). The ordering source further restricts to "best"
worlds. In IL terms:
- Simple Kratzer necessity =
box R_f(no ordering source) - Full Kratzer necessity =
box R_{f,g}whereR_{f,g}restricts to best worlds - S5 necessity =
box universalR
5 axiom: euclidean R gives ◇_R p w → □_R ◇_R p w.
Positive possibility introspection.
Moore reductio for KD4: no world satisfies □_R (p ∧ ¬□_R p) when
R is serial and transitive. The content p ∧ ¬□_R p is itself
satisfiable; what fails is boxing it. Specialise to belief
([Hin62]), knowledge, or any other KD4 modality.
Modal square of opposition #
[CP08a]. The □/◇ pair forms an Aristotelian square
(A = □p, E = □¬p, I = ◇p, O = ¬□p). Under seriality — the modal D axiom
(box_D) — it satisfies all six relations of the square of opposition, so every
serial modality (epistemic, deontic, temporal, doxastic) inherits the square.
The modal square of opposition over an accessibility relation R
([CP08a]): A = □p, E = □¬p, I = ◇p, O = ¬□p.
Equations
- Core.Logic.Modal.modalSquare R p = { A := Core.Logic.Modal.box R p, E := Core.Logic.Modal.box R pᶜ, I := Core.Logic.Modal.diamond R p, O := (Core.Logic.Modal.box R p)ᶜ }
Instances For
The modal square satisfies all six Aristotelian relations whenever R is
serial. subalternAI is exactly the D axiom (box_D : □p → ◇p); the two
contradiction diagonals combine isCompl_compl with box–diamond duality; and
contrariety/subcontrariety reduce to box_disjoint_compl.
Conversion (Prior's tense axiom A ⊃ G P A / A ⊃ H F A): for R and its converse
flip R, p w → □_{flip R} ◇_R p w. The correspondence fact that two modalities over a
relation and its converse are temporally adjoint (holds for any R).
With reflexive + euclidean accessibility (= S5 frame conditions),
box validates all of T, D, 4, B, 5.
KD45 frame conditions validate all three KD45 axioms (D, 4, 5).
The Gallin hierarchy ([Gal75]) #
In IL/ML_p, propositional operators form a three-level hierarchy:
General (
PropOp): Any(W → Prop) → W → Prop— arbitrary properties of propositions, varying by world.Indicial (= Kripke-type): Operators definable via an accessibility relation
R. The necessity variant is∀ v, R w v → p v(=box); the possibility variant is∃ v, R w v ∧ p v(=diamond).S5: The indicial case with
R = universalR— IL'sbox/diamond.
All PropOps ⊋ Indicial (Kripke) ⊋ S5 (IL's □)
Why this is here even with no current downstream consumer. These
theorems are the architectural anchor for the design choice that
restricted modality lives in Semantics/Intensional/: they prove that
classical IL S5 is exactly the universal-accessibility special case of
the polymorphic theory, and that every box R is a normal modal
operator (monotone, distribConj). Non-indicial PropOps (e.g., tense,
present progressive) are the formal extension point for tense /
non-Kripke modal operators that cannot be expressed as box R for
any R. Removing this section would erase the formal record of why
the directory layout is what it is.
A propositional operator: any function from propositions to propositions, parametrized by world. This is Gallin's most general level — an arbitrary property of propositions varying by index.
Examples: necessity (box R), possibility (diamond R),
past tense (∃ v, v < w ∧ p v), present progressive, habituals.
Equations
- Core.Logic.Modal.PropOp W = ((W → Prop) → W → Prop)
Instances For
A propositional operator distributes over conjunction (one direction of the K axiom: □(p ∧ q) → □p ∧ □q).
Equations
- N.DistribConj = ∀ (p q : W → Prop) (w : W), N (fun (v : W) => p v ∧ q v) w → N p w ∧ N q w
Instances For
An indicial necessity operator: the restriction of PropOp to
operators definable via an accessibility relation.
indicialNec R p w ↔ ∀ v, R w v → p v.
This is box viewed as a member of the Gallin hierarchy.
Equations
- Core.Logic.Modal.indicialNec R p w = ∀ (v : W), R w v → p v
Instances For
An indicial possibility operator (dual).
indicialPoss R p w ↔ ∃ v, R w v ∧ p v.
Equations
- Core.Logic.Modal.indicialPoss R p w = ∃ (v : W), R w v ∧ p v
Instances For
box IS indicialNec — definitional equality.
diamond IS indicialPoss — definitional equality.
A propositional operator is indicial if there exists an accessibility
relation R such that N = indicialNec R. The non-indicial case is
where tense and other non-Kripke operators live.
Equations
- Core.Logic.Modal.IsIndicial N = ∃ (R : Core.Logic.Modal.AccessRel W), N = Core.Logic.Modal.indicialNec R
Instances For
Every box R is indicial.
Every indicial operator is monotone (every Kripke operator is a K-operator).
Every indicial operator distributes over conjunction.
S5 necessity as a PropOp: p holds at all worlds.
Equations
- Core.Logic.Modal.s5Nec p x✝ = ∀ (w : W), p w
Instances For
S5 possibility as a PropOp: p holds at some world.
Equations
- Core.Logic.Modal.s5Poss p x✝ = ∃ (w : W), p w
Instances For
Flat S5 operators (world-collapsed) #
poss/nec are the genuinely flat existential/universal modals (∃ w / ∀ w),
the world-collapsed projection of s5Poss/s5Nec, whose evaluation world is
vestigial. These are the canonical flat modals consumed by the implicature
calculus (Exhaustification.FreeChoice) and free-choice scope theory, which do
not track an evaluation world; s5Poss_apply/s5Nec_apply connect them back to
the PropOp hierarchy.
Flat S5 possibility: ◇p = ∃ w, p w (no evaluation world).
Equations
- Core.Logic.Modal.poss p = ∃ (w : W), p w
Instances For
Flat S5 necessity: □p = ∀ w, p w (no evaluation world).
Equations
- Core.Logic.Modal.nec p = ∀ (w : W), p w
Instances For
S5 = indicialNec universalR: the S5 necessity operator is the indicial operator with universal accessibility. The formal statement that S5 sits at the top of the indicial hierarchy.
S5 necessity is indicial.
Restriction order on indicial operators: if R₂ ⊆ R₁ then
indicialNec R₁ is weaker than indicialNec R₂ —
fewer accessible worlds means a stronger necessity.
S5 (R = universal) is the weakest; empty R is the strongest (vacuously true). This is Kratzer's insight that conversational backgrounds restrict the modal base, formalized at the PropOp level.
S5 necessity is the weakest indicial operator: for any R,
s5Nec p w → indicialNec R p w.
Empty accessibility gives the strongest (vacuously true) indicial operator.
Decidability over finite worlds #
box R p w is decidable when worlds enumerate, accessibility is decidable,
and the proposition is decidable.
Equations
- Core.Logic.Modal.box_decidable R p w = decidable_of_iff (∀ v ∈ Finset.univ, R w v → p v) ⋯
diamond R p w is decidable under the same conditions as box.
Equations
- Core.Logic.Modal.diamond_decidable R p w = decidable_of_iff (∃ v ∈ Finset.univ, R w v ∧ p v) ⋯
Equations
- Core.Logic.Modal.instDecidableEqAxiom x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Core.Logic.Modal.instReprAxiom = { reprPrec := Core.Logic.Modal.instReprAxiom.repr }
Equations
- One or more equations did not get rendered due to their size.
- Core.Logic.Modal.instReprAxiom.repr Core.Logic.Modal.Axiom.M prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Logic.Modal.Axiom.M")).group prec✝
- Core.Logic.Modal.instReprAxiom.repr Core.Logic.Modal.Axiom.D prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Logic.Modal.Axiom.D")).group prec✝
- Core.Logic.Modal.instReprAxiom.repr Core.Logic.Modal.Axiom.B prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Logic.Modal.Axiom.B")).group prec✝
Instances For
Equations
Equations
Equations
- Core.Logic.Modal.instHashableAxiom.hash Core.Logic.Modal.Axiom.M = 0
- Core.Logic.Modal.instHashableAxiom.hash Core.Logic.Modal.Axiom.D = 1
- Core.Logic.Modal.instHashableAxiom.hash Core.Logic.Modal.Axiom.B = 2
- Core.Logic.Modal.instHashableAxiom.hash Core.Logic.Modal.Axiom.four = 3
- Core.Logic.Modal.instHashableAxiom.hash Core.Logic.Modal.Axiom.five = 4
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Core.Logic.Modal.instDecidableEqLogic.decEq { axioms := a } { axioms := b } = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
- Core.Logic.Modal.Logic.K = { axioms := ∅ }
Instances For
Equations
- Core.Logic.Modal.Logic.T = { axioms := {Core.Logic.Modal.Axiom.M} }
Instances For
Equations
- Core.Logic.Modal.Logic.D = { axioms := {Core.Logic.Modal.Axiom.D} }
Instances For
Equations
- Core.Logic.Modal.Logic.KB = { axioms := {Core.Logic.Modal.Axiom.B} }
Instances For
Equations
- Core.Logic.Modal.Logic.K4 = { axioms := {Core.Logic.Modal.Axiom.four} }
Instances For
Equations
- Core.Logic.Modal.Logic.K5 = { axioms := {Core.Logic.Modal.Axiom.five} }
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Core.Logic.Modal.Logic.KTB = { axioms := {Core.Logic.Modal.Axiom.M, Core.Logic.Modal.Axiom.B} }
Instances For
Equations
Instances For
Equations
Instances For
L₁ ≤ L₂ means L₁ is weaker (fewer axioms).
Equations
- Core.Logic.Modal.Logic.instLE = { le := fun (L₁ L₂ : Core.Logic.Modal.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
Instances For
Equations
- Core.Logic.Modal.Logic.instOrderBot = { bot := Core.Logic.Modal.Logic.K, bot_le := Core.Logic.Modal.Logic.instOrderBot._proof_1 }
Equations
Equations
- Core.Logic.Modal.Logic.instBoundedOrder = { toOrderTop := Core.Logic.Modal.Logic.instOrderTop, toOrderBot := Core.Logic.Modal.Logic.instOrderBot }
The syntactic-semantic bridge for S5: frameConditions Logic.S5 R
iff R is an S5 frame.
The syntactic-semantic bridge for KD45.
The syntactic-semantic bridge for KTB.