Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to Coq PR #18591: better refolding of List.app inducing "simpl never" now better respected #224

Conversation

herbelin
Copy link
Contributor

Tactic injection (called here via the introduction pattern []) routinely calls simpl to simplify the application of the underlying injectors to the terms to invert. We modify two cases in MM2_ZERO_HALTING_to_SSTS01.v where, after coq/coq#18591, these calls to simpl stop reducing [] ++ l into l due to List.app (i.e. ++) being declared simpl never.

The reason simpl formerly reduced [] ++ l is that simpl called on a subterm of the form injector ([a] ++ l]) wrongly failed to refold the underlying occurrences of List.app, producing instead (fix f := ... code of List.app ...) [] l, leading to miss the simpl never request.

We fix the script by explicitly unfolding ++ in the two cases where [] ++ l was produced.

I tried at some time to understand if the use of simpl never in the file was actually motivated by List.app being not enough refolded, but apparently no. So, I kept the simpl never and locally modified instead the two failing places.

If I'm correct, the change is backwards compatible. So, if the change looks ok to you, it can be merged as soon as now.

…curatedly.

The change is however indirect:
- Coq PR #18591 fixes a lack of refolding of fixpoints;
- as a consequence, some calls to "simpl" on subterms start to respect
  "simpl never" as required;
- this impacts "injection" (here the "[]" intro-pattern) as
  "injection" calls "simpl" on the subterms it generates.
@mrhaandi mrhaandi merged commit a1cf0f9 into uds-psl:master Jun 17, 2024
1 check passed
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