PrecursorBoundaryArcData #
Adapted from Wesley Pegden’s Apache-2.0 Trellis formalization of Levine–Pegden–Smart. Changes: pool module paths, public exports, project namespace and current Mathlib compatibility.
Let $D^+,D^-,O,O'$ be prototiles, where $O$ and $O'$ are the two
labelled occurrences of one precursor: they have the same cell set and,
when that set is empty, the same anchor. Let $(Q_2,S_3)$ and
$(Q_3,S_2)$ be its two labelled attaching pairs. Thus
$(Q_2,S_3,O)$ and $(Q_3,S_2,O)$ are TouchingTriples, the
$Q_2,Q_3$ cell sets are contained in $D^+$, and the $S_3,S_2$ cell sets
are contained in $D^-$. A precursor
boundary-arc certificate consists of two attachment vertices $a,b$ such
that $a$ is the unique common boundary vertex of $Q_2,S_3,O$ and $b$ is
the unique common boundary vertex of $Q_3,S_2,O$, together with one of the
following two alternatives.
If $O$ has a cell, the certificate contains simple vertex lists $K^+$ and $K^-$, oriented from $a$ to $b$ and from $b$ to $a$, whose vertex sets are exactly $$ \partial\operatorname{foot}(D^+)\cap\partial\operatorname{foot}(O),\qquad \partial\operatorname{foot}(D^-)\cap\partial\operatorname{foot}(O), $$ and whose consecutive edges belong to the corresponding common boundary edge sets. These two arcs cover the entire boundary footprint of $O$, their common vertices are exactly $\{a,b\}$, half-turn about $\operatorname{cent}(O)$ sends $a$ to $b$, and that half-turn sends the vertex set of $K^+$ exactly onto the vertex set of $K^-$. The lists have no repeated vertices.
If $O$ has no cells, then $a=b$ is the common anchor of $O$ and $O'$, and both boundary footprints are exactly the singleton $\{a\}$.
- first_touching : TouchingTriple Q2 S3 O
- second_touching : TouchingTriple Q3 S2 O
- a : GaussianInt
The unique attachment vertex of the first labelled child pair to the precursor.
- b : GaussianInt
The unique attachment vertex of the second labelled child pair to the precursor.
- first_transition (x : GaussianInt) : x ∈ BoundaryFootprintVertices Q2 ∧ x ∈ BoundaryFootprintVertices S3 ∧ x ∈ BoundaryFootprintVertices O ↔ x = self.a
- second_transition (x : GaussianInt) : x ∈ BoundaryFootprintVertices Q3 ∧ x ∈ BoundaryFootprintVertices S2 ∧ x ∈ BoundaryFootprintVertices O ↔ x = self.b
- branch : (Finset.Nonempty O.cells ∧ ∃ (plusArc : List GaussianInt) (minusArc : List GaussianInt), plusArc.Nodup ∧ minusArc.Nodup ∧ plusArc.head? = some self.a ∧ plusArc.getLast? = some self.b ∧ minusArc.head? = some self.b ∧ minusArc.getLast? = some self.a ∧ ↑plusArc.toFinset = BoundaryFootprintVertices Dplus ∩ BoundaryFootprintVertices O ∧ ↑minusArc.toFinset = BoundaryFootprintVertices Dminus ∩ BoundaryFootprintVertices O ∧ (∀ (x y : GaussianInt) (l1 l2 : List GaussianInt), plusArc = l1 ++ x :: y :: l2 → {x, y} ∈ BoundaryFootprintEdges Dplus ∩ BoundaryFootprintEdges O) ∧ (∀ (x y : GaussianInt) (l1 l2 : List GaussianInt), minusArc = l1 ++ x :: y :: l2 → {x, y} ∈ BoundaryFootprintEdges Dminus ∩ BoundaryFootprintEdges O) ∧ BoundaryFootprintVertices O = ↑plusArc.toFinset ∪ ↑minusArc.toFinset ∧ ↑plusArc.toFinset ∩ ↑minusArc.toFinset = {self.a, self.b} ∧ GaussianRealPoint self.b = (2 * (TileCentroid O).1 - (GaussianRealPoint self.a).1, 2 * (TileCentroid O).2 - (GaussianRealPoint self.a).2) ∧ (fun (z : GaussianInt) => (2 * (TileCentroid O).1 - (GaussianRealPoint z).1, 2 * (TileCentroid O).2 - (GaussianRealPoint z).2)) '' ↑plusArc.toFinset = GaussianRealPoint '' ↑minusArc.toFinset) ∨ O.cells = ∅ ∧ self.a = self.b ∧ self.a = O.anchor ∧ self.a = O'.anchor ∧ BoundaryFootprintVertices O = {self.a} ∧ BoundaryFootprintVertices O' = {self.a}