Rectangles in grid diagrams #
The grid lives on a torus, so the basic one-dimensional ingredient of a rectangle is the circular
interval in Fin n. A grid rectangle carries two finite coordinate sets built from such intervals:
its interior, the product of two open intervals, records the grid points strictly inside and
is what a grid state must avoid for the rectangle to be empty; its coveredSquares, the product
of two half-open intervals, records the region the rectangle covers and is what must avoid the
O and X markings.
The final section packages an oriented rectangle from one grid state to another: two columns
where the states exchange rows, and agreement everywhere else. This is the shape counted by
the grid differential; the IsEmptyFor and AvoidsMarkings predicates record the two
finite-set disjointness conditions used for empty rectangles and marking-avoiding rectangles.
AvoidsMarkings tests coveredSquares, so a marking counts as covered exactly when its square
lies under the rectangle: marking indices are the southwest corners of square-centred markings,
the convention the Maslov and Alexander gradings use. Rectangle/Squares.lean develops the
covered squares further for the gradings.
Main definitions #
TauCeti.GridRectangle: a toroidal rectangle, represented by its four cyclic sides.TauCeti.GridRectangle.transpose: the diagonal reflection of a toroidal rectangle, exchanging the column and row sides.TauCeti.GridRectangle.interior: the finite set of grid points strictly inside the rectangle.TauCeti.GridRectangle.coveredSquares: the finite set of squares the rectangle covers, each named by its lower-left grid point.TauCeti.GridRectangle.IsEmptyFor: a toroidal rectangle is empty for a grid state when no point of the state lies in its interior.TauCeti.GridRectangle.AvoidsMarkings: a toroidal rectangle avoids a grid diagram's markings when noOorXmarking lies in a square it covers.TauCeti.GridRectangleBetween: an oriented rectangle from one grid state to another.TauCeti.GridRectangleBetween.toGridRectangle: the toroidal rectangle of an oriented rectangle, with the same side columns and with the source-state rows in those columns as its horizontal sides.TauCeti.GridRectangleBetween.IsEmpty: an oriented rectangle is empty when its toroidal rectangle is empty for the source state.TauCeti.GridRectangleBetween.swapSides: the other oriented rectangle fromxtoyon the same two side columns, which runs along the complementary column arc and the complementary row arc.TauCeti.GridRectangleBetween.transpose: the diagonal reflection of an oriented rectangle, fromx.transposetoy.transpose.TauCeti.GridRectangleBetween.transposeEquiv: the diagonal reflection packaged as an involutive equivalence with oriented rectangles fromx.transposetoy.transpose.TauCeti.GridRectangleBetween.emptyRectangles: the empty rectangles fromxtoy.
Main results #
TauCeti.GridRectangle.isEmptyFor_iff_forall_notMem_cIoo: emptiness of a toroidal rectangle for a grid state, quantified over the columns strictly inside it, andTauCeti.GridRectangleBetween.isEmpty_iff_forall_notMem_cIoo, its form for an oriented rectangle and its source state, withTauCeti.GridRectangleBetween.isEmpty_iff_forall_notMem_cIoo_targetthe same test read through the target state.TauCeti.GridRectangleBetween.isEmpty_of_right_eq_finRotate: a rectangle one column wide is empty.TauCeti.GridRectangle.avoidsMarkings_iff_forall: marking avoidance tested column by column.
References #
The encoding follows the toroidal grid-diagram convention from Ozsváth--Stipsicz--Szabó, Grid
Homology for Knots and Links, Chapter 3. Rectangles connecting two grid states, Rect(x, y), and
the empty ones among them, Rect°(x, y) (Definition 4.2.1), are in Chapter 4, Section 4.2; the
marking-avoidance condition defining the fully blocked complex is in Section 4.4.
A toroidal grid rectangle, represented by its oriented column and row sides.
The interior is the product of the clockwise open interval from left to right with the
clockwise open interval from bottom to top. Degenerate side choices are allowed at this
level; their interiors are empty in the degenerate direction.
- left : Fin n
The initial vertical side of the rectangle.
- right : Fin n
The terminal vertical side of the rectangle.
- bottom : Fin n
The initial horizontal side of the rectangle.
- top : Fin n
The terminal horizontal side of the rectangle.
Instances For
The columns strictly inside a toroidal grid rectangle.
Instances For
The rows strictly inside a toroidal grid rectangle.
Instances For
Membership in the interior columns is membership in the corresponding open-open circular interval.
Membership in the interior rows is membership in the corresponding open-open circular interval.
The left side is not an interior column.
The right side is not an interior column.
The bottom side is not an interior row.
The top side is not an interior row.
The finite set of grid points strictly inside a toroidal grid rectangle.
Instances For
Membership in a rectangle interior is membership in both one-dimensional open intervals.
A point on the initial side column is not in the interior.
A point on the terminal side column is not in the interior.
A rectangle has empty interior if its two column sides coincide.
A rectangle has empty interior if its two row sides coincide.
The number of interior grid points is the product of the numbers of interior columns and interior rows.
In a grid of size at most two, every toroidal rectangle has empty interior.
The columns of squares a toroidal grid rectangle covers: the clockwise half-open arc from the initial vertical side to the terminal one. For distinct sides this is the initial side together with the strictly interior columns, each column of squares named by its initial grid line; for coincident sides it is empty.
Instances For
The covered columns are the half-open cyclic interval between the vertical sides.
The rows of squares a toroidal grid rectangle covers: the clockwise half-open arc from the initial horizontal side to the terminal one. For distinct sides this is the initial side together with the strictly interior rows, each row of squares named by its initial grid line; for coincident sides it is empty.
Instances For
The covered rows are the half-open cyclic interval between the horizontal sides.
Membership in the covered columns is membership in the corresponding half-open circular interval.
Membership in the covered rows is membership in the corresponding half-open circular interval.
The finite set of squares a toroidal grid rectangle covers, each square named by its
lower-left grid point, following the marking-coordinate convention documented with
GridDiagram.OSet and GridDiagram.XSet.
Where interior records the grid points strictly inside the rectangle — what a grid state must
avoid for the rectangle to be empty — coveredSquares records the region the rectangle covers,
which is what contains or avoids the O and X markings placed in the squares of a grid
diagram: a marking sits at the centre of its square, so it lies inside the rectangle exactly when
its column and row indices lie in the two half-open arcs. If either pair of sides coincides, the
covered set is empty.
Instances For
The covered squares are the product of the covered columns and rows.
Membership in the covered squares is membership in both one-dimensional half-open arcs.
A rectangle is empty for a grid state when the state has no point in its interior.
Instances For
A rectangle is empty for a grid state exactly when no point of the state lies in its interior.
A rectangle is empty for a grid state exactly when the state sends every column strictly between its two side columns to a row outside the open arc between its two side rows.
This is the one-dimensional form of emptiness that the rectangle-pairing arguments for the grid differential use: it quantifies over columns rather than over grid points.
A rectangle whose terminal side is the cyclic successor of its initial side is empty for every grid state: no column lies strictly between two cyclically consecutive ones.
In a grid of size at most two, every toroidal rectangle is empty for every grid state.
Emptiness transfers between two grid states that agree away from two columns, once the two points of the first state on those columns are known to lie outside the interior: every other point of the first state is a point of the second.
A rectangle avoids the markings of a grid diagram when none of the squares it covers
carries an O or X marking.
Instances For
A marking-avoiding rectangle covers no square carrying an O marking.
A marking-avoiding rectangle covers no square carrying an X marking.
A rectangle avoids markings exactly when neither the O nor the X marking set meets
the squares it covers.
A rectangle avoids markings exactly when, in each column of squares it covers, neither the
O marking nor the X marking of that column lies in a covered row.
Marking avoidance is unchanged by swapping the O and X markings, since it only refers to
the union of the two marking sets.
The diagonal reflection of a toroidal rectangle, exchanging the two vertical sides with the two horizontal sides.
Reflecting across the main diagonal turns columns into rows and rows into columns, so the
interior is reflected by Prod.swap.
Instances For
Reflecting a toroidal rectangle twice gives the original rectangle.
The interior of the reflected rectangle is the diagonal reflection of the original interior.
The squares covered by the reflected rectangle are the diagonal reflections of the squares covered by the original rectangle.
The diagonal reflection preserves emptiness: the reflected rectangle is empty for the reflected state exactly when the rectangle is empty for the state.
The diagonal reflection preserves marking avoidance: the reflected rectangle avoids the markings of the reflected diagram exactly when the rectangle avoids those of the diagram.
An oriented toroidal rectangle from one grid state to another.
The two states agree outside the two side columns, and in those side columns they exchange the
two rows. Swapping left and right gives the other oriented rectangle from x to y on the
same side columns (GridRectangleBetween.swapSides). The two side columns determine the rectangle
(GridRectangleBetween.ext).
- left : Fin n
The initial vertical side.
- right : Fin n
The terminal vertical side.
The two side columns are distinct.
At the initial side,
yuses the row thatxuses at the terminal side.At the terminal side,
yuses the row thatxuses at the initial side.Away from the side columns, the two states agree.
Instances For
The unordered finite set of side columns of an oriented grid rectangle.
Instances For
Membership in the side-column set of an oriented grid rectangle.
An oriented grid rectangle has exactly two side columns.
A rectangle between two grid states is determined by its two side columns.
A rectangle between two fixed grid states is determined by its initial side column alone: the
exchange condition y R.left = x R.right fixes the terminal one.
An oriented rectangle between two grid states has decidable equality: it is determined by its ordered pair of side columns, which has decidable equality.
For fixed source and target grid states, the oriented rectangles between them form a
finite type: a rectangle is its ordered pair of side columns, and the pairs that occur form a
decidable subset of Fin n × Fin n. The instance is computable, so decide can count
rectangles on a concrete grid.
The row of x on the initial side.
Instances For
The row of x on the terminal side.
Instances For
The initial horizontal side is the row occupied by the source state in the initial column.
The terminal horizontal side is the row occupied by the source state in the terminal column.
The toroidal rectangle of an oriented rectangle: it has the same two side columns, and its bottom and top sides are the rows the source state occupies in the initial and terminal side columns.
Instances For
The associated toroidal rectangle in terms of the two side columns: its two horizontal sides are the rows the source state assigns to them.
Membership in the covered columns of the rectangle underlying a rectangle between states is membership in the half-open cyclic interval between its side columns.
A rectangle between states whose terminal column lies strictly inside the cyclic interval from
its initial column to the rotation of a covers only columns of that interval, and misses both
a and its rotation.
Membership in the interior of an oriented rectangle is membership in the open cyclic intervals between its side columns and the corresponding source-state rows.
Membership in the covered squares of an oriented rectangle is membership in the half-open cyclic intervals between its side columns and the corresponding source-state rows.
The covered squares of an oriented rectangle, read through its target state: the rows it covers run from the target-state row at its terminal side to the target-state row at its initial side.
The two side rows of a rectangle between states are distinct.
A rectangle between grid states has distinct source and target states. A self-rectangle would force the source state's permutation to take the same value on the two distinct side columns.
There are no rectangles from a grid state to itself.
The associated rectangle covers its initial lower square.
The associated rectangle is empty for the source state when no source-state point lies in its interior.
Instances For
Emptiness of an oriented rectangle is emptiness of its underlying toroidal rectangle for the source state.
The finite set of empty oriented rectangles from x to y.
Instances For
Membership in the finite set of empty rectangles is exactly the emptiness predicate.
In grid size at most two, every oriented rectangle between grid states is empty.
In grid size at most two, the empty rectangles are all oriented rectangles.
There are no empty rectangles from a grid state to itself.
The source state has no point in the interior of an empty rectangle between states.
A rectangle between states is empty exactly when no source-state point lies in its interior.
A rectangle between states is empty exactly when the source state sends every column strictly between its two side columns to a row outside the open arc between its two side rows.
This is the one-dimensional form of emptiness that the rectangle-pairing arguments for the grid differential use: it quantifies over columns rather than over grid points.
A rectangle between states whose terminal side is the cyclic successor of its initial side is empty: no column lies strictly between two cyclically consecutive ones.
A rectangle between states is empty exactly when no target-state point lies in its interior.
The target state has no point in the interior of an empty rectangle between states.
A rectangle between states is empty exactly when the target state sends every column strictly between its two side columns to a row outside the open arc between its two side rows, read through the target state: from its row at the terminal side to its row at the initial side.
This is isEmpty_iff_forall_notMem_cIoo for rectangles into a distinguished target state.
The associated rectangle avoids a grid diagram's markings when none of the squares it covers carries a marking.
Instances For
A rectangle between states avoids markings exactly when neither marking set meets the squares it covers.
A marking-avoiding rectangle between states covers no square carrying an O marking.
A marking-avoiding rectangle between states covers no square carrying an X marking.
The diagonal reflection of an oriented rectangle from x to y, an oriented rectangle from
x.transpose to y.transpose.
Reflecting across the main diagonal exchanges the side columns with the side rows: the new side
columns are the two rows x R.left and x R.right that R connects.
Instances For
The reflected rectangle's initial side row is the original initial side column.
The reflected rectangle's terminal side row is the original terminal side column.
The associated toroidal rectangle of the reflected oriented rectangle is the reflection of the associated toroidal rectangle.
The oriented rectangle from x to y obtained by exchanging the two side columns.
It connects the same two states x and y -- the two states still exchange rows at the two
side columns and agree elsewhere -- but runs along the complementary column arc and the
complementary row arc. Cutting the torus along the two side columns and the two side rows, R and
R.swapSides are diagonally opposite pieces; the other two pieces lie in neither. This is not the
opposite rectangle symm, which runs from y back to x.
Instances For
The side-swapped rectangle's initial side column is the original terminal side column.
The side-swapped rectangle's terminal side column is the original initial side column.
The side-swapped rectangle's bottom row is the original top row.
The side-swapped rectangle's top row is the original bottom row.
The toroidal rectangle of the side-swapped oriented rectangle, written out by its four sides.
Exchanging the two side columns twice gives the original rectangle.
Exchanging the two side columns gives a genuinely different rectangle, since the two side columns are distinct.
Reflecting an oriented rectangle twice gives the original rectangle.
The transpose equivalence applies a rectangle by reflecting it.
The inverse of the transpose equivalence is again reflection.
The diagonal reflection is injective on oriented rectangles.
Two oriented rectangles have equal diagonal reflections exactly when they are equal.
The diagonal reflection preserves emptiness of a rectangle between grid states.
The diagonal reflection preserves marking avoidance of a rectangle between grid states: the reflected rectangle avoids the markings of the reflected diagram exactly when the rectangle avoids those of the diagram.
Swapping the O and X markings preserves marking avoidance of a rectangle between grid
states.