Skip to content

Inspect spaces and maps

Download the executed notebook · Build and environment record

The finite encodings chapter described a module supported on the closed square $[0,2]^2$. We could determine each space and map from its definition; here we will construct the same module in TamerOp and follow our chosen parameters into the returned finite model. The answers we already know will help us read the matrices and figures. We will then add an overlapping square and see what happens to a vector as it moves from one square into the other.

Coordinatewise order on pairs and basic matrix multiplication are enough to begin. The introduction to two parameters develops that order, and persistence modules gives the fuller definitions. To run the cells, use Julia 1.12 with TamerOp and CairoMakie, following the installation guide. No input files are needed.

After recovering the spaces and maps, optional sections look inside the presentation, explore live selections and save a figure.

Predict the square before computing

At a parameter $q=(q_1,q_2)$, our module assigns the vector space $\mathbb Q$ if both coordinates lie between 0 and 2, and the zero space otherwise. The region where the space is nonzero is its support, the closed square $S=[0,2]^2$. The module is defined on the whole real plane, including outside this square.

For comparable parameters $q\leq r$, the map is the identity if both points lie in $S$, and zero otherwise. We can predict the following queries by remembering that a matrix has one row for each target coordinate and one column for each source coordinate.

ParametersSpacesExpected matrix
$(1/2,1/2)\leq(3/2,3/2)$$\mathbb Q\longrightarrow\mathbb Q$The $1\times1$ matrix $[1]$
$(1/2,1/2)\leq(3,1)$$\mathbb Q\longrightarrow0$An empty matrix of size $0\times1$
$(1/4,3/2)$ and $(3/2,1/4)$Both spaces are $\mathbb Q$No structure map: the points are incomparable

All four edges belong to the square. In particular, $(0,0)$ and $(2,2)$ have one-dimensional spaces. The rational coefficient field $\mathbb Q$ describes vectors and matrices; it does not restrict the parameter plane to rational points. We are specifying this module directly, not deriving it from the earlier ring's filtration.

Describe the support with two regions

We import TamerOp as OP and load CairoMakie to draw static figures. The Advanced import, named OA here, gives us the region constructors and the queries used to inspect individual maps. We will construct the encoding through OP.encode. Selecting PNG display makes the figures available as saved notebook output.

import TamerOp as OP
import TamerOp.Advanced as OA
import TamerOp.CoreModules: QQField
import CairoMakie
CairoMakie.activate!(type="png", px_per_unit=1);

Let $U$ contain the points whose two coordinates are at least zero, and let $D$ contain those whose coordinates are at most two. Their intersection is our square. BoxUpset describes $U$: once a point belongs to it, increasing its coordinates keeps it there. BoxDownset describes $D$, where membership is preserved by decreasing coordinates. Both regions extend indefinitely in their respective directions.

We connect their indicator modules with the $1\times1$ coefficient matrix $[1]$. Where the regions overlap, this gives a map $\mathbb Q\to\mathbb Q$ whose image is $\mathbb Q$; elsewhere the image is zero. The indicator presentation therefore describes our square module as an image. The presentation chapter explains why the maps fit together, including when there are several regions.

births = [OA.BoxUpset([0, 0])]
deaths = [OA.BoxDownset([2, 2])]
coefficient = reshape(OP.QQ[1], 1, 1)
1×1 Matrix{Rational{BigInt}}:
 1

We choose rational arithmetic for the vector spaces and a signature encoding for the regions. A signature will record their membership conditions, allowing the encoder to use one label for parameters with the same pattern. The box constructor stores its corners in floating point coordinates; our integer corners are exactly representable, independently of the rational arithmetic used for vectors and matrices.

field = QQField()
options = OA.EncodingOptions(; backend=:pl_backend,
    poset_kind=:signature, field=field);

The result of encode is an EncodingResult, which keeps the finite poset, the assignment of original parameters to its labels, and the encoded module together. To find a space on the plane, we will use that assignment and read the space at the resulting finite label.

enc = OP.encode(births, deaths, coefficient, options);

Read the finite object we actually received

The following accessors give us the poset P, the map classifier assigning parameters to labels, and the dimensions of the spaces at those labels. A space at one parameter or label is called a stalk; entry dims[q] is the dimension of the stalk at finite label q.

P = OP.encoding_poset(enc)
classifier = OP.encoding_map(enc)
dims = OP.dimensions(enc)
@assert OP.provenance(enc).field == field
@assert OA.nvertices(P) == 4
@assert sort(dims) == [0, 0, 0, 1]
(; nvertices=OA.nvertices(P), dimensions=dims)
(nvertices = 4, dimensions = [0, 0, 1, 0])

The introductory chapter used nine regions to describe one possible encoding. This encoder combines regions by recording two bits: whether a point belongs to $U$, and whether it lies outside $D$. Both bits can only increase as the original parameter increases.

SignatureOne parameter with this signatureStalk dimension
$(0,0)$: outside $U$, inside $D$$(-1,-1)$0
$(1,0)$: inside $U$ and $D$$(1,1)$1
$(0,1)$: outside both $U$ and $D$$(-1,3)$0
$(1,1)$: inside $U$, outside $D$$(3,3)$0

The numeric IDs belong to the returned object. locate discovers them; we do not assume that ID 1 means the first row of this table.

lower_id = OA.locate(classifier, (-1, -1))
inside_id = OA.locate(classifier, (1, 1))
mixed_id = OA.locate(classifier, (-1, 3))
upper_id = OA.locate(classifier, (3, 3))
@assert length(unique([lower_id, inside_id, mixed_id, upper_id])) == 4
@assert dims[[lower_id, inside_id, mixed_id, upper_id]] == [0, 1, 0, 0]
@assert OA.locate(classifier, (3, -1)) == mixed_id
(; lower_id, inside_id, mixed_id, upper_id)
(lower_id = 1, inside_id = 3, mixed_id = 2, upper_id = 4)

First draw the labels in the parameter plane. The kind argument chooses this view, while box supplies the corners of the viewing window. Cropping the picture leaves the module itself unchanged, and keeping this window will let us compare the selections that follow.

view_box = ([-1, -1], [5, 5])
OP.visualize(enc; kind=:region_labels, box=view_box)
The actual square encoding in a fixed parameter window. The central closed square has the interior label; the upper-left and lower-right exterior pieces share a different label.

The central closed square carries inside_id. In the exterior, the pieces at upper left and lower right share mixed_id, so the set of parameters assigned one label, called its fiber, need not be connected. The colours distinguish labels rather than dimensions. Solid boundaries are included, dashed ones are excluded, and dotted ones mark where the viewing window cuts the drawing.

To see how those labels are ordered, use kind=:hasse. A Hasse diagram draws an arrow for a comparison with no intermediate label; longer comparisons follow by composing arrows. Upward means increasing in the finite order, but the positions are schematic rather than coordinates in the original plane. We select vertex=inside_id to keep the square's label in view.

OP.visualize(enc; kind=:hasse, vertex=inside_id)
The four finite labels form a diamond. Only the highlighted square label has stalk dimension one; the other three have dimension zero.

The signatures $(1,0)$ and $(0,1)$ are incomparable, with a common lower label and a common upper label forming the diamond. Each vertex records its stalk dimension. An arrow tells us which map the module must provide; in this example, every map between distinct labels is zero because at least one endpoint space is zero.

Both the description with nine labels and this one with four recover the square module.

Follow a parameter to its space

Take $x=(1/2,1/2)$. We first find its label $\pi(x)$, then read the space $N(\pi(x))$ in the finite module $N$. That space recovers $M(x)$.

Julia writes an exact rational number as 1//2. The corners and query points chosen here are exactly representable by the box geometry as well. We will check all four corners along with the interior point, since each belongs to the closed square.

x = (1//2, 1//2)
qx = OA.locate(classifier, x)
@assert qx == inside_id
@assert dims[qx] == 1
@assert OA.locate(classifier, (0, 0)) == inside_id
@assert OA.locate(classifier, (2, 2)) == inside_id
@assert OA.locate(classifier, (0, 2)) == inside_id
@assert OA.locate(classifier, (2, 0)) == inside_id
(; parameter=x, finite_label=qx, dimension=dims[qx])
(parameter = (1//2, 1//2), finite_label = 3, dimension = 1)

The module inspector puts the recovery steps next to one another: the parameter picture, its finite poset, and the selected space. point=x selects an original parameter; vertex=qx would select a label directly.

OP.visualize(enc; kind=:module_inspector, point=x, box=view_box)
The parameter x equals one half in each coordinate. Its highlighted parameter region and finite vertex correspond to the one-dimensional stalk over the rational field.

Reading from left to right follows the lookup: the marked parameter lies in the highlighted region, its label appears in the finite poset, and the selected space has dimension one. The readout uses the stored module's coordinates. Our module was specified by regions, so these coordinates have no supplied identification with loop classes in the earlier ring.

Recover a map between comparable parameters

For $y=(3/2,3/2)$ we have $x\leq y$ coordinatewise. Both points lie inside the square, so the definition predicts the identity matrix $[1]$.

encoding_module obtains the finite module with its maps. Having checked the comparison in the original plane, we pass the corresponding finite labels to structure_map, naming its source and target.

y = (3//2, 3//2)
qy = OA.locate(classifier, y)
square_module = OP.encoding_module(enc)
inside_map = OA.structure_map(square_module; source=qx, target=qy)
@assert inside_map == reshape(OP.QQ[1], 1, 1)
inside_map
1×1 Matrix{Rational{BigInt}}:
 1

The inspector accepts parameter_pair=(x,y), retaining the original parameters and checking their order. In its matrix, columns name source coordinates and rows name target coordinates. Rank one means that one independent vector from the source remains independent in the target.

OP.visualize(enc; kind=:module_inspector,
    parameter_pair=(x, y), box=view_box)
Two comparable points inside the closed square share one finite label. Their structure matrix is the one-by-one identity, with rank one and zero-dimensional kernel.

Although the parameter points differ, they have the same finite label. Their map is recovered from the identity at that label, which explains why we see a nonzero map without an edge between distinct Hasse vertices: identity arrows are omitted from the diagram.

Exercise: a zero map or no map?

Keep $x$ as the source and move the target to $z=(3,1)$. The pair remains ordered. Before running the next cell, predict the target space and use it to determine the matrix shape and rank.

z = (3, 1)
qz = OA.locate(classifier, z)
leaving_map = OA.structure_map(square_module; source=qx, target=qz)
@assert qz != 0 && dims[qz] == 0
@assert size(leaving_map) == (0, 1)
leaving_map
0×1 Matrix{Rational{BigInt}}

Outside the support the target is the zero space, so every source vector maps to zero. The matrix consequently has zero rows and one column. There are no entries to draw, although the map is defined and has rank zero; the figure records its empty shape.

OP.visualize(enc; kind=:module_inspector,
    parameter_pair=(x, z), box=view_box)
A comparable pair leaves the square. The source stalk has dimension one, the target has dimension zero, and the defined structure map has shape zero by one and rank zero.

Now choose $u=(1/4,3/2)$ and $v=(3/2,1/4)$. Both lie inside the square. One coordinate increases while the other decreases, so neither point is at most the other. Predict whether sharing a finite label supplies a map between these original parameters.

To inspect the answer as data as well as a picture, visual_spec prepares the view without drawing it. visual_metadata retains its mathematical readout. We can render that same specification afterward.

u, v = (1//4, 3//2), (3//2, 1//4)
@assert OA.locate(classifier, u) == OA.locate(classifier, v) == inside_id
unordered_spec = OA.visual_spec(enc; kind=:module_inspector,
    parameter_pair=(u, v), box=view_box)
unordered = OA.visual_metadata(unordered_spec).inspection
@assert !unordered.defined && unordered.matrix === nothing
(; relation=unordered.relation, map_defined=unordered.defined)
(relation = :incomparable, map_defined = false)
OP.visualize(unordered_spec)
Two incomparable points inside the square share the same finite label. The inspector explicitly reports that no ambient structure map is defined; this is different from a zero matrix.

The shared finite label has an identity endomorphism, but the original module only prescribes maps for comparable parameters. Asking about the finite pair (inside_id, inside_id) would be a different question.

Query in the original planeWhat the encoding recovers
$x\leq y$, both insideAn identity map of rank one
$x\leq z$, leaving the squareA defined zero map of size $0\times1$
$u$ and $v$, incomparableNo structure map to recover

Outside the square is still inside this module's parameter domain. The zero-dimensional stalk at $z$ is represented by a real finite label. It is different from the special return value 0, which some other classifiers use to report an unrepresented parameter.

Switch between the identity, the zero map and the incomparable pair in the prepared viewer. Keep an eye on the marked endpoints and the matrix: the map leaving the square has no rows, while the incomparable pair has no structure map at all.

Compare an identity, a zero map and an incomparable pair

Change the example: two overlapping squares

Add $[1,3]^2$ as an independent summand, keeping the first square $[0,2]^2$. The $2\times2$ identity coefficient matrix says that the two square contributions are independent. Along the increasing path

\[a=(1/2,1/2)\leq b=(3/2,3/2)\leq c=(5/2,5/2),\]

the first square alone is present at $a$, both are present at $b$, and only the second remains at $c$. Before computing, use those supports to predict the three dimensions and whether any vector from $a$ can survive all the way to $c$.

two_squares = OP.encode(
    [OA.BoxUpset([0, 0]), OA.BoxUpset([1, 1])],
    [OA.BoxDownset([2, 2]), OA.BoxDownset([3, 3])],
    OP.QQ[1 0; 0 1], options);

We can locate each of these parameters and read the dimension at its finite label just as we did for the first square. The earlier enc remains available if we want to compare the two constructions.

a, b, c = (1//2, 1//2), (3//2, 3//2), (5//2, 5//2)
two_classifier = OP.encoding_map(two_squares)
two_dims = OP.dimensions(two_squares)
qa, qb, qc = [OA.locate(two_classifier, p) for p in (a, b, c)]
path_dims = two_dims[[qa, qb, qc]]
@assert path_dims == [1, 2, 1]
path_dims
3-element Vector{Int64}:
 1
 2
 1

The dimensions are $1\to2\to1$. In coordinates that name the two summands, the maps are

\[\mathbb Q\ \xrightarrow{\;\left[\begin{smallmatrix}1\\0\end{smallmatrix}\right]\;} \mathbb Q^2\ \xrightarrow{\;\left[\begin{smallmatrix}0&1\end{smallmatrix}\right]\;}\ \mathbb Q.\]

The first map puts a vector into the first coordinate. The second discards that coordinate and keeps the second. Their composite is zero. The package may choose other bases; its stored matrices still compose because every query uses the same finite module.

two_module = OP.encoding_module(two_squares)
first_map = OA.structure_map(two_module; source=qa, target=qb)
second_map = OA.structure_map(two_module; source=qb, target=qc)
direct_map = OA.structure_map(two_module; source=qa, target=qc)
@assert size(first_map) == (2, 1) && size(second_map) == (1, 2)
@assert first_map != zeros(OP.QQ, 2, 1) && second_map != zeros(OP.QQ, 1, 2)
@assert second_map * first_map == direct_map == zeros(OP.QQ, 1, 1)
(; first_map, second_map, composite=direct_map)
(first_map = Rational{BigInt}[1; 0;;], second_map = Rational{BigInt}[0 1], composite = Rational{BigInt}[0;;])

At the first step, the source has one coordinate and the overlap has two, so the map is represented by a column. The same viewing window contains both squares and lets us see where this additional coordinate appears.

OP.visualize(two_squares; kind=:module_inspector,
    parameter_pair=(a, b), box=view_box)
From the first square into the overlap, the stalk dimension increases from one to two. The map is an inclusion of rank one, represented by a two-by-one column.

On leaving the overlap for the second square, only its coordinate remains. The matrix is now a row of rank one. Watch which coordinate it retains: the vector that entered from the first square lies in the other coordinate.

OP.visualize(two_squares; kind=:module_inspector,
    parameter_pair=(b, c), box=view_box)
From the overlap into the second square, the map is a one-by-two projection of rank one. It discards the first-square coordinate and retains the second.

Selecting the endpoints displays the resulting $1\times1$ matrix $[0]$. Both stalks have dimension one, yet every source vector has zero image. The earlier map to a zero space had shape $0\times1$; here the row remains because the second square still supplies a target coordinate.

OP.visualize(two_squares; kind=:module_inspector,
    parameter_pair=(a, c), box=view_box)
The map from the first square to the second has one-dimensional source and target but is the one-by-one zero matrix. Both adjacent maps had rank one, while their composite has rank zero.

The vectors at the beginning and end belong to different summands. Their dimensions, $1,2,1$, leave that distinction unresolved, and even the two adjacent ranks do not determine the rank of the composite. Following the actual maps explains why the vector from the first square is lost.

The same lookup procedure recovered the spaces and the maps throughout this example: locate the original parameters, check their comparison, and inspect the corresponding finite data. The next optional sections let us see how the presentation creates those data, change a selection in a live view, or keep a separate figure.

The prepared viewer lets you compare the two steps and their composite. Follow the column matrix into the overlap, then see how the row matrix retains only the second square's coordinate. Select the endpoints to see why the resulting matrix is $[0]$ even though both endpoint spaces are nonzero.

Follow the maps through two overlapping squares

Optional: Where the spaces and maps come from

The presentation of the two squares explains the spaces as images of small matrices. At a parameter, keep the rows whose downsets contain it and the columns whose upsets contain it. The resulting active block maps active source coordinates to active target coordinates. Its image is the stalk. For our identity coefficient matrix, predict these blocks:

ParameterActive rowsActive columnsBlockImage dimension
$a$$D_1,D_2$$U_1$$[1\;0]^T$1
$b$$D_1,D_2$$U_1,U_2$$I_2$2
$c$$D_2$$U_1,U_2$$[0\;1]$1

encoding_presentation retrieves the finite fringe presentation retained by this encoding. presentation_stalk inspects one of its stalks. These queries use the retained presentation's coordinates; they do not assume those coordinates match every stored module basis.

retained_fringe = OP.encoding_presentation(two_squares)
@assert retained_fringe !== nothing
overlap = OA.presentation_stalk(two_squares; vertex=qb)
@assert OA.active_rows(overlap) == [1, 2]
@assert OA.active_columns(overlap) == [1, 2]
@assert OA.presentation_matrix(overlap) == OP.QQ[1 0; 0 1]
OA.presentation_matrix(overlap)
2×2 Matrix{Rational{BigInt}}:
 1  0
 0  1

At the overlap, the active block is the identity and its image is the entire target space of dimension two. With basis=true, we retain a basis for that image: each column returned by image_basis is a vector in the active downset coordinates. Omitting the option gives the block and its rank without computing this basis.

overlap_with_basis = OA.presentation_stalk(two_squares; vertex=qb, basis=true)
@assert OA.image_basis(overlap_with_basis) == OP.QQ[1 0; 0 1]
OA.image_basis(overlap_with_basis)
2×2 Matrix{Rational{BigInt}}:
 1  0
 0  1

Now try $t=(1/2,5/2)$, which lies in $U_1$ and $D_2$ but in neither $U_2$ nor $D_1$. The active block keeps row 2 and column 1 of the coefficient matrix, giving $[0]$. Its target has one coordinate, but its image contains only zero. What shape should a matrix have if its columns are a basis for that image?

t = (1//2, 5//2)
qt = OA.locate(two_classifier, t)
zero_stalk = OA.presentation_stalk(two_squares; vertex=qt, basis=true)
@assert OA.active_rows(zero_stalk) == [2]
@assert OA.active_columns(zero_stalk) == [1]
@assert OA.presentation_matrix(zero_stalk) == reshape(OP.QQ[0], 1, 1)
@assert size(OA.image_basis(zero_stalk)) == (1, 0)
(; block=OA.presentation_matrix(zero_stalk),
   image_basis_size=size(OA.image_basis(zero_stalk)))
(block = Rational{BigInt}[0;;], image_basis_size = (1, 0))

One row and zero columns express exactly this situation: the image sits in a target of dimension one and needs no basis vectors. An active source and target do not force a nonzero image when their coefficient is zero.

The presentation inspector places the supports beside the full coefficient matrix, the active block and its image basis. The arguments upset=1 and downset=2 choose the supports to draw, leaving the active block calculation unchanged. We use basis=true to include its image basis.

OP.visualize(two_squares; kind=:presentation_inspector,
    point=t, upset=1, downset=2, basis=true, box=view_box)
At the active-zero point, the first upset and second downset are both present. Their coefficient is zero, giving an active one-by-one zero block and an image basis with one row and no columns.

To recover a map, let $B_b$ and $B_c$ denote the matrices whose columns form image bases at its source and target. The ambient projection $R$ drops downset coordinates that have disappeared. The induced map $C$ between image coordinates satisfies

\[B_c C=R B_b.\]

The right side first embeds a source vector and then projects it. On the left, $C$ gives the target image coordinates and $B_c$ embeds them into the active target coordinates. For the step $b\leq c$ in our path, the ambient projection keeps only the second coordinate. presentation_map computes the endpoint bases needed to express this map.

presentation_bc = OA.presentation_map(two_squares; source=qb, target=qc)
Bb = OA.image_basis(OA.source_stalk(presentation_bc))
Bc = OA.image_basis(OA.target_stalk(presentation_bc))
R = OA.ambient_projection(presentation_bc)
C = OA.induced_map(presentation_bc)
@assert R == OP.QQ[0 1]
@assert Bc * C == R * Bb
C
1×2 Matrix{Rational{BigInt}}:
 0  1

The figure puts the active blocks, bases, projection and induced map beside one another, so we can follow the equation through their coordinates. For this diagonal coefficient matrix, the induced map is the familiar row $[0\;1]$. A general presentation can use image bases that differ from a separately stored module's bases, requiring a change of coordinates before their matrix entries are compared. The indicator presentations chapter explains how these spaces and maps fit together.

OP.visualize(two_squares; kind=:presentation_inspector,
    parameter_pair=(b, c), upset=1, downset=2, box=view_box)
For the overlap-to-second-square map, the presentation panels show both active blocks, their image bases, the projection dropping the first coordinate, and the induced map satisfying the basis equation.
Optional: Explore a live linked view

For a display with live WGL controls, load WGLMakie in the same Julia environment and keep Julia running. The optional integrations guide explains the packages and display requirements.

import WGLMakie
live = OP.inspection_session(two_squares; box=view_box)
OA.select_inspection!(live; parameter_pair=(a, c))
OP.visualize(live; backend=:wglmakie)

Start with the endpoint map: the matrix should be $[0]$. Select a stalk in Selection endpoint, then use the exact point fields to inspect (3/2, 3/2) in the overlap. Its dimension is two. To return to the original pair, enter source (1/2, 1/2) and target (5/2, 5/2) in the exact fields for the parameter pair. Fractions such as 1/2 are accepted as exact input; pointer clicks use drawing coordinates and are less useful for boundary questions.

If you read the presentation section, switch Coordinate view to presentation and inspect (1/2, 5/2) with Compute selected image basis enabled. The active block is $[0]$ and its basis has shape $1\times0$. Switching views preserves the selection, but does not identify the two coordinate bases.

A snapshot keeps the selected state as a static specification:

snapshot = OA.inspection_snapshot(live)
OP.visualize(snapshot; backend=:cairomakie)

Each visualize(live; backend=:wglmakie) call creates a new viewer linked to the same session; display a given viewer in one browser client. Closing a browser viewer leaves the session available. When finished, use Close inspector or run OA.close_inspection!(live). The snapshot remains usable afterward.

Optional: Save a figure

The static results are already retained in the notebook. To keep a separate PNG or SVG, use save_visual with the same selection. We will save the map from the first square to the second, whose zero entry records what happened to our vector.

The files go under tamerop_outputs/square in the working directory, and export_path gives the actual path. The usual figure layout is sufficient for this example.

output_dir = joinpath("tamerop_outputs", "square")
png = OP.save_visual(output_dir, "two-square-composite", two_squares;
    kind=:module_inspector, parameter_pair=(a, c), box=view_box,
    format=:png, backend=:cairomakie)
@assert isfile(OP.export_path(png))
OP.export_path(png)
"tamerop_outputs/square/two-square-composite.png"

Download the composite map as PNG

SVG preserves sharp lines and text when resized. Keep the same selection and change the format. Stating the static backend here also works if you have loaded WGLMakie for the optional live view.

svg = OP.save_visual(output_dir, "two-square-composite", two_squares;
    kind=:module_inspector, parameter_pair=(a, c), box=view_box,
    format=:svg, backend=:cairomakie)
@assert isfile(OP.export_path(svg))
OP.export_path(svg)
"tamerop_outputs/square/two-square-composite.svg"

Download the composite map as SVG

To keep the comparisons as a browser viewer, prepare the same selections with visual_spec and pass them together to save_visual_session. The quoted names become the choices in its selector. This stores the answers to the listed queries; changing to a new pair of parameters still uses the live Julia session described above.

square_views = (
    var"Inside: identity map" = OA.visual_spec(enc; kind=:module_inspector,
        parameter_pair=(x, y), box=view_box),
    var"Leaving the square: zero map" = OA.visual_spec(enc; kind=:module_inspector,
        parameter_pair=(x, z), box=view_box),
    var"Incomparable: no structure map" = unordered_spec,
)
square_viewer_path = joinpath(output_dir, "three-maps.html")
OP.save_visual_session(square_viewer_path, square_views;
    title="Three different parameter comparisons",
    caption="Compare the marked parameters, their finite labels and the matrix. The square includes its boundary. Its exterior still belongs to the parameter domain and has zero spaces.",
    style=OP.VisualStyle(fontsize=18), size=(1080, 720))
@assert isfile(square_viewer_path)
square_viewer_path
"tamerop_outputs/square/three-maps.html"

The second file keeps the three maps through the overlapping squares. Every state uses the same encoded module, so the matrices use compatible stored bases and can be multiplied as above.

two_square_views = (
    var"First square to overlap: a to b" = OA.visual_spec(two_squares;
        kind=:module_inspector, parameter_pair=(a, b), box=view_box),
    var"Overlap to second square: b to c" = OA.visual_spec(two_squares;
        kind=:module_inspector, parameter_pair=(b, c), box=view_box),
    var"Composite: a to c" = OA.visual_spec(two_squares;
        kind=:module_inspector, parameter_pair=(a, c), box=view_box),
)
two_square_viewer_path = joinpath(output_dir, "two-square-maps.html")
OP.save_visual_session(two_square_viewer_path, two_square_views;
    title="Follow a vector through the overlapping squares",
    caption="The two steps each have rank one. Their composite has rank zero because the coordinate supplied by the first square is lost on entering the second square alone.",
    style=OP.VisualStyle(fontsize=18), size=(1080, 720))
@assert isfile(two_square_viewer_path)
two_square_viewer_path
"tamerop_outputs/square/two-square-maps.html"

When can we do this beyond the square?

In the square example, four labels recovered the spaces and maps throughout the plane, including a disconnected fiber. Adding a second square gave us a map whose two steps each have rank one while their composite is zero. Having the finite maps available let us follow the calculation rather than infer continuation from dimensions.

We began both constructions with finite presentations. For a module given in another way, the next question is whether a finite description exists at all. Continue with tameness and scope to relate constant subdivisions, encodings and presentations. The visualization guide gives other views of the objects we have just inspected.