erdos-solver

Workflow for attempting to solve Erdős problems. Use when the user wants to work on a specific Erdős problem, analyze open problems, or find tractable problems to attempt.

Erdős Problem Solver Workflow

A structured approach to working on Erdős problems, informed by lessons from AI research efforts (Gemini/Aletheia, GPT-5).

Quick Start Commands

# Get problem details
./erdos get {number} --json

# Find tractable problems
./erdos open --tag primes --formalized

# Search related problems
./erdos find "keyword"

Phase 1: Problem Selection

Finding Good Candidates

from tools.query_db import ErdosDB

with ErdosDB() as db:
    # Problems marked tractable by community
    tractable = db.get_tractable_problems()

    # Open problems with Lean formalizations
    formalized = db.get_formalized_problems()

    # Filter by tag
    primes = db.search_by_tag("primes", status="open")

    # Check what people are working on
    active = db.get_problems_being_worked_on()

Selection Criteria

FactorWhy It Matters
Has Lean formalizationClearer statement, verifiable
Tagged "formalisable"Community thinks it's well-defined
Recent commentsActive discussion, partial progress
No prizeLess likely to be extremely hard
Status = "open"Actually unsolved

Phase 2: Deep Understanding

2.1 Read Everything

p = db.get_problem(number)
print(p.statement)      # Full LaTeX
print(p.references)     # Original Erdős papers
print(p.comments)       # Community discussion
print(p.lean_url)       # Check formalization

2.2 Understand the Intent

Common issues (from Gemini paper):

  • Notational conventions differ (additive vs Dirichlet convolution)
  • "Strong" vs "weak" completeness
  • Implicit assumptions in Erdős's original formulation
  • Errors in transcription from original papers

Check: Does erdosproblems.com note any issues with the statement?

2.3 Literature Review

# Search academic databases
# - Google Scholar: "Erdős problem {number}"
# - arXiv: key mathematical terms
# - OEIS: related sequences
# - MathOverflow/StackExchange

Warning: ~40% of "novel" AI solutions were already in literature (Gemini study).

Phase 3: Technique Selection

Based on problem domain, consult:

Quick Technique Selector

Problem PatternTry First
"Is there infinitely many..."Construction, Pell equations
"Does there exist..."Probabilistic method
"For all n, is it true..."Induction, counterexample search
"What is the maximum..."Extremal arguments
"Can we color..."Ramsey theory
"How many distinct..."Incidence geometry

Phase 4: Solution Attempt

4.1 Start Simple

  1. Check small cases (n = 1, 2, 3, ...)
  2. Look for counterexamples if conjecture seems false
  3. Try direct approach before clever tricks

4.2 Work Incrementally

Informal sketch → Detailed proof → Formal verification (if Lean available)

4.3 Document Everything

Keep track of:

  • Approaches tried
  • Why they failed
  • Partial progress
  • Related problems that might help

Phase 5: Post-Solution Pipeline

After generating a solution, follow POST_SOLUTION.md:

SOLUTION → Self-Audit → Novelty Check → Formalize → Peer Review → Submit

5.1 Self-Audit

Use VERIFICATION.md checklist. Rate each component A-F.

5.2 Novelty Check (LOCAL DATA FIRST!)

Priority order:

# 1. Check local database
./erdos get {number} --json  # status, references, related_problems

# 2. Check LITERATURE.md AI-solved list
grep -i "{number}" .claude/skills/math-techniques/LITERATURE.md

# 3. Check our prior solutions
ls .claude/examples/solution_attempt_*.md

# 4. ONLY THEN: Web search for recent updates

5.3 Formalization (if Lean available)

# Check if formalization exists
./erdos get {number} --json | jq .lean_url

5.4 Peer Review → Submission

See POST_SOLUTION.md for full pipeline.

Phase 6: Documentation

Cite Everything (Including Ourselves)

### Sources
- [Erdős Problem #N](https://www.erdosproblems.com/N)
- Original: [reference from ./erdos output]
- **This solution**: `.claude/examples/solution_attempt_N.md`

Document Outcomes

OutcomeAction
SolvedSubmit PR to erdosproblems.com
PartialDocument progress, remaining gaps
LiteratureReport reference to update database

Example Workflow

# 1. Get problem
p = db.get_problem("1051")

# 2. Check it's truly open
assert p.status == "open"

# 3. Understand tags
# Tags: ['number theory', 'sequences']

# 4. Check for formalization
if p.lean_url:
    print(f"Lean at: {p.lean_url}")

# 5. Select technique (irrationality → Mahler criterion)
# See NUMBER_THEORY.md

# 6. Attempt solution...

# 7. Verify not in literature
# Search: "irrationality series growth rate Erdős"

Pitfalls to Avoid

  1. Assuming "open" means unsolved - Check literature thoroughly
  2. Misinterpreting the statement - Read original Erdős paper
  3. Ignoring definitional conventions - Check site's notation guide
  4. Citing incorrect theorem versions - Verify statements exactly
  5. Claiming novelty prematurely - AI solutions often rediscover known results