From f2a82e7d962c758e94d8a6062d0eedb4cbb48b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Marie=20P=C3=A9drot?= Date: Wed, 18 Nov 2026 17:29:14 +0100 Subject: [PATCH] Do not rely on casts to select the term to generalize. Adapt to rocq-prover/rocq#22732, which makes term equality sensitive to casts. A cast in the argument of generalize then does not match the uncasted term in the goal. We use a volatile cast instead, which leaves no trace in the elaborated term, and restore the type of the generalized binder with an explicit change. --- msl/knot_full.v | 2 +- msl/knot_full_variant.v | 2 +- msl/knot_hered.v | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/msl/knot_full.v b/msl/knot_full.v index 726c797da..13e4debd9 100644 --- a/msl/knot_full.v +++ b/msl/knot_full.v @@ -699,7 +699,7 @@ Module KnotFull (TF':TY_FUNCTOR_FULL) : KNOT_FULL with Module TF:=TF'. eapply (stratifies_unstratify_more x 0 1). simpl; reflexivity. simpl. - generalize (fst (proj1_sig k) : sinv x). + generalize (fst (proj1_sig k) :> sinv x); change (forall s : sinv x, stratifies (unstratify x s) x s). clear. induction x; simpl; intuition. eapply (stratifies_unstratify_more x 0 1). diff --git a/msl/knot_full_variant.v b/msl/knot_full_variant.v index e6ae6665b..6c8cd7913 100644 --- a/msl/knot_full_variant.v +++ b/msl/knot_full_variant.v @@ -719,7 +719,7 @@ Module Knot_MixVariantHeredTOthRel (KI':KNOT_INPUT__MIXVARIANT_HERED_T_OTH_REL) eapply (stratifies_unstratify_more x 0 1). simpl; reflexivity. simpl. - generalize (fst (proj1_sig k) : sinv x). + generalize (fst (proj1_sig k) :> sinv x); change (forall s : sinv x, stratifies (unstratify x s) x s). clear. induction x; simpl; intuition. eapply (stratifies_unstratify_more x 0 1). diff --git a/msl/knot_hered.v b/msl/knot_hered.v index 341992f52..0e47f06de 100644 --- a/msl/knot_hered.v +++ b/msl/knot_hered.v @@ -547,7 +547,7 @@ Module KnotHered (TF':TY_FUNCTOR_PROP) : KNOT_HERED with Module TF:=TF'. eapply (stratifies_unstratify_more x 0 1). simpl; reflexivity. simpl. - generalize (fst (proj1_sig k) : sinv x). + generalize (fst (proj1_sig k) :> sinv x); change (forall s : sinv x, stratifies (unstratify x s) x s). clear. induction x; simpl; intuition. eapply (stratifies_unstratify_more x 0 1).