Loogle Search - Mathlib Type Signature Search

SkillSearch

Lets your agent find Mathlib lemmas by searching for matching type signatures.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Loogle Search - Mathlib Type Signature Search skill

About this capability

Search Mathlib for lemmas by type signature pattern

What this skill tells your AI

The instructions your AI receives, as published by parcadei/continuous-claude-v3 in .claude/skills/loogle-search/SKILL.md and read by ahel’s review.

Search Mathlib for lemmas by type signature pattern.

When to Use

  • Finding a lemma when you know the type shape but not the name
  • Discovering what's available for a type (e.g., all Nontrivial ↔ _ lemmas)
  • Type-directed proof search

Commands

# Search by pattern (uses server if running, else direct)
loogle-search "Nontrivial _ ↔ _"
loogle-search "(?a → ?b) → List ?a → List ?b"
loogle-search "IsCyclic, center"

# JSON output
loogle-search "List.map" --json

# Start server for fast queries (keeps index in memory)
loogle-server &

Query Syntax

PatternMeaning
_Any single type
?a, ?bType variables (same variable = same type)
Foo, BarMust mention both Foo and Bar
Foo.barExact name match

Examples

# Find lemmas relating Nontrivial and cardinality
loogle-search "Nontrivial _ ↔ _ < Fintype.card _"

# Find map-like functions
loogle-search "(?a → ?b) → List ?a → List ?b"
# → List.map, List.pmap, ...

# Find everything about cyclic groups and center
loogle-search "IsCyclic, center"
# → commutative_of_cyclic_center_quotient, ...

# Find Fintype.card lemmas
loogle-search "Fintype.card"

Performance

  • With server running: ~100-200ms per query
  • Cold start (no server): ~10s per query (loads 343MB index)

Setup

Loogle must be built first:

cd ~/tools/loogle && lake build
lake build LoogleMathlibCache  # or use --write-index

Integration with Proofs

When stuck in a Lean proof:

  1. Identify what type shape you need
  2. Query Loogle to find the lemma name
  3. Apply the lemma in your proof
-- Goal: Nontrivial G from 1 < Fintype.card G
-- Query: loogle-search "Nontrivial _ ↔ 1 < Fintype.card _"
-- Found: Fintype.one_lt_card_iff_nontrivial
exact Fintype.one_lt_card_iff_nontrivial.mpr h

Signals

GitHub stars
4k
Forks
300
Last commit
Jan 2026

Others that do the same job

Advanced
Catalog kind
skill
Gateway key
loogle-search
Source
github.com/parcadei/continuous-claude-v3