-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinfex.tex
6188 lines (5359 loc) · 273 KB
/
infex.tex
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\chapter[From event perception and action to information states and
information exchange][Information states and information
exchange]{From event perception and action to information states and information exchange}
\label{ch:infex}
\setcounter{equation}{0}
\section{Introduction}
In Chapter~\ref{ch:percint} we talked about two kinds of situation
types: ptypes and record types. This presents a static view of
situations which are events, that is, those situations in which a
change takes place. In Section~\ref{sec:ev-strings} we will introduce
string types which enable us to treat events as strings of smaller events.
\section{The string theory of events}
\label{sec:ev-strings}
Kim stands and watches the boy and the dog for a while. They start to
play fetch.\footnote{\url{http://en.wikipedia.org/wiki/Fetch_(game)},
accessed 10th Oct 2011.} This is a moderately complex game in that
it consists of a number of components which are carried out in a
certain order. The boy picks up a stick attracts the attention of
the dog (possibly shouting ``Fetch!''), and throws the stick. The dog
runs after the stick, picks it up in his mouth and brings it back to
the boy. This sequence can be repeated arbitrarily many times. One
thing that becomes clear from this is that events do not happen in a
single moment but rather they are stretched out over intervals of
time, characterized by the sub-events that constitute them. So if we were to have a type of event (that is, a type of situation)
play\_fetch($a$,$b$,$c$) where $a$ is a human, $b$ is a dog and
$c$ is a stick % , then $t$ should not be a moment of time but a time
% \textit{interval} starting with the time of the beginning of the event
% and ending with the time of the end of the event. But
we can %could also
say something about the series of subevents that we have identified.
So we might draw an informal diagram something like
Figure~\ref{fig:fetch}.
\begin{figure}
%\includegraphics[width=6in]{fetch}
\hspace*{-4em}\begin{tikzpicture}[
play/.style={rectangle, fill=Lamentation5, draw=Lamentation1, text=white, text depth=0.25ex, text height=1.5ex}
]
\node [play, pin=above:\textbf{Begin}] (p1) {pick\_up($a,c$)};
\node [play, right=of p1] (p2) {attract\_attention($a,b$)};
\node [play, right=of p2] (p3) {throw($a,c$)};
\node [play, below=1.5 of p1] (p4) {run\_after($b,c$)};
\node [play, right=of p4] (p5) {pick\_up($b,c$)};
\node [play, right=of p5, pin=below:\textbf{End}] (p6) {return($b,c,a$)};
\path [-{Stealth[]}, thick]
(p1) edge [bend left] (p2)
(p2) edge [bend left] (p3)
(p3) edge [out=240, in=60] (p4)
(p4) edge [bend left] (p5)
(p5) edge [bend left] (p6)
(p6) edge [out=210, in=190, looseness=1.7] (p1);
\end{tikzpicture}
\caption{play\_fetch($a$,$b$,$c$)}
\label{fig:fetch}
\end{figure}
In an important series of papers including
\cite{Fernando2004,Fernando2006,Fernando2008,Fernando2009,Fernando2011,Fernando2015}, Fernando introduces a finite state
approach to event analysis where events are analyzed in terms of
finite state automata something like what we have represented in
Figure~\ref{fig:fetch-fs}.
\begin{figure}
%\includegraphics[width=6in]{fetch-fs}
\begin{tikzpicture}[
node distance=3cm,
on grid,
every state/.style={fill=Lamentation2},
]
\node [state, initial] (n0) {0};
\node [state] (n1) [right=of n0] {1};
\node [state] (n2) [right=of n1] {2};
\node [state] (n3) [right=of n2] {3};
\node [state] (n4) [below=of n3] {4};
\node [state] (n5) [left=of n4] {5};
\node [state, accepting] (n6) [left=of n5] {6};
\path [-{Stealth[]}, thick]
(n0) edge [bend left] node [above] {pick\_up($a,c$)} (n1)
(n1) edge [bend left] node [above] {attract\_attention($a,b$)} (n2)
(n2) edge [bend left] node [above] {throw($a,c$)} (n3)
(n3) edge [bend left] node [right] {run\_after($b,c$)} (n4)
(n4) edge [bend left] node [below] {pick\_up($b,c$)} (n5)
(n5) edge [bend left] node [below] {return($b,c,a$)} (n6)
(n6) edge [bend left] node [left] {pick\_up($a,c$)} (n1);
\end{tikzpicture}
\caption{play\_fetch($a$,$b$,$c$) as a finite state machine}
\label{fig:fetch-fs}
\end{figure}
Such an automaton will recognize a string of
sub-events. The idea is that our perception of complex events can be seen as strings of
punctual observations similar to the kind of sampling we are
familiar with from audio technology and digitization processing in
speech recognition. Thus events can be analyzed as strings of smaller
events. % What we mean by a string is made precise in
% Appendix~\ref{sec:regular}.
Any object of any type can be part of a
string. Any two objects (including strings themselves), $s_1$ and $s_2$, can be
\textit{concatenated} to form a string $s_1s_2$. An
important property of concatenation is \textit{associativity}, that is
if we concatenate $s_1$ with $s_2$ and then concatenate the result
with $s_3$ we get the same string that we would obtain by
concatenating $s_2$ with $s_3$ and then concatenating $s_1$ with the
result. In symbols: $(s_1s_2)s_3 =
s_1(s_2s_3)$. For this reason we normally write
$s_1s_2s_3$ (without the parentheses). Following Fernando we will use these strings to
give us our notion of temporal order.
If $a_1,a_2,\ldots,a_n$ are objects we will normally represent the
string of these objects as $a_1a_2\ldots a_n$. Where confusion might
arise from this notation we use $\mathrm{str}(a_1a_2\ldots a_n)$.
This latter notation will be particularly useful when distinguishing a
single object, $a$, from a unit string containing this object
$\mathrm{str}(a)$. Although we will present strings in this way, we will model them as
records \label{pg:stringsasrecords} with distinguished labels related to the natural numbers,
t$_0$, t$_1$, \ldots (`t' for ``time''). The field labelled t$_n$
will correspond to the $n+1$th place in the string. Thus a string of
objects $a_1a_2a_3$
will be the record in \nexteg{}.
\begin{ex}
\record{\field{t$_0$}{$a_1$} \\
\field{t$_1$}{$a_2$} \\
\field{t$_2$}{$a_3$}}
\end{ex}
The concatenation of \preveg{} with the string $a_4$, that is, \nexteg{a}, will
be \nexteg{b}.
\begin{ex}
\begin{subex}
\item \record{\field{t$_0$}{$a_4$}}
\item \record{\field{t$_0$}{$a_1$} \\
\field{t$_1$}{$a_2$} \\
\field{t$_2$}{$a_3$} \\
\field{t$_3$}{$a_4$}}
\end{subex}
\end{ex}
\begin{shaded}
Strings can be introduced into a type system with record types by the
definition in \nexteg{} (repeated in Appendix~\ref{app:strings})
\begin{ex}
A system of complex types \textbf{TYPE}$_C$ = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ with record types
based on $\langle\mathcal{L}, \mathbf{RType}\rangle$ \textit{has strings}
if
\begin{enumerate}
\item for each natural number $i$, t$_i\in\mathcal{L}$
\item \textit{String} $\in$ \textbf{BType}
\item $\emptyset:_{\mathbf{TYPE}_C}$ \textit{String}
\item if $T \in$ \textbf{Type} and $a:_{\mathbf{TYPE}_C}T$ then
$\{\langle\text{t}_0,a\rangle\} : \textit{String}$
\item if $s$ :$_{\mathbf{TYPE}_C}$ \textit{String}, t$_n\in\mathrm{labels}(s)$ such that
there is no $i>n$ where t$_i\in\mathrm{labels}(s)$, $T \in$ \textbf{Type}
and $a:_{\mathbf{TYPE}_C}T$ then $s\cup\{\langle \mathrm{t}_{n+1},a\rangle\}$ :$_{\mathbf{TYPE}_C}$
\textit{String}
\item Nothing is of type \textit{String} except as required above.
\end{enumerate}
\label{ex:string-sys}
\end{ex}
\preveg{}, clause~1 ensures that the labels $t_i$ are among the labels
available for forming record types. Clause~2 introduces a basic type
\textit{String}. Clause~3 says the empty set (also known as the empty
record and empty string) is a string. Clause~4 says that if you have
an object, $a$, of some type then you can form a unit string
containing $a$. That is the record
\smallrecord{\field{t$_0$}{$a$}}. Note that we always start with the
label `t$_0$'. Clause~5 says that we can always create a new string
from a string $s$ by adding an additional object to the end of it,
using a label `t$_{n+1}$' where $n$ is the highest number such that
$\text{t}_n\in\mathrm{labels}(s)$. Clause~6 is an exclusion clause.
Clauses~3--6 constitute an inductive definition of the set of
witnesses of the type \textit{String}.
In our informal proof theoretic notation this can be characterized by
giving an inductive definition as in \nexteg{}.
\begin{ex}
For $\Gamma$ a system of complex types with record types based on
$\langle\mathcal{L},\mathbf{RType}\rangle$ and strings
\begin{subex}
\item \begin{prooftree}
\infer0[$i\in\textit{Nat}$]{\text{t}_i\in\mathcal{L}}
\end{prooftree}
\item \begin{prooftree}
\infer0{\Gamma\vdash\textit{String}\in\textbf{BType}}
\end{prooftree}
\item \begin{prooftree}
\infer0{\Gamma\vdash\emptyset:\textit{String}}
\end{prooftree}
\item \begin{prooftree}
\hypo{\Gamma\vdash a:T}
\infer1{\Gamma\vdash\{\langle\text{t}_0,a\rangle\}:\textit{String}}
\end{prooftree}
\item \begin{prooftree}
\hypo{\Gamma\vdash s:\textit{String}}
\hypo{\Gamma\vdash a:T}
\hypo{\{\text{t}_0,\ldots,\text{t}_n\}=\mathrm{labels}(s)}
\infer3[$n\geq 0$]{\Gamma\vdash
s\cup\{\langle\text{t}_{n+1},a\rangle\}:\textit{String}}
\end{prooftree}
\end{subex}
\end{ex}
\end{shaded}
We will continue to
represent strings for convenience in the traditional way but modelling
strings as records will become important when following paths in
records down to elements in strings and any operations we define on
records will automatically generalize to strings. We will use
$\varepsilon$ to represent the empty string (that is, the empty set). We will use $s[n]$ to represent
the $n$th element in a string $s$ (where the first element in the
string is $s[0]$). In terms of the record notation
this is just a convenient abbreviation for $s$.t$_n$.
\label{pg:stringtype-notation}We will use $T^{=n}$, or, when there is no risk of confusion, simply
$T^n$, as the type of strings of length $n$ all of whose elements are
of type $T$. We will use $T^{\geq n}$ for the type of strings of
objects of type $T$ which have length greater than or equal to $n$.
In particular we will use $T^*$ (the Kleene star) for $T^{\geq0}$ and
$T^+$ (the Kleene plus) for $T^{\geq1}$.
\begin{shaded}
We can make this precise with the definition in \nexteg{} (repeated in
Appendix~\ref{app:strings})
\begin{ex}
A system of complex types \textbf{TYPE}$_C$ = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ with strings has
\textit{length determining string types} if
\begin{enumerate}
\item for any $T\in\textbf{Type}$ and $n$ a natural number, the string
types $T^{=n}$,
$T^{\leq n}$, $T^{\geq n}\in\textbf{Type}$
\item $s:_{\mathbf{TYPE}_C}T^{=n}\ (T^{\leq n}, T^{\geq n})$ iff
$s:_{\mathbf{TYPE}_C}\textit{String}$, for all $i$, $0\leq
i<\mathrm{length}(s)$, $s[i]:_{\mathbf{TYPE_C}}T$ and $\mathrm{length}(s) =
(\leq,\geq)\ n$
\end{enumerate}
\label{ex:ldstringtypes}
\end{ex}
In our informal proof theoretic notation this can be expressed as
\nexteg{}.
\begin{ex}
For $\Gamma$ a system of complex types with strings and length
determining string types:
\begin{subex}
\item \begin{prooftree}
\hypo{\Gamma\vdash T\in\textbf{Type}}
\infer1[$n\in\textit{Nat}$]{\Gamma\vdash T^{=n}\in\textbf{Type}}
\end{prooftree}
\hspace*{2em}
\begin{prooftree}
\hypo{\Gamma\vdash T\in\textbf{Type}}
\infer1[$n\in\textit{Nat}$]{\Gamma\vdash T^{\leq n}\in\textbf{Type}}
\end{prooftree}
\hspace*{2em}
\begin{prooftree}
\hypo{\Gamma\vdash T\in\textbf{Type}}
\infer1[$n\in\textit{Nat}$]{\Gamma\vdash T^{\geq n}\in\textbf{Type}}
\end{prooftree}
\item \begin{prooftree}
\hypo{\Gamma\vdash s:\textit{String}}
\hypo{\mathrm{length}(s)=n}
\hypo{[i<n]}
\ellipsis{}{\Gamma\vdash s[i]:T}
\infer3{\Gamma\vdash s:T^{=n}}
\end{prooftree}
\hspace*{2em}
\begin{prooftree}
\hypo{\Gamma\vdash s:\textit{String}}
\hypo{\mathrm{length}(s)\leq n}
\hypo{[i<\mathrm{length}(s)]}
\ellipsis{}{\Gamma\vdash s[i]:T}
\infer3{\Gamma\vdash s:T^{\leq n}}
\end{prooftree}
\hspace*{2em}
\begin{prooftree}
\hypo{\Gamma\vdash s:\textit{String}}
\hypo{\mathrm{length}(s)\geq n}
\hypo{[i<\mathrm{length}(s)]}
\ellipsis{}{\Gamma\vdash s[i]:T}
\infer3{\Gamma\vdash s:T^{\geq n}}
\end{prooftree}
\end{subex}
\end{ex}
\preveg{a} introduces the string types and \preveg{b} specifies
witness conditions for the types.
\end{shaded}
Next we introduce concatenation types. For any
two types, $T_1$ and $T_2$, we can form the type ${T_1}^{\frown}T_2$.
This is the type of strings $ab$ where $a:T_1$ and $b:T_2$.
The concatenation operation on types (just like that on objects) is
associative so we do not use parentheses when more than one type is
involved, e.g. ${T_1}^{\frown}{T_2}^{\frown}T_3$.
\begin{shaded}
This can be made precise as \nexteg{}, repeated in
Appendix~\ref{app:strings}.
\begin{ex}
A system of complex types \textbf{TYPE}$_C$ = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ with strings and
length determining string types has \textit{concatenation types}
if
\begin{enumerate}
\item if $T_1$, $T_2\in\textbf{Type}$ then the string type $T_1^\frown T_2\in\textbf{Type}$
\item $s:_{\mathbf{TYPE}_C}T_1^\frown T_2$ iff there are $s_1$ and
$s_2$ such that
\begin{enumerate}
\item $s_1s_2=s$
\item $s_1:_{\mathbf{TYPE}_C}T_1$ if $T_1$ is a string type, otherwise
$s_1:_{\mathbf{TYPE}_C}{T_1}^{=1}$
\item $s_2:_{\mathbf{TYPE}_C}T_2$ if $T_2$ is a string type, otherwise
$s_2:_{\mathbf{TYPE}_C}{T_2}^{=1}$
\end{enumerate}
\end{enumerate}
\label{ex:concatenation-types}
\end{ex}
Clause~1 introduces concatenation types, $T_1^\frown T_2$, and clause~2 says that
witnesses for concatenative types must be the concatenation of two
strings which are of the types $T_1$ and $T_2$ resepctively if they
are string types of if they are not they must be of the type of
singleton strings whose only element is of type $T_1$ or $T_2$
respectively.
We can express this in our informal proof theoretic notation as
\nexteg{}.
\begin{ex}
For $\Gamma$ a system of complex types with strings, length
determining string types and concatenative string types
\begin{subex}
\item \begin{prooftree}
\hypo{\Gamma\vdash T_1\in\textbf{Type}}
\hypo{\Gamma\vdash T_2\in\textbf{Type}}
\infer2{\Gamma\vdash {T_1}^\frown T_2\in\textbf{Type}}
\end{prooftree}
\item \begin{prooftree}
\hypo{\Gamma\vdash s_1:T_1'}
\hypo{\Gamma\vdash s_2:T_2'}
\infer2[$T_i'=T_i$ if $T_i$ is a string type; otherwise
$T_i'=T_i^{=1}$]{\Gamma\vdash s_1s_2:T_1^\frown T_2}
\end{prooftree}
\end{subex}
\end{ex}
\preveg{a} introduces concatenative types, $T_1^\frown T_2$, and
\preveg{b} tells us that witnesses for these types are concatenations
of two strings, $s_1$ and $s_2$, where $s_1:T_1$ (or $s_1:T_1^{=1}$ if
$T_1$ is not a string type) and similarly for $s_2$ and $T_2$.
To \preveg{} we can add \nexteg{} to express the associativity of
`$^\frown$'.
\begin{ex}
\begin{prooftree}
\hypo{\Gamma\vdash (T_1^\frown T_2)^\frown T_3\in\textbf{Type}}
\hypo{\Gamma\vdash T_1^\frown(T_2^\frown T_3)\in\textbf{Type}}
\infer2{\Gamma\vdash(T_1^\frown T_2)^\frown T_3 =
T_1^\frown(T_2^\frown T_3)\in\textbf{Type}}
\end{prooftree}
\end{ex}
\end{shaded}
While strings as we have defined them are useful for modelling events
in terms of strings of subevents, it is not the case that all strings
of events
can be considered as occurring events. Consider a case where we have
two events as characterized in \nexteg{}.
\begin{ex}
\begin{subex}
\item $e_1:T_1$
\item $e_2:T_2$
\end{subex}
\end{ex}
The type theory as we have defined it will yield both
judgements in \nexteg{}.
\begin{ex}
\begin{subex}
\item $e_1e_2:T_1^{\frown}T_2$
\item $e_2e_1:T_2^{\frown}T_1$
\end{subex}
\end{ex}
However, if we are using event strings to model temporal ordering it
cannot be the case that both $e_1e_2$ and $e_2e_1$ both model
occurring events even though they are both strings of events. That
is, if $e_1$ temporally precedes $e_2$ then $e_2$ cannot temporally
precede $e_1$ and \textit{vice versa}. This has to do with the fact
that a particular event can only happen once. It is, of course,
possible to have different events of the same types occurring in the
reverse order as in \nexteg{}.
\begin{ex}
\begin{subex}
\item $e_1e_2:T_1^{\frown}T_2$
\item $e_3e_4:T_2^{\frown}T_1$
\end{subex}
\end{ex}
One way to distinguish those strings which correspond to occurring
events from those which do not is to introduce a type \textit{Occur}
such that if $e_1e_2:\textit{Occur}$ then $e_2e_1\not:\textit{Occur}$.
Below we will use records to model the simultaneous occurrence of
events. We can do this by allowing records to be witnesses for
\textit{Occur} and requiring that if $r:\textit{Occur}$ and
$\ell_1,\ell_2\in\mathrm{labels}(r)$ then
$r.\ell_1r.\ell_2\not:\textit{Occur}$. We will not develop this idea
further here but assume it in the background.
Let us return to Kim watching the boy, $a$, playing fetch with the
dog, $b$, using the stick, $c$. % over a time interval $t$
She
perceives the event as being of type play\_fetch($a$,$b$,$c$).
But what does it mean to be an event of this type? Given our
concatenation types we can build a type which corresponds to most of
what we have sketched in Figure~\ref{fig:fetch}, namely \nexteg{}.
% (again ignoring time for the sake of simplification).
\begin{ex}
pick\_up($a$,$c$)$^{\frown}$attract\_attention($a$,$b$)$^{\frown}$throw($a$,$c$)$^{\frown}$run\_after($b$,$c$)$^{\frown}$pick\_up($b$,$c$)$^{\frown}$\\
\hspace*{2em}return($b$,$c$,$a$)
\end{ex}
\preveg{} is a type corresponding to everything we have represented in
Figure~\ref{fig:fetch} except for the arrow which loops back from the
end state to the start state. In order to get the loop into the event
type we will use a Kleene-+ type. % In
% standard notations for strings $s^+$ stands for a string consisting of
% one or more occurrences of $s$.\footnote{This notation was introduced
% by the mathematician Stephen Kleene.}
% We will adopt this into types
% by saying that for any type $T$ there is also a type $T^+$ which is
% the type of strings of objects of type $T$ containing one or more
% members. (See Appendix~\ref{sec:regular} for a more precise
% definition.)
The type \nexteg{} will, then,
give us a type corresponding to the complete Figure~\ref{fig:fetch}
since it will be the type consisting of strings of one or more events
of the type \preveg{}.
\begin{ex}
(pick\_up($a$,$c$)$^{\frown}$attract\_attention($a$,$b$)$^{\frown}$throw($a$,$c$)$^{\frown}$run\_after($b$,$c$)$^{\frown}$pick\_up($b$,$c$)$^{\frown}$
\\ \hspace*{2em}return($b$,$c$,$a$))$^+$
\end{ex}
% In \preveg{} we simplified the string type by excluding time. Now we
% will consider what is needed to put time back in. Each of the
% subevents represented there is associated with a time interval, a
% different time interval for each subevent. The type for time
% intervals, which we will abbreviate as \textit{TimeInt} is \nexteg{}\label{pg:TimeInt}.
% \begin{ex}
% \record{\tfield{start}{\textit{Time}} \\
% \tfield{end}{\textit{Time}} \\
% \tfield{c$_<$}{start$<$end}}
% \end{ex}
% where \textit{Time} is the type of time points and $<$ is the relation
% ``earlier than'' defined on the witnesses of this type.\footnote{We
% use the infix notation $t_1<t_2$ rather than the official notation
% $<(t_1,t_2)$.} In order to get time intervals associated with each
% subevent we will treat the subevent types as record types rather than
% ptypes. Thus as a first step towards characterizing the right type we
% have \nexteg{}.
% \begin{ex}
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{pick\_up}}$}{pick\_up($a$,$c$,e-time)}}$^{\frown}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}}
% \\
% \smalltfield{c$_{\mathrm{attract\_attention}}$}{attract\_attention($a$,$b$,e-time)}}$^{\frown}$
% \medskip
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{throw}}$}{throw($a$,$c$,e-time)}}$^{\frown}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{run\_after}}$}{run\_after($b$,$c$,e-time)}}$^{\frown}$
% \medskip
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{pick\_up}}$}{pick\_up($b$,$c$,e-time)}}$^{\frown}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{return}}$}{return($b$,$c$,$a$,e-time) }}
% \end{ex}
% This will get us a time interval for each subevent but it does not
% require any relationship between the time intervals of the different
% subevents whereas, of course, each subevent should occur at a later
% time than the previous one. In order to achieve this we will
% introduce a more restricted notion of type concatenation especially
% for record types which have a field
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}}} as in \nexteg{}.
% \begin{ex}
% \begin{enumerate}
% \item If $T_1$ and $T_2$ are subtypes of
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}}}$^+$ then
% $T_1^{\frown_<}T_2$ is a type.
% \item $a:T_1^{\frown_<}T_2$ iff $a=a_1^{\frown}a_2$, $a_1:T_1$, $a_2:T_2$ and
% last($a_1$).e-time.end$<$first($a_2$).e-time.start
% \end{enumerate}
% \end{ex}
% Here first($s$) and last($s$) pick out the first and last elements
% respectively of the string $s$. We need to make a similar adjustment
% to the Kleene-+ type constructor.
% \begin{ex}
% \begin{enumerate}
% \item If $T$ is a subtype of
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}}} then $T^{+_<}$
% is a type
% \item $a:T^{+_<}$ iff $a=x_1^\frown\!\ldots^\frown\!x_n$, $n>0$ and
% for $i$, $j$, $1\leq
% i<j\leq n$, $x_i:T$, $x_j:T$ and $x_i^{\frown}x_j:T^{\frown_<}T$
% \end{enumerate}
% \end{ex}
% [The details of temporal concatenation above should be included in the
% appendix.]
We will complicate \preveg{} slightly by substituting record types for
the ptypes as in \nexteg{}. We do this because we
will want to allow for things happening simultaneously and record
types will give us a straightforward way of allowing this.
\begin{ex}
(\smallrecord{\smalltfield{e}{pick\_up($a$,$c$)}}$^{\frown}$\smallrecord{\smalltfield{e}{attract\_attention($a$,$b$)}}$^{\frown}$\smallrecord{\smalltfield{e}{throw($a$,$c$)}}$^{\frown}$\smallrecord{\smalltfield{e}{run\_after($b$,$c$)}}$^{\frown}$\\
\hspace*{2em}\smallrecord{\smalltfield{e}{pick\_up($b$,$c$)}}$^{\frown}$\smallrecord{\smalltfield{e}{return($b$,$c$,$a$)}})$^+$
\label{eg:fetch-type}
\end{ex}
The label `e' (``event'') occurs in each of the elements of the string
type. In this case we will say that `e' labels a \textit{dimension}
of events of this type. The `e'-dimension can be thought of as the
dimension which characterizes what is happening at each stage of the
event. % If you want to think geometrically, you can think of the
% event-string as being located in a space of event types (that is, the ptypes).
% So now we can represent the event type for playing fetch as \nexteg{}.
% \begin{ex}
% (\smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{pick\_up}}$}{pick\_up($a$,$c$,e-time)}}$^{\frown_<}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}}
% \\
% \smalltfield{c$_{\mathrm{attract\_attention}}$}{attract\_attention($a$,$b$,e-time)}}$^{\frown_<}$
% \medskip
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{throw}}$}{throw($a$,$c$,e-time)}}$^{\frown_<}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{run\_after}}$}{run\_after($b$,$c$,e-time)}}$^{\frown_<}$
% \medskip
% \smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{pick\_up}}$}{pick\_up($b$,$c$,e-time)}}$^{\frown_<}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\mathrm{return}}$}{return($b$,$c$,$a$,e-time) }})$^{+_<}$
% \end{ex}
\section{Doing things with types}
\label{sec:typeacts}
\subsection{Type acts}
The boy and the dog have to coordinate and interact in order to create an
event of the game of fetch. This involves doing more with types than
just making judgements. For example, when the dog observes the
situation in which the boy raises the stick, it may not be clear
to the dog whether this is part of a fetch-game situation or a
stick-beating situation. The dog may be in a situation of
entertaining these two types as possibilities prior to making the
judgement that the situation is of the fetch type. We will call this
act a query as opposed to a judgement. Once the dog has made the
judgement that what it has observed so far is an initial segment of a
fetch type situation it has to make its own contribution in order to
realize the fetch type, that is, it has to run after the stick and
bring it back. This involves the creation of a situation of a certain
type. Thus creation acts are another kind of act related to types.
Creating objects of a given type often has a \textit{de se}
\citep[see, for example,][]{Perry1979,Lewis1979a,Ninan2010,Schlenker2011} aspect. The dog
has to know that it itself must run after the stick in order to make
this a situation in which it and the boy are playing fetch. There is
something akin to what Perry calls an essential indexical here,
though, of course, the dog does not have indexical linguistic
expressions. It is nevertheless part of the basic competence that an
agent needs in order to be able to coordinate its action with the rest
of the world that it has a primitive sense of self which is distinct
from being able to identify an object which has the same properties as
itself. We will follow Lewis in modelling \textit{de se} in terms of
functional abstraction over the ``self''. In our terms this will mean
that \textit{de se} type acts involve dependent types.
In standard type theory we have judgements such as $o:T$ ``$o$ is of type $T$''
and
$T$ \textit{true} ``there is something of type $T$''. We want to
enhance this notion of judgement by including a reference to the agent
$A$ which makes the judgement, giving judgements such as
$o:_AT$ ``agent $A$ judges that $o$ is of type $T$''
and
$:_AT$ ``agent $A$ judges that there is some object of type $T$''. We will call
the first of these a \textit{specific} judgement and the second a
\textit{non-specific} judgement. Such
judgements are one of the three kinds of acts represented in \nexteg{}
that we want to include
in our type act theory.
\begin{ex}
\textit{Type Acts}
\begin{description}
\item[judgements] \mbox{}
\begin{description}
\item[\textit{specific}] $o:_A T$ ``agent $A$ judges object $o$ to be of type
$T$''
\item[\textit{non-specific}] $:_A T$ ``agent $A$ judges that there is some
object of type $T$''
\end{description}
\item[queries] \mbox{}
\begin{description}
\item[\textit{specific}] $o:_A T?$ ``agent $A$ wonders whether object $o$ is of type
$T$''
\item[\textit{non-specific}] $:_A T?$ ``agent $A$ wonders whether there is some object of type
$T$''
\end{description}
\item[creations] \mbox{}
\begin{description}
\item[\textit{non-specific}] $:_A T!$ ``agent $A$ creates something of type
$T$''
\end{description}
\end{description}
\end{ex}
Note that creations only come in the non-specific variant. You cannot
create an object which already exists.
Creations are also limited in
that there are certain types which a given agent is not able to
realize as the main actor. Consider for example the event type involved in the fetch
game of the dog running after the stick. The human cannot be the main
creator of such
an event since it is the dog who is the actor. The most the human can
do is wait until the dog has carried out the action
and we will count this as a creation type act. This will become
important when we discuss coordination in the fetch-game below. It is
actually important that the human makes this passive contribution to
the creation of the event of the dog running after the stick and does
not, for example, get the game confused by immediately throwing
another stick before the dog has had a chance to retrieve the first
stick. There are other cases of event types which require a less
passive contribution from an agent other than the main actor.
Consider the type of event where the dog returns the stick to the
human. The dog is clearly the main actor here but the human has also
a role to play in making the event realized. For example, if the
human turns her back on the dog and ignores what is happening or runs
away, the event type will not be realized despite the dog's best
efforts. Other event types, such as lifting a piano, involve more
equal collaboration between two or more agents, where it is not
intuitively clear that any one of the agents is the main actor. So
when we say ``agent $A$ creates something of type $T$'' perhaps it
would be more accurate to phrase this as ``agent $A$ contributes to
the creation of something of type $T$'' where $A$'s contribution might
be as little as not realizing any of the other types involved in the game until
$T$ has been realized.
\textit{De se} type acts involve functions which have the agent in its
domain and return a type, that is, they are dependent types which,
given the agent, will yield a type. We will say that agents are of
type \textit{Ind} and that the relevant dependent types,
$\mathcal{T}$, are functions of type
(\textit{Ind}$\rightarrow$\textit{Type}).
We characterize \textit{de se} type acts in a way parallel to
\preveg{}, as given in \nexteg{}.
\begin{ex}
\textit{De Se Type Acts}
\begin{description}
\item[\textit{judgements}] \mbox{}
\begin{description}
\item[\textit{specific}] $o:_A \mathcal{T}(A)$ ``agent $A$ judges object $o$ to be of type
$\mathcal{T}(A)$''
\item[\textit{non-specific}] $:_A \mathcal{T}(A)$ ``agent $A$ judges
that there is some object of type $\mathcal{T}(A)$''
\end{description}
\item[\textit{queries}] \mbox{}
\begin{description}
\item[\textit{specific}] $o:_A \mathcal{T}(A)?$ ``agent $A$ wonders whether object $o$ is of type
$\mathcal{T}(A)$''
\item[\textit{non-specific}] $:_A \mathcal{T}(A)?$ ``agent $A$ wonders whether there is some object of type
$\mathcal{T}(A)$''
\end{description}
\item[\textit{creations}] \mbox{}
\begin{description}
\item[\textit{non-specific}] $:_A \mathcal{T}(A)!$ ``agent $A$ creates
something of type $\mathcal{T}(A)$''
\end{description}
\end{description}
\end{ex}
From the point of view of the type theory \textit{de se} type acts
seem more complex than non-\textit{de se} type acts since they involve
a dependent rather than a non-dependent type and a functional
application of that dependent type to the agent. However, from a
cognitive perspective one might expect \textit{de se} type acts to be
more basic. Agents which perform type acts using types directly
related to themselves are behaving egocentrically and one could regard
it as a more advanced level of abstraction to consider types which are
independent of the agent. This seems a puzzling way in which our
notions of type seem in conflict with out intuitions about cognition.
While these type acts are prelinguistic (we need them to account for
the dog's behaviour in the game of fetch), it seems
that they are the basis on which the notion of speech act
\citep[and much subsequent literature]{Austin1962,Searle1969} is built. % Our notion of using types in
% query acts seems intuitively related to work on inquisitive semantics
% \citep{GroenendijkRoelofsen2012} where some propositions (in
% particular disjunctions) are regarded as inquisitive. However, this
% will still allow us to make a distinction between questions and
% assertions in natural language as argued for by \cite{Ginzburg2012}.
\subsection{Making inferences about events}
What happens
when Kim perceives an event as being of the type (\ref{eg:fetch-type})? She
makes a series of observations of events, assigning them to types in
the string type. Note that the ptypes in each of the types can be
further broken down in a similar way. This gives us a whole hierarchy
of perceived events which at some point have to bottom out in basic
perceptions which are not further analyzed. In order to recognize an
event as being of this type Kim does not need to perceive a string of
events corresponding to each of the types in the string types. She
may, for example, observe the boy waving the stick to attract the
dog's attention, get distracted by a bird flying overhead for a while,
and then return to the fetch event at the point where the dog is
running back to the boy with the stick. This still enables her to
perceive the event as an event of fetch playing because she has seen
such events before and learned that such events are of the string type in (\ref{eg:fetch-type}). It suffices for her to observe enough of the elements in
the string to distinguish the event from other event types she may
have available in her knowledge resources. Suppose, for example, that
she has just two event string types available that begin with the picking
up of a stick by a human in the company of a dog. One is (\ref{eg:fetch-type}).
The other is one that leads to the human beating the dog with the
stick. If she only observes the picking up of the stick she cannot be
sure whether what she is observing is a game of fetch or a beating.
However, as soon as she observes something in the event string which
belongs only to the fetch type she can reasonably conclude
that she is observing an event of the fetch type. She may, of course,
be wrong. She may be observing an event of a type which she does not
yet have available in her resource of event types, in which case she
will need to learn about the new event type and add it to her
resources. However, given the resources at her disposal she can make
a prediction about the nature of the rest of the event. One could
model her prediction making ability in terms of a function which maps
a situation (modelled as a record) to a type of predicted situation,
for example \nexteg{}.
\begin{ex}
$\lambda r$:\smallrecord{\smalltfield{x}{\textit{Ind}} \\
\smalltfield{c$_{\mathrm{human}}$}{human(x)}
\\
\smalltfield{y}{\textit{Ind}} \\
\smalltfield{c$_{\mathrm{dog}}$}{dog(y)} \\
\smalltfield{z}{\textit{Ind}} \\
\smalltfield{c$_{\mathrm{stick}}$}{stick(z)}
\\
\smalltfield{e}{\smallrecord{
\smalltfield{e}{pick\_up(x,z)}}$^{\frown}$\smallrecord{
\smalltfield{e}{attract\_attention(x,y)}}}} .
\\*[.75\baselineskip]
\hspace*{4em}\smallrecord{\smalltfield{e}{play\_fetch($r$.x,$r$.y,$r$.z)}
\\
\smalltfield{c$_{\mathrm{init}}$}{init($r$.e,e)}}
\label{ex:ev-predict-fun}
\end{ex}
% \begin{ex}
% $\lambda r$:\smallrecord{\smalltfield{x}{\textit{Ind}} \\
% \smalltfield{c$_{\mathrm{human}}$}{human(x)}
% \\
% \smalltfield{y}{\textit{Ind}} \\
% \smalltfield{c$_{\mathrm{dog}}$}{dog(y)} \\
% \smalltfield{z}{\textit{Ind}} \\
% \smalltfield{c$_{\mathrm{stick}}$}{stick(z)}
% \\
% \smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{e}{\smallrecord{\smalltfield{e-time}{\textit{TimeInt}}
% \\
% \smalltfield{c$_{\leq}$}{$\Uparrow$e-time.start$\leq$e-time.start} \\
% \smalltfield{c$_{\mathrm{pick\_up}}$}{pick\_up($\Uparrow$x,$\Uparrow$z,e-time)}}$^{\frown_<}$\smallrecord{\smalltfield{e-time}{\textit{TimeInt}}
% \\
% \smalltfield{c$_{\leq}$}{e-time.start$\leq\Uparrow$e-time.start} \\
% \smalltfield{c$_{\mathrm{attract\_attention}}$}{attract\_attention($\Uparrow$x,$\Uparrow$y,e-time)}}}}
% \\*[.75\baselineskip]
% \hspace*{4em}(\smallrecord{\smalltfield{e-time}{\textit{TimeInt}} \\
% \smalltfield{c$_{\leq}$}{$r$.e-time.start$\leq$e-time.start} \\
% \smalltfield{e}{play\_fetch($r$.x,$r$.y,$r$.z,e-time)}})
% \label{ex:ev-predict-fun}
% \end{ex}
Here the predicate `init' has arity
$\langle$\textit{String}, \textit{String}$\rangle$. The type init($s_1$,$s_2$) is
non-empty just in case $s_1$ is an initial substring of $s_2$.
\begin{shaded}
We
achieve this by the definition in \nexteg{}, repeated in Appendix~\ref{app:strings}.
\begin{ex}
If $s_1$ is a string of length $n$ and $s_2$ is a string of any
length, then $s$ : init($s_1$,$s_2$) iff the length of $s_2$ is
greater than or equal to $n$ and for each $i$, $0\leq i<n$,
$s_1[i]=s_2[i]$ and $s=s_2$.
\end{ex}
That is, if the initial substring condition holds then the second
argument to the predicate (and nothing else) is of the ptype.
\end{shaded}
% Here a `$\Uparrow$' prefixed to a path-name consisting of labels such
% as `e-time.start' or `x' means that the path-name is to start in the
% next higher record type in which the current record type is embedded.
% This notation is an abbreviation for something much less readable (but
% more precise) which is given in Appendix~\ref{app:rectypes}. [????
% This notation needs to be added to the appendix.]
The kind of function of which (\ref{ex:ev-predict-fun} is an instance is a function
of the general form \nexteg{}.
\begin{ex}
$\lambda a\!:\!T_1\ .\ T_2\dep{a}$
\label{ex:deptypefun}
\end{ex}
Recall that the notation $T_2\dep{a}$ represents that $T_2$
depends on $a$. The nature of this dependence in
(\ref{ex:ev-predict-fun}) is seen in the occurrences of $r$ in the body
of the function, for example, \nexteg{}.
\begin{ex}
play\_fetch($r$.x,$r$.y,$r$.z)
\end{ex}
A function of the form (\ref{ex:deptypefun}) maps an object of some type (represented by $T_1$) to
a type (represented by $T_2\dep{a}$). The type that results from an
application of this function will depend on what object it is applied
to -- that is, we have the possibility of obtaining different types
from different objects. This function is then a dependent type as
discussed, for example, on p.~\pageref{pg:deptype}, These functions will play an important
role in much of what is to come later in this book. They will show up
many times in what appear at first blush to be totally unrelated
phenomena. We want to suggest, however, that all of the phenomena we
will describe using such functions have their origin in our basic
cognitive ability to make predictions on the basis of partial
observation of objects and events.
Functions which are dependent types return types but they do not, of
themselves, tell us what to do with the type if we have obtained it by
applying the function to an argument. Suppose $\mathcal{T}$ is the
function (\ref{ex:ev-predict-fun}) and that $T$ is the domain type of
$\mathcal{T}$, that is, \nexteg{}.
\begin{ex}
\smallrecord{\smalltfield{x}{\textit{Ind}} \\
\smalltfield{c$_{\mathrm{human}}$}{human(x)}
\\
\smalltfield{y}{\textit{Ind}} \\
\smalltfield{c$_{\mathrm{dog}}$}{dog(y)} \\
\smalltfield{z}{\textit{Ind}} \\
\smalltfield{c$_{\mathrm{stick}}$}{stick(z)}
\\
\smalltfield{e}{\smallrecord{
\smalltfield{e}{pick\_up(x,z)}}$^{\frown}$\smallrecord{
\smalltfield{e}{attract\_attention(x,y)}}}}
\end{ex}
Then we may have the action rule given in \nexteg{}.
\begin{ex}
\begin{prooftree}
\hypo{s:_A T}
\infer[enth]1{:_A\mathcal{T}(s)}
\end{prooftree}
\end{ex}
\preveg{} represents that if an agent, $A$, judges a situation, $s$, to
be of type $T$ then $A$ is licensed to judge that there is some
situation of type $\mathcal{T}(s)$. We use a wavy line in this
inference rule to indicate that it does not represent a conclusion
that follows from a premise in a logical sense, but rather that the
act above the line licenses the act below the line. That is, on the
basis of what is above the line it is reasonable to perform what is
below the line, though without a guarantee that it is correct or even
that the action will be performed. Given
that you observe a human pick up a stick and attract a dog's
attention, it is reasonable to conclude that there will be an event of
playing fetch, but there is no guarantee that there actually will be
such an event. We have talked in terms of what is above the line
licensing what is below the line. Another term that can be used is
\textit{afford} which goes back to Gibson's (\citeyear{Gibson1979})
notion of affordance. Thus we can talk of the action above the line
as affording the action below the line.
Sometimes dependent type functions like $\mathcal{T}$ can be
associated with more than one action rule. Agents may get to choose
which they apply or perhaps there will be aspects of the context which
will determine which of the action rules is appropriate. Thus in
addition to \preveg{} we might also have the action rules in
\nexteg{}.
\begin{ex}
\begin{subex}
\item \begin{prooftree}
\hypo{s:_A T}
\infer[enth]1{s:_A\mathcal{T}(s)}
\end{prooftree}
\item \begin{prooftree}
\hypo{s:_A T}
\infer[enth]1{:_A\mathcal{T}(s)!}
\end{prooftree}
\end{subex}
\end{ex}
\preveg{a} says that if $A$ judges $s$ to be of type $T$ then $A$ is
licensed to judge that $s$ is also of type $\mathcal{T}(s)$.
\preveg{b} says that if $A$ judges $s$ to be of type $T$ then $A$ is
licensed to create something of type $\mathcal{T}(s)$.
What happens when Kim does not observe enough of the event to be able
to predict with any certainty that the complete event will be a game
of fetch? One theory would be that she can only make categorical
judgements, and that she has to wait until she has seen enough so that
there is only one type that matches in the collection of situation
types in her resources. Another theory would be
one where she predicts a disjunction of the available matching types when there is
more than one that matches. One might refine this theory so that she
can choose one of the available types but assign it a probability
based on the number of matching types. If $n$ is the number of
matching types the probability of any one of them might be
$\frac{1}{n}$. This assumes that each of the types is equally likely
to be realized. It would be natural to assume, however, that the
probability which Kim assigns to any one of the matching types would
be dependent on her previous experience. Suppose, for example, that
she has seen 100 events of a boy picking up a stick in the company of
a dog, 99 of those events led to a game of fetch and only one led to
the boy beating the dog. One might then assume that when she now sees
the boy pick up the stick she would assign a .99 probability (on a
scale of 0 to 1) to the
type of fetch events and only .01 probability to the boy beating the