Zulip Chat Archive
Stream: new members
Topic: How do I search function by type on loogle?
MrQubo (Mar 01 2025 at 13:56):
I'm trying do find a theorem that would compose implications. On hoogle I can just search e.g. (p -> q) -> (q -> r) -> p -> r.
Is something like that possible on loogle? I've tried (?p ?q ?r : Prop) -> (?p -> ?q) -> (?q -> ?r) -> ?p -> ?r.
MrQubo (Mar 01 2025 at 13:58):
These don't work either:
(?p -> ?q) -> (?q -> ?r) -> ?p -> ?r
(p q r : Prop) -> (p -> q) -> (q -> r) -> p -> r
Edward van de Meent (Mar 01 2025 at 14:03):
is there a reason why usual function composition doesn't fit your use?
suhr (Mar 01 2025 at 14:03):
example {p q r: Prop}(pq: p → q)(qr: q → r): p → r :=
qr ∘ pq
MrQubo (Mar 01 2025 at 14:05):
Edward van de Meent said:
is there a reason why usual function composition doesn't fit your use?
It does. But I don't know how to do function composition either.
MrQubo (Mar 01 2025 at 14:06):
And I've tried finding how to do function composition, without having to ask question on zulip. .-.
MrQubo (Mar 01 2025 at 14:06):
So, I've got the answer to that (thanks @suhr !), but I still would want to know how to use loogle.
Eric Wieser (Mar 01 2025 at 14:09):
I think you've just stumbled upon a corner case that Loogle can't handle
MrQubo (Mar 01 2025 at 14:10):
Hmm, I've tried using loogle like many times, and I think it never worked. What is the problem in this case?
Eric Wieser (Mar 01 2025 at 14:10):
"Cannot search: No constants or name fragments in search pattern." is what loogle says
Eric Wieser (Mar 01 2025 at 14:10):
Indeed, loogle works much better if you have some constants or name fragments
MrQubo (Mar 01 2025 at 14:11):
There's Prop
constant. So I'm not even sure what the error means.
Edward van de Meent (Mar 01 2025 at 14:11):
technically, Prop
is not a constant, i think...
MrQubo (Mar 01 2025 at 14:12):
Ah, yeah, you might be right.
Edward van de Meent (Mar 01 2025 at 14:12):
looking at the constructors of docs#Lean.Expr, indeed it is a separate expression. (.sort .zero
rather than .const ``Prop
or something)
MrQubo (Mar 01 2025 at 14:16):
Thanks! I hope this limitation will be fixed at some point. Until than, I guess I have to use zulip-powered search. :P
Or work through MoP, cause I would probably find function composition somewhere in there.
Eric Wieser (Mar 01 2025 at 14:18):
Searching loogle for "comp"
and "function"
would have found it
Last updated: May 02 2025 at 03:31 UTC