Lib, νGpd: introduce square and hexagonal coherence definitions #48
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 336 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.348
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #48"
general
weight: 0.35
artagnon
Background
On
groupoid-no-funext(the early ν-groupoid development branch), abstract coherence types and lemmas were introduced in theAbstractShapesmodule to answer a question: can hexagonal coherence be proved once and for all, as square coherence can?It was shown that naturality squares always have fillers, whereas a proof of every abstract hexagon would be equivalent to global UIP. These types were not integrated into the
νGpdconstruction at the time.PR #45 implemented a broad refactoring aimed at improving comprehension of the ν-groupoid construction.
Overview
This PR continues that effort using the idea from
AbstractShapes: give the coherence shapes names and use them throughout the construction. These named types let us express the statements of lemmas used in the ν-groupoid construction at a higher level of abstraction, making their mathematical content easier to follow.Coherence shapes
The new
Lib/CohShapes.vdefinessquare_coherenceandhexagonal_coherence, following the naming scheme of the existingpermutahedral_coherence.square_coherencehas a proof once and for all, supplied bysquare_coherence_fill.hexagonal_coherencerequires coherence data. We port the abstract hexagon–UIP proof: a filler for every hexagonal boundary is equivalent to global UIP._depversion, expressing dependent coherence over a chosen base coherence.Use in the construction
mkCoh2FrameTypebecomes an instance ofhexagonal_coherence. The layer and painting coherence types become instances ofhexagonal_coherence_dep.The building blocks of the
permutahedral_coherencenow clearly consist of instances ofhexagonal_coherence(supplied) andsquare_coherence(built viasquare_coherence_fill).The frame-coherence assumption of
rew_cohLayer_hexis expressed ashexagonal_coherence. One level up,rew_coh2Layer_perm4takes a painting coherence expressed ashexagonal_coherence_depand, using the permutahedral frame coherence, produces another dependent hexagon for the second-order layer coherence.The decomposition lemmas
eq_existT_curried_hexandeq_existT_curried_hex_dep, used for frame and painting coherence respectively, now state explicitly how hexagonal coherences of dependent pairs are assembled from their components.The same definitions shorten the types of other lemmas in
Layer.v,Lemmas.v, andPasting.v, so the construction and its supporting lemmas describe their coherences in a common language.