Affine-described positions on the CLOSED length orthant #
The DegSpec counterpart of Certificate/AffinePosition.lean's
decodePosition and decodeVertex. Nothing there is modified: the strictly
positive decoder keeps working, and the passive Code type, its two cone rows
(BoundsCertified), rawOffset, coordinate and every purely arithmetic fact
about them are reused verbatim — none of them mention Spec.
Two things change, and both are forced.
ValidbecomesValidClosed.rawOffset_le_segmentNatreads the slot length offsegmentNat_cast_eq, which needssegment_positive_of_valid. The closed-orthant replacement issegmentNat_cast_eq_of_validClosed, which needs only non-negativity. Nothing else in the bound argument changes.The two-case split becomes a trichotomy. On a
Speca decoded position is0or interior whenever it is strictly below the slot length, andlength_posusually supplies that. On the closed orthantcoordinate = lengthis reachable — and at a collapsed slot it is the only possibility, where it coincides withcoordinate = 0.decodeDegenerateVertex_trichotomyis the exhaustive statement; the positive-world two-case consumers have no case for the middle disjunct.
Note that decodeVertex_eq_head_of_coordinate_eq_length is already
boundary-safe as a statement; what is not boundary-safe is concluding
"interior" from 0 < coordinate.
The bound argument, on the closed orthant #
Closed-orthant replacement for rawOffset_le_segmentNat. Only the length
decoding changes: segmentNat_cast_eq_of_validClosed needs non-negativity, not
positivity.
Closed-orthant replacement for coordinate_le_segmentNat.
Decoding into the contracted subdivision #
Typed path position on the contracted subdivision, decoded from a cone-certified affine position.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The actual vertex of the contracted subdivision named by an affine position code.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The trichotomy #
decodeVertex_eq_tail_of_coordinate_eq_zero and
decodeVertex_eq_head_of_coordinate_eq_length port unchanged; the third case is
the one the positive world does not have as a separate statement, because there
0 < coordinate already implies interiority when coordinate < length.
Coordinate zero decodes to the tail class.
Coordinate equal to the slot length decodes to the head class. This holds
at a collapsed slot too, where it is the same vertex as the tail class:
DegSpec.pathVertex_length uses rep_zero, not length_pos.
A strictly interior coordinate decodes to an interior vertex.
The trichotomy. A decoded position lands on the tail class, on the head
class, or on an interior vertex. At a collapsed slot only the first two are
available and they coincide; the positive-world two-case split
(coordinate = 0 versus coordinate > 0 ⟹ interior) has no case for the head
class.