Documentation

Linglib.Core.Logic.Modal.QBSML.Properties

QBSML formula properties #

[AvO23] [Ant21]

The QBSML instances of the closure properties of [Ant21] Proposition 2.2.8: NE-free formulas have downward-closed, sup-closed, empty-team support, hence flat support, via the same Core.Logic.Team.isFlat_iff template as Core/Logic/Modal/BSML/Properties.lean.

Main declarations #

Implementation notes #

BSML proves the closure properties in separate inductions; QBSML cannot. The union case of support for exi (dually, anti-support for univ) weakens (t \ s).extendFunctional x h_t to t.extendFunctional x h_t via State.extendFunctional_mono plus downward closure of the subformula, so union closure and downward closure must live in one joint induction — and union closure holds only on the NE-free fragment, whereas BSML's is unconditional. The flatness corollary is unaffected: flat consumers use NE-free anyway.

Empty-team property for NE-free formulas #

theorem Core.Logic.Modal.QBSML.support_empty_of_isNEFree {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] {φ : QBSMLFormula Var Const Pred} (hNE : φ.IsNEFree) (M : QBSMLModel W Domain Const Pred) :
support M φ

NE-free QBSML formulas are supported on the empty team.

Joint downward + sup closure for NE-free formulas #

theorem Core.Logic.Modal.QBSML.isLowerSet_support_of_isNEFree {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] {φ : QBSMLFormula Var Const Pred} (hNE : φ.IsNEFree) (M : QBSMLModel W Domain Const Pred) :
IsLowerSet {t : Finset (Index W Var Domain) | support M φ t}

NE-free QBSML formulas are downward-closed ([Ant21] Proposition 2.2.8 part 1, extended to first-order).

theorem Core.Logic.Modal.QBSML.supClosed_support_of_isNEFree {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] {φ : QBSMLFormula Var Const Pred} (hNE : φ.IsNEFree) (M : QBSMLModel W Domain Const Pred) :
SupClosed {t : Finset (Index W Var Domain) | support M φ t}

NE-free QBSML formulas have sup-closed support.

NB: BSML's supClosed_support needs no NE-free hypothesis, but QBSML's exi UC case needs downward closure of the subformula as IH (see the module docstring), so the QBSML version narrows to NE-free. The downstream flat corollary consumes NE-free anyway.

Flatness corollary #

theorem Core.Logic.Modal.QBSML.isFlat_support_of_isNEFree {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] {φ : QBSMLFormula Var Const Pred} (hNE : φ.IsNEFree) (M : QBSMLModel W Domain Const Pred) :
Team.IsFlat {t : Finset (Index W Var Domain) | support M φ t}

[Ant21] Proposition 2.2.16 (QBSML specialisation): NE-free QBSML formulas are flat. Derived from [Ant21] Proposition 2.2.2 (Core.Logic.Team.isFlat_iff) applied to the three closure properties above.

Soundness for the flat cell (Definability bridge) #

theorem Core.Logic.Modal.QBSML.soundFor_flat_neFree {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) :

The NE-free fragment of QBSML is sound for the flat cell: every team property definable by an NE-free QBSML formula is flat (downward-closed, union-closed, empty-team). This restates [AvO23]'s observation that NE-free QBSML reduces to classical first-order modal logic, whose support is flat, in the Team/Definability.lean vocabulary.

The restriction to the NE-free fragment is essential, not incidental: NE is the only source of non-classical behaviour, and union closure of exi already needs downward closure of the subformula as IH (see the module docstring), which NE breaks. So QBSML has no unconditional all-formula cell — unlike BSML, whose NE-bearing formulas still land in the convex, union-closed cell.

Fact 1: classical validities #

[AvO23] Fact 1 lists the classical equivalences QBSML validates: double negation elimination, the De Morgan laws, and the / and / dualities. In the bilateral setup every one is definitional — negation literally swaps support and antiSupport, whose clauses are arranged in De Morgan pairs — so each is Iff.rfl.

theorem Core.Logic.Modal.QBSML.support_neg_neg {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ : QBSMLFormula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.neg.neg s support M φ s

Double negation elimination ([AvO23] Fact 1).

theorem Core.Logic.Modal.QBSML.support_neg_disj {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ ψ : QBSMLFormula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M (φ.disj ψ).neg s support M (φ.neg.conj ψ.neg) s

De Morgan: ¬(φ ∨ ψ) ≡ ¬φ ∧ ¬ψ ([AvO23] Fact 1).

theorem Core.Logic.Modal.QBSML.support_neg_conj {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ ψ : QBSMLFormula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M (φ.conj ψ).neg s support M (φ.neg.disj ψ.neg) s

De Morgan: ¬(φ ∧ ψ) ≡ ¬φ ∨ ¬ψ ([AvO23] Fact 1).

theorem Core.Logic.Modal.QBSML.support_neg_nec {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ : QBSMLFormula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.nec.neg s support M φ.neg.poss s

Modal duality: ¬□φ ≡ ◇¬φ ([AvO23] Fact 1).

theorem Core.Logic.Modal.QBSML.support_neg_poss {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ : QBSMLFormula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.poss.neg s support M φ.neg.nec s

Modal duality: ¬◇φ ≡ □¬φ ([AvO23] Fact 1).

theorem Core.Logic.Modal.QBSML.support_neg_univ {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ : QBSMLFormula Var Const Pred) (x : Var) (s : Finset (Index W Var Domain)) :

Quantifier duality: ¬∀xφ ≡ ∃x¬φ ([AvO23] Fact 1).

theorem Core.Logic.Modal.QBSML.support_neg_exi {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ : QBSMLFormula Var Const Pred) (x : Var) (s : Finset (Index W Var Domain)) :

Quantifier duality: ¬∃xφ ≡ ∀x¬φ ([AvO23] Fact 1).

Flatness as pointwise evaluation #

theorem Core.Logic.Modal.QBSML.support_iff_forall_singleton {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] {φ : QBSMLFormula Var Const Pred} (hNE : φ.IsNEFree) (M : QBSMLModel W Domain Const Pred) (s : Finset (Index W Var Domain)) :
support M φ s is, support M φ {i}

Flat (NE-free) support is pointwise: a team supports φ iff each of its singletons does (Core.Logic.Team.IsFlat unfolded at the support set).

theorem Core.Logic.Modal.QBSML.antiSupport_iff_forall_singleton {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] {φ : QBSMLFormula Var Const Pred} (hNE : φ.IsNEFree) (M : QBSMLModel W Domain Const Pred) (s : Finset (Index W Var Domain)) :
antiSupport M φ s is, antiSupport M φ {i}

Anti-support of an NE-free formula is likewise pointwise: flatness of the bilateral negation.

Atom substitution salva veritate #

theorem Core.Logic.Modal.QBSML.eval_mapAtoms_iff {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {fp : PredVarQBSMLFormula Var Const Pred} {fc : PredConstQBSMLFormula Var Const Pred} (hfp : ∀ (P : Pred) (x : Var) (b : Bool) (s : Finset (Index W Var Domain)), eval M b (fp P x) s eval M b (QBSMLFormula.pred P x) s) (hfc : ∀ (P : Pred) (c : Const) (b : Bool) (s : Finset (Index W Var Domain)), eval M b (fc P c) s eval M b (QBSMLFormula.predc P c) s) (φ : QBSMLFormula Var Const Pred) (b : Bool) (s : Finset (Index W Var Domain)) :
eval M b (QBSMLFormula.mapAtoms fp fc φ) s eval M b φ s

Atom-substitution congruence: an atom map whose images are bilaterally equivalent to the atoms they replace is salva veritateφ.mapAtoms fp fc and φ are supported and anti-supported by exactly the same states. Atom-rewriting operations (e.g. [Yan23]'s reinterpretation function, Studies/Yan2023.lean) get truth-conditional harmlessness for the price of their two atom lemmas.

Upward monotonicity of the NE-free fragment #

theorem Core.Logic.Modal.QBSML.support_disj_inl {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {α β : QBSMLFormula Var Const Pred} ( : β.IsNEFree) {s : Finset (Index W Var Domain)} (h : support M α s) :
support M (α.disj β) s

Disjunction introduction: α ⊨ α ∨ β for NE-free β (the right disjunct is supported by the empty half of the split).

@[simp]
theorem Core.Logic.Modal.QBSML.support_nec_iff {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) (φ : QBSMLFormula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.nec s is, support M φ (State.modalLift (M.access i.world) i.assign)

Support of the derived is pointwise support at the full accessible lift — definitional, by the neg/poss clauses of eval.

theorem Core.Logic.Modal.QBSML.support_nec_mono {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {α β : QBSMLFormula Var Const Pred} (h : ∀ (t : Finset (Index W Var Domain)), support M α tsupport M β t) {s : Finset (Index W Var Domain)} ( : support M α.nec s) :
support M β.nec s

is monotone: a state-wise entailment between prejacents lifts to their necessitations.

Existential introduction via witness reconstruction #

theorem Core.Logic.Modal.QBSML.support_exi_of_update_closure {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {γ : QBSMLFormula Var Const Pred} {x : Var} {s t : Finset (Index W Var Domain)} (hpar : jt, is, ∃ (d : Domain), i.update x d = j) (hcov : is, ∃ (d : Domain), i.update x d t) (hsupp : support M γ t) :

A state t of x-updates of s (covering all of s) that supports γ witnesses ∃x γ on s: the functional collecting, at each index, the values whose updates land in t reconstructs t exactly (State.extendFunctional_filter_of_update_mem). The shared existential-witness step of the free-choice facts (Core/Logic/Modal/QBSML/FreeChoice.lean).

Classicality: the modal-free Realize bridge #

[AvO23] Proposition 4.1 reduces the NE-free fragment to classical quantified modal logic. The modal-free part of that reduction is stated against mathlib first-order satisfaction: QBSMLFormula.toFormula? translates the fragment into (monadicLang Const Pred).Formula Var — quantifiers via the computable named binders Formula.all₁ / Formula.ex₁ of Core/Logic/FirstOrder/Binders.lean — support at a singleton state is Formula.Realize in the structure the model carries at that world (support_singleton_iff_realizeAt), and flatness extends the bridge to arbitrary states (support_iff_forall_realizeAt). Modals remain outside the bridge: their right-hand side is classical modal logic, which mathlib's ModelTheory does not carry.

@[simp]
theorem FirstOrder.Language.KripkeStructure.realizeAt_rel₁ {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} (M : Core.Logic.Modal.QBSML.QBSMLModel W Domain Const Pred) (P : Pred) (x : Var) (w : W) (v : VarDomain) :
RealizeAt M w ((Core.Logic.Modal.QBSML.monadicRel P).formula₁ (var x)) v pInterp M P w (v x)
@[simp]
theorem FirstOrder.Language.KripkeStructure.realizeAt_rel₁_const {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} (M : Core.Logic.Modal.QBSML.QBSMLModel W Domain Const Pred) (P : Pred) (c : Const) (w : W) (v : VarDomain) :
def Core.Logic.Modal.QBSML.QBSMLFormula.toFormula? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] :
QBSMLFormula Var Const PredOption ((monadicLang Const Pred).Formula Var)

Translate the modal-free fragment of QBSML into mathlib first-order formulas over the monadic signature: quantifiers via the computable named binders Formula.all₁ / Formula.ex₁ (none on NE and modal formulas).

Equations
Instances For
    theorem Core.Logic.Modal.QBSML.isNEFree_of_toFormula? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] {φ : QBSMLFormula Var Const Pred} {ψ : (monadicLang Const Pred).Formula Var} :
    φ.toFormula? = some ψφ.IsNEFree

    Translatable formulas are NE-free.

    theorem Core.Logic.Modal.QBSML.support_singleton_iff_realizeAt {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {φ : QBSMLFormula Var Const Pred} {ψ : (monadicLang Const Pred).Formula Var} ( : φ.toFormula? = some ψ) {i : Index W Var Domain} {v : VarDomain} (hv : ∀ (y : Var), i.assign y = some (v y)) :

    [AvO23] Proposition 4.1, singleton case (modal-free fragment): support of a translatable formula at a singleton state is classical first-order satisfaction at that index's world, for any total valuation the index's partial assignment refines.

    theorem Core.Logic.Modal.QBSML.antiSupport_singleton_iff_realizeAt {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {φ : QBSMLFormula Var Const Pred} {ψ : (monadicLang Const Pred).Formula Var} ( : φ.toFormula? = some ψ) {i : Index W Var Domain} {v : VarDomain} (hv : ∀ (y : Var), i.assign y = some (v y)) :

    Anti-support of a translatable formula at a singleton state is the classical falsity of its translation.

    theorem Core.Logic.Modal.QBSML.support_iff_forall_realizeAt {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {φ : QBSMLFormula Var Const Pred} {ψ : (monadicLang Const Pred).Formula Var} ( : φ.toFormula? = some ψ) (s : Finset (Index W Var Domain)) (v : Index W Var DomainVarDomain) (hv : is, ∀ (y : Var), i.assign y = some (v i y)) :
    support M φ s is, FirstOrder.Language.KripkeStructure.RealizeAt M i.world ψ (v i)

    [AvO23] Proposition 4.1 (modal-free fragment): a translatable formula is supported by a state iff it is classically satisfied at every index — M, s ⊨ φ(x̄) iff M, w ⊨_g φ(x̄) for all ⟨w, g⟩ ∈ s, with the right-hand side mathlib's Formula.Realize.

    Classicality II: the full modal bridge #

    The complete [AvO23] Proposition 4.1: QBSMLFormula.toModal? translates the whole NE-free fragment — modals included — into ModalFormula over the monadic signature (Core/Logic/FirstOrder/Kripke.lean), and support is Kripke satisfaction at every index. The translation is total on exactly the NE-free fragment.

    def Core.Logic.Modal.QBSML.QBSMLFormula.toModal? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} :
    QBSMLFormula Var Const PredOption ((monadicLang Const Pred).ModalFormula Var)

    Translate QBSML into modal formulas over the monadic signature: atoms embed as classical formulas, becomes the derived ModalFormula.dia, quantifiers become named binders; only NE returns none.

    Equations
    Instances For
      theorem Core.Logic.Modal.QBSML.isNEFree_of_toModal? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] {φ : QBSMLFormula Var Const Pred} {τ : (monadicLang Const Pred).ModalFormula Var} :
      φ.toModal? = some τφ.IsNEFree

      Modally translatable formulas are NE-free.

      theorem Core.Logic.Modal.QBSML.exists_toModal?_of_isNEFree {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] {φ : QBSMLFormula Var Const Pred} :
      φ.IsNEFree∃ (τ : (monadicLang Const Pred).ModalFormula Var), φ.toModal? = some τ

      The modal translation is total on the NE-free fragment: together with isNEFree_of_toModal?, the translatable and NE-free fragments coincide.

      theorem Core.Logic.Modal.QBSML.support_singleton_iff_realize {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {φ : QBSMLFormula Var Const Pred} {τ : (monadicLang Const Pred).ModalFormula Var} ( : φ.toModal? = some τ) {i : Index W Var Domain} {v : VarDomain} (hv : ∀ (y : Var), i.assign y = some (v y)) :

      [AvO23] Proposition 4.1, singleton case (full NE-free fragment): support of a modally translatable formula at a singleton state is Kripke satisfaction at that index's world.

      theorem Core.Logic.Modal.QBSML.antiSupport_singleton_iff_realize {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {φ : QBSMLFormula Var Const Pred} {τ : (monadicLang Const Pred).ModalFormula Var} ( : φ.toModal? = some τ) {i : Index W Var Domain} {v : VarDomain} (hv : ∀ (y : Var), i.assign y = some (v y)) :

      Anti-support of a modally translatable formula at a singleton state is classical modal falsity.

      theorem Core.Logic.Modal.QBSML.support_iff_forall_realize {W : Type u_1} {Var : Type u_2} {Domain : Type u_3} {Const : Type u_4} {Pred : Type u_5} [DecidableEq W] [DecidableEq Var] [Fintype Var] [DecidableEq Domain] [Fintype Domain] (M : QBSMLModel W Domain Const Pred) {φ : QBSMLFormula Var Const Pred} {τ : (monadicLang Const Pred).ModalFormula Var} ( : φ.toModal? = some τ) (s : Finset (Index W Var Domain)) (v : Index W Var DomainVarDomain) (hv : is, ∀ (y : Var), i.assign y = some (v i y)) :
      support M φ s is, FirstOrder.Language.ModalFormula.Realize M i.world τ (v i)

      [AvO23] Proposition 4.1 (full NE-free fragment): an NE-free formula is supported by a state iff its modal translation is classically satisfied at every index — M, s ⊨ φ(x̄) iff M, w ⊨_g φ(x̄) for all ⟨w, g⟩ ∈ s, the right-hand side Kripke satisfaction over mathlib structures.