Zulip Chat Archive
Stream: mathlib4
Topic: loogle doesn't find dependent function with `?α → ?β`
Jireh Loreaux (Mar 25 2024 at 16:18):
@Joachim Breitner Is the following expected behavior for Loogle?
Jireh Loreaux (Mar 25 2024 at 16:18):
@loogle ⊢ TopologicalSpace.SeparableSpace (?α → ?β)
loogle (Mar 25 2024 at 16:18):
:shrug: nothing found
Jireh Loreaux (Mar 25 2024 at 16:19):
@loogle ⊢ TopologicalSpace.SeparableSpace ((i : ?α) → ?β i)
loogle (Mar 25 2024 at 16:19):
:search: TopologicalSpace.instSeparableSpaceForAllTopologicalSpace
Joachim Breitner (Mar 25 2024 at 17:10):
Hmm, I don’t claim that there isn’t some amount of accidentialy here, but I would argue that it could be somewhat intentional. The metavariable ?β
is introduced outside any local scopes, so it won’t unify with something mentioning local variables. Or put differently, ?α → ?β
looks like a non-dependent arrow, so it's not wrong to reject that.
But I admit I am rationalizing :-)
Joachim Breitner (Mar 25 2024 at 17:12):
It matches what conv => pattern
does, for example:
example : ((n : Nat) → Fin n) = ((n : Nat) → Fin n.succ) := by
-- does not work:
-- conv => pattern (?a → ?b)
conv => pattern ((i : ?a) → ?b i)
Jireh Loreaux (Mar 25 2024 at 17:39):
That feels a bit like a bug, but I'll accept that it possibly needs to be this way. I just tried to think through in my head a way to get the second query out of the first, but it seems infeasible in general (unless you implement explicit support for exactly "is this subexpression of the form metavariable → metavariable? If so, replace it with a dependent one").
Joachim Breitner (Mar 25 2024 at 17:41):
I agree it’s not perfect yet.
Joachim Breitner (Mar 25 2024 at 17:42):
⊢ TopologicalSpace.SeparableSpace ((_ : _) → _)
works too.
Floris van Doorn (Mar 26 2024 at 23:32):
Loogle's behavior seems like the desired behavior to me.
Last updated: May 02 2025 at 03:31 UTC