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

Michael Stoll (Jun 07 2025 at 19:29):

@loogle ∀ x < ?a, x < ?b → ?a ≤ ?b

loogle (Jun 07 2025 at 19:29):

:shrug: nothing found

Michael Stoll (Jun 07 2025 at 19:30):

But: docs#le_of_forall_lt :

theorem le_of_forall_lt {α : Type u_2} [LinearOrder α] {a b : α} (H :  (c : α), c < a  c < b) :
a  b

Why does Loogle miss this?

Edward van de Meent (Jun 07 2025 at 19:31):

brackets, i think?

Edward van de Meent (Jun 07 2025 at 19:31):

@loogle (∀ x < ?a, x < ?b) → ?a ≤ ?b

loogle (Jun 07 2025 at 19:31):

:search: le_of_forall_lt

Edward van de Meent (Jun 07 2025 at 19:35):

without, it interprets it as ∀ x < ?a, (x < ?b → ?a ≤ ?b) which seems to say that all elements less than a are minimal?

Edward van de Meent (Jun 07 2025 at 19:38):

that doesn't quite seem to describe all consequences, but it's a decent start

Edward van de Meent (Jun 07 2025 at 19:40):

maybe a better description is "a is the successor of all elements strictly smaller than it"


Last updated: Dec 20 2025 at 21:32 UTC