Skip to content

Do not rely on casts to select the term to generalize - #882

Merged
andrew-appel merged 1 commit into
PrincetonUniversity:masterfrom
ppedrot:constr-keep-cast-equality
Nov 23, 2026
Merged

andrew-appel merged 1 commit into
PrincetonUniversity:masterfrom
ppedrot:constr-keep-cast-equality

Conversation

@ppedrot

@ppedrot ppedrot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Overlay for rocq-prover/rocq#22732, which makes term equality sensitive to casts. With it, generalize (fst (proj1_sig k) : sinv x) no longer abstracts the uncast term in the goal. A volatile cast (_ :> sinv x) leaves no trace in the elaborated term, so the abstraction works again. However, the binder then gets the unfolded type of the term instead of sinv x, so an explicit change restores the original goal. The change is backwards compatible.

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.
@ppedrot

ppedrot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Ping @andrew-appel

@andrew-appel
andrew-appel merged commit a4f38df into PrincetonUniversity:master Nov 23, 2026
16 checks passed
@ppedrot
ppedrot deleted the constr-keep-cast-equality branch November 23, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants