111 lines
3.9 KiB
TeX
111 lines
3.9 KiB
TeX
% Emacs, note: this is a -*- LaTeX -*- file.
|
|
% MAKE SURE YOU EDIT THE RIGHT FILE, math.ptex and not the math.tex
|
|
% file where gpic has already expanded things.
|
|
\documentclass{article}
|
|
|
|
\usepackage{rcs}
|
|
\RCS $Date: 2000/07/18 05:21:50 $
|
|
\RCS $Revision: 1.3 $
|
|
\date{Rev.\RCSRevision~~\RCSDate}
|
|
|
|
\usepackage{amsmath}
|
|
|
|
\title{Mathematics of ZigZag}
|
|
\author{Tuomas J.~Lukka}
|
|
\begin{document}
|
|
\maketitle
|
|
|
|
\newtheorem{theorem}{Definition}[section]
|
|
\newtheorem{definition}[theorem]{Definition}
|
|
|
|
\section{Introduction}
|
|
|
|
The purpose of this document is to look at ZigZag from a
|
|
mathematical perspective.
|
|
|
|
It is slowly becoming more and more obvious that this type of analysis
|
|
can help us understand some of the conceptually less clear parts of ZigZag
|
|
and why they are conceptually less clear.
|
|
|
|
\section{Tumblers}
|
|
|
|
\section{Definition of a ZigZag space}
|
|
|
|
\begin{definition}
|
|
% A ZigZag space $Z$ is the tuple $(C, d, t)$ of the set of cells $C$,
|
|
% a mapping $d$ from strings to bijections between subsets of $C$,
|
|
% and a mapping $t$ from cells to cell contents
|
|
% (either permascroll spans as tumbler addresses or strings)
|
|
A ZigZag space $Z$ is the tuple $(C, d, t)$ of the set of cells $C$, a
|
|
mapping $d$ from strings to the set \( D := \{ \, f\colon $C'$
|
|
\longrightarrow $C''$ \mid \text{$f$ is bijective and } C', C''
|
|
\subset C \, \} \) and a mapping $t$ from cells to the set of all
|
|
possible cell content (permascroll spans as tumbler addresses or
|
|
strings).
|
|
\end{definition}
|
|
|
|
Now, special dimensions can be defined simply as restrictions on
|
|
the space; for instance, as predicates:
|
|
\begin{definition}
|
|
The ZZspace $Z$ has a clone-dimension $d_0$ iff
|
|
for all cells $c$ for which $d(d_0)(c)$ exists, $t(d(d_0)(c)) = t(c)$.
|
|
\end{definition}
|
|
|
|
Likewise, we can define a versioning operation:
|
|
\begin{definition}
|
|
A ZZ operation $o: Z \rightarrow Z'$ is versioning
|
|
if ... XXX
|
|
\end{definition}
|
|
|
|
|
|
\section{Solving real problems}
|
|
|
|
\subsection{Slice spaces}
|
|
|
|
It is possible to highlight some problems related to defining operations
|
|
and combinations of spaces with this type of analysis. One observation
|
|
made early on in the coding was that encapsulation makes it complicated
|
|
to define operations on e.g.~slice spaces (spaces that consist of a
|
|
combination of several spaces). For example, in $C = f(A,B)$ the ZZspace
|
|
is $C$ a slice space if it contains cells corresponding to most cells
|
|
of $A$ and $B$ (excluding {\em preflets}, i.e. cells whose meaning is to
|
|
specify for $f$ which cells are to be connected between $A$ and $B$).
|
|
|
|
The forwards transform is simple: $C = f(A,B)$ as above.
|
|
However, problems begin to appear when we consider that normally
|
|
performing an operation functionally: $A' = \Omega(A)$ causes $A'$ to be
|
|
saved on the disk to replace $A$. $C' = \Omega(C)$ cannot do the same
|
|
as simply because we would like to trace the chain to change $A$ and $B$,
|
|
obtaining $(A', B') = f^{-1}(\Omega(f(A,B)))$. This can naturally be quite
|
|
complicated. Most combination functions $f$ used in reality are nice but still
|
|
this causes a pronounced difficulty in coding the usual operations
|
|
(new cell, etc) on slice spaces if starting from this perspective.
|
|
|
|
Thus, the conceptually simplest way forwards might be defining a whole
|
|
new kind of mathematical object, a slice space, which has its own
|
|
operations that naturally distribute to the next level.
|
|
After this it is simple to define performance enhancements by caching parts
|
|
of the next level space but the conceptual simplicity of directly modifying
|
|
only the underlying representation (instead of e.g.~the representation {\em and}
|
|
a cache) is appealing.
|
|
|
|
\begin{definition}
|
|
A Slice space $S$ is a
|
|
tuple $(Z_0, s)$ where $Z_0$ is the slice 0, i.e.~the root space,
|
|
and $s$ is a mapping from strings to ZigZag spaces
|
|
\end{definition}
|
|
|
|
\begin{definition}
|
|
A slice composition function
|
|
$f_c$ is a mapping
|
|
$S \rightarrow Z$
|
|
from a slice space to a ZigZag space (the composition function).
|
|
\end{definition}
|
|
|
|
|
|
|
|
\end{document}
|
|
|
|
|
|
|