-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchap-2.3-forlan16.tex
72 lines (72 loc) · 2.62 KB
/
chap-2.3-forlan16.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
\begin{list}{}
{\setlength{\leftmargin}{\leftmargini}
\setlength{\rightmargin}{0cm}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\itemsep}{0cm}
\setlength{\parsep}{0cm}
\setlength{\labelsep}{0cm}
\setlength{\labelwidth}{0cm}
\catcode`\#=12
\catcode`\$=12
\catcode`\%=12
\catcode`\^=12
\catcode`\_=12
\catcode`\.=12
\catcode`\?=12
\catcode`\!=12
\catcode`\&=12
\ttfamily}
\small
\item[]\textsl{-\ }val\ rel\ =\ SymRel.input\ "";
\item[]\textsl{@\ }(1,\ 2),\ (2,\ 3),\ (3,\ 4)
\item[]\textsl{@\ }.
\item[]\textsl{val\ rel\ =\ -\ :\ sym_rel}
\item[]\textsl{-\ }SymRel.output("",\ rel);
\item[]\textsl{(1,\ 2),\ (2,\ 3),\ (3,\ 4)}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\item[]\textsl{-\ }SymSet.output("",\ SymRel.domain\ rel);
\item[]\textsl{1,\ 2,\ 3}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\item[]\textsl{-\ }SymSet.output("",\ SymRel.range\ rel);
\item[]\textsl{2,\ 3,\ 4}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\item[]\textsl{-\ }SymRel.function\ rel;
\item[]\textsl{val\ it\ =\ true\ :\ bool}
\item[]\textsl{-\ }SymRel.functionFromTo
\item[]\textsl{=\ }(rel,\ SymSet.fromString\ "1,\ 2,\ 3",\ SymSet.fromString\ "2,\ 3,\ 4");
\item[]\textsl{val\ it\ =\ true\ :\ bool}
\item[]\textsl{-\ }SymRel.injection\ rel;
\item[]\textsl{val\ it\ =\ true\ :\ bool}
\item[]\textsl{-\ }SymRel.bijectionFromTo
\item[]\textsl{=\ }(rel,\ SymSet.fromString\ "1,\ 2,\ 3",\ SymSet.fromString\ "2,\ 3,\ 4");
\item[]\textsl{val\ it\ =\ true\ :\ bool}
\item[]\textsl{-\ }val\ f\ =\ SymRel.applyFunction\ rel;
\item[]\textsl{val\ f\ =\ fn\ :\ sym\ ->\ sym}
\item[]\textsl{-\ }Sym.output("",\ f(Sym.fromString\ "1"));
\item[]\textsl{2}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\item[]\textsl{-\ }Sym.output("",\ f(Sym.fromString\ "2"));
\item[]\textsl{3}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\item[]\textsl{-\ }Sym.output("",\ f(Sym.fromString\ "3"));
\item[]\textsl{4}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\item[]\textsl{-\ }Sym.output("",\ f(Sym.fromString\ "4"));
\item[]\textsl{argument\ not\ in\ domain}
\item[]
\item[]\textsl{uncaught\ exception\ Error}
\item[]\textsl{-\ }val\ rel'\ =\ SymRel.input\ "";
\item[]\textsl{@\ }(4,\ 3),\ (3,\ 2),\ (2,\ 1)
\item[]\textsl{@\ }.
\item[]\textsl{val\ rel'\ =\ -\ :\ sym_rel}
\item[]\textsl{-\ }val\ rel''\ =\ SymRel.compose(rel',\ rel);
\item[]\textsl{val\ rel''\ =\ -\ :\ sym_rel}
\item[]\textsl{-\ }SymRel.functionFromTo
\item[]\textsl{=\ }(rel'',\ SymSet.fromString\ "1,\ 2,\ 3",
\item[]\textsl{=\ }\ SymSet.fromString\ "1,\ 2,\ 3");
\item[]\textsl{val\ it\ =\ true\ :\ bool}
\item[]\textsl{-\ }SymRel.output("",\ rel'');
\item[]\textsl{(1,\ 1),\ (2,\ 2),\ (3,\ 3)}
\item[]\textsl{val\ it\ =\ ()\ :\ unit}
\end{list}