-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset.tex
153 lines (109 loc) · 3.07 KB
/
set.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
\textslideleft{
Cells accumulate information in a {\it bounded join-semilattice}
\pnl
A bounded join-semilattice is:
\begin{itemize}
\item A {\it partially ordered set}
\item with a least element
\item such that any subset of elements has a {\it least upper bound}
\end{itemize}
\pnl
``Least upper bound'' is denoted as $\vee$ and is usually pronounced ``join''
}
\begin{frame}
\begin{columns}
\column{0.7\textwidth}
\includegraphics[scale=0.65]{powerset.pdf}
\pause
\column{0.3\textwidth}
\includegraphics[scale=0.5]{more-information.pdf}
\end{columns}
\end{frame}
\latticeinfoslide{set/powerset-info1.pdf}
\latticeinfoslide{set/powerset-info2.pdf}
\latticeinfoslide{set/powerset-info3.pdf}
\latticeinfoslide{set/powerset-info4.pdf}
\latticeinfoslide{set/powerset1.pdf}
\latticeinfoslide{set/powerset2.pdf}
\latticeinfoslide{set/powerset3.pdf}
\latticeinfoslide{set/powerset4.pdf}
\latticeinfoslide{set/powerset5.pdf}
\latticeinfoslide{set/powerset6.pdf}
\textslideleft{
$\vee$ has useful algebraic properties. It is:
\begin{itemize}
\item A monoid
\item that's commutative
\item and idempotent
\end{itemize}
}
\textslide{
Left identity
$\epsilon \vee x = x$
\nl
Right identity
$x \vee \epsilon = x$
\nl
Associativity
$(x \vee y) \vee z = x \vee (y \vee z)$
\nl
Commutative
$x \vee y = y \vee x$
\nl
Idempotent
$x \vee x = x$
}
\begin{frame}[fragile]
\begin{haskellcode}
class BoundedJoinSemilattice a where
bottom :: a
(\/) :: a -> a -> a
\end{haskellcode}
\pnl
\begin{haskellcode}
data SudokuVal = One | Two | Three | Four
deriving (Eq, Ord, Show)
\end{haskellcode}
\pause
\begin{haskellcode}
newtype SudokuSet = S (Set SudokuVal)
\end{haskellcode}
\pnl
\begin{haskellcode}
instance BoundedJoinSemilattice SudokuSet where
bottom = S (Set.fromList [One, Two, Three, Four])
S a \/ S b = S (Set.intersection a b)
\end{haskellcode}
\end{frame}
\textslideleft{
We don't write values directly to cells
Instead we {\it join information in}
\pnl
This makes our propagators {\it monotone}, meaning that as the input cells gain information, the output cells gain information (or don't change)
\pnl
A function $f : A \rightarrow B$ where $A$ and $B$ are partially ordered sets is {\bf monotone} if and only if, \\
for all $x,y \in A .$ $x \leq y \implies f(x) \leq f(y)$
}
\textslide{
All our lattices so far have been fininte
\includegraphics[scale=0.6]{powerset.pdf}
}
\textslideleft{
Thanks to these properties:
\begin{itemize}
\item the bounded join-semilattice laws
\item the finiteness of our lattice
\item the monotonicity of our propagators
\end{itemize}
our propagator networks will yield with a deterministic answer, in finite time, regardless of parallelism and distribution
\pnl
Bounded join-semilattices are already popular in the distributed systems world
See: Conflict Free Replicated Datatypes
\pnl
We can relax these constraints in a few different directions
}
\textslide{
Our lattices only need the {\it ascending chain condition}
\includegraphics[scale=0.8]{flat.pdf}
}
\textslide{\Huge{?}}