Quantified bilateral state-based modal logic (QBSML) #
QBSML ([AvO23]) is the first-order extension of BSML
([Alo22], [Ant21]). A formula is evaluated bilaterally —
supported or anti-supported — at a state: a finite set of indices
⟨w, g⟩ pairing a world with a partial variable assignment. Quantifiers
are interpreted by extending states, disjunction by splitting them, and
the non-emptiness atom NE — the only source of non-classical behaviour —
by state non-emptiness.
Main definitions #
Index,State.worldProj: indices⟨w, g⟩and the world projections↓.State.extendIndividual,State.extendUniversal,State.extendFunctional: the state extensionss[x/d],s[x],s[x/h].State.modalLift: a set of worlds, paired with one assignment.Formula: the formula language;Formula.necis the derived□;Formula.NEFreethe NE-free fragment.Model,Model.ofMonadic: models, asModalStructures over the monadic signature with constants(Language.monadic Pred)[[Const]].eval,support,antiSupport: bilateral evaluation.
Implementation notes #
- The paper takes
□primitive and derives◇; we invert this, soeval'spossclauses match the paper's derived◇-clauses. - The paper's requirement that all indices of a state share an assignment domain is not enforced at the type level; the state operations preserve it.
- Each
evalclause is an operation on team properties applied to the support sets of the subformulas: the propositional and modal clauses are those ofTeam/Operations.lean(Team.flat,Team.tensor,Team.ne), the quantifier clausesState.univandState.exibelow. The closure inductions ofQBSML/Properties.leanare folds over their lemmas.
Indices #
An index is a (world, assignment) pair ([AvO23]
Definition 4.2: i = ⟨wᵢ, gᵢ⟩), with gᵢ a PartialAssign.
Equations
- QBSML.Index W Var Domain = (W × PartialAssign Var Domain)
Instances For
The assignment component of an index.
Equations
- i.assign = i.2
Instances For
Update an index's assignment ([AvO23] Definitions 4.3–4.4:
i[x/d] := ⟨wᵢ, gᵢ[x/d]⟩, with the assignment update gᵢ[x/d] as
mathlib's Function.update).
Instances For
The world projection #
The world projection s↓ of a state of indices: the set of worlds
appearing in some index ([AvO23] Definition 4.10:
s↓ := {w | ∃g, (w, g) ∈ s}). Frame conditions on accessibility are
stated relative to s↓, so QBSML reuses BSML's notions via this
projection.
Equations
- QBSML.State.worldProj s = Finset.image QBSML.Index.world s
Instances For
State extensions #
Individual extension s[x/d]: assign x to d in every index
([AvO23] Definition 4.5: s[x/d] := {i[x/d] | i ∈ s}).
Equations
- QBSML.State.extendIndividual s x d = Finset.image (fun (i : QBSML.Index W Var Domain) => i.update x d) s
Instances For
Universal extension s[x]: extend with every domain value at x
([AvO23] Definition 4.6: s[x] := {i[x/d] | i ∈ s, d ∈ D}).
Requires [Fintype Domain] to range over the entire domain.
Equations
- QBSML.State.extendUniversal s x = Finset.univ.biUnion fun (d : Domain) => QBSML.State.extendIndividual s x d
Instances For
Functional extension s[x/h]: for each i ∈ s, extend with values
drawn from h i ([AvO23] Definition 4.7:
s[x/h] := {i[x/d] | i ∈ s, d ∈ h(i)}). Interprets existential
quantification: ∃x φ iff M, s[x/h] ⊨ φ for some functional h.
Equations
- QBSML.State.extendFunctional s x h = s.biUnion fun (i : QBSML.Index W Var Domain) => Finset.image (fun (d : Domain) => i.update x d) (h i)
Instances For
Membership characterisations #
Extension algebra #
The universal extension is the functional extension with the constant full-domain functional.
Witness reconstruction: a state t consisting of x-updates of
indices of s is recovered exactly as the functional extension of s
by the functional collecting, at each index, the values whose updates
land in t. The shared Finset surgery behind the existential-witness
steps of the free-choice facts
(Logic/Team/QBSML/FreeChoice.lean).
The quantifier clauses as operations on team properties #
The universal-extension clause is the preimage of a property along s ↦ s[x], and the
functional-extension clause asks for some functional, non-empty on the state, whose
extension lies in the property. These are the operations the quantifier cases of the closure
inductions in QBSML/Properties.lean consume, beside those of Team/Operations.lean. Union
closure of the functional clause needs downward closure of the property, which is why
QBSML's union closure is confined to the NE-free fragment.
Universal extension s ↦ s[x] as a map of the bounded join-semilattice of states.
Equations
- QBSML.State.extendUniversalHom x = { toFun := fun (s : Finset (QBSML.Index W Var Domain)) => QBSML.State.extendUniversal s x, map_sup' := ⋯, map_bot' := ⋯ }
Instances For
The universal-extension clause: s[x] ∈ P.
Equations
- QBSML.State.univ x P = ⇑(QBSML.State.extendUniversalHom x) ⁻¹' P
Instances For
The functional-extension clause: s[x/h] ∈ P for some h non-empty on s.
Equations
- QBSML.State.exi x P = {s : Finset (QBSML.Index W Var Domain) | ∃ (h : QBSML.Index W Var Domain → Finset Domain), (∀ i ∈ s, (h i).Nonempty) ∧ QBSML.State.extendFunctional s x h ∈ P}
Instances For
Union closure of the functional clause needs downward closure of P: the two
functionals are merged with s's taking precedence, so the merged extension of
s ∪ t is the union of s's extension with the extension of t \ s, a subteam of
t's.
Modal pairing #
Modal pairing R(wᵢ)[gᵢ]: pair each accessible world with the
assignment of the original index. Used in modal evaluation
([AvO23] Definition 4.9).
Equations
- QBSML.State.modalLift X g = Finset.image (fun (v : W) => (v, g)) X
Instances For
A state contained in a modal pairing is recovered by projecting its
worlds and pairing them back with the same assignment: every index of
s ⊆ State.modalLift X g carries the assignment g.
The formula language #
QBSML formula language ([AvO23] Definition 4.1),
parameterized over variable type Var, constant type Const, and
(monadic) predicate type Pred. The paper's terms t := c | x appear
as the two atom constructors. □ is not primitive — see
Formula.nec.
- pred
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Pred → Var → Formula Var Const Pred
Monadic predicate applied to a variable.
- predc
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Pred → Const → Formula Var Const Pred
Monadic predicate applied to an individual constant.
- ne
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Formula Var Const Pred
Non-emptiness atom: state is non-empty.
- neg
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Formula Var Const Pred → Formula Var Const Pred
Bilateral negation: swap support/anti-support.
- conj
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Formula Var Const Pred → Formula Var Const Pred → Formula Var Const Pred
Conjunction.
- disj
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Formula Var Const Pred → Formula Var Const Pred → Formula Var Const Pred
Split (tensor) disjunction.
- poss
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Formula Var Const Pred → Formula Var Const Pred
Possibility modal.
- exi
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Var → Formula Var Const Pred → Formula Var Const Pred
Existential quantifier.
- univ
{Var : Type u_6}
{Const : Type u_7}
{Pred : Type u_8}
: Var → Formula Var Const Pred → Formula Var Const Pred
Universal quantifier.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- QBSML.instReprFormula.repr QBSML.Formula.ne prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "QBSML.Formula.ne")).group prec✝
Instances For
Equations
- QBSML.instReprFormula = { reprPrec := QBSML.instReprFormula.repr }
Necessity, derived: □φ := ¬◇¬φ. [AvO23] takes □
primitive and ◇ := ¬□¬ derived; we invert this, so eval's poss
clauses match the paper's derived ◇-clauses and nec matches its
primitive □.
Instances For
The NE-free fragment: formulas not containing the NE atom. On this
fragment QBSML reduces to classical first-order modal logic
([AvO23] analogue of [Ant21]
Proposition 2.2.16); see Logic/Team/QBSML/Properties.lean.
- pred {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} (P : Pred) (x : Var) : (Formula.pred P x).NEFree
- predc {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} (P : Pred) (c : Const) : (Formula.predc P c).NEFree
- neg {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} {φ : Formula Var Const Pred} : φ.NEFree → φ.neg.NEFree
- conj {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} {φ ψ : Formula Var Const Pred} : φ.NEFree → ψ.NEFree → (φ.conj ψ).NEFree
- disj {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} {φ ψ : Formula Var Const Pred} : φ.NEFree → ψ.NEFree → (φ.disj ψ).NEFree
- poss {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} {φ : Formula Var Const Pred} : φ.NEFree → φ.poss.NEFree
- exi {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} (x : Var) {φ : Formula Var Const Pred} : φ.NEFree → (Formula.exi x φ).NEFree
- univ {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} (x : Var) {φ : Formula Var Const Pred} : φ.NEFree → (Formula.univ x φ).NEFree
Instances For
Atom substitution #
Substitute a formula for each atom, commuting with every connective and
quantifier (and fixing NE). The generic congruence machinery for
atom-rewriting operations: an atom map whose images are bilaterally
equivalent to the atoms is salva veritate (eval_mapAtoms_iff in
Logic/Team/QBSML/Properties.lean), so each such operation — e.g.
[Yan23]'s reinterpretation function in Studies/Yan2023.lean — needs
only its two atom lemmas.
Equations
- QBSML.Formula.mapAtoms fp fc (QBSML.Formula.pred P x_1) = fp P x_1
- QBSML.Formula.mapAtoms fp fc (QBSML.Formula.predc P c) = fc P c
- QBSML.Formula.mapAtoms fp fc QBSML.Formula.ne = QBSML.Formula.ne
- QBSML.Formula.mapAtoms fp fc φ.neg = (QBSML.Formula.mapAtoms fp fc φ).neg
- QBSML.Formula.mapAtoms fp fc (φ.conj ψ) = (QBSML.Formula.mapAtoms fp fc φ).conj (QBSML.Formula.mapAtoms fp fc ψ)
- QBSML.Formula.mapAtoms fp fc (φ.disj ψ) = (QBSML.Formula.mapAtoms fp fc φ).disj (QBSML.Formula.mapAtoms fp fc ψ)
- QBSML.Formula.mapAtoms fp fc φ.poss = (QBSML.Formula.mapAtoms fp fc φ).poss
- QBSML.Formula.mapAtoms fp fc (QBSML.Formula.exi x_1 φ) = QBSML.Formula.exi x_1 (QBSML.Formula.mapAtoms fp fc φ)
- QBSML.Formula.mapAtoms fp fc (QBSML.Formula.univ x_1 φ) = QBSML.Formula.univ x_1 (QBSML.Formula.mapAtoms fp fc φ)
Instances For
An atom substitution with NE-free images preserves NE-freeness.
Models #
A QBSML model ([AvO23] Definition 4.2:
M = ⟨W, D, R, I⟩) is a constant-domain first-order Kripke
structure over the monadic signature with constants: accessibility R
plus the world-indexed interpretation I, carried as a family of
mathlib structures (FirstOrder.Language.ModalStructure) — true by
construction, not by bridge.
Equations
- QBSML.Model W Domain Const Pred = ((FirstOrder.Language.monadic Pred).withConstants Const).ModalStructure W Domain
Instances For
The unary relation symbol of the predicate P.
Equations
- QBSML.predSymb P = Sum.inl P
Instances For
The QBSML model with accessibility access, constant interpretation
κ, and valuation V.
Equations
- QBSML.Model.ofMonadic access κ V = { access := access, interp := fun (w : W) => inferInstance }
Instances For
Bilateral evaluation #
Bilateral evaluation of QBSML formulas ([AvO23]
Definition 4.9): eval M true φ s is support (M, s ⊨ φ),
eval M false φ s anti-support (M, s ⫤ φ). Negation flips the
polarity, making double-negation elimination definitional.
Equations
- One or more equations did not get rendered due to their size.
- QBSML.eval M true QBSML.Formula.ne x✝ = (x✝ ∈ Team.ne)
- QBSML.eval M false QBSML.Formula.ne x✝ = (x✝ ∈ {∅})
- QBSML.eval M true ψ.neg x✝ = QBSML.eval M false ψ x✝
- QBSML.eval M false ψ.neg x✝ = QBSML.eval M true ψ x✝
- QBSML.eval M true (φ.conj ψ) x✝ = (QBSML.eval M true φ x✝ ∧ QBSML.eval M true ψ x✝)
- QBSML.eval M false (φ.conj ψ) x✝ = (x✝ ∈ Team.tensor {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M false φ t} {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M false ψ t})
- QBSML.eval M true (φ.disj ψ) x✝ = (x✝ ∈ Team.tensor {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M true φ t} {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M true ψ t})
- QBSML.eval M false (φ.disj ψ) x✝ = (QBSML.eval M false φ x✝ ∧ QBSML.eval M false ψ x✝)
- QBSML.eval M true (QBSML.Formula.univ x_3 ψ) x✝ = (x✝ ∈ QBSML.State.univ x_3 {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M true ψ t})
- QBSML.eval M false (QBSML.Formula.univ x_3 ψ) x✝ = (x✝ ∈ QBSML.State.exi x_3 {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M false ψ t})
- QBSML.eval M true (QBSML.Formula.exi x_3 ψ) x✝ = (x✝ ∈ QBSML.State.exi x_3 {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M true ψ t})
- QBSML.eval M false (QBSML.Formula.exi x_3 ψ) x✝ = (x✝ ∈ QBSML.State.univ x_3 {t : Finset (QBSML.Index W Var Domain) | QBSML.eval M false ψ t})
Instances For
Support: positive evaluation.
Equations
- QBSML.support M φ s = QBSML.eval M true φ s
Instances For
Anti-support: negative evaluation.
Equations
- QBSML.antiSupport M φ s = QBSML.eval M false φ s