Loogle Search

Search Mathlib for lemmas by type signature patterns.

8|1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/scooter-lacroix/Maestro --skill loogle-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Loogle Search
Source: https://github.com/scooter-lacroix/Maestro/tree/main/maestro/skills/research/loogle-search
Command: npx skills add https://github.com/scooter-lacroix/Maestro --skill loogle-search

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users find mathematical lemmas in Mathlib by searching for their type signature patterns, which is useful when the lemma name is unknown.

Core Features & Use Cases

  • Type Signature Search: Find lemmas based on the shape of their type signatures.
  • Pattern Matching: Supports wildcards (_) and type variables (?a, ?b) for flexible queries.
  • Use Case: When trying to prove a theorem, you might know you need a lemma that takes a list of type ?a and returns a list of type ?b, but not its name. This Skill can find List.map or similar functions.

Quick Start

Use loogle-search to find lemmas matching the pattern "(?a → ?b) → List ?a → List ?b".

Frequently Asked Questions about Loogle Search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for Mathlib lemmas when I only know the type signature?

You can search for Mathlib lemmas by providing a type signature pattern to find relevant proofs. This approach helps you discover lemmas when the exact name is unknown, using wildcards and type variables for flexible queries.

Can I use wildcards or type variables when searching for Lean proofs?

Yes, you can use wildcards (`_`) and type variables (`?a`, `?b`) when searching for Lean proofs. This pattern matching allows you to perform both precise and broad searches across the Mathlib library.

What is the best way to find a specific function in Mathlib without knowing its name?

The best way to find a function in Mathlib without knowing its name is searching by its type signature shape. By inputting the expected input and output types, you can locate matching lemmas or functions like `List.map`.

Does Loogle Search support discovering lemmas for theorem proving in Lean?

Yes, Loogle Search supports theorem proving in Lean by facilitating the discovery of relevant lemmas. It searches the Mathlib library based on type signature patterns, aiding mathematical exploration when you need a specific proof.

How do I format a type signature query to find a list mapping lemma in Mathlib?

To find a list mapping lemma in Mathlib, format your type signature query using pattern matching syntax like `(?a → ?b) → List ?a → List ?b`. This query will return matching lemmas such as `List.map`.

What are the limitations of searching Mathlib by type signature patterns?

A limitation of searching Mathlib by type signature patterns is that it requires knowing the exact shape of the types involved. If the type signature is too broad, the search may return too many results, and if too specific, it might miss relevant lemmas.