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

Search categories for constants with opaque (lemmas, etc) and transparent (definition, ...) bodies #18985

Open
Villetaneuse opened this issue Apr 28, 2024 · 2 comments
Labels
kind: feature New user-facing feature request or implementation. kind: wish Feature or enhancement requests. part: search Search and Locate vernac commands. part: vernac High level command interpretation.

Comments

@Villetaneuse
Copy link
Contributor

Villetaneuse commented Apr 28, 2024

Is your feature request related to a problem?

It should be possible to search for

  • "logical" constants (Lemmas, Theorems, ...)
  • "definitional" constants (Definitions, Fixpoints, ...)
    without knowing which keyword was used.
    At this point the is:logical_kind of Search requires that the user has this information.

Proposed solution

I propose (following @JasonGross suggestion here) we add the
is:Qed and is:Defined in Search queries.

Alternative solutions

My initial idea was to add another Search keyword like kind:Transparent and kind:Opaque.
What is already possible at this point is to Search ... [is:Lemma | is:Theorem] and Search ... [is:Definition | is:Fixpoint] (if/after PR #18983 is merged), which is quite verbose and not really equivalent.

Additional context

No response

@Villetaneuse Villetaneuse added needs: triage The validity of this issue needs to be checked, or the issue itself updated. kind: wish Feature or enhancement requests. part: vernac High level command interpretation. part: search Search and Locate vernac commands. kind: feature New user-facing feature request or implementation. and removed needs: triage The validity of this issue needs to be checked, or the issue itself updated. labels Apr 28, 2024
@herbelin
Copy link
Member

I would say that Transparent and Opaque refers to the current status of a Defined constant for the non-kernel parts while Qed and Defined would refer to the kernel status of the constant. So both pairs of keys make sense I would say.

@JasonGross
Copy link
Member

I would say that Transparent and Opaque refers to the current status of a Defined constant for the non-kernel parts

The kernel's heuristics care about Transparent and Opaque though. Maybe it makes sense to generalize this to:

  1. Search for constants with a given range / set of Strategy levels (subsumes Transparent and Opaque for kernel things)
  2. Search for things that are Hint Transparent and Hint Opaque for a given hint database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New user-facing feature request or implementation. kind: wish Feature or enhancement requests. part: search Search and Locate vernac commands. part: vernac High level command interpretation.
Projects
None yet
Development

No branches or pull requests

3 participants