Documentation

Linglib.Logic.Team.BSML.Defs

Bilateral state-based modal logic: core definitions #

Bilateral state-based modal logic (BSML, [Alo22]) evaluates formulas against teams — finite sets of worlds of a Kripke model — with two polarities: support (⊨⁺) and anti-support (⊨⁻). Negation swaps the polarities, so double-negation elimination holds definitionally, and the non-emptiness atom NE (supported exactly by non-empty teams) is the ingredient from which the free-choice effects derive. Despite being state-based, BSML is a static logic: formulas are evaluated against teams, not updated by them ([Alo22] p. 22). QBSML ([AvO23]) runs the same recursion over quantified atoms.

Main declarations #

Implementation notes #

The support and anti-support clauses are dual — / swap, / swap, atoms flip truth value:

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 = ∅

Encoding both polarities in one eval makes the duality a single recursion and double-negation elimination a rfl: eval M true (.neg (.neg φ)) t reduces to eval M true φ t by two negation clauses. Models are the shared ModalLogic.KripkeModel carrier; teams are Finset W; eval is Prop-valued with a Decidable instance, so concrete claims close by decide.

Formulas #

inductive BSML.Formula (Atom : Type u_1) :
Type u_1

BSML formulas over an atom type: p | NE | ¬φ | φ∧ψ | φ∨ψ | ◇φ. is not primitive — see Formula.nec.

Instances For
    @[instance_reducible]
    instance BSML.instReprFormula {Atom✝ : Type u_1} [Repr Atom✝] :
    Repr (Formula Atom✝)
    Equations
    def BSML.instReprFormula.repr {Atom✝ : Type u_1} [Repr Atom✝] :
    Formula Atom✝Std.Format
    Equations
    • One or more equations did not get rendered due to their size.
    • BSML.instReprFormula.repr BSML.Formula.ne prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ 1024 then 1 else 2) (Std.Format.text "BSML.Formula.ne")).group prec✝
    Instances For
      def BSML.Formula.nec {Atom : Type u_1} (φ : Formula Atom) :
      Formula Atom

      Necessity as an abbreviation: Formula.nec φ = ¬◇¬φ, giving the derived clauses s ⊨⁺ □φ ↔ ∀ w ∈ s, R[w] ⊨⁺ φ and s ⊨⁻ □φ ↔ ∀ w ∈ s, ∃ nonempty t ⊆ R[w], t ⊨⁻ φ.

      Equations
      Instances For

        Syntactic fragments #

        def BSML.Formula.NEFree {Atom : Type u_1} :
        Formula AtomProp

        Formula.NEFree φ holds when φ contains no NE atom — the fragment on which BSML collapses to classical modal logic on singleton teams (BSML/Bridge.lean).

        Equations
        Instances For
          @[instance_reducible]
          instance BSML.instDecidableNEFree {Atom : Type u_1} (φ : Formula Atom) :
          Decidable φ.NEFree
          Equations
          def BSML.Formula.Positive {Atom : Type u_1} :
          Formula AtomProp

          Formula.Positive φ holds when φ contains no negation.

          Equations
          Instances For
            @[instance_reducible]
            instance BSML.instDecidablePositive {Atom : Type u_1} (φ : Formula Atom) :
            Decidable φ.Positive
            Equations

            Bilateral evaluation #

            def BSML.eval {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) :
            BoolFormula AtomFinset WProp

            Bilateral evaluation with polarity parameter: eval M true φ t is support (⊨⁺), eval M false φ t is anti-support (⊨⁻), and negation flips the polarity. The split clauses (disjunction-support, conjunction-anti-support) quantify over Team.splitsAs decompositions t₁ ∪ t₂ = t.

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

              Support: positive evaluation.

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

                Anti-support: negative evaluation.

                Equations
                Instances For

                  Double-negation elimination #

                  theorem BSML.dne_support {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) (φ : Formula Atom) (t : Finset W) :
                  support M φ.neg.neg t support M φ t

                  ¬¬φ has the same support as φ, definitionally.

                  theorem BSML.dne_antiSupport {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) (φ : Formula Atom) (t : Finset W) :
                  antiSupport M φ.neg.neg t antiSupport M φ t

                  ¬¬φ has the same anti-support as φ, definitionally.

                  Unfolding lemmas #

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

                  BSML's support and antiSupport form a paraconsistent bilateral logic (Bilateral.IsBilateral) under Formula.neg.

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

                  The empty team supports every atom, vacuously.

                  Frame conditions #

                  def ModalLogic.KripkeModel.IsIndisputable {Atom : Type u_1} {W : Type u_2} (M : KripkeModel W Atom) (t : Finset W) :

                  Indisputable accessibility: all worlds in the team see the same accessible worlds — the frame condition for wide-scope free choice. Defined via Team.IsIndisputable, sharing substrate with QBSML.

                  Equations
                  Instances For
                    def ModalLogic.KripkeModel.IsStateBased {Atom : Type u_1} {W : Type u_2} (M : KripkeModel W Atom) (t : Finset W) :

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

                    Equations
                    Instances For
                      @[instance_reducible]
                      instance BSML.instDecidableIsIndisputableOfFintype {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : ModalLogic.KripkeModel W Atom) (t : Finset W) :
                      Decidable (M.IsIndisputable t)
                      Equations
                      @[instance_reducible]
                      instance BSML.instDecidableIsStateBasedOfFintype {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : ModalLogic.KripkeModel W Atom) (t : Finset W) :
                      Decidable (M.IsStateBased t)
                      Equations

                      Consequence and equivalence #

                      def BSML.consequence {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (φ ψ : Formula Atom) :

                      Semantic consequence: every team supporting φ supports ψ.

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

                        Semantic equivalence: same support and anti-support conditions.

                        Equations
                        Instances For

                          BSML* #

                          def BSML.evalStar {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) :
                          BoolFormula AtomFinset WProp

                          Bilateral evaluation for BSML* ([Alo22] §6.3.1): like eval, but is not among the possible states, so the split clauses (disjunction-support, conjunction-anti-support) quantify over Team.splitsAsNE decompositions into non-empty parts. The exclusion is imposed wherever states are quantified — the splits here and the outer team in consequenceStar — while the atom, ne, and modal clauses keep their BSML form.

                          Equations
                          Instances For
                            @[reducible, inline]
                            abbrev BSML.supportStar {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) (φ : Formula Atom) (t : Finset W) :

                            BSML* support: positive evaluation with non-empty intermediate states.

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev BSML.antiSupportStar {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) (φ : Formula Atom) (t : Finset W) :

                              BSML* anti-support.

                              Equations
                              Instances For
                                @[simp]
                                theorem BSML.supportStar_neg {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) (φ : Formula Atom) (t : Finset W) :
                                supportStar M φ.neg t antiSupportStar M φ t
                                @[simp]
                                theorem BSML.antiSupportStar_neg {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (M : ModalLogic.KripkeModel W Atom) (φ : Formula Atom) (t : Finset W) :
                                antiSupportStar M φ.neg t supportStar M φ t
                                def BSML.consequenceStar {Atom : Type u_1} {W : Type u_2} [DecidableEq W] (φ ψ : Formula Atom) :

                                BSML* consequence: supportStar consequence on non-empty teams — in BSML*, is not among the possible states.

                                Equations
                                Instances For

                                  Decidability of evaluation #

                                  def BSML.decidableEval {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : ModalLogic.KripkeModel W Atom) (pol : Bool) (φ : Formula Atom) (t : Finset W) :
                                  Decidable (eval M pol φ t)

                                  Decidability of eval by structural recursion on the formula.

                                  Equations
                                  Instances For
                                    @[instance_reducible]
                                    instance BSML.instDecidableEval {Atom : Type u_1} {W : Type u_2} [DecidableEq W] [Fintype W] (M : ModalLogic.KripkeModel W Atom) (pol : Bool) (φ : Formula Atom) (t : Finset W) :
                                    Decidable (eval M pol φ t)
                                    Equations