Zulip Chat Archive

Stream: mathlib4

Topic: loogle miss


Jireh Loreaux (Nov 29 2024 at 15:45):

Why doesn't @loogle (∀ y, inner ?x y = inner ?z y), ?x = ?z

find docs#ext_inner_right here?

loogle (Nov 29 2024 at 15:45):

:shrug: nothing found

Floris van Doorn (Nov 29 2024 at 15:47):

@loogle (∀ y, inner ?x y = inner ?z y) -> ?x = ?z

loogle (Nov 29 2024 at 15:47):

:search: ext_inner_right

Floris van Doorn (Nov 29 2024 at 15:48):

That doesn't answer your question. I don't your the answer.

Floris van Doorn (Nov 29 2024 at 15:50):

I expect that Loogle doesn't like this quantifier as head of an expression. This also works:
@loogle inner _ ?y = inner _ ?y

loogle (Nov 29 2024 at 15:50):

:search: ext_inner_right, ext_inner_map, and 4 more

Floris van Doorn (Nov 29 2024 at 15:50):

(@Joachim Breitner )

Joachim Breitner (Nov 29 2024 at 15:57):

(∀ y, inner ?x y = inner ?z y) is equivalent to (y : ?x) → inner ?x y = inner ?z y. I would have assumed that this would be equivalent to searching for inner ?x ?y = inner ?z ?y and then finding a hypothesis matching ?x, but it seems that this somewhere doesn't work.

So I don’t your the answer either.

Joachim Breitner (Nov 29 2024 at 15:58):

But using the same metavariables on independent filters (the comma-separated things) doesn’t do what you want it to do anyways. Likely loogle should warn about this. If you want the metavariable to scope that way, you have to put them into one expression, like Floris did.

Eric Wieser (Nov 29 2024 at 15:59):

does P -> R match expressions of the form P -> Q -> R?

Eric Wieser (Nov 29 2024 at 15:59):

Because if not, then that's often a reason for wanting to use independent filters

Joachim Breitner (Nov 29 2024 at 16:09):

Eric Wieser said:

does P -> R match expressions of the form P -> Q -> R?

It should

Joachim Breitner (Nov 29 2024 at 16:09):

If the pattern has parameters, they are matched in any order. Both of these will find List.map:
:search: (?a -> ?b) -> List ?a -> List ?b
:search: List ?a -> (?a -> ?b) -> List ?b

Joachim Breitner (Nov 29 2024 at 16:10):

@loogle (?a -> ?b) -> List ?b

loogle (Nov 29 2024 at 16:10):

:search: List.modifyHead, List.map, and 20 more


Last updated: May 02 2025 at 03:31 UTC