Typed atoms and small world models for free-choice scenarios #
Shared scenario substrate for BSML- and QBSML-based free-choice studies
([Alo22], [AvO23], [Yan23]). Replaces ad-hoc
string atoms ("coffee", "tea", ...) in scenario constructions, where
a typo silently compiles to false under the
match p with | "coffee" => ... | _ => false fallthrough pattern.
Main declarations #
FCAtom— typed propositional atoms:a/bcover the disjuncts of binary FC inferences;cis reserved for embedded scenarios involving a third proposition.QVar— the shared toy variable type for quantified FC scenarios (QBSML); the first-order counterpart ofFCAtom.TwoAtomWorld— the 2² = 4 truth assignments to two atoms ([Alo22] Figure 1:w_∅,w_a,w_b,w_ab), with the typedholdstruth table.
Studies instantiate KripkeModel's String-keyed val field by
pattern-matching on the canonical names via FCAtom.toName. Eliminating
the String layer entirely (making KripkeModel.val : FCAtom → α → Bool)
would require parameterizing Formula and KripkeModel over the atom
type — a substrate-wide refactor deferred to a separate effort.
Equations
- BSML.instDecidableEqFCAtom x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- BSML.instReprFCAtom.repr BSML.FCAtom.a prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.FCAtom.a")).group prec✝
- BSML.instReprFCAtom.repr BSML.FCAtom.b prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.FCAtom.b")).group prec✝
- BSML.instReprFCAtom.repr BSML.FCAtom.c prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.FCAtom.c")).group prec✝
Instances For
Equations
- BSML.instReprFCAtom = { reprPrec := BSML.instReprFCAtom.repr }
Equations
- BSML.instInhabitedFCAtom = { default := BSML.instInhabitedFCAtom.default }
Equations
- BSML.instFintypeFCAtom = { elems := {BSML.FCAtom.a, BSML.FCAtom.b, BSML.FCAtom.c}, complete := BSML.instFintypeFCAtom._proof_1 }
Canonical String name of an atom. Used at KripkeModel.val boundaries
where the substrate's val : String → α → Bool field forces String.
Equations
- BSML.FCAtom.a.toName = "a"
- BSML.FCAtom.b.toName = "b"
- BSML.FCAtom.c.toName = "c"
Instances For
Equations
- BSML.instDecidableEqQVar x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- BSML.instReprQVar.repr BSML.QVar.x prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.QVar.x")).group prec✝
Instances For
Equations
- BSML.instReprQVar = { reprPrec := BSML.instReprQVar.repr }
Equations
- BSML.instFintypeQVar = { elems := { val := ↑BSML.QVar.enumList, nodup := BSML.QVar.enumList_nodup }, complete := BSML.instFintypeQVar._proof_1 }
Power-set-of-{a,b}: the 4 truth assignments to two propositional atoms.
Names follow [Alo22] Figure 1 (w_∅, w_a, w_b, w_ab):
- nothing : TwoAtomWorld
- onlyA : TwoAtomWorld
- onlyB : TwoAtomWorld
- both : TwoAtomWorld
Instances For
Equations
- BSML.instDecidableEqTwoAtomWorld x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- BSML.instReprTwoAtomWorld.repr BSML.TwoAtomWorld.nothing prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.TwoAtomWorld.nothing")).group prec✝
- BSML.instReprTwoAtomWorld.repr BSML.TwoAtomWorld.onlyA prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.TwoAtomWorld.onlyA")).group prec✝
- BSML.instReprTwoAtomWorld.repr BSML.TwoAtomWorld.onlyB prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.TwoAtomWorld.onlyB")).group prec✝
- BSML.instReprTwoAtomWorld.repr BSML.TwoAtomWorld.both prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "BSML.TwoAtomWorld.both")).group prec✝
Instances For
Equations
- BSML.instReprTwoAtomWorld = { reprPrec := BSML.instReprTwoAtomWorld.repr }
Equations
- One or more equations did not get rendered due to their size.
Truth-table for the two-atom power set. The third atom (c) is
unsatisfiable in this baseline 4-world model — embedded scenarios
needing c should use a larger world type.
Equations
- BSML.TwoAtomWorld.both.holds BSML.FCAtom.a = true
- BSML.TwoAtomWorld.both.holds BSML.FCAtom.b = true
- BSML.TwoAtomWorld.onlyA.holds BSML.FCAtom.a = true
- BSML.TwoAtomWorld.onlyA.holds BSML.FCAtom.b = false
- BSML.TwoAtomWorld.onlyB.holds BSML.FCAtom.a = false
- BSML.TwoAtomWorld.onlyB.holds BSML.FCAtom.b = true
- BSML.TwoAtomWorld.nothing.holds BSML.FCAtom.a = false
- BSML.TwoAtomWorld.nothing.holds BSML.FCAtom.b = false
- x✝.holds BSML.FCAtom.c = false
Instances For
Synonym used by Studies that prefer the predicate spelling.