Liking cljdoc? Tell your friends :D

vaelii.impl.projection

Relation algebras built as two independent projections onto the one-dimensional point algebra — the shape the cardinal directions (vaelii.impl.orientation) and the relative frame (vaelii.impl.relative) both have.

Each names nine base relations, and each of the nine is a pair of coordinates on two orthogonal axes: north is [:eq :gt] east-west by north-south, front-left is [:lt :gt] left-right by front-back. The two differ only in what the axes are called and which nine names sit on them.

Composition is computed, never looked up. Because the axes are independent, composing two relations is composing each axis through point-compose and taking the product of the two results — north-then-east is :eq;:gt = :gt on x and :gt;:eq = :gt on y, which is northeast. Two opposite diagonals lose both axes at once and compose to the whole universe. A 9×9 composition table would be 81 entries to get right by hand and to keep right; this derives them from nine projections and the point algebra's nine.

Totality is what makes it legitimate. The projection must be a bijection onto all nine [x y] combinations — three point relations on each of two axes — so whatever pair the axes compose to names a relation and nothing falls out of the algebra. algebra checks that rather than assuming it, because a projection table with a duplicate or a gap composes to nil and stores it as a relation.

The point algebra here is spelled :lt :eq :gt — coordinates on an axis. vaelii.impl.point is the same three-element algebra as a calculus over instants, where the relations are :before :equal :after and name a claim about time; the two are not shared, because an axis coordinate and a temporal ordering are different claims that happen to compose alike.

Relation algebras built as **two independent projections onto the one-dimensional
point algebra** — the shape the cardinal directions (`vaelii.impl.orientation`) and the
relative frame (`vaelii.impl.relative`) both have.

Each names nine base relations, and each of the nine is a pair of coordinates on two
orthogonal axes: north is `[:eq :gt]` east-west by north-south, front-left is
`[:lt :gt]` left-right by front-back.  The two differ only in what the axes are called
and which nine names sit on them.

**Composition is computed, never looked up.**  Because the axes are independent,
composing two relations is composing each axis through `point-compose` and taking the
product of the two results — north-then-east is `:eq;:gt` = `:gt` on x and `:gt;:eq` =
`:gt` on y, which is northeast.  Two opposite diagonals lose both axes at once and
compose to the whole universe.  A 9×9 composition table would be 81 entries to get
right by hand and to keep right; this derives them from nine projections and the
point algebra's nine.

**Totality is what makes it legitimate.**  The projection must be a bijection onto all
nine `[x y]` combinations — three point relations on each of two axes — so whatever
pair the axes compose to names a relation and nothing falls out of the algebra.
`algebra` checks that rather than assuming it, because a projection table with a
duplicate or a gap composes to `nil` and stores it as a relation.

The point algebra here is spelled `:lt :eq :gt` — coordinates on an axis.
`vaelii.impl.point` is the same three-element algebra as a *calculus* over instants,
where the relations are `:before :equal :after` and name a claim about time; the two
are not shared, because an axis coordinate and a temporal ordering are different
claims that happen to compose alike.
raw docstring

algebraclj

(algebra relation->axes)

A vaelii.impl.qcn relation algebra from relation->axes, a map of base relation → its [axis-1 axis-2] projection.

Returns {:universe :identity :compose :converse}, where the identity is whichever relation projects to [:eq :eq] — the one a thing stands in to itself, since neither axis separates it from itself.

Refuses a projection that is not a bijection onto all nine axis pairs: a table with a gap or a repeat still composes, and what it composes to is a nil stored as though it were a relation.

A `vaelii.impl.qcn` relation algebra from `relation->axes`, a map of base relation →
its `[axis-1 axis-2]` projection.

Returns `{:universe :identity :compose :converse}`, where the identity is whichever
relation projects to `[:eq :eq]` — the one a thing stands in to itself, since neither
axis separates it from itself.

Refuses a projection that is not a bijection onto all nine axis pairs: a table with a
gap or a repeat still composes, and what it composes to is a `nil` stored as though it
were a relation.
sourceraw docstring

point-composeclj

The one-dimensional point algebra: [a b] → the relations possible between x and z when a relates x to y and b relates y to z. Only the two disagreeing pairs lose information — x < y and y > z says nothing at all about x and z.

The one-dimensional point algebra: `[a b]` → the relations possible between x and z
when a relates x to y and b relates y to z.  Only the two disagreeing pairs lose
information — x < y and y > z says nothing at all about x and z.
sourceraw docstring

point-converseclj

The one-dimensional point algebra's converse: reading a relation backwards flips it.

The one-dimensional point algebra's converse: reading a relation backwards flips it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close