← Back to Pull requests

Presheaf/Dgn: identify degeneracy presentations with functors on ν-shape #44

Closed
unknown closed this pull request without merging on Sep 19, 2026 02:25 UTC
View on GitHub
unknown unknown commented on Sep 13, 2026 19:32 UTC
Author

Overview

This PR completes the degeneracy extension proposed in PR #43: a face presentation equipped with degeneracies and their four identities is equivalent to a set-valued functor on the opposite ν-shape category. For every arity h-set A, pshDgnEqFunctor uses univalence to give the type equality:

pshDgnEqFunctor (A: HSet): νDgnSetPresentation A = Functor (Op (νShape A)) HSetCat

Together with the indexed–fibred correspondence from PR #42, this relates the indexed νDgnSets construction to presheaves on ν-shape.

Construction and proof

The new development in Presheaf/Dgn/ defines ν-shape by normal forms. A morphism from dimension p to dimension n consists of a selection mask retaining k input coordinates and a face word inserting arity-labelled constants among those coordinates:

Shape A p n := {k: nat &T Word hunit k p * Word A k n}.

The two words share their number of retained positions, so each input coordinate occurs at most once and their order is preserved. Composition normalizes the middle face word against the next selection mask, then composes the resulting words with the outer mask and face word. Compatibility of this normalization with word composition proves associativity and yields the category without quotients.

A normal-form morphism from p to n induces a map from F0 n to F0 p: first apply the face maps encoded by its face word, reaching F0 k, then apply the degeneracies encoded by its selection mask, reaching F0 p. This reversal of direction gives the contravariant action. The face–degeneracy identities justify normalization of the middle pair, while the face–face and degeneracy–degeneracy identities handle composition within each word. This gives the associated functor. Conversely, evaluating a functor on generating cofaces and coordinate deletions recovers the presentation and its identities.

Induction on words and masks proves that the constructions are mutually inverse.

Compatibility with forgetting degeneracies

The inclusion νSemiShape A → νShape A keeps every dimension and sends each face word to the normal form whose selection mask retains all input coordinates. It embeds the morphisms generated by cofaces into the category that also has coordinate deletions.

A presheaf on ν-shape can therefore be restricted to ν-semi-shape by precomposing with the opposite of this inclusion. The restricted functor keeps the same sets of cells and their face maps, while forgetting the action of coordinate deletions—the degeneracy maps. On the presentation side, forgetting degeneracies simply takes a pair P : νDgnSetPresentation A to its underlying face presentation P.1.

The theorem restrictDgnFunctor proves that these two ways of forgetting degeneracies agree under the correspondences: converting P to a functor and then restricting gives the same functor as first taking P.1 and then applying the face-only correspondence from PR #43. The result is an equality of functors:

semiShapeOpInclusion ⨟ᶠ toDgnFunctor P = toFunctor A P.1.

Here ⨟ᶠ denotes functor composition in diagrammatic order: first the functor on the left, then the one on the right.

Axiom dependencies

The ν-shape category and the pointwise action-composition proof are axiom-free. The correspondence uses functional extensionality to identify functions and presentation structures; pshDgnEquivFunctor depends only on that axiom. The type equality additionally uses univalence.

Diff: 475 lines (+356 / -119) across 5 files Reviewer: artagnon Review duration: 7612m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 475 lines diff across 5 files
0.46
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.369
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #44"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 45.7% (MEDIUM) · Higher = larger blast radius
45.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 18.1% · Safe to merge
18.1%
Repository