Documentation

Linglib.Logic.Team.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 Team.isFlat_iff template as Logic/Team/BSML/Properties.lean.

Main declarations #

Implementation notes #

The closure inductions are folds over the connective-level lemmas of Team/Operations.lean and the quantifier clauses State.univ/State.exi of QBSML/Defs.lean. BSML proves its closure properties in separate inductions; QBSML cannot: union closure of the functional-extension clause (State.supClosed_exi) needs downward closure of the subformula, so the two properties 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 QBSML.support_empty_of_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] {φ : Formula Var Const Pred} (hNE : φ.NEFree) (M : Model W Domain Const Pred) :
support M φ ∅

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

Downward and union closure for NE-free formulas #

theorem QBSML.isLowerSet_support_of_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] {φ : Formula Var Const Pred} (hNE : φ.NEFree) (M : Model 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 QBSML.supClosed_support_of_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] {φ : Formula Var Const Pred} (hNE : φ.NEFree) (M : Model 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 QBSML.isFlat_support_of_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] {φ : Formula Var Const Pred} (hNE : φ.NEFree) (M : Model W Domain Const Pred) :
Team.IsFlat {t : Finset (Index W Var Domain) | support M φ t}

NE-free QBSML formulas are flat, the QBSML case of [Ant21] Proposition 2.2.16. It follows from [Ant21] Proposition 2.2.2 (Team.isFlat_iff) applied to the three closure properties above.

Soundness for the flat cell (Definability bridge) #

theorem QBSML.definableClass_support_neFree_subset {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 : Model W Domain Const Pred) :
(Team.definableClass fun (φ : { φ : Formula Var Const Pred // φ.NEFree }) => support M ↑φ) ⊆ {P : Team.TeamProperty (Index W Var Domain) | Team.IsFlat P}

The NE-free fragment of QBSML is sound for the flat cell, since 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 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 : Model W Domain Const Pred) (φ : Formula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.neg.neg s ↔ support M φ s

Double negation elimination ([AvO23] Fact 1).

theorem 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 : Model W Domain Const Pred) (φ ψ : Formula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M (φ.disj ψ).neg s ↔ support M (φ.neg.conj ψ.neg) s

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

theorem 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 : Model W Domain Const Pred) (φ ψ : Formula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M (φ.conj ψ).neg s ↔ support M (φ.neg.disj ψ.neg) s

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

theorem 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 : Model W Domain Const Pred) (φ : Formula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.nec.neg s ↔ support M φ.neg.poss s

The modal duality ¬□φ ≡ ◇¬φ ([AvO23] Fact 1).

theorem 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 : Model W Domain Const Pred) (φ : Formula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.poss.neg s ↔ support M φ.neg.nec s

The modal duality ¬◇φ ≡ □¬φ ([AvO23] Fact 1).

theorem 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 : Model W Domain Const Pred) (φ : Formula Var Const Pred) (x : Var) (s : Finset (Index W Var Domain)) :
support M (Formula.univ x φ).neg s ↔ support M (Formula.exi x φ.neg) s

The quantifier duality ¬∀xφ ≡ ∃x¬φ ([AvO23] Fact 1).

theorem 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 : Model W Domain Const Pred) (φ : Formula Var Const Pred) (x : Var) (s : Finset (Index W Var Domain)) :
support M (Formula.exi x φ).neg s ↔ support M (Formula.univ x φ.neg) s

The quantifier duality ¬∃xφ ≡ ∀x¬φ ([AvO23] Fact 1).

Flatness as pointwise evaluation #

theorem 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] {φ : Formula Var Const Pred} (hNE : φ.NEFree) (M : Model W Domain Const Pred) (s : Finset (Index W Var Domain)) :
support M φ s ↔ ∀ i ∈ s, support M φ {i}

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

theorem 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] {φ : Formula Var Const Pred} (hNE : φ.NEFree) (M : Model W Domain Const Pred) (s : Finset (Index W Var Domain)) :
antiSupport M φ s ↔ ∀ i ∈ s, antiSupport M φ {i}

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

Atom substitution salva veritate #

theorem 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 : Model W Domain Const Pred) {fp : Pred → Var → Formula Var Const Pred} {fc : Pred → Const → Formula 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 (Formula.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 (Formula.predc P c) s) (φ : Formula Var Const Pred) (b : Bool) (s : Finset (Index W Var Domain)) :
eval M b (Formula.mapAtoms fp fc φ) s ↔ eval M b φ s

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 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 : Model W Domain Const Pred) {α β : Formula Var Const Pred} (hβ : β.NEFree) {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 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 : Model W Domain Const Pred) (φ : Formula Var Const Pred) (s : Finset (Index W Var Domain)) :
support M φ.nec s ↔ ∀ i ∈ s, 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 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 : Model W Domain Const Pred) {α β : Formula Var Const Pred} (h : ∀ (t : Finset (Index W Var Domain)), support M α t → support M β t) {s : Finset (Index W Var Domain)} (hα : 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 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 : Model W Domain Const Pred) {γ : Formula Var Const Pred} {x : Var} {s t : Finset (Index W Var Domain)} (hpar : ∀ j ∈ t, ∃ i ∈ s, ∃ (d : Domain), i.update x d = j) (hcov : ∀ i ∈ s, ∃ (d : Domain), i.update x d ∈ t) (hsupp : support M γ t) :
support M (Formula.exi x γ) s

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 (Logic/Team/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: Formula.toFormula? translates the fragment into ((Language.monadic Pred)[[Const]]).Formula Var — quantifiers via the computable named binders Formula.all₁ / Formula.ex₁ of Core/ModelTheory/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.

def QBSML.Formula.toFormula? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] :
Formula Var Const Pred → Option (((FirstOrder.Language.monadic Pred).withConstants Const).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 QBSML.neFree_of_toFormula? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] {φ : Formula Var Const Pred} {ψ : ((FirstOrder.Language.monadic Pred).withConstants Const).Formula Var} :
    φ.toFormula? = some ψ → φ.NEFree

    Translatable formulas are NE-free.

    theorem 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 : Model W Domain Const Pred) {φ : Formula Var Const Pred} {ψ : ((FirstOrder.Language.monadic Pred).withConstants Const).Formula Var} (hψ : φ.toFormula? = some ψ) {i : Index W Var Domain} {v : Var → Domain} (hv : ∀ (y : Var), i.assign y = ↑(v y)) :
    support M φ {i} ↔ ψ.RealizeAt M.interp i.world v

    [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 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 : Model W Domain Const Pred) {φ : Formula Var Const Pred} {ψ : ((FirstOrder.Language.monadic Pred).withConstants Const).Formula Var} (hψ : φ.toFormula? = some ψ) {i : Index W Var Domain} {v : Var → Domain} (hv : ∀ (y : Var), i.assign y = ↑(v y)) :
    antiSupport M φ {i} ↔ ¬ψ.RealizeAt M.interp i.world v

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

    theorem 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 : Model W Domain Const Pred) {φ : Formula Var Const Pred} {ψ : ((FirstOrder.Language.monadic Pred).withConstants Const).Formula Var} (hψ : φ.toFormula? = some ψ) (s : Finset (Index W Var Domain)) (v : Index W Var Domain → Var → Domain) (hv : ∀ i ∈ s, ∀ (y : Var), i.assign y = ↑(v i y)) :
    support M φ s ↔ ∀ i ∈ s, ψ.RealizeAt M.interp i.world (v i)

    A translatable formula is supported by a state iff it is classically satisfied at every index, [AvO23] Proposition 4.1 for the modal-free fragment: 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: Formula.toModal? translates the whole NE-free fragment — modals included — into ModalFormula over the monadic signature (Logic/Modal/FirstOrder/Semantics.lean), and support is Kripke satisfaction at every index. The translation is total on exactly the NE-free fragment.

    def QBSML.Formula.toModal? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] :
    Formula Var Const Pred → Option (((FirstOrder.Language.monadic Pred).withConstants Const).ModalFormula Var)

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

    Equations
    Instances For
      theorem QBSML.neFree_of_toModal? {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] {φ : Formula Var Const Pred} {τ : ((FirstOrder.Language.monadic Pred).withConstants Const).ModalFormula Var} :
      φ.toModal? = some τ → φ.NEFree

      Modally translatable formulas are NE-free.

      theorem QBSML.exists_toModal?_of_neFree {Var : Type u_2} {Const : Type u_4} {Pred : Type u_5} [DecidableEq Var] {φ : Formula Var Const Pred} :
      φ.NEFree → ∃ (τ : ((FirstOrder.Language.monadic Pred).withConstants Const).ModalFormula Var), φ.toModal? = some τ

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

      theorem 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 : Model W Domain Const Pred) {φ : Formula Var Const Pred} {τ : ((FirstOrder.Language.monadic Pred).withConstants Const).ModalFormula Var} (hτ : φ.toModal? = some τ) {i : Index W Var Domain} {v : Var → Domain} (hv : ∀ (y : Var), i.assign y = ↑(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 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 : Model W Domain Const Pred) {φ : Formula Var Const Pred} {τ : ((FirstOrder.Language.monadic Pred).withConstants Const).ModalFormula Var} (hτ : φ.toModal? = some τ) {i : Index W Var Domain} {v : Var → Domain} (hv : ∀ (y : Var), i.assign y = ↑(v y)) :

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

      theorem 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 : Model W Domain Const Pred) {φ : Formula Var Const Pred} {τ : ((FirstOrder.Language.monadic Pred).withConstants Const).ModalFormula Var} (hτ : φ.toModal? = some τ) (s : Finset (Index W Var Domain)) (v : Index W Var Domain → Var → Domain) (hv : ∀ i ∈ s, ∀ (y : Var), i.assign y = ↑(v i y)) :
      support M φ s ↔ ∀ i ∈ s, 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.