orientFace s is the canonical orientation of a face s: its vertices
listed in increasing order with respect to the ambient LinearOrder on ι.
Use this in the specification/proof layer (incidence and sign checks), not as a transport encoding for Sage JSON interop.
Equations
- orientFace s = s.sort fun (x1 x2 : ι) => x1 ≤ x2
Instances For
Equations
- deletionMatches σ τ = List.filter (fun (i : ℕ) => decide (σ.eraseIdx i = τ)) (List.range σ.length)
Instances For
index i if τ = σ with exactly the i-th vertex deleted; none otherwise
Equations
- deletionIndex σ τ = match deletionMatches σ τ with | [i] => some i | x => none
Instances For
Equations
- boundaryCoeff σ τ = match deletionIndex σ τ with | some i => signOfIndex i | none => 0
Instances For
declarative entry predicate for external matrix verification
Equations
- isBoundaryEntry σ τ a = (a = boundaryCoeff σ τ)
Instances For
Expected boundary entry from bases at (i,j):
row i = codomain simplex τ, column j = domain simplex σ.
Equations
- expectedEntry? dom cod i j = do let τ ← cod[i]? let σ ← dom[j]? pure (boundaryCoeff σ τ)