Documentation

Linglib.Theories.Semantics.QBSML.Defs

Quantified Bilateral State-based Modal Logic (QBSML) — Core Definitions #

@cite{aloni-vanormondt-2023} @cite{aloni-2022} @cite{anttila-2021}

QBSML is the first-order extension of Aloni's BSML, presented in Aloni & van Ormondt 2023 (J Logic Lang Inf 32:539-567) "Modified Numerals and Split Disjunction: The First-Order Case".

What changes from BSML #

The propositional BSML (Aloni 2022) is recovered when assignments are empty. QBSML extends along three axes:

  1. Indices replace worlds: Index = W × Assignment (Aloni & van Ormondt §3, Definition 4.2). A state is Finset Index rather than Finset W.
  2. Predicates with variables (no constants for now; monadic predicates sufficient for free-choice scenarios).
  3. Quantifiers: ∀x and ∃x evaluated via state extensions.

What stays the same #

Everything else carries over from BSML:

The point of this file is substrate validation: QBSML's support should fit into Core.Logic.Team.flat_iff_downwardClosed_unionClosed_emptyTeam's shape exactly as BSML's does — same template, different Point type.

Scope #

This file: types, state operations, support relation. No Anttila 2.2.8 proofs (those go in Properties.lean to validate the substrate). No pragmatic enrichment (separate Enrichment.lean). No free-choice theorems (separate study files under Phenomena/FreeChoice/Studies/).

Simplifications vs the paper #

@[reducible, inline]
abbrev Semantics.QBSML.Assignment (Var : Type u_1) (Domain : Type u_2) :
Type (max u_1 u_2)

An assignment is a partial function from variables to domain values. Aloni & van Ormondt §4 Definition 4.2: gᵢ : V → D. We use Option D to represent the partiality.

The paper enforces that all indices in a state share the same domain (dom(gᵢ) = dom(gⱼ)). We don't enforce this at the type level; instead, state operations preserve the invariant.

Equations
Instances For
    @[reducible, inline]
    abbrev Semantics.QBSML.Index (W : Type u_1) (Var : Type u_2) (Domain : Type u_3) :
    Type (max u_1 u_3 u_2)

    An index is a (world, assignment) pair. Aloni & van Ormondt §4 Definition 4.2: i = ⟨wᵢ, gᵢ⟩.

    Equations
    Instances For
      @[reducible, inline]
      abbrev Semantics.QBSML.Index.world {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} (i : Index W Var Domain) :
      W

      The world component of an index.

      Equations
      Instances For
        @[reducible, inline]
        abbrev Semantics.QBSML.Index.assign {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} (i : Index W Var Domain) :
        Assignment Var Domain

        The assignment component of an index.

        Equations
        Instances For
          def Semantics.QBSML.State.worldProj {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} [DecidableEq W] (s : Finset (Index W Var Domain)) :
          Finset W

          The "world projection" s↓ of a state of indices: the set of worlds appearing in some index. Aloni & van Ormondt §4 Definition 4.10: s↓ := {w | ∃g, (w, g) ∈ s}.

          Frame conditions on R (state-based, indisputable) are defined relative to s↓ rather than s, so QBSML reuses BSML's notions via this projection.

          Equations
          Instances For
            def Semantics.QBSML.Assignment.update {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] (g : Assignment Var Domain) (x : Var) (d : Domain) :
            Assignment Var Domain

            Update an assignment at a single variable: g[x/d](y) = d if y = x, else g(y).

            Equations
            • g.update x d y = if y = x then some d else g y
            Instances For
              def Semantics.QBSML.Index.update {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] {W : Type u_3} (i : Index W Var Domain) (x : Var) (d : Domain) :
              Index W Var Domain

              Update an index's assignment. Aloni & van Ormondt §4 Definition 4.4: i[x/d] := ⟨wᵢ, gᵢ[x/d]⟩.

              Equations
              Instances For
                @[implicit_reducible]
                instance Semantics.QBSML.instDecidableEqAssignment {Var : Type u_1} {Domain : Type u_2} [Fintype Var] [DecidableEq Domain] :
                DecidableEq (Assignment Var Domain)

                DecidableEq on assignments follows from Fintype on the variable space plus DecidableEq on the codomain (Option Domain via Domain).

                Equations
                @[implicit_reducible]
                instance Semantics.QBSML.instDecidableEqIndex {Var : Type u_1} {Domain : Type u_2} [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] :
                DecidableEq (Index W Var Domain)

                DecidableEq on indices: pair of decidable types.

                Equations
                def Semantics.QBSML.State.extendIndividual {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] (s : Finset (Index W Var Domain)) (x : Var) (d : Domain) :
                Finset (Index W Var Domain)

                Individual extension s[x/d]: assign x to d in every index. Aloni & van Ormondt §4 Definition 4.5: s[x/d] := {i[x/d] | i ∈ s}.

                Equations
                Instances For
                  def Semantics.QBSML.State.extendUniversal {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] [Fintype Domain] (s : Finset (Index W Var Domain)) (x : Var) :
                  Finset (Index W Var Domain)

                  Universal extension s[x]: extend with every domain value at x. Aloni & van Ormondt §4 Definition 4.6: s[x] := {i[x/d] | i ∈ s, d ∈ D}.

                  Requires [Fintype Domain] to range over the entire domain.

                  Equations
                  Instances For
                    def Semantics.QBSML.State.extendFunctional {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] (s : Finset (Index W Var Domain)) (x : Var) (h : Index W Var DomainFinset Domain) :
                    Finset (Index W Var Domain)

                    Functional extension s[x/h]: for each i in s, extend with d's drawn from h(i) (a non-empty subset of D). Aloni & van Ormondt §4 Definition 4.7: s[x/h] := {i[x/d] | i ∈ s, d ∈ h(i)}.

                    Used to interpret existential quantification: ∃x φ iff M, s[x/h] ⊨ φ for some functional h.

                    Equations
                    Instances For
                      def Semantics.QBSML.State.modalLift {Var : Type u_1} {Domain : Type u_2} [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] (X : Finset W) (g : Assignment Var Domain) :
                      Finset (Index W Var Domain)

                      Modal pairing R(wᵢ)[gᵢ]: pair each accessible world with the assignment of the original index. Used in modal evaluation (Aloni & van Ormondt §4 Definition 4.9).

                      Equations
                      Instances For
                        theorem Semantics.QBSML.State.extendUniversal_empty {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] [Fintype Domain] (x : Var) :
                        extendUniversal x =

                        Universal extension of empty team is empty.

                        theorem Semantics.QBSML.State.extendFunctional_empty {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] (x : Var) (h : Index W Var DomainFinset Domain) :
                        extendFunctional x h =

                        Functional extension of empty team is empty.

                        theorem Semantics.QBSML.State.extendUniversal_subset_mono {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] [Fintype Domain] {s t : Finset (Index W Var Domain)} (x : Var) (hsub : s t) :

                        Universal extension is monotone in the team.

                        theorem Semantics.QBSML.State.extendUniversal_union_distrib {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] [Fintype Domain] (s t : Finset (Index W Var Domain)) (x : Var) :

                        Universal extension distributes over union.

                        theorem Semantics.QBSML.State.extendFunctional_union_distrib {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] (s t : Finset (Index W Var Domain)) (x : Var) (h : Index W Var DomainFinset Domain) :
                        extendFunctional (s t) x h = extendFunctional s x h extendFunctional t x h

                        Functional extension distributes over union of teams.

                        theorem Semantics.QBSML.State.extendFunctional_subset_mono {Var : Type u_1} {Domain : Type u_2} [DecidableEq Var] [Fintype Var] {W : Type u_3} [DecidableEq W] [DecidableEq Domain] {s t : Finset (Index W Var Domain)} (x : Var) (h : Index W Var DomainFinset Domain) (hsub : s t) :

                        Functional extension is monotone in the team (for fixed h).

                        inductive Semantics.QBSML.QBSMLFormula (Var : Type u_1) (Pred : Type u_2) :
                        Type (max u_1 u_2)

                        QBSML formula language (Aloni & van Ormondt §4 Definition 4.1).

                        Parameterized over variable type Var and predicate type Pred. We use monadic predicates (Pred → Var → Formula) — sufficient for free-choice scenarios. Higher arities (Pred → List Var → Formula) and a term language (constants + variables) can be added without changing the substrate abstraction.

                        □ is NOT primitive — defined as □φ := ¬◇¬φ (QBSMLFormula.nec).

                        Instances For
                          @[implicit_reducible]
                          instance Semantics.QBSML.instReprQBSMLFormula {Var✝ : Type u_1} {Pred✝ : Type u_2} [Repr Var✝] [Repr Pred✝] :
                          Repr (QBSMLFormula Var✝ Pred✝)
                          Equations
                          def Semantics.QBSML.instReprQBSMLFormula.repr {Var✝ : Type u_1} {Pred✝ : Type u_2} [Repr Var✝] [Repr Pred✝] :
                          QBSMLFormula Var✝ Pred✝Std.Format
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Semantics.QBSML.QBSMLFormula.nec {Var : Type u_1} {Pred : Type u_2} (φ : QBSMLFormula Var Pred) :
                            QBSMLFormula Var Pred

                            □φ := ¬◇¬φ — necessity as an abbreviation, mirroring BSML.

                            Equations
                            Instances For
                              def Semantics.QBSML.QBSMLFormula.isNEFree {Var : Type u_1} {Pred : Type u_2} :
                              QBSMLFormula Var PredBool

                              A formula is NE-free if it does not contain the NE atom. For NE-free formulas, QBSML reduces to classical first-order modal logic on singleton states (Aloni & van Ormondt analogue of Anttila Proposition 2.2.16).

                              Equations
                              Instances For
                                structure Semantics.QBSML.QBSMLModel (W : Type u_1) (Domain : Type u_2) (Pred : Type u_3) [DecidableEq W] [Fintype W] :
                                Type (max (max u_1 u_2) u_3)

                                A QBSML model. Aloni & van Ormondt §4 Definition 4.2: M = ⟨W, D, R, I⟩.

                                We use Domain : Type* as a parameter and [Fintype Domain] for the universal extension. The interpretation function is split: accessibility R : W → Finset W and predicate interpretation pInterp : Pred → W → Finset Domain.

                                • access : WFinset W

                                  Accessibility relation (per-world set of accessible worlds).

                                • pInterp : PredWFinset Domain

                                  Predicate interpretation: at world w, predicate p picks out the Finset of domain elements satisfying it.

                                Instances For
                                  def Semantics.QBSML.eval {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) :
                                  BoolQBSMLFormula Var PredFinset (Index W Var Domain)Prop

                                  Bilateral evaluation of QBSML formulas. Aloni & van Ormondt §4 Definition 4.9.

                                  eval M true φ s is support (M, s ⊨ φ); eval M false φ s is anti-support (M, s ⊧ φ). Negation flips polarity, making DNE definitional.

                                  Key shape: Bool → Form → Finset Index → Prop — exactly the template Core.Logic.Team.flat_iff_downwardClosed_unionClosed_emptyTeam is parameterized over (with Point := Index W Var Domain). The substrate test is whether the property + flatness theorems compose identically to BSML's.

                                  Equations
                                  Instances For
                                    @[reducible, inline]
                                    abbrev Semantics.QBSML.support {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) (φ : QBSMLFormula Var Pred) (s : Finset (Index W Var Domain)) :

                                    Support: positive evaluation.

                                    Equations
                                    Instances For
                                      @[reducible, inline]
                                      abbrev Semantics.QBSML.antiSupport {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) (φ : QBSMLFormula Var Pred) (s : Finset (Index W Var Domain)) :

                                      Anti-support: negative evaluation.

                                      Equations
                                      Instances For
                                        theorem Semantics.QBSML.dne_support {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) (φ : QBSMLFormula Var Pred) (s : Finset (Index W Var Domain)) :
                                        support M φ.neg.neg s support M φ s
                                        theorem Semantics.QBSML.dne_antiSupport {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) (φ : QBSMLFormula Var Pred) (s : Finset (Index W Var Domain)) :
                                        antiSupport M φ.neg.neg s antiSupport M φ s
                                        @[simp]
                                        theorem Semantics.QBSML.support_neg {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) (φ : QBSMLFormula Var Pred) (s : Finset (Index W Var Domain)) :
                                        support M φ.neg s antiSupport M φ s
                                        @[simp]
                                        theorem Semantics.QBSML.antiSupport_neg {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) (φ : QBSMLFormula Var Pred) (s : Finset (Index W Var Domain)) :
                                        antiSupport M φ.neg s support M φ s
                                        theorem Semantics.QBSML.isBilateral {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Pred) :

                                        QBSML's support and antiSupport form a paraconsistent bilateral logic (Core.Logic.Bilateral.IsBilateral) under QBSMLFormula.neg. Same shape as BSML's isBilateral, lifted to Index W Var Domain — point-polymorphism at work. The of_iff helper resolves the metavariables that previously required explicit Form/Result annotations.

                                        def Semantics.QBSML.QBSMLModel.isStateBased {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] (M : QBSMLModel W Domain Pred) (s : Finset (Index W Var Domain)) :

                                        QBSML's isStateBased: defined via the s↓ projection composed with Core.Logic.Team.isStateBased. The same Core function as BSML uses, just applied to the world-set of the team rather than the team itself.

                                        Aloni & van Ormondt §4 Definition 4.10: R is state-based on (M, s) iff R(w) = s↓ for all w ∈ s↓. Specialization-via-composition exemplifies the foundational mathlib pattern: same Core definition, different instantiation via projection.

                                        Equations
                                        Instances For
                                          def Semantics.QBSML.QBSMLModel.isIndisputable {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Pred : Type u_4} [DecidableEq W] [Fintype W] (M : QBSMLModel W Domain Pred) (s : Finset (Index W Var Domain)) :

                                          QBSML's isIndisputable: same Core function, applied to s↓.

                                          Equations
                                          Instances For