Documentation

Linglib.Theories.Semantics.BSML.Defs

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

@cite{aloni-2022}

BSML is a bilateral, state-based modal logic in which formulas are evaluated against teams (sets of worlds):

Key innovations over classical modal logic:

Despite being state-based, BSML is a static logic (not dynamic): formulas are evaluated against teams, not updated by them (@cite{aloni-2022} p. 22).

Atom polymorphism #

Both BSMLFormula and BSMLModel are parameterized over an atom type Atom : Type*. This eliminates the silent typo trap of String-keyed valuations and aligns with the predicate-level extension in QBSML (@cite{aloni-vanormondt-2023}), which generalizes atoms to typed predicates with terms.

Substrate dependencies #

The split-disjunction predicate splitsAs and the frame-condition predicates isStateBased / isIndisputable live in Core.Logic.Team (theory-neutral Finset combinatorics) and are consumed below. This is the same machinery QBSML reuses via the s↓ projection from Finset (W × Assignment) to Finset W.

Bilateral Symmetry #

The support and anti-support clauses exhibit a striking duality:

ConnectiveSupport (⊨⁺)Anti-support (⊨⁻)
p (atom)∀w∈s: V(w,p)=1∀w∈s: V(w,p)=0
¬φs ⊨⁻ φs ⊨⁺ φ
φ ∧ ψs ⊨⁺ φ ∧ s ⊨⁺ ψ∃t,u: t∪u=s ∧ t ⊨⁻ φ ∧ u ⊨⁻ ψ
φ ∨ ψ∃t,u: t∪u=s ∧ t ⊨⁺ φ ∧ u ⊨⁺ ψs ⊨⁻ φ ∧ s ⊨⁻ ψ
◇φ∀w∈s: ∃ ne t⊆R[w]: t ⊨⁺ φ∀w∈s: R[w] ⊨⁻ φ
□φ∀w∈s: R[w] ⊨⁺ φ∀w∈s: ∃ ne t⊆R[w]: t ⊨⁻ φ
NEs ≠ ∅s = ∅

∧/∨ are swapped; ◇/□ are swapped; atoms are dual.

Implementation #

Teams are Finset W (with [DecidableEq W] [Fintype W]). Support and anti-support are unified into a single eval function parameterized by a Bool polarity. This makes DNE definitional (eval M true (.neg (.neg φ)) t reduces to eval M true φ t by two applications of the negation clause).

eval returns Prop, with a Decidable instance provided for computational verification via #guard decide (...).

inductive Semantics.BSML.BSMLFormula (Atom : Type u_1) :
Type u_1

BSML formula language (Definition 1 from @cite{aloni-2022}).

Parameterized over an atom type Atom : Type*. The base language is: p | ¬φ | φ∧ψ | φ∨ψ | ◇φ | NE. □ is NOT a primitive — it is defined as an abbreviation: □φ := ¬◇¬φ (see BSMLFormula.nec).

Instances For
    def Semantics.BSML.instReprBSMLFormula.repr {Atom✝ : Type u_1} [Repr Atom✝] :
    BSMLFormula Atom✝Std.Format
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      instance Semantics.BSML.instReprBSMLFormula {Atom✝ : Type u_1} [Repr Atom✝] :
      Repr (BSMLFormula Atom✝)
      Equations
      def Semantics.BSML.BSMLFormula.nec {Atom : Type u_1} (φ : BSMLFormula Atom) :

      □φ := ¬◇¬φ — necessity as an abbreviation, not a primitive. The derived support/anti-support conditions are:

      • s ⊨⁺ □φ iff ∀w∈s, R[w] ⊨⁺ φ
      • s ⊨⁻ □φ iff ∀w∈s, ∃ ne t⊆R[w], t ⊨⁻ φ These follow from the definitions of ¬, ◇, and ¬ applied to φ.
      Equations
      Instances For
        def Semantics.BSML.BSMLFormula.isNEFree {Atom : Type u_1} :
        BSMLFormula AtomBool

        A formula is NE-free if it does not contain the NE atom. For NE-free formulas, BSML reduces to classical modal logic on singleton teams (Fact 15, @cite{aloni-2022}).

        Equations
        Instances For

          A formula is positive if it contains no negation.

          Equations
          Instances For
            def Semantics.BSML.BSMLFormula.isAtom {Atom : Type u_1} :
            BSMLFormula AtomBool

            A formula is atomic (a single propositional variable).

            Equations
            Instances For
              theorem Semantics.BSML.BSMLFormula.isAtom_implies_isNEFree {Atom : Type u_1} (φ : BSMLFormula Atom) (h : φ.isAtom = true) :
              φ.isNEFree = true

              Atoms are NE-free.

              structure Semantics.BSML.BSMLModel (W : Type u_2) (Atom : Type u_3) [DecidableEq W] [Fintype W] :
              Type (max u_2 u_3)

              A BSML model: accessibility and valuation over a finite type of worlds (Definition 1, @cite{aloni-2022}). The universe of worlds is given by [Fintype W] — use Finset.univ for the full set.

              Parameterized over both W (worlds) and Atom (atomic propositions). The val field maps an atom name to its truth value at each world.

              • access : WFinset W

                Accessibility: R[w] = worlds accessible from w

              • val : AtomWBool

                Valuation: which atoms are true at which worlds

              Instances For
                def Semantics.BSML.eval {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) :
                BoolBSMLFormula AtomFinset WProp

                Bilateral evaluation with polarity parameter (Definition 2, @cite{aloni-2022}).

                eval M true φ t is support (⊨⁺), eval M false φ t is anti-support (⊨⁻). Negation flips polarity, making DNE definitional: eval M true (.neg (.neg φ)) t = eval M true φ t by computation.

                Split disjunction and split conjunction-anti-support clauses use Core.Logic.Team.splitsAs (= t₁ ∪ t₂ = t); the recursion is the same shape QBSML reuses at the Finset (W × Assignment) carrier.

                Equations
                Instances For
                  @[reducible, inline]
                  abbrev Semantics.BSML.support {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ : BSMLFormula Atom) (t : Finset W) :

                  Support: positive evaluation.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev Semantics.BSML.antiSupport {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ : BSMLFormula Atom) (t : Finset W) :

                    Anti-support: negative evaluation.

                    Equations
                    Instances For
                      theorem Semantics.BSML.dne_support {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ : BSMLFormula Atom) (t : Finset W) :
                      support M φ.neg.neg t support M φ t

                      DNE: ¬¬φ has the same support as φ. Definitional with the polarity design.

                      theorem Semantics.BSML.dne_antiSupport {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ : BSMLFormula Atom) (t : Finset W) :
                      antiSupport M φ.neg.neg t antiSupport M φ t

                      DNE: ¬¬φ has the same anti-support as φ.

                      @[simp]
                      theorem Semantics.BSML.support_neg {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ : BSMLFormula Atom) (t : Finset W) :
                      support M φ.neg t antiSupport M φ t
                      @[simp]
                      theorem Semantics.BSML.antiSupport_neg {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ : BSMLFormula Atom) (t : Finset W) :
                      antiSupport M φ.neg t support M φ t
                      theorem Semantics.BSML.isBilateral {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) :

                      BSML's support and antiSupport form a paraconsistent bilateral logic (Core.Logic.Bilateral.IsBilateral) under BSMLFormula.neg. Pointwise polarity-flip lemmas (support_neg / antiSupport_neg, both Iff.rfl) lift to function equality via IsBilateral.of_iff.

                      @[simp]
                      theorem Semantics.BSML.support_conj {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ ψ : BSMLFormula Atom) (t : Finset W) :
                      support M (φ.conj ψ) t support M φ t support M ψ t
                      @[simp]
                      theorem Semantics.BSML.antiSupport_disj {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (φ ψ : BSMLFormula Atom) (t : Finset W) :
                      antiSupport M (φ.disj ψ) t antiSupport M φ t antiSupport M ψ t
                      theorem Semantics.BSML.empty_supports_atom {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (p : Atom) :

                      Empty team supports all atoms (vacuous truth).

                      def Semantics.BSML.BSMLModel.isIndisputable {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (t : Finset W) :

                      Indisputable accessibility: all worlds in team see the same accessible worlds. Required for wide-scope FC (Fact 5, @cite{aloni-2022}).

                      Defined via Core.Logic.Team.isIndisputable to share substrate with QBSML and any other state-based logic.

                      Equations
                      Instances For
                        def Semantics.BSML.BSMLModel.isStateBased {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (t : Finset W) :

                        State-based accessibility: every world in team has the team itself as accessible worlds. Strictly stronger than indisputability.

                        Defined via Core.Logic.Team.isStateBased.

                        Equations
                        Instances For
                          @[implicit_reducible]
                          instance Semantics.BSML.instDecidableIsIndisputable {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (t : Finset W) :
                          Decidable (M.isIndisputable t)
                          Equations
                          @[implicit_reducible]
                          instance Semantics.BSML.instDecidableIsStateBased {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (t : Finset W) :
                          Decidable (M.isStateBased t)
                          Equations
                          def Semantics.BSML.consequence {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (φ ψ : BSMLFormula Atom) :

                          Semantic consequence: φ ⊨ ψ if every team supporting φ also supports ψ.

                          Equations
                          Instances For
                            def Semantics.BSML.equivalent {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (φ ψ : BSMLFormula Atom) :

                            Semantic equivalence: same support and anti-support conditions.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Semantics.BSML.supportStar {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) :
                              BSMLFormula AtomFinset WProp

                              BSML* support: like standard BSML support but ∅ is excluded from all intermediate states. The only difference from eval M true is in disjunction, where both parts of the split must be non-empty. (@cite{aloni-2022} §6.3.1).

                              NOTE: the negation case | .neg _, _ => True is a placeholder. Aloni's actual BSML* uses bilateral polarity mirror BSML's; completing this requires a proper polarity-flipped supportStar definition. Tracked as out-of-scope per Phenomena/FreeChoice/Divergences.lean §3.

                              Equations
                              Instances For
                                def Semantics.BSML.consequenceStar {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (φ ψ : BSMLFormula Atom) :

                                BSML* consequence: consequence using BSML* support (non-empty intermediate states) on non-empty teams. In BSML*, the empty set ∅ is not among the possible states (@cite{aloni-2022} §6.3.1).

                                Equations
                                Instances For
                                  def Semantics.BSML.decidableEval {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (pol : Bool) (φ : BSMLFormula Atom) (t : Finset W) :
                                  Decidable (eval M pol φ t)

                                  Decidability of eval by structural recursion on the formula.

                                  Equations
                                  Instances For
                                    @[implicit_reducible]
                                    instance Semantics.BSML.instDecidableEval {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : BSMLModel W Atom) (pol : Bool) (φ : BSMLFormula Atom) (t : Finset W) :
                                    Decidable (eval M pol φ t)
                                    Equations