# Arcs on N(k,1): mathematical contract

Research and implementation: 7 September 2026.

## Scope

The integrated Laboratory (`index.html`, `assets/general_lab.js`) represents **individual simple marked arcs on a compact
nonorientable surface with one boundary component and no punctures**, for k ≥ 2.
Endpoints may coincide. Marked points remain fixed throughout isotopies.
As in the laboratory, a contractible based loop or a curve homotopic relative
endpoints to a single boundary segment is excluded. An arc cutting off a disk
containing other boundary marks is not automatically excluded.

This is a complete *representation language*, not a finite list of classes,
not a canonical normal form for isotopy, and not an implementation of the
whole quasi-cluster algebra. It is deliberately separate from the older
fixed-spine preview in `marked_surface.js`. Its generators are dual to the
cuts below; do not interchange its words with the older schema's words.

## Sources checked before implementation

1. Grégoire Dupont and Frédéric Palesi,
   [Quasi-cluster algebras from non-orientable surfaces](https://arxiv.org/abs/1105.1560),
   [full paper](https://arxiv.org/pdf/1105.1560), Journal of Algebraic
   Combinatorics 42 (2015). §2.2 defines marked arcs and one-sided closed
   curves; Proposition 3.7 gives the rank; Theorem 7.2 distinguishes the finite
   disk/Möbius cases from the infinite cases. In our notation χ = 1 − k and
   the quasi-triangulation rank is 3k + n − 3.
2. D. B. A. Epstein,
   [Curves on 2-manifolds and isotopies](https://wrap.warwick.ac.uk/id/eprint/34905/),
   Acta Mathematica 115 (1966), 83–107, DOI 10.1007/BF02392203.
   This is the relevant background for the distinction between homotopy and
   isotopy of embedded curves. A word by itself does not certify an embedding.
   The implementation does not rely on an unrestricted homotopy-to-isotopy
   assertion for possibly self-intersecting input.
3. Marcus Schaefer, Eric Sedgwick and Daniel Štefankovič,
   [Algorithms for Normal Curves and Surfaces](https://www.cs.rochester.edu/~stefanko/Publications-new/C4.pdf),
   §2. This explains encoding embedded curves by ordered intersections with
   edges. **The paper assumes orientability in its initial setup.** We do not
   cite it as a theorem proving our nonorientable algorithm; the elementary
   cut-disk argument below accounts explicitly for the gluing orientation.
   Our chord diagrams are not the paper's compressed normal coordinates.
4. Michael S. Floater,
   [One-to-one piecewise linear mappings over triangulations](https://doi.org/10.1090/S0025-5718-02-01466-7),
   Mathematics of Computation 72 (2003), 685–696. The convex-combination
   injectivity result under a convex boundary condition supplies the background
   for the disk chart used in the crosscap drawing. The implementation also
   checks convergence and strictly positive triangle areas at runtime.

## Quotient and conventions

Take a closed disk whose boundary is divided, in positive cyclic order, into

    B, a1+, a1−, a2+, a2−, …, ak+, ak−.

Glue `ai+` to `ai−` with equal boundary parameters t ↦ t. Thus both copies
have the **same direction as the perimeter**. These are twisted identifications,
not the opposite-perimeter-direction identifications of an orientable handle.
Leave B unpaired. The quotient is N(k,1). The polygon's vertices form one
unmarked boundary vertex, and its link is an interval. There is one face,
k+1 edges and one vertex, hence χ = 1 − k; the gluing is nonorientable.

Place P1,…,Pn in this order in the **interior of B**. This avoids putting an
endpoint on a cut vertex or having to choose a corner sector at a marked point.
The cut-disk views draw either a polygon or curved paired sides. The
quarter-circle assigned to B in the cover changes layout, not topology.

A crossing `(a,r)` goes from the r-th port on `a+` to the r-th port on `a−`.
A crossing `(-a,r)` goes in the reverse direction. The r-th ports in a pair
are identified. For each a, the ranks must be a permutation of 1,…,m, where
m is the number of crossings of that cut in the path. A port cannot be reused.
There is no restriction on how often a cut occurs and no 512-letter cutoff.

## Integrated views

The existing crosscap-count control at the bottom of the Laboratory selects
the surface without an access code. k=0 and k=1 retain their previous backends;
k=2,…,24 use the complete cut-disk representation above. The existing arc
register, undo, clear, language buttons, PNG exports and 3D camera controls
are shared. Saved diagrams live in the Laboratory's common `state.arcs`.

Only admissible drafts are rendered, in every view including 3D and PNG
exports. Rejected drafts remain editable, with an explanation, but show an
empty surface rather than a red self-intersecting curve. For an intersecting
single-crossing draft, the UI can offer the opposite crossing if it passes
the full admissibility check. This is an explicit alternative chosen by the
user, not an isotopy simplification or an automatic change of the entered arc.

The base view is a large circular disk with k smaller crossed circles inside,
as in the crosscap convention of Dupont–Palesi §2.2. Opposite points of each
small circle are identified; these circles are not additional free boundaries.
The marked points are evenly spaced on the large circle, starting at the top.
The planar view uses a radial homeomorphism
to a regular polygon; curved segments are sampled for display. The double
cover uses two disk copies, with the second drawn reflected. Each crossing
switches sheets; both lifts are drawn. Thus a+ in one sheet is glued to a−
in the other sheet at the same rank. Reflecting one disk displays opposite
orientations on the two sheets. The glued cover is connected and orientable,
has χ=2−2k and two boundary components, hence genus k−1.

For k=2, the 3D view shows a classical Klein bottle with a disk removed and
the selected arc on it (construction below). For k>2, it bends the *cut disk*
into a bowl, explicitly labeled as a gluing diagram. The camera controls are
shared. In every view, the geometry is derived
from the same certified sequence of disk segments. The views show the active
arc or draft; they do not claim simultaneous compatibility of saved arcs.

Starting at the specified point on B, draw a chord to the first entry port,
jump to its matched exit port, draw the next chord, and end at the specified
point on B. The order of the supplied crossings makes this a single connected
path; no disconnected extra closed component can be hidden in the input.

## Simplicity certificate

Two chords of a convex disk with four distinct endpoints intersect in their
interiors if and only if their endpoints alternate in cyclic boundary order.
The engine uses only integer side indices and integer port ranks for this
predicate. It never uses pixel distances or a floating-point tolerance to
certify simplicity. Shared terminal marked endpoints are permitted; degenerate
or duplicate chord segments are not. The ranks guarantee distinct crossings
on the glued seams, each with exactly two incident half-segments, one from
each side. Consequently disjoint chord interiors glue to an arc with embedded
interior; a repeated terminal point is the allowed based-loop case.

If endpoints alternate, no deformation of the chords with those endpoints
fixed can repair that diagram. The UI displays the conflicting chords in red
and does not save it as an admissible arc. **This does not prove that the word
has no simple representative with a different ordering of ports.** Change
the ranks to specify a different drawing when appropriate.

## Why every simple marked arc has a diagram

1. Start with a representative of any such isotopy class. Perturb its interior
   away from the unmarked cut vertex and transverse to the k cut edges, with
   finitely many crossings. This fixes its marked endpoints, also when equal.
2. Cut the surface open. The arc becomes a finite collection of disjoint
   disk arcs, meeting the paired edges in corresponding ordered points.
   Record the cuts in path order and each point's rank on its side. The two
   copies of each cut have the same rank order by the chosen gluing.
3. A disjoint family of disk arcs has nonalternating endpoints and can be
   straightened to the associated chords while preserving those endpoints
   and their cyclic order. For a repeated terminal endpoint the two terminal
   germs keep their order as well. The disk isotopy can be chosen to fix its
   boundary, so it descends through the gluing.
4. The resulting data are accepted by the simplicity check and reconstruct a
   representative of the original isotopy class. The essentiality convention
   below only removes classes already excluded in the laboratory definition.

Thus the absence of a fixed passage bound matters: every individual class has
a finite diagram, although the collection of classes is infinite. This
argument establishes coverage, **not uniqueness** of diagrams. Rank insertion,
manual editing, path reversal and JSON import/export are available in the UI.

The boundary-twist example also supplies an explicit infinite family at fixed
k. Starting with the based arc a1 at the only marked point, each collar twist
prepends W and appends W inverse, where W = a1²…ak². On each paired side, the
four new ports have ranks 1, m+4, m+3, 2 in traversal order and the m old ports
shift by 2. The two new outer strands at each end run alongside the disk
boundary, so they introduce no crossing. After t twists the word is
W^t a1 W^(-t). For k≥2 these are distinct reduced based words (even after
reversing arc orientation), hence distinct relative-endpoint isotopy classes.
The UI allows any nonnegative number of twists, subject to finite resources.

## Trivial and boundary-segment exclusions

The dual cut spine is a rank-k rose. Relative to connectors inside the disk,
crossings give a word in its free generators. Adjacent inverse letters cancel.
We use that word only to reject the following elementary classes:

* empty reduced word and identical endpoints: contractible;
* empty reduced word between Pi and P(i+1), in either direction: the straight
  boundary segment inside B;
* from Pn to P1, the reduced word `1 1 2 2 … k k`: the boundary segment
  passing the unmarked vertex; in reverse, the inverse word.

To check the last convention, trace the link of the unmarked vertex starting
at the end of B: it crosses `a1+` near its initial end, then `a1+` near its
terminal end, then similarly each next pair. This gives two positive crossings
per generator. This also handles n=1 and the two different segments for n=2.
If n>2 a longer boundary interval containing other marked points is allowed.

The word is not used to claim that arbitrary input is simple. Exclusions are
combined with the independent geometric embedding certificate above.

## Software checks and limits

### Readable itinerary

The main editor lists the traversed crosscaps in order. A denotes the original
`a+` semicircle and B denotes `a−`; `A → B` encodes a positive crossing, and
`B → A` a negative one. A position selector appears only for repeated visits
to the same crosscap. Exchanging positions swaps the two ranks, preserving
their permutation. Removing or changing a crosscap renumbers only that
crosscap's remaining positions. Moving a step changes traversal order while
preserving its position. All of the original encoding is still expressible;
the compact textarea remains available under the advanced disclosure.

### The punctured Klein model

Reference: Gregorio Franzoni, [The Klein Bottle: Variations on a Theme](https://www.math-art.eu/Documents/pdfs/rtx120801076p.pdf),
Notices of the AMS 59 (2012), DOI 10.1090/noti880. We use Dickson's classical
piecewise parametrization (equation 4), including its nonsmooth joins, as a
surface visualization. It is not a spatial embedding. Intersecting sheets in
3D are distinct surface points unless the parameter gluing identifies them.

After shifting the transverse parameter by pi/2, its twist is v ↦ −v. Cutting
the two one-sided core curves leaves an annulus parameterized by
0 ≤ t ≤ 4pi, 0 ≤ v ≤ pi. Equal points on each boundary are t and t+2pi;
t=0 and t=4pi are also glued. A small disk centered at (0,pi/2) is removed,
and the remaining t=0 seam is opened. The resulting domain is a rectangle
with a semicircular indentation on each side, hence a disk. Its boundary
order gives the original two pairs of crosscap sides. A convex harmonic
chart transfers each certified chord into this domain. A monotone angular
map near the removed disk distributes all marked points around its boundary.
The same surface parametrization maps the mesh, the marks and every arc
segment. In particular, matched crosscap ports coincide in 3D, rather than
being connected by an invented straight line through space.

The Klein tests check both parameter seam identities, the quotient mesh's
Euler characteristic −1 and its single boundary component, positive chart
triangles, marked-point positions, and continuity of winding arcs at all
recollements. Meshing and curve sampling remain numerical approximations.

### Transferring arcs to the crossed-circle drawing

`crosscap_view.js` triangulates the planar disk with k holes, opening a slit
from each hole to the outer boundary. Slit banks are distinct vertices, even
where they share screen coordinates. A collar homeomorphism places all marked
points around the free boundary while keeping all slit tips in its unmarked
gap. In the cut boundary order, each pair ai+, ai− becomes the two consecutive
halves of the corresponding inner circle, traversed in the same direction.
Equal ranks therefore become antipodal points. The added slit banks and
unmarked outer intervals contain no arc endpoints. Contracting these auxiliary
trees recovers the original B,a1+,a1−,… cut convention; this contraction can be
performed away from the arc. Thus it does not discard winding classes.

The opened mesh is a topological disk. Its boundary vertices are mapped in
order to a strictly convex polygon and its interior vertices to positive
averages of their neighbors. Straight noncrossing chords in that convex chart
are transferred triangle by triangle. Disjoint radial collars round the small
polygonal holes to exact circles; the outer angular collar is monotone on
every concentric circle. These homeomorphisms preserve the curves' topology.

For readability, the display shortens strands across triangles containing
neither a crosscap nor another strand. Rounded corners stay inside similarly
checked empty triangles. Each such move is an isotopy relative to all ports
and the other strands. This is display simplification, not a canonical
geodesic or an algorithm for identifying isotopy classes.

The chart and curves use floating-point arithmetic. Nonlinear pieces are
adaptively sampled at a local coordinate error of 1e-6 (well below a screen
pixel at the default scale). This is a numerical drawing, not a formal proof
of arbitrary-precision rendering. The exact integer admissibility certificate
is independent of these display coordinates.

`crosscap_view.test.js` checks 69 charts covering every k from 2 through 24
with 1, 2 and 12 marks: boundary order, orientation of every mesh triangle,
antipodal ports and separated holes. It additionally checks winding examples,
round-hole clearance and absence of spurious crossings after simplification.

`arc_diagrams.test.js` compares integer chord alternation with an independent
Euclidean segment-intersection calculation on 2,040 small diagrams; tests
reversal, repeated cuts, common endpoints, boundary wrapping, malformed ranks,
an accepted simple 600-crossing diagram, and boundary-twist examples at k=2
up to 801 crossings. These tests supplement the
argument; they are not a formal verification or an external mathematical review.

The engine takes O(L²) time in the explicit number L of segments. Memory,
safe machine integers and browser performance remain practical limits. The
integrated surface selector currently supports up to 24 crosscaps. Large
diagrams can be slow or visually dense; PNG and JSON export are available.
The drawn order and the certificate come from the same segment
objects. Saved identifiers only deduplicate identical diagrams up to reversal;
they are explicitly not isotopy identifiers.

This editor does not compute minimal intersection numbers, quasi-triangulations,
flips, snake graphs, or simultaneous compatibility of independently saved
diagrams. It does not claim that a planar or 3D sketch is an embedding of the
surface in space. The quotient is specified by antipodal identification in
the base view and by the paired-side arrows in the cut-disk views.

## Animated gluing explanation

The question-mark button next to the planar title opens an explanatory dialog.
It includes the user-supplied five-stage reference diagram and a continuous
parametric reconstruction, with play/pause, a scrubber and stage controls.
Nothing runs automatically. Closing the dialog or hiding the page pauses it.

For one crosscap the model is an annulus whose inner circle is identified
antipodally. Cutting along two opposite radii gives two half-annuli. Their
material coordinates are `u,r ∈ [0,1]`, with `r=0` on the inner semicircle.
The initial antipodal pairing is `upper(u,0) ~ lower(1-u,0)`; the two copies
of each radial cut pair at equal `r`. These material coordinates persist
through the animation. Both half-annuli unfold to rectangles. Rotating the
upper rectangle by π around its vertical axis in **three dimensions** aligns
the inner-edge pairing pointwise. Translating the pieces together then joins
these edges. The remaining red/blue pairings combine into the oppositely
oriented vertical sides of the usual Möbius rectangle.

The unfolding is a linear interpolation from the half-annulus coordinates
to rectangle coordinates. Writing `s` for its eased progress, `ρ=30+110r`,
and `θ=πu`, the absolute Jacobian divided by 110 is

`(1-s)²ρπ + s(1-s)(ρπ+220)sin(θ) + 220s² > 0`.

Thus each material patch stays regular during unfolding. The rotation is
rigid in space; its planar **projection** can become edge-on. The cut and
glue operations are changes of presentation of the quotient surface, not a
claim of an ambient planar isotopy between the original and final pictures.
The red arrows point toward the inner circle on both copies of the left
radial cut. The blue arrows point outward. Reversing both arrows of a pair
does not change its gluing. After turning and joining, this convention gives
upward arrows on the whole left side and downward arrows on the whole right
side, without reversing either colour at an intermediate stage.

### Whole-surface construction for k >= 2

`global_gluing.js` starts with the same disk and arrangement of k crosscaps
as the lab's base view. It has no single-collar selector. All k circles are
opened in the same animation, ending at the actual lab's `(2k+1)`-gon with
cyclic word `B C1A C1B ... CkA CkB`. B is free; Ai and Bi for each crosscap
are paired in the same perimeter direction and with equal parameters.

1. Draw disjoint radial slits from each crosscap to the outer boundary.
2. Open the slits, deforming each circular hole into a notch within its own
   angular sector. Keep both antipodal half-circle labels throughout. The
   paired auxiliary slit edges shrink to vertices at the end of this step.
3. Increase the radial coordinate of the notched boundary to obtain a circle.
4. Contract the k-1 green boundary intervals between successive crosscaps,
   retaining the interval preceding C1A as B. Redistribute polar angles and
   straighten the remaining sides into the lab's regular polygon.

These are **explicit contractions of auxiliary trees**, not merely a linear
interpolation of two arbitrary pictures. On the quotient surface each slit
is an embedded arc from the boundary to an interior point. Contracting it
preserves the surface type: a regular neighbourhood is a disk meeting the
surface boundary in an interval. The later contracted boundary intervals
form a proper boundary arc, not the entire boundary component. They likewise
have half-disk neighbourhoods. No crosscap edge is contracted. The animation
explains the unmarked surface; boundary marks can be transported into the
retained free interval before these contractions. It does not animate arcs.

For the geometric opening, write `d` and `r` for a hole's radial position and
radius and `q` for its sector angle. On its clockwise circumference, use
`u in [0,1]`. The initial polar radius is
`R0(u)=sqrt(d*d+r*r+2*d*r*cos(2*pi*u))` and the initial relative angle is
`theta0(u)=atan2(-r*sin(2*pi*u),d+r*cos(2*pi*u))`. Interpolate radius to
`R1(u)=d-r+(1-d+r)*abs(2*u-1)` and relative angle to `beta*(2*u-1)`, where
`beta=.78*pi/k`. Both radii strictly decrease on the first half and increase
on the second. The relative angle has strictly opposite signs on the two
halves. Thus the two halves cannot intersect. For all supported k,
`asin(r/d)<beta<pi/k`, so different holes' sectors stay disjoint. The slit
banks lie radially outside each deformed hole and cannot cross it.

After opening, the full boundary is a positive radial graph. Rounding changes
only its positive radius. The final angular redistribution is monotone,
with only the designated green intervals becoming constant at the terminal
frame. Positive radial interpolation and monotone angular order prevent
contour crossings. We do not interpolate the interior triangulation, which
could fold even if its boundary behaved correctly.

At the end all polygon vertices are identified, there are k paired edges
plus B, and one face. Hence `chi=1-(k+1)+1=1-k`; the only boundary component
is B. Same-direction paired sides give the required nonorientability.
`global_gluing.test.js` compares final coordinates and side parameters against
`GeneralArcLab.point/polygonMap` for every k from 2 to 24, checks the initial
antipodal pairings and final vertex quotient, and tests continuity and sampled
contour nonintersection. The geometric argument above covers the continuous
motion; frame sampling alone is not a proof of it.

### Attribution

The user identifies the supplied one-crosscap diagram as coming from
Véronique Bazier-Matte, [*Quasi-cluster algebras: An overview* (2025),
pp. 85–119, DOI 10.4171/ECR/21/3](https://ems.press/books/ecr/312/6318), the same
reference already cited in the lab. The dialog now credits that source for
the reference diagram. Bibliographic details were verified with EMS Press;
the chapter's full text requires a subscription, so a figure number and a
claim that the author gives this particular global interpolation would not
be justified. The animation and the explicit generalization above are the
laboratory's implementation. The supplied reference image is kept unchanged.
