Skip to content
Back to skills

Loogle Search

ASecurity

Search Mathlib for lemmas by type signature pattern

  • 3,935 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 7, 2026
ai-agentsgobashperformance

Works with

  • cli

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add parcadei/Continuous-Claude-v3 --skill loogle-search --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Loogle Search?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Loogle Search
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/parcadei-loogle-search/badge)](https://www.skillsdirectory.com/skills/parcadei-loogle-search)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: loogle-search
description: Search Mathlib for lemmas by type signature pattern
---
# Loogle Search - Mathlib Type Signature Search

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

```bash
# 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

| Pattern | Meaning |
|---------|---------|
| `_` | Any single type |
| `?a`, `?b` | Type variables (same variable = same type) |
| `Foo, Bar` | Must mention both `Foo` and `Bar` |
| `Foo.bar` | Exact name match |

## Examples

```bash
# 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:
```bash
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

```lean
-- 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
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.