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

Allow searching for just lemmas or just definitions (I guess: Prop/Sort) #9

Open
ericrbg opened this issue Dec 21, 2023 · 5 comments
Open

Comments

@ericrbg
Copy link

ericrbg commented Dec 21, 2023

It'd be nice to only be shown lemmas when I'm looking for lemmas, as opposed to other stuff that I don't particularly want; I assume it'd be the same for defs!

@nomeata
Copy link
Owner

nomeata commented Dec 21, 2023

Any concrete syntax in mind?

@ericrbg
Copy link
Author

ericrbg commented Dec 21, 2023

Maybe just "lemma" or "def" as special keywords? That should be fine to special-case I guess

@nomeata
Copy link
Owner

nomeata commented Dec 21, 2023

That a reasonable suggestion. If they are “filters” of their own you’d have to comma-searate them, e.g.

theorem, 1 + 1 =2

which probably takes getting used to. Or the syntax could be more liberal and not require a comma after theorem or def.

(Note that lemma is a Mathlib’ism, not a lean keyword. I’ll have to think about whether loogle should be generous or generic here.)

@nomeata
Copy link
Owner

nomeata commented Dec 21, 2023

BTW, the current syntax allows this already, although less convenient: You can write

|- (?a : Prop)

to get theorems and

|- (?a : Type _)

to get everything else.

For example https://loogle.lean-lang.org/?q=Real.sin%2C+%7C-+%28%3Fa+%3A+Prop%29 vs. https://loogle.lean-lang.org/?q=Real.sin%2C+%7C-+%28%3Fa+%3A+Type+_%29.

@ericrbg
Copy link
Author

ericrbg commented Dec 21, 2023

I think having to comma-separate them doesn't seem unreasonable!

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

No branches or pull requests

2 participants