hierarchy-builder icon indicating copy to clipboard operation
hierarchy-builder copied to clipboard

Joins with primitive projections declared by HB are not found in the canonical structure table

Open Tragicus opened this issue 9 months ago • 0 comments

When HB declares a join for structures with primitive projections, it uses the compatibility constants of the projections instead of the projections themselves. However, the canonical structure table differentiates them, so the instance is unusable.

From HB Require Import structures.

HB.mixin Record isA (T : Type) := {}.
HB.mixin Record isB (T : Type) := {}.

#[primitive]
HB.structure Definition A := {T of isA T}.
#[primitive]
HB.structure Definition B := {T of isB T}.

#[primitive]
HB.structure Definition C := {T of isA T & isB T}.

Fail Check fun (a : A.type) => a : B.type.

Tragicus avatar Mar 04 '25 13:03 Tragicus