-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathttr.tex
4273 lines (3463 loc) · 172 KB
/
ttr.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
\renewcommand{\thechapter}{}
\chapter{TTR}{}{}
%\chapter{Appendix}
\label{app:ttr}
\renewcommand{\thesection}{\arabic{section}}
%\section*{TTR}
Unless otherwise stated this is the version of TTR presented in
\cite{Cooper2012}.
\section{Underlying set theory}
\label{app:sets}
In previous statements of this system such as \cite{Cooper2012} we
tacitly assumed a standard underlying set theory such as ZF
(Zermelo-Fraenkel) with urelements (as formulated for example in \citealp{Suppes1960}). This is what we take to be the
common or garden working set theory which is familiar from the core
literature on formal semantics deriving from Montague's original work
\citep{Montague1974}.
In this version we
will assume that our set theory comes equipped with a set of
\textit{urelements} (entities which are not sets but which can be
members of sets). We will assume that among the urelements is a countably infinite
set which is designated as the set of \textit{labels}. In addition we assume
that among the urelements there is a finite or countably infinite set,
disjoint from the set of labels, designated as the set of
\textit{flavours}. Finally, we assume that there is a countably infinite set
of urelements, \fbox{0}, \fbox{1},\ldots, called indices, which is
disjoint from both the set of labels and the set of flavours.
A \textit{field} is either
\begin{quote}
an ordered pair $\langle\ell,a\rangle$ where
$\ell$ is a label and $a$ is not a label or a flavour
\end{quote}
or
\begin{quote}
an ordered triple $\langle\ell,a,i\rangle$ where
$\langle\ell,a\rangle$ is a field and $i$ is an index
\end{quote}
An \textit{(unflavoured) labelled set}
(Chapter~\ref{ch:percint}, p.~\pageref{sec:labelled-sets}) is a set
of fields% ordered pairs whose first member is a label and whose second
% element is either an urelement which is not a label or a set (possibly a labelled
% set)
such that no more than one field can contain any
particular label as its first member. This means that a labelled set
whose members are all ordered pairs
is the traditional set theoretic construction of an extensional
function from a set of labels onto some set. A \textit{flavoured
labelled set} is an unflavoured labelled set, $X$, with the addition of
some flavour, $\mathfrak{f}$, that is, $X\cup\{\mathfrak{f}\}$. We use
flavours when we need to distinguish objects which correspond to the
same set of ordered pairs.
We refer to the first members of the fields in a
labelled set (flavoured or unflavoured) as \textit{labels} used in the labelled set and we will refer to
the second members of the fields as the \textit{labelled
elements} of the labelled set. If $X$ is a labelled set we use
$\mathrm{labels}(X)$ to represent the set $\{\ell\mid\exists
x,i\ \langle\ell,x\rangle\in X\text{ or }\langle\ell,x,i\rangle\in X\}$, the left projection of $X$. If
$\ell\in\mathrm{labels}(X)$ and $\langle\ell,v\rangle\in X$ or
$\langle\ell,v,i\rangle\in X$ for some $i$, then we
use $X.\ell$ to represent $v$. We characterize the set of
\textit{paths} in a labelled set, $\mathrm{paths}(X)$ by the following
inductive definition:
\begin{quote}
If $X$ is a labelled set, then
\begin{enumerate}
\item if $\ell\in\mathrm{labels}(X)$, then $\ell\in\mathrm{paths}(X)$
\item if $\ell\in\mathrm{labels}(X)$, $X.\ell$ is a labelled set and
$\pi\in\mathrm{paths}(X.\ell)$, then $\ell.\pi\in\mathrm{paths}(X)$
\end{enumerate}
\end{quote}
The set of \textit{total paths} in a labelled set, $X$,
$\mathrm{tpaths}(X)$ is the set of paths, $\pi$, such that
\mbox{$\pi\in\mathrm{paths}(X)$} and $X.\pi$ is not a labelled set.
$\pi_1$ is an \textit{initial subpath} (Chapter~\ref{ch:propnames}, p.~\pageref{ex:subpath}) of $\pi_2$,
$\pi_1\leq\pi_2$, just in case either $\pi_1=\pi_2$ or there is
some $\pi$ such that $\pi_2=\pi_1.\pi$.
$\pi_1$ is a \textit{proper initial subpath}
(Chapter~\ref{ch:propnames}, p.~\pageref{ex:subpath}) of $\pi_2$,
$\pi_1<\pi_2$, just in case there is
some $\pi$ such that $\pi_2=\pi_1.\pi$.
If $X$ is a labelled set, then \textit{$x$ is a component of $X$},
$x\varepsilon X$, iff there some $\pi\in\mathrm{paths}(X)$ such that $X.\pi=x$.
We characterize \textit{the subtraction of a path, $\pi$, from a
labelled set $X$}, $X\ominus\pi$, (Chapter~\ref{ch:quant},
p.~\pageref{ex:subtraction-labelled-sets}) as follows:
\begin{enumerate}
\item If $X$ is a labelled set, $\ell\in\mathrm{labels}(X)$ and
$\langle\ell,\varphi\rangle\in X$, then $X\ominus\ell$ is
\begin{quote}
$X-\{\langle\ell,\varphi\rangle\}$
\end{quote}
\item If $X$ is a labelled set, $\langle\ell,\varphi\rangle\in X$ and
$\ell.\pi\in\mathrm{tpaths}(X)$, then
\begin{quote}
if $\ell.\pi$ is branching in $X$, then $X\ominus\ell.\pi$ is
\begin{quote}
$(X-\{\langle\ell,\varphi\rangle\})\cup\{\langle\ell,\varphi\ominus\pi\rangle\}$
\end{quote}
otherwise $X\ominus\ell.\pi$ is
\begin{quote}
$X-\{\langle\ell,\varphi\rangle\}$
\end{quote}
\end{quote}
\end{enumerate}
If $X$ is a labelled set and
$\pi_1,\ldots,\pi_n\in\mathrm{tpaths}(X)$, then we write
$X\ominus\pi_1,\ldots,\pi_n$ for $X\ominus\pi_1\ominus\ldots\ominus\pi_n$.
% When we introduced complex
% objects and types
% other than records and record types we were not explicit about exactly which
% structured set-theoretic object they represented. The reason for this
% was that, except in the case of records and record types, it did not
% seem important exactly how you code structured objects in the set
% theory and a detailed exposition would seem to provide another level
% of complication over and above an already complicated story.
% In this
% version we will take advantage of the freedom provided by an appendix
% and spell out a set theoretic coding for all of our structured
% objects.
If $\mathcal{L}$ is a set of labels, the $\mathcal{L}_+$ is defined
inductively by
\begin{enumerate}
\item if $\ell\in\mathcal{L}$, then $\ell\in\mathcal{L}_+$
\item if $\ell\in\mathcal{L}$ and $\pi\in\mathcal{L}_+$, then $\ell.\pi\in\mathcal{L}_+$
\end{enumerate}
If $\mathcal{L}$ is a set of labels and $X$ is a labelled set such
that $\mathrm{paths}(X)\subseteq\mathcal{L}_+$, then a
$\mathcal{L}$-relabelling of $X$ is a one-one function, $\eta$, such
that
\begin{enumerate}
\item $\mathrm{dom}(\eta)\subseteq\mathrm{paths}(X)$
\item
$\mathrm{rng}(\eta)\subseteq\mathcal{L}_+-(\mathrm{paths}(X)-\mathrm{dom}(\eta))$
\item if $\pi_1,\pi_2\in\mathrm{dom}(\eta)$ and $\pi_1<\pi_2$, then $\eta(\pi_1)<\eta(\pi_2)$
\end{enumerate}
If $X$ is a labelled set based on $\mathcal{L}$ and $\eta$ is a
$\mathcal{L}$-relabelling of $X$, then $[X]_\eta$ is the labelled set
$X'$ exactly like $X$ except that
\begin{enumerate}
\item if $\pi\in\mathrm{dom}(\eta)$, then $\eta(\pi)$ replaces $\pi$
in $\mathrm{paths}(X')$, that is
\begin{quote}
$\mathrm{paths}(X')=(\mathrm{paths}(X)-\mathrm{dom}(\eta))\cup\mathrm{rng}(\eta)$
\end{quote}
\item if $\pi\in\mathrm{dom}(\eta)$ and there is no
$\pi'\in\mathrm{dom}(\eta)$ such that $\pi<\pi'$, then
$X'.\eta(\pi)=X.\pi$
\item if $\pi\in\mathrm{tpaths}(X')$ and
$\pi\not\in\mathrm{dom}(\eta)$, then $X'.\pi=X.\pi$
\end{enumerate}
We represent a relabelling,
$\eta$, whose domain is $\{\pi_1,\ldots,\pi_n\}$ and which is defined
by $\eta(\pi_1)=\pi'_1,\ldots,\eta(\pi_n)=\pi'_n$ as:
\begin{quote}
$\pi_1\leadsto\pi'_1$\\
\vdots\\
$\pi_n\leadsto\pi'_n$
\end{quote}
% The remaining definitions relating to labelled sets are for the
% support of dependent record types.
% An \textit{indexed value, $v$, in a labelled set, $X$,} is a pair
% \begin{quote}
% $\langle f,\langle\pi_1,\ldots,\pi_n\rangle\rangle$
% \end{quote}
% such that for some $\pi$ in $\mathrm{paths}(X)$
% \begin{enumerate}
% \item $X.\pi=v$
% \item $f$ is a function with $n$ arguments
% \item for $1\leq i\leq n$,
% $\pi_i\in\mathrm{paths}(X)-\{\pi'|\pi'\leq\pi\}$
% \end{enumerate}
% A \textit{labelled set with path dependencies} is a labelled set, $X$,
% which has a component which is an indexed value in $X$.
% A \textit{parametric labelled set} is a function, $f$, whose range is
% a family of labelled sets. If $f$ requires $n$ arguments then
% $\langle f, \langle i_1,\ldots,i_n\rangle\rangle$ is an
% \textit{indexed labelled set} indexed by $\langle
% i_1,\ldots,\i_n\rangle$. If $X=\langle f, \langle
% i_1,\ldots,i_n\rangle\rangle$ is an indexed labelled set, then
% $\mathrm{labels}(X)$ is $\mathrm{labels}(f(a_1,\ldots,a_n))$ where
% $a_1,\ldots,a_n$ are appropriate arguments to $f$. \todo{Need to
% restrict $f$ so there will be a unique set of labels}
\section{Basic types}
\label{sec:basic}
\paragraph{System of basic types} \mbox{}
A {\it system of basic types\/} (Chapter~\ref{ch:percint}, p.~\pageref{ex:def-basic-types}) is a pair:
\begin{quote}
{\bf TYPE$_B$} = $\langle${\bf Type}, $A$$\rangle$
\end{quote}
where:
\begin{enumerate}
\item \textbf{Type} is a non-empty set
\item $A$ is a function whose domain is \textbf{Type}
\item for any $T\in\textbf{Type}$, $A(T)$ is a set disjoint from
\textbf{Type}
\item for any $T\in\textbf{Type}$, $a:_{\mathbf{TYPE_B}}T$ iff $a\in A(T)$
\end{enumerate}
% A \textit{modal system of basic types}\footnote{This definition was
% not present in \cite{Cooper2012}.} (Chapter~\ref{ch:intensional},
% p.~\pageref{ex:def-modal-basic-types}) is a family of
% pairs:
% \begin{display}
% \textbf{TYPE$_{\mathit{MB}}$} = $\langle${\bf Type},
% $A\rangle_{A\in\mathcal{A}}$
% \end{display}
% where:
% \begin{enumerate}
% \item $\mathcal{A}$ is a set of functions with domain \textbf{Type}
% \item for each $A\in\mathcal{A}$, $\langle${\bf Type}, $A\rangle$ is a
% system of basic types
% \end{enumerate}
% This enables us to define some simple modal notions:
% If {\bf TYPE$_{\mathit{MB}}$} = $\langle${\bf Type},
% $A\rangle_{A\in\mathcal{A}}$
% is a modal system of basic types, we shall use the notation {\bf
% TYPE$_{\mathit{MB}_A}$} (where $A\in\mathcal{A}$) to refer to that
% system of basic types in {\bf TYPE$_{\mathit{MB}}$} whose type assignment is
% $A$. Then:
% \begin{enumerate}
% \item for any $T_1,T_2\in\textbf{Type}$, $T_1$ \textit{is
% (necessarily) equivalent
% to} $T_2$ \textit{in} {\bf TYPE$_{\mathit{MB}}$},
% $T_1\approx_{\mathbf{TYPE_{\mathit{MB}}}}T_2$, iff for all
% $A\in\mathcal{A}$, $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MB}_A}}T_1\}=\{a\mid a:_{\mathbf{TYPE}_{\mathit{MB}_A}}T_2\}$
% \item for any $T_1,T_2\in\textbf{Type}$, $T_1$ \textit{is a
% subtype of} $T_2$ \textit{in} {\bf TYPE$_{\mathit{MB}}$},
% $T_1\sqsubseteq_{\mathbf{TYPE_{\mathit{MB}}}}T_2$, iff for all
% $A\in\mathcal{A}$, $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MB}_A}}T_1\}\subseteq\{a\mid a:_{\mathbf{TYPE}_{\mathit{MB}_A}}T_2\}$
% \item for any $T\in\textbf{Type}$, $T$ \textit{is necessary in} {\bf TYPE$_{\mathit{MB}}$} iff for all
% $A\in\mathcal{A}$, \\ $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MB}_A}}T\}\not=\emptyset$
% \item for any $T\in\textbf{Type}$, $T$ \textit{is possible in} {\bf TYPE$_{\mathit{MB}}$} iff for some
% $A\in\mathcal{A}$, \\ $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MB}_A}}T\}\not=\emptyset$
% \end{enumerate}
\section{Complex types}
\subsection{Predicates}
\label{app:predicates}
We start by introducing the notion of a predicate signature.
A \textit{predicate signature} (Chapter~\ref{ch:percint}, p.~\pageref{ex:pred-sig})
is a triple
\begin{quote}
$\langle$\textbf{Pred}, \textbf{ArgIndices}, \textit{Arity}$\rangle$
\end{quote}
where:
\begin{enumerate}
\item \textbf{Pred} is a set (of predicates)
\item \textbf{ArgIndices} is a set (of indices for predicate
arguments, normally types)
\item \textit{Arity} is a function with domain \textbf{Pred} and range
included in the set of finite sequences of members of \textbf{ArgIndices}.
\end{enumerate}
\medskip
A \textit{polymorphic predicate signature} (Chapter~\ref{ch:percint}, p.~\pageref{ex:poly-pred-sig})
is a triple
\begin{quote}
$\langle$\textbf{Pred}, \textbf{ArgIndices}, \textit{Arity}$\rangle$
\end{quote}
where:
\begin{enumerate}
\item \textbf{Pred} is a set (of predicates)
\item \textbf{ArgIndices} is a set (of indices for predicate
arguments, normally types)
\item \textit{Arity} is a function with domain \textbf{Pred} and range
included in the powerset of the set of finite sequences of members
of \textbf{ArgIndices}.
\end{enumerate}
\subsection{Systems of complex types}
\label{app:comptypes}
A {\it system of complex types\/} (Chapter~\ref{ch:percint},
p.~\pageref{ex:comp-types}) is a quadruple:
\begin{quote}
{\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$
\end{quote}
where:
\begin{enumerate}
\item $\langle$\textbf{BType}, $A$$\rangle$ is a system of basic types
\item \textbf{BType}$\subseteq$\textbf{Type}
\item for any $T\in\textbf{Type}$, if $a:_{\langle\mathbf{BType},
A\rangle}T$ then $a:_{\mathbf{TYPE_C}}T$
\item \label{cl:predtypes}$\langle${\bf Pred}, \textbf{ArgIndices},
{\it Arity\/}$\rangle$ is a (polymorphic) predicate
signature
\item\hspace*{-1ex}\footnote{This clause has been modified since
\cite{Cooper2012} where it was a conditional rather than a biconditional.} %\sloppy
$P(a_1,\ldots a_n)\in\textbf{PType}$ iff $P\in\textbf{Pred}$, $T_1\in \mathbf{Type},\ldots,T_n\in
\mathbf{Type}$, \textit{Arity}($P$)=$\langle
T_1,\ldots,T_n\rangle$ ($\langle
T_1,\ldots,T_n\rangle$$\in$\textit{Arity}($P$)) and $a_1:_{\mathbf{TYPE_C}}T_1,\ldots,a_n:_{\mathbf{TYPE_C}}T_n$
% If $P\in\textbf{Pred}$, $T_1\in \mathbf{Type},\ldots,T_n\in
% \mathbf{Type}$, \textit{Arity}($P$)=$\langle
% T_1,\ldots,T_n\rangle$ ($\langle
% T_1,\ldots,T_n\rangle$$\in$\textit{Arity}($P$)) and $a_1:_{\mathbf{TYPE_C}}T_1,\ldots,a_n:_{\mathbf{TYPE_C}}T_n$ then
% $P(a_1,\ldots a_n)\in\textbf{PType}$
\item \textbf{PType}$\subseteq$\textbf{Type}
\item for any $T\in\textbf{PType}$, $F(T)$ is a set disjoint from \textbf{Type}
\item for any $T\in\textbf{PType}$, $a:_{\mathbf{TYPE_C}}T$ iff $a\in F(T)$
\end{enumerate}
We call the pair $\langle A,F\rangle$ in a complex system of types the
\textit{model} because of its similarity to first order models in
providing values for the basic types and the ptypes constructed from
predicates and arguments. It is this pair which connects the system
of types to the non-type theoretical world of objects and situations.
In \cite{Cooper2012} we did not define exactly what entity is
represented by $P(a_1,\ldots a_n)$. Here we will specify it to be the
labelled set
$\{\langle\mathrm{pred},P\rangle,\langle\mathrm{arg}_1,a_1\rangle,\ldots,\langle\mathrm{arg}_n,a_n\rangle\}$
where `pred', `arg$_i$' are reserved labels (not used except as
required here).
%\section{Complex types in record types}
\section{Function types}
\label{app:funtypes}
A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has
function types} (Chapter~\ref{ch:percint}, p.~\pageref{ex:funtypes}) if
\begin{enumerate}
\item for any $T_1,T_2 \in \textbf{Type}$, $(T_1\rightarrow T_2) \in \textbf{Type}$
\item for any $T_1,T_2 \in \textbf{Type}$, $f:_{\mathbf{TYPE_C}}(T_1\rightarrow T_2)$ iff
$f$ is a function whose domain is $\{a\mid
a:_{\mathbf{TYPE_C}}T_1\}$ and whose range is included in $\{a\mid a:_{\mathbf{TYPE_C}}T_2\}$
\end{enumerate}
In \cite{Cooper2012} we did not specify exactly what object is
represented by a function type $(T_1\rightarrow T_2)$. Here we
specify it to be the labelled set
$\{\langle\mathrm{dmn},T_1\rangle,\langle\mathrm{rng},T_2\rangle\}$
where `dmn' (``domain'') and `rng' (``range'') are reserved labels.
We also introduce a limited kind of polymorphism is function types
which we did not have in \cite{Cooper2012}.
A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ with function types
\textit{has
partial function types} (Chapter~\ref{ch:infex},
p.~\pageref{ex:partialfuntypes}) if
\begin{enumerate}
\item for any $T_1,T_2 \in \textbf{Type}$,
$(T_1\rightharpoonup T_2) \in \textbf{Type}$
\item for any $T_1,T_2 \in \textbf{Type}$,
$f:_{\mathbf{TYPE_C}}(T_1\rightharpoonup T_2)$ iff there is some type $T'$ such that
$f:(T'\rightarrow T_2)$ and for any $a$, if $a:T'$ then $a:T_1$
\end{enumerate}
We
specify the type $(T_1\rightharpoonup T_2)$ to be the labelled set
$\{\langle\mathrm{partdmn},T_1\rangle,\langle\mathrm{rng},T_2\rangle\}$
where `partdmn' (``partial domain'') and `rng' (``range'') are
reserved labels (`rng' being the same reserved label that was used for
total function types).
% A\todo{Do we want both these definitions?} system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
% $\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
% Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has
% polymorphic function types} if
% \begin{enumerate}
% \item for any $T_1,T_2 \in \textbf{Type}$,
% $\displaystyle{\bigvee_{T\sqsubseteq T_1}}(T\rightarrow T_2) \in \textbf{Type}$
% \item for any $T_1,T_2 \in \textbf{Type}$,
% $f:_{\mathbf{TYPE_C}}\displaystyle{\bigvee_{T\sqsubseteq
% T_1}}(T\rightarrow T_2)$ iff there is some type $T'$ such that
% $f:(T'\rightarrow T_2)$ and $T'\sqsubseteq T_1$
% \end{enumerate}
% We
% specify the type $\displaystyle{\bigvee_{T\sqsubseteq T_1}}(T\rightarrow T_2)$ to be the labelled set
% $\{\langle\mathrm{polydmn},T_1\rangle,\langle\mathrm{rng},T_2\rangle\}$
% where `polydmn' (``polymorphic domain'') and `rng' (``range'') are
% reserved labels (`rng' being the same reserved label that was used for
% non-polymorphic function types).
We introduce a notation for functions which is borrowed from the
$\lambda$-calculus:
$\lambda v\!:\!T\ .\ \varphi$ (Chapter~\ref{ch:percint},
p.~\pageref{ex:fun-notation}) is that function $f$ such that for any
$a:T$, $f(a)$ (the result of applying $f$ to $a$) is represented by
$\varphi[v\leftarrow a]$ (the result of replacing any free occurrence
of $v$ in $\varphi$ with $a$).
% as used by \cite{Montague1973}. Let $O[v]$ be the
% notation for some object of our type theory which uses the variable
% $v$ and let $T$ be a type. Then the function
% $\lambda v:T\ .\ O[v]$
% is to be the function
% $\{\langle v,O[v]\rangle\mid v:T\}$
% (Here we suppress the subscript $\mathbf{TYPE_C}$ on the `:'.)
For
example, the graph of the function
$\lambda v$:\textit{Ind} . run($v$)
is the set of ordered pairs
$\{\langle v,\mathrm{run}(v)\rangle\mid v:\mathit{Ind}\}$
Recall that `run($v$)' is itself a representation for the labelled
set
$\{\langle \mathrm{pred},\mathrm{run}\rangle, \langle
\mathrm{arg}_1,v\rangle\}$
Note that if $f$ is the function $\lambda v$:\textit{Ind} . run($v$)
and $a$:\textit{Ind} then $f(a)$ (the result of applying $f$ to $a$)
is `run($a$)'. Our definition of function-argument application
guarantees what is called $\beta$-equivalence in the
$\lambda$-calculus. When we discuss record types as arguments to
functions we will need to introduce one slight complication to our
notion of function application. We will introduce that complication
when we discuss record types.
In order to maintain $\alpha$-equivalence (for example, if $v_1$ and
$v_2$ are distinct variables, $\lambda v_1\!:\!T\ .\ \varphi\dep{v_1}$
represents the same function as $\lambda v_2\!:\!T\ .\
\varphi\dep{v_2}$), we use a variant of de Bruijn indexing
\citep{deBruijn1972} in the labelled set we use to model functions.
We model functions as labelled sets with two fields with the
distinguished labels `lambda' and `body'.
Where de Bruijn uses natural numbers to index the variable positions
we use segments of paths in the labelled set which relate the
appropriate instance of the 'body'-label labelling the field which is
sister to the binding 'lambda'-field. Thus
\begin{quote}
$\lambda v$:\textit{Ind} . run($v$)
\end{quote}
is the labelled set
\begin{quote}
\begin{tabbing}
$\{$\=$\langle$lambda, \textit{Ind}$\rangle$,\\
\>$\langle$body, $\{$\=$\langle$pred, run$\rangle$,\\
\>\> $\langle$arg$_1$, body.arg$_1\rangle\}\rangle\}$
\end{tabbing}
\end{quote}
and
\begin{quote}
$\lambda v_1$:\textit{Ind} . $r_1(v_1,\lambda v_2$:\textit{Ind}
. $r_2(v_2,v_1))$
\end{quote}
is the labelled set
\begin{quote}
\begin{tabbing}
$\{$\=$\langle$lambda, \textit{Ind}$\rangle$,\\
\> $\langle$body, $\{$\=$\langle$pred, $r_1\rangle$,\\
\>\> $\langle$arg$_1$, body.arg$\rangle$,\\
\>\> $\langle$arg$_2$, $\{$\=$\langle$lambda, \textit{Ind}$\rangle$,\\
\>\>\> $\langle$body, $\{$\=$\langle$pred, $r_2\rangle$,\\
\>\>\>\> $\langle$arg$_1$, body.arg$_1\rangle$,\\
\>\>\>\> $\langle$arg$_2$, body.arg$_2$.body.arg$_2\rangle\}\rangle\}\rangle\}\rangle\}$
\end{tabbing}
\end{quote}
\section{Set types}
\label{app:settypes}
Set types were not included in \cite{Cooper2012}.
A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has set
types} (Chapter~\ref{ch:infex}, p.~\pageref{ex:settypes}) if
\begin{enumerate}
\item for any $T \in \textbf{Type}$, $\mathrm{set}(T) \in \textbf{Type}$
\item for any $T \in \textbf{Type}$,
$X:_{\mathbf{TYPE_C}}\mathrm{set}(T)$ iff $X$ is a set and
for all $a\in X$, $a:_{\mathbf{TYPE_C}}T$
\item for any $T \in \textbf{Type}$, if $X:\mathrm{set}(T)$, then
$\mathfrak{T}(X)\in \textbf{Type}$ (Chapter~\ref{ch:quant},
p.~\pageref{ex:mathfrakT})
\item $a:\mathfrak{T}(X)$ iff $a\in X$
\end{enumerate}
We let $\mathrm{set}(T)$ represent the labelled set
$\{\langle\mathrm{set},T\rangle\}$ where `set' is a reserved
label.
% If $T$ is a type and $X:\mathrm{set}(T)$, then $\mathfrak{T}(X)$ is a
% type. $a:\mathfrak{T}(X)$ iff $a\in X$. (Chapter~\ref{ch:quant},
% p.~\pageref{ex:mathfrakT})\todo{Need to expand this to a system of
% complex types with set types and membership types}
% We also introduce a special kind of set type known as a plurality
% type. The idea here is that a plurality is a set that does not contain any two
% objects such that one is a proper part of the other. The notion of
% proper part is characterized by:
% \begin{enumerate}
% \item If $r_1$ and $r_2$ are records then $r_1$ \textit{is a proper
% part of} $r_2$, $r_1<r_2$, just in case $\varphi(r_1)\subset\varphi(r_2)$.
% \item If $o_1$ and $o_2$ are objects of some type and at least one of
% them is not of type \textit{Rec}, then $o_1$ is \textit{not} a
% proper part of $o_2$, $o_1\not<o_2$
% \end{enumerate}
In order to define plurality types as subtypes of set types we
introduce a notion of one record being a proper part of another.
For any objects $r_1$ and $r_2$, $r_1$ \textit{is a proper
part of} $r_2$, $r_1<r_2$, (Chapter~\ref{ch:commonnouns},
p.~\pageref{ex:properpart}) just in case
\begin{enumerate}
\item $r_1$ and $r_2$ are records,
\item
$\mathrm{paths}_{\text{rec}}(r_1)\subset\mathrm{paths}_{\text{rec}}(r_2)$
and
\item for all $\pi\in\mathrm{tpaths}(r_1)$, $r_1.\pi=r_2.\pi$
\end{enumerate}
A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ with set types
\textit{has plurality types} (Chapter~\ref{ch:commonnouns},
p.~\pageref{ex:plurality-types}) if
\begin{enumerate}
\item for any $T \in \textbf{Type}$, $\mathrm{plurality}(T) \in \textbf{Type}$
\item for any $T \in \textbf{Type}$,
$A:_{\mathbf{TYPE_C}}\mathrm{plurality}(T)$ iff
\begin{enumerate}
\item $A :_{\mathbf{TYPE_C}} \mathrm{set}(T)$
\item if $a\in A$ then for any $b$ such that $a<b$, $b\not\in A$
\end{enumerate}
\end{enumerate}
We let $\mathrm{plurality}(T)$ represent the labelled set
$\{\langle\text{plurality},T\rangle\}$ where `plurality' is a reserved
label.
\section{Singleton types}
\label{app:singletontypes}
Singleton types were not included in the formal definition in \cite{Cooper2012}.
A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has
singleton types} (Chapter~\ref{ch:infex}, p.~\pageref{ex:singleton-types}) if
% \begin{enumerate}
% \item for any $T \in \textbf{Type}$ and $a:_{\mathbf{TYPE_C}}T$, $T_a \in \textbf{Type}$
% \item for any $T \in \textbf{Type}$ and $a:_{\mathbf{TYPE_C}}T$,
% $b:_{\mathbf{TYPE_C}}T_a$ iff $a=b$
% \end{enumerate}
% These clauses are those presented in \cite{Cooper2012}. A more general
% version of these clauses seems useful for the uses we wish to make of
% singleton types, for example, the restriction of properties discussed
% in Appendix~\ref{app:gramrulesuniv}. The more general version allows
% singleton types to be created using an object of any type but will
% guarantee that the type is empty if the object is not of the type
% being restricted:
\begin{enumerate}
\item for any $T,T' \in \textbf{Type}$ and $a:_{\mathbf{TYPE_C}}T'$, $T_a \in \textbf{Type}$
\item for any $T,T' \in \textbf{Type}$ and $a:_{\mathbf{TYPE_C}}T'$,
$b:_{\mathbf{TYPE_C}}T_a$ iff $b:_{\mathbf{TYPE_C}}T$ and $a=b$
\end{enumerate}
% As we now allow singleton types that are empty (because the object
% used to restrict them is not of the required type) it may seem that
% the name ``singleton type'' is a misnomer. The cases of empty types
% are those where we have failed to define a singleton type.
We let $T_a$ represent the labelled set
$\{\langle\mathrm{singleton},\langle T,a\rangle\rangle\}$ where `singleton' is a reserved
label.
\section{Join types}
\label{app:jointypes}
A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has join
types} (Chapter~\ref{ch:infex}, p.~\pageref{ex:jointypes}) if
\begin{enumerate}
\item for any $T_1,T_2 \in \mathbf{Type}$, $(T_1\vee T_2) \in \mathbf{Type}$
\item for any $T_1,T_2 \in \mathbf{Type}$, $a:_{\mathbf{TYPE_C}}(T_1\vee T_2)$ iff
$a:_{\mathbf{TYPE_C}}T_1$ or $a:_{\mathbf{TYPE_C}}T_2$
\end{enumerate}
Here, but not in \cite{Cooper2012}, we specify that $(T_1\vee T_2)$
represents the labelled set
$\{\langle\mathrm{disj}_1,T_1\rangle,\langle\mathrm{disj_2},T_2\rangle\}$
where `disj$_1$' and `disj$_2$' are reserved labels (``disjunct'').
We add generalized join types which were not present in
\cite{Cooper2012}. A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has
generalized join
types} (Chapter~\ref{ch:infex}, p.~\pageref{ex:genjointypes}) if
\begin{enumerate}
\item for any finite set of types, $\mathscr{T}$, such that $\mathscr{T}
\subseteq\mathbf{Type}$, $\bigvee\mathscr{T} \in \mathbf{Type}$
\item for any finite $\mathscr{T} \subseteq\mathbf{Type}$, $a:_{\mathbf{TYPE_C}}\bigvee\mathscr{T}$ iff
$a:_{\mathbf{TYPE_C}}T$ for some $T\in\mathscr{T}$
\end{enumerate}
We specify that $\bigvee\mathscr{T}$
represents the labelled set
$\{\langle\mathrm{disj},\mathscr{T}\rangle\}$
where `disj' is a reserved label (``disjunction'').
\section{Meet types}
\label{app:meettypes}
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$ \textit{has meet
types} (Chapter~\ref{ch:infex}, p.~\pageref{ex:meettypes}) if
\begin{enumerate}
\item for any $T_1,T_2 \in \mathbf{Type}$, $(T_1\wedge T_2) \in \mathbf{Type}$
\item for any $T_1,T_2 \in \mathbf{Type}$, $a:_{\mathbf{TYPE_C}}(T_1\wedge T_2)$ iff
$a:_{\mathbf{TYPE_C}}T_1$ and $a:_{\mathbf{TYPE_C}}T_2$
\end{enumerate}
Here, but not in \cite{Cooper2012}, we specify that $(T_1\wedge T_2)$
represents the labelled set
$\{\langle\mathrm{conj}_1,T_1\rangle,\langle\mathrm{conj_2},T_2\rangle\}$
where `conj$_1$' and `conj$_2$' are reserved labels (``conjunct'').
We add generalized meet types which were not present in
\cite{Cooper2012}. A system of complex types {\bf TYPE$_C$} = $\langle${\bf Type}, {\bf BType},
$\langle$\textbf{PType}, {\bf Pred}, \textbf{ArgIndices}, {\it
Arity\/}$\rangle$, $\langle A,F\rangle$$\rangle$ \textit{has
generalized meet
types} (Chapter~\ref{ch:infex}, p.~\pageref{ex:genmeettypes}) if
\begin{enumerate}
\item for any non-empty finite set of types, $\mathscr{T}$, such that $\mathscr{T}
\subseteq\mathbf{Type}$, $\bigwedge\mathscr{T} \in \mathbf{Type}$
\item for any finite $\mathscr{T} \subseteq\mathbf{Type}$, $a:_{\mathbf{TYPE_C}}\bigwedge\mathscr{T}$ iff
$a:_{\mathbf{TYPE_C}}T$ for all $T\in\mathscr{T}$
\end{enumerate}
We specify that $\bigwedge\mathbb{T}$
represents the labelled set
$\{\langle\mathrm{conj},\mathbb{T}\rangle\}$
where `conj' is a reserved label (``conjunction'').
\section{Models and modal systems of types}
\label{app:modal}
A modal system of complex types
provides a collection of models, $\mathcal{M}$, so that we can talk about properties of the whole collection of
type assignments provided by the various models $M\in\mathcal{M}$.
A \textit{modal system of complex types based on $\mathcal{M}$}
(Chapter~\ref{ch:percint}, p.~\pageref{ex:modalsys-complex}) is a
family of quadruples\footnote{This definition has been modified since
\cite{Cooper2012} to make \textbf{PType} and \textbf{Type} be
relativized to the model $M$.}:
\begin{quote}
{\bf TYPE$_{\mathit{MC}}$} = $\langle${\bf Type}$_M$, {\bf BType},
$\langle$\textbf{PType}$_M$, {\bf Pred}, \textbf{ArgIndices}, {\it Arity\/}$\rangle, M\rangle_{M\in\mathcal{M}}$
\end{quote}
where for each $M\in \mathcal{M}$, $\langle${\bf Type}$_M$, {\bf BType},
$\langle$\textbf{PType}$_M$, {\bf Pred}, \textbf{ArgIndices}, {\it Arity\/}$\rangle, M\rangle$ is
a system of complex types.
This enables us to define modal notions:
If {\bf TYPE$_{\mathit{MC}}$} = $\langle${\bf Type}$_M$, {\bf BType},
$\langle$\textbf{PType}$_M$, {\bf Pred}, \textbf{ArgIndices}, {\it Arity\/}$\rangle, M\rangle_{M\in\mathcal{M}}$
is a modal system of complex types based
on $\mathcal{M}$, we shall use the notation {\bf
TYPE$_{\mathit{MC}_M}$} (where $M\in\mathcal{M}$) to refer to that
system of complex types in {\bf TYPE$_{\mathit{MC}}$} whose model is
$M$. Let \textbf{Type}$_{\mathit{MC}_{\mathit{restr}}}$ be
$\bigcap\limits_{M\in\mathcal{M}}\!\textbf{Type}_M$, the
``restrictive'' set of
types which occur in all possibilities, and \textbf{Type}$_{\mathit{MC}_{\mathit{incl}}}$ be
$\bigcup\limits_{M\in\mathcal{M}}\!\textbf{Type}_M$, the
``inclusive'' set of
types which occur in at least one possibility. Then we can define
modal notions either restrictively or inclusively (indicated by the
subscripts $r$ and $i$ respectively):
\paragraph{restrictive modal notions}
\begin{enumerate}
\item for any $T_1,T_2\in\textbf{Type}_{\mathit{MC}_{\mathit{restr}}}$, $T_1$ \textit{is
(necessarily) equivalent$_r$
to} $T_2$ \textit{in} {\bf TYPE$_{\mathit{MC}}$},
$T_1\approx_{\mathbf{TYPE_{\mathit{MC}}}}T_2$, iff for all
$M\in\mathcal{M}$, $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_1\}=\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_2\}$
\item for any $T_1,T_2\in\textbf{Type}_{\mathit{MC}_{\mathit{restr}}}$, $T_1$ \textit{is a subtype$_r$ of} $T_2$ \textit{in} {\bf TYPE$_{\mathit{MC}}$},
$T_1\sqsubseteq_{\mathbf{TYPE_{\mathit{MC}}}}T_2$, iff for all
$M\in\mathcal{M}$, $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_1\}\subseteq\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_2\}$
\item for any $T\in\textbf{Type}_{\mathit{MC}_{\mathit{restr}}}$, $T$ \textit{is necessary$_r$ in} {\bf TYPE$_{\mathit{MC}}$} iff for all
$M\in\mathcal{M}$, \\ $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T\}\not=\emptyset$
\item for any $T\in\textbf{Type}_{\mathit{MC}_{\mathit{restr}}}$, $T$ \textit{is possible$_r$ in} {\bf TYPE$_{\mathit{MC}}$} iff for some
$M\in\mathcal{M}$, \\ $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T\}\not=\emptyset$
\end{enumerate}
\paragraph{inclusive modal notions}
\begin{enumerate}
\item for any $T_1,T_2\in\textbf{Type}_{\mathit{MC}_{\mathit{incl}}}$, $T_1$ \textit{is
(necessarily) equivalent$_i$
to} $T_2$ \textit{in} {\bf TYPE$_{\mathit{MC}}$},
$T_1\approx_{\mathbf{TYPE_{\mathit{MC}}}}T_2$, iff for all
$M\in\mathcal{M}$, if $T_1$ and $T_2$ are members of
\textbf{Type}$_M$, then $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_1\}=\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_2\}$
\item for any $T_1,T_2\in\textbf{Type}_{\mathit{MC}_{\mathit{incl}}}$, $T_1$ \textit{is a subtype$_i$ of} $T_2$ \textit{in} {\bf TYPE$_{\mathit{MC}}$},
$T_1\sqsubseteq_{\mathbf{TYPE_{\mathit{MC}}}}T_2$, iff for all
$M\in\mathcal{M}$, if $T_1$ and $T_2$ are members of
\textbf{Type}$_M$, then $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_1\}\subseteq\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T_2\}$
\item for any $T\in\textbf{Type}_{\mathit{MC}_{\mathit{incl}}}$, $T$ \textit{is necessary$_i$ in} {\bf TYPE$_{\mathit{MC}}$} iff for all
$M\in\mathcal{M}$, if $T\in$\textbf{Type}$_M$, then \\ $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T\}\not=\emptyset$
\item for any $T\in\textbf{Type}_{\mathit{MC}_{\mathit{incl}}}$, $T$ \textit{is possible$_i$ in} {\bf TYPE$_{\mathit{MC}}$} iff for some
$M\in\mathcal{M}$, if $T\in$\textbf{Type}$_M$, then\\ $\{a\mid a:_{\mathbf{TYPE}_{\mathit{MC}_M}}T\}\not=\emptyset$
\end{enumerate}
It is easy to see that if any of the restrictive definitions holds for
given types in a particular system then the corresponding inclusive
definition will also hold for those types in that system.
\section{The type \textit{Type} and stratification}
\label{app:int}
% An intensional type system is one in which the types themselves become
% objects of a type. We introduce a distinguished type \textit{Type} to
% which all the members of the set \textbf{Type} belong. Things are a
% little more complicated than this, though, since we want \textit{Type}
% itself to be a type and therefore it should belong to the set
% \textbf{Type}. This would mean that \textit{Type} belongs to itself,
% i.e. \textit{Type}:\textit{Type}. Allowing types to belong to
% themselves puts us in danger of creating a situation in which
% Russell's paradox arises. If some members of \textbf{Type} belong to
% themselves then we should be able to talk of the set of types which do
% not belong to themselves,
% $\{T\in\mathbf{Type}\mid T\not\ : T\}$. Suppose that some model
% assigns this set to $T'$. Then the question arises whether $T'$
% belongs to itself and we can show that if $T':T'$ then $T'\not\ :T'$
% and if $T'\not\ :T'$ then $T':T'$.
% In order to avoid this problem we
% will \textit{stratify} (or \textit{ramify}) our type system by introducing types of
% different \textit{orders}. A type system of order 0 will be a
% system of complex types in the way we have defined it. The
% set of types, \textbf{Type}$^1$ of a type
% system of order 1 based on this system will contain in addition to
% everything in the original type system a type, \textit{Type}$^1$, to
% which all the types of order 0, members of the set \textbf{Type}$^0$, belong. In general for all the natural
% numbers $n$, \textit{Type}$^{n+1}$ will be a type to which all the
% types in \textbf{Type}$^n$ belong. But there may be more additional
% types included in the higher sets of types. Suppose, for example,
% that we want to introduce a predicate $P$ expressing a relationship
% between individuals and types. (This will be our basic strategy for
% the treatment of attitude predicates such as \textit{believe} and
% \textit{know}.) Then \textit{Arity}($P$) might be $\langle
% \mathit{Ind},\mathit{Type}^n\rangle$. In systems of any order less
% than $n$, $P$ will not be able to be used to construct a type because
% clause~\ref{cl:predtypes} in our definition of systems of complex
% types requires that the types assigned to the arguments be types in
% the system. However, in systems of order $n$ or greater the required
% type will be present and the predicate will form a type.
% This avoids the risk of running into Russell's paradox but it
% introduces another problem which it is best we deal with straight
% away. We will illustrate the problem by creating a small example.
% Suppose that we have a system of complex types which includes the type
% \textit{Ind} (``individuals'') to which the objects $a$, $b$ and $c$
% belong. Suppose further that we have three predicates
% \textit{run},\textit{know} and \textit{believe} and that
% \textit{Arity}(\textit{run})=$\langle\mathit{Ind}\rangle$ and
% \textit{Arity}(\textit{know})=\textit{Arity}(\textit{believe})=$\langle\mathit{Ind},\mathit{Type}^1\rangle$.
% The set \textbf{Type}$^0$ will contain the types \textit{run}($a$),
% \textit{run}($b$) and \textit{run}($c$) but no types constructed with
% \textit{know} and \textit{believe}. The set \textbf{Type}$^1$ will
% contain types
% such as \textit{believe}($a$, \textit{run}($a$)) and
% \textit{know}($c$, \textit{run}($b$)) in addition, since \textit{run}($a$),
% \textit{run}($b$) and \textit{run}($c$), being members of
% \textbf{Type}$^0$ will belong to the type \textit{Type}$^1$. The set
% \textbf{Type}$^2$ will not get any additional types constructed with
% predicates since the arity of the predicates restricts the second
% argument to be of \textit{Type}$^1$. But suppose we want to express
% that $a$ believes that $b$ knows that $c$ runs, that is we want to
% construct the type \textit{believe}($a$, \textit{know}($b$,
% \textit{run}($c$))). Perhaps we could solve this by saying that the
% arity of \textit{know} and \textit{believe} is
% $\langle\mathit{Ind},\mathit{Type}^2\rangle$. But now
% \textbf{Type}$^1$ will not contain any types constructed with these
% predicates and \textbf{Type}$^2$ will again only contain types such as
% \textit{know}($c$, \textit{run}($b$)).
% In order to solve this problem we need to introduce a limited amount
% of \textit{polymorphism} into our arities and assign these predicates
% the arity $\langle\mathit{Ind},\mathit{Type}^n\rangle_{n>0}$ (that is,
% the set of sequences $\langle\mathit{Ind},\mathit{Type}^n\rangle$
% where $n$ is a natural number greater than 0). Predicates with this
% arity will be able to take arguments of any type \textit{Type}$^n$ where
% $n>0$. We will say that the predicates \textit{know} and
% \textit{believe} have this arity. Now it will be the case that
% \textit{run}($c$):\textit{Type}$^1$, \textit{know}($b$,
% \textit{run}($c$)):\textit{Type}$^2$, \textit{believe}($a$, \textit{know}($b$,
% \textit{run}($c$))):\textit{Type}$^3$ and so on.