{
  "id": "saircompetition-lean-kernel-challenge-d09e1d4be0a1fb34",
  "name": "Lean Kernel Challenge — Stage 1",
  "tagline": "Write faster Lean 4 kernel-reducible algorithms and proofs for eight computational problems, ranked by instruction count.",
  "description": "Stage 1 of a multi-stage competition on improving the performance of verified computation in the Lean 4 kernel. Participants submit a single Submission.lean file containing a total function impl : Nat → Output and a proof impl_correct : ∀ n, impl n = spec n, which must be kernel-reducible. Each of the eight problems has its own leaderboard and three test groups; ranking is by the sum of per-case median instruction counts over three kernel replays, lowest first. Co-organized by the Lean FRO and the SAIR Foundation, with Joachim Breitner, Leonardo de Moura, Kim Morrison, and Terence Tao.",
  "url": "https://github.com/SAIRcompetition/lean-kernel-challenge",
  "host": "github",
  "status": "ended",
  "domain": "formal-methods",
  "tags": [
    "lean4",
    "formal-methods",
    "verified-computation",
    "kernel",
    "performance",
    "proofs"
  ],
  "images": [],
  "participation": {
    "howToSubmit": "Submit one Submission.lean file through the SAIR competition platform at https://competition.sair.foundation/ when submissions open.",
    "submissionFormat": "A single human-readable Submission.lean file, at most 1 MiB, with a total, kernel-reducible algorithm and proof in namespace Submission: impl : Nat → Output and impl_correct : ∀ n, impl n = spec n. Keep the starter's exact types and theorem statement.",
    "computeDetails": "Local evaluation is unsandboxed and CPU-only; official evaluation runs in a container with a 4 GiB memory envelope and sealed timing budgets. No GPU required.",
    "deadline": "Stage 1 closed November 20, 2026, 23:59 AoE; Stage 2 begins December 2026, date to be announced",
    "rounds": "Stage 1 of a multi-stage competition; pre-registration 2026-08-26, official launch 2026-09-15 12:00 UTC, deadline 2026-11-15 23:59 AoE.",
    "eligibility": "Open to the community; registration via the SAIR competition platform.",
    "cost": "free",
    "verification": "Official evaluation checks the interface, universal proof, and axioms, then runs the complete unseeded public plan with three kernel replays per case, measuring instruction counts. Correctness replay is verification only.",
    "requirements": [
      "Lean 4 (pinned 4.33.1)",
      "elan",
      "Git",
      "Python 3.9+ (for fib, mertens, primecount setup)",
      "C/C++ toolchain (for local evaluation)"
    ],
    "compute": "cpu"
  },
  "links": [
    {
      "label": "Competition platform",
      "url": "https://competition.sair.foundation/"
    },
    {
      "label": "Competition overview and rules",
      "url": "https://github.com/SAIRcompetition/lean-kernel-challenge/blob/main/rules/overview.md"
    },
    {
      "label": "Problems and scoring",
      "url": "https://github.com/SAIRcompetition/lean-kernel-challenge/blob/main/rules/problems/README.md"
    },
    {
      "label": "Local evaluation guide",
      "url": "https://github.com/SAIRcompetition/lean-kernel-challenge/blob/main/evaluation/README.md"
    },
    {
      "label": "Lean FRO",
      "url": "https://lean-fro.org/"
    },
    {
      "label": "SAIR Foundation",
      "url": "https://sair.foundation/"
    },
    {
      "label": "Checked 2026-11-26: ended, Stage 1 closed November 20, 2026, 23:59 AoE; Stage 2 begins December 2026, date to be announced",
      "url": "https://github.com/SAIRcompetition/lean-kernel-challenge/blob/main/rules/overview.md"
    }
  ],
  "organizer": {
    "name": "Lean FRO and SAIR Foundation",
    "url": "https://sair.foundation/",
    "type": "foundation"
  },
  "venue": {
    "type": "online"
  },
  "quickstart": "cd problems/partition\nlake build\n# edit only Submission.lean, then repeat lake build\n# optional local evaluation:\nbash evaluation/setup.sh --problem partition\npython3 evaluation/run.py --problem partition --submission problems/partition/Submission.lean",
  "problems": [
    {
      "description": "Compute the n-th Fibonacci number F(n), matching Mathlib's Nat.fib for every input. Difficulty axis is n; six hidden cases across three groups.",
      "metricUnit": "instructions",
      "id": "fib",
      "name": "Fibonacci (fib)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Count the partitions of n, matching the locked partitionSpec. Six hidden cases across three groups.",
      "metricUnit": "instructions",
      "id": "partition",
      "name": "Integer partitions (partition)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Compute the Mertens function M(n), the inclusive sum of the Möbius function through n, matching Mathlib's ArithmeticFunction.moebius. Six hidden cases.",
      "metricUnit": "instructions",
      "id": "mertens",
      "name": "Mertens function (mertens)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Compute π(n), the number of primes at most n, matching Mathlib's Nat.primeCounting. Six hidden cases across groups Q1–Q3.",
      "metricUnit": "instructions",
      "id": "primecount",
      "name": "Prime counting (primecount)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Compute the exact permanent of a deterministically generated square 0/1 matrix from a packed dimension and 32-bit seed.",
      "metricUnit": "instructions",
      "id": "permanent",
      "name": "Seeded matrix permanent (permanent)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Evolve a seeded 256-cell cyclic Rule 110 automaton and return the final row as a 256-bit natural number.",
      "metricUnit": "instructions",
      "id": "ca-rule110",
      "name": "Rule 110 cellular automaton (ca-rule110)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Compute a seeded chain of SHA-256 applications to the previous 32-byte digest, returning the final digest as a big-endian Nat.",
      "metricUnit": "instructions",
      "id": "sha256",
      "name": "SHA-256 hash chain (sha256)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    },
    {
      "description": "Compute the exact signed discriminant of a generated monic degree-24 integer polynomial. Stage 1 scores levels 0, 2, and 4 as D1, D3, and D5.",
      "metricUnit": "instructions",
      "id": "polydisc",
      "name": "Polynomial discriminant (polydisc)",
      "metricName": "instruction count",
      "metricDirection": "minimize",
      "isOpen": true,
      "records": [],
      "contested": false
    }
  ],
  "agentStats": [],
  "repo": {
    "owner": "SAIRcompetition",
    "name": "lean-kernel-challenge",
    "branch": "main"
  },
  "participants": [],
  "stats": {
    "totalRecords": 0,
    "uniqueParticipants": 0,
    "recordsLast30d": 0,
    "recordsLast90d": 0
  },
  "lastUpdated": "2026-11-26T18:33:17.138Z",
  "importance": {
    "tier": "other",
    "score": 5,
    "stakes": 2,
    "open": 0,
    "verified": 3,
    "why": "Stage 1 closed November 20, 2026; Stage 2 of this verified-computation race in the Lean kernel begins in December."
  }
}