P4261T1PlacedOdometer #
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.
Fix an ordered-general layout $\mathcal L$ on $(q,T_0)$ and a partial
odometer $h_0$. A placed odometer at index $a=(X,m,n)$ consists of a
positive band circle $C$, a literal support $T$, and a literal partial
odometer $h$, together with the following certificates. Following the
interpretation in SixSubtileLabel, write
$(j,e)=(0,\mathrm{true}),(0,\mathrm{false}),(1,\mathrm{true}), (1,\mathrm{false}),(2,\mathrm{true}),(2,\mathrm{false})$
when $X=A,B,C,D,E,F$, respectively. Then
$C=q_{j+1}$, $h$ is a tile odometer for $C$ on $T$, and $T$ has exactly
the cells and centroid of $\operatorname{Occ}_{\mathcal L}(a)$.
Its domain is exactly the raw footprint of that occurrence. There are
defined slopes $p_0=\operatorname{slope}(h_0)$ and
$p=\operatorname{slope}(h)$. Put
$w_j=a(q_{(j+2)+1},q_{(j+1)+1})$, where indices inside parentheses
are in $\mathbb Z/3\mathbb Z$. Then the slope equation is
$$ p-p_0=\epsilon_e\,\frac12(w_j+i w_j)+m a_{01}+n a_{02}, \qquad \epsilon_{\mathrm{true}}=1,\quad \epsilon_{\mathrm{false}}=-1. $$
The half-vector is P4250T1SlopeOffset. The data retain the
literal function $h$; they do not choose a replacement odometer on the
same cells or require equality of auxiliary anchors of nonempty tiles.
- odometer : TileOdometer (↑↑C) T h
The defined slope of the literal outer odometer.
The defined slope of the odometer placed at the retained periodic index.
- slope_offset : let slot := match a.label with | SixSubtileLabel.A => (0, true) | SixSubtileLabel.B => (0, false) | SixSubtileLabel.C => (1, true) | SixSubtileLabel.D => (1, false) | SixSubtileLabel.E => (2, true) | SixSubtileLabel.F => (2, false); self.slope - self.rootSlope = (if slot.2 = true then 1 else -1) • P4250T1SlopeOffset (BandVectors.2 (q (slot.1 + 2).succ) (q (slot.1 + 1).succ)) + GaussianRealPoint (↑a.first * BandVectors.2 (q 0) (q 1) + ↑a.second * BandVectors.2 (q 0) (q 2))