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

Add SSReflect contextual pattern UNDER #19011

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erikmd
Copy link
Member

@erikmd erikmd commented May 8, 2024

Close #11118

This PR proposes a simpler workaround than PR #11200.

Cc @gares @CohenCyril @proux01 @mrhaandi FYI

  • Added / updated test-suite.
  • Added changelog.
  • Added / updated documentation.

@erikmd erikmd requested review from a team as code owners May 8, 2024 16:36
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label May 8, 2024
@erikmd erikmd force-pushed the ssr-under-pattern branch 2 times, most recently from 17acc1c to 6948d55 Compare May 8, 2024 17:11
Copy link
Member

@jfehrle jfehrle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording suggestions

doc/changelog/07-ssreflect/19011-add-under-pattern.rst Outdated Show resolved Hide resolved
doc/changelog/07-ssreflect/19011-add-under-pattern.rst Outdated Show resolved Hide resolved
@erikmd erikmd added kind: documentation Additions or improvement to documentation. part: ssreflect The SSReflect proof language. kind: enhancement Enhancement to an existing user-facing feature, tactic, etc. labels May 9, 2024
@gares
Copy link
Member

gares commented May 12, 2024

Thanks for reviving this, Erik. I like the fact that this approach is simpler, but it requires the user to understand what goes wrong and it is not easy to explain. For example the changelog entry is unclear to me (if one does not know the implementation of under).

I'm wondering if we could instead hide the evar as in:

a : T
_rhs_ : S := ?123
=============
@Under_rel S (expression) _rhs_

In this way the evar and its local context are hidden. Would this work? If not I'll just click merge ;-)

@erikmd
Copy link
Member Author

erikmd commented May 12, 2024

@gares thanks for your comment!

I'm wondering if we could instead hide the evar as in: (...)

Yes I was also thinking about this idea, but I didn't try it... (and AFAIAC, I won'd be able to experiment this before the end of the month).

Would this work? If not I'll just click merge ;-)

Thanks. I don't know yet, but I agree this would be worth it to try. So let's postpone merging this PR for the moment...

@erikmd erikmd marked this pull request as draft May 12, 2024 20:36
@proux01
Copy link
Contributor

proux01 commented May 13, 2024

What was the issue with the nomatch idea discussed in #11118 (comment) it sounds like a much better solution?

@gares
Copy link
Member

gares commented May 13, 2024

That would also work but needs to be implemented, and can be used outside of the under tactic.
What I propose here is way more limited, but seems trivial to implement.
What Erik proposes is implemented, but requires the user to do something in some situations that are not so easy to explain.

@erikmd
Copy link
Member Author

erikmd commented May 13, 2024

That would also work but needs to be implemented, and can be used outside of the under tactic.

Just to correct: a prototype has already been implemented:

#11200

but the implementation looked nontrivial and it still needs to be refined (read: fixed) to fully work... but if it looks nicer to you, maybe it would be worth it to put forth #11200 anew...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: documentation Additions or improvement to documentation. kind: enhancement Enhancement to an existing user-facing feature, tactic, etc. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. part: ssreflect The SSReflect proof language.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

over tactic fails after rewrite
4 participants