aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/union.ht
blob: 9d7716aba9f5fd50aa5030292105a09d816eb318 (plain)
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
%---------------------------------------------------------------------------
%                   Tagged Union Constructor Page
%---------------------------------------------------------------------------
 
\begin{page}{DomainUnion}{Domain {\em Union(a:A,...,b:B)}}
\beginscroll
{\em Union} takes any number of "tag"-domain pairs of arguments:
\indentrel{2}
\newline \spad{a}, a tag, an element of domain \spadtype{Symbol}
\newline \spad{A}, a domain of category \spadtype{SetCategory}
\newline\tab{10}...
\newline \spad{b}, a tag, an element of domain \spadtype{Symbol}
\newline \spad{B}, a domain of category \spadtype{SetCategory}
\indentrel{-2}\newline
This constructor is a primitive in \Language{}. 
\newline
\beginmenu
\item\menulispdownlink{Description}{(|dbSpecialDescription| '|Union|)) }\tab{15}General description
\item\menulispdownlink{Operations}{(|dbSpecialOperations| '|Union|)}\tab{15}All exported operations of \spad{Union(a:A,b:B)}
%\item\menudownlink{Examples}   {UnionExamples}   \tab{15}Examples illustrating use
\item\menulispdownlink{Exports}{(|dbSpecialExports| '|Union|)}\tab{15}Explicit categories and operations
\endmenu
\vspace{1}\newline
In this tagged \spad{Union}, tags \spad{a,...,b} must be distinct. 
\newline
For an alternate "untagged" form of \spad{Union}, see \downlink{Union(A,B)}{UntaggedUnion}.
\endscroll\end{page}
 
\begin{page}{UnionDescription}{Domain Constructor {\em Union}}
\beginscroll
\newline\menuitemstyle{}\tab{2}Union({\em a:A},{\em b:B})
\newline\tab{2}{\em Arguments:}\indent{17}\tab{-2}
{\em a}, a tag, an element of domain \spadtype{Symbol}
\newline\tab{-2}
{\em A}, a domain of category \spadtype{SetCategory}
\newline\tab{-2}
{\em b}, a tag, an element of domain \spadtype{Symbol}
\newline\tab{-2}
{\em B}, a domain of category \spadtype{SetCategory}
\indent{0}\newline\tab{2}{\em Returns:}\indent{17}\tab{-2}
the "union of {\em A} and {\em B}" as described below.
\indent{0}\newline\tab{2}{\em Description:}\indent{15}\tab{0}
{\em Union(a:A,b:B)} denotes the class of objects 
which are either members of domain {\em A} or of domain {\em B}.
The symbols {\em a} and {\em b} are called "tags" and 
are used to identify the two "branches"
of the union.
The {\em Union} constructor can take any number of arguments and
has an alternate form without {\em tags}.
This tagged {\em Union} type is necessary, for example, to disambiguate
two branches of a union where {\em A} and {\em B} denote the same type.
{\em Union} is a primitive domain of \Language{} which cannot be
defined in the \Language{} language. 
\endscroll\end{page}

%---------------------------------------------------------------------------
%               Untagged Union Constructor Page
%---------------------------------------------------------------------------
 
\begin{page}{UntaggedUnion}{Domain {\em Union(A,...,B)}}
\beginscroll
{\em Union} takes any number of domain arguments:
\indentrel{2}
\newline \spad{A}, a domain of category \spadtype{SetCategory}
\newline\tab{10}...
\newline \spad{B}, a domain of category \spadtype{SetCategory}
\indentrel{-2}\newline
\spad{Union} is a primitive constructor in \Language{}. 
\newline
\beginmenu
\item\menulispdownlink{Description}{(|dbSpecialDescription| '|UntaggedUnion|)) }\tab{15}General description
\item\menulispdownlink{Operations}{(|dbSpecialOperations| '|UntaggedUnion|)}\tab{15}All exported operations of \spad{Union(A,B)}
%\item\menudownlink{Examples}   {UTUnionExamples}   \tab{15}Examples illustrating use
%\item\menudownlink{Exports}    {UTUnionExports}    \tab{15}Explicit categories and operations
\endmenu
\vspace{1}\newline
In this untagged form of \spad{Union}, domains \spad{A,...,B} must be distinct.
\endscroll\end{page}

\begin{page}{UTUnionDescription}{Domain Constructor {\em Union}}
\beginscroll
\newline\menuitemstyle{}\tab{2}Union({\em A},{\em B})
\newline\tab{2}{\em Arguments:}\indent{17}\tab{-2}
{\em A}, a domain of category \spadtype{SetCategory}
\newline\tab{-2}
{\em B}, a domain of category \spadtype{SetCategory}
\indent{0}\newline\tab{2}{\em Returns:}\indent{17}\tab{-2}
the "union of {\em A} and {\em B}" as described below.
\indent{0}\newline\tab{2}{\em Description:}\indent{15}\tab{0}
{\em Union(A,B)} denotes the class of objects which are
which are either members of domain {\em A} or of domain {\em B}.
The {\em Union} constructor can take any number of arguments and
has an alternate form using {\em tags}.
{\em Union} is a primitive domain of \Language{} which cannot be
defined in the \Language{} language. 
\endscroll\end{page}