Basic Question Types #
Core types for question semantics shared across theoretical approaches.
@[reducible, inline]
Partition-based question: list of mutually exclusive proposition cells.
Equations
- Semantics.Questions.Question W = List (W → Bool)
Instances For
@[reducible, inline]
Answer: proposition as characteristic function on worlds.
Equations
- Semantics.Questions.Answer W = (W → Bool)
Instances For
@[reducible, inline]
Cell in a question partition.
Equations
- Semantics.Questions.Cell W = (W → Bool)
Instances For
Equations
- Semantics.Questions.trivialQuestion = [fun (x : W) => true]
Instances For
Equations
- Semantics.Questions.exactQuestion worlds = List.map (fun (w v : W) => w == v) worlds
Instances For
Equations
Instances For
Equations
- Semantics.Questions.cellOf q w = List.find? (fun (cell : Semantics.Questions.Cell W) => cell w) q
Instances For
Equations
- Semantics.Questions.filterWorlds worlds p = List.filter p worlds
Instances For
Product of two questions: cells are intersections.
Equations
- Semantics.Questions.questionProduct q1 q2 = List.flatMap (fun (c1 : W → Bool) => List.map (fun (c2 : W → Bool) (w : W) => c1 w && c2 w) q2) q1
Instances For
Equations
def
Semantics.Questions.completelyAnswers
{W : Type u_1}
(p : Answer W)
(q : Question W)
(worlds : List W)
:
Equations
- Semantics.Questions.completelyAnswers p q worlds = ((List.filter (fun (cell : W → Bool) => worlds.any fun (w : W) => p w && cell w) q).length == 1)
Instances For
Equations
- Semantics.Questions.pnot p w = !p w
Instances For
Equations
- Semantics.Questions.pand p q w = (p w && q w)
Instances For
Equations
- Semantics.Questions.por p q w = (p w || q w)
Instances For
Equations
- Semantics.Questions.pimplies p q w = (!p w || q w)