-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrooth.fst
More file actions
105 lines (80 loc) · 2.22 KB
/
rooth.fst
File metadata and controls
105 lines (80 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# This file defines a simple version of Rooth's (2017) finite state semantics.
# The basic principles of Rooth's semantics are maintained, with minor
# simplifications to the world model itself.
#######
#
# EXTRA PRIMITIVES
#
#######
# Domain of a relation
define Do(X) X.u;
# Co-domain of a relation
define Co(X) X.l;
#######
#
# BASIC STRUCTURES
#
#######
# Indices (trace, center, pericenter, null)
define Idx "I0" | "I1" | "I2" | "INull";
# Agents (facing left or right)
define Agent "<" | ">";
# Regular symbols (letters)
define Letter "a" | "b" | "c" | "d";
# Identifiers (may be letters or an agent)
define Id Letter | Agent;
# Knowledge bit
define Kno "K+" | "K-";
# Complete individual - with knowledge bit, identifier, and index
define Individual Kno Id Idx;
# The world consists of four individuals, including exactly one agent, at most
# one center, at most one pericenter, and pericenters imply the existence of a
# center; the agent always knows its own location.
define W Individual^4 & [$. Agent] & [$? "I1"] & [$? "I2"] & [$? "I0"] &
["I2" => ?* "I1" ?* _ ?*, ?* _ ?* "I1" ?*] &
[Agent => "K+" _];
#######
#
# INDEFINITES
#
#######
# A transducer for popping centers.
define PopT "I1" -> "INull" ,,
"I2" -> "I1" ,,
"Null" (->) "I2" ,,
"I0" (->) "I2";
# Pop as a function macro.
define Pop(X) W & Co(X .o. PopT);
# Indefinite quantifier.
define Indef(X, Y) Pop(X & Y);
#######
#
# EPISTEMIC MODALS
#
#######
# A transducer which allows letters to vary freely in case they have not been
# observed by the agent.
define R0 Id -> Id || "K-" _;
# The knowledge relation.
define R [W .x. W] & R0;
# A function macro which creates a predicate indicating whether the agent knows
# a proposition X.
define K(X) W - Do(R .o. [W - X]);
#######
#
# PREDICATES
#
#######
# The center has the identifier X.
define HasId(X) W & [$ [Kno X "I1"]];
# The center is adjacent to the pericenter.
define Adj W & [$ [Kno Id ["I1" | "I2"] Kno Id ["I1" | "I2"]]];
#######
#
# EXAMPLES
#
#######
# A "c" is adjacent to a "d"
define Example11 Indef(HasId("c"), Indef(HasId("d"), Adj));
# The agent knows that a "c" is adjacent to a "d".
define Example15 K(Example11);