{"id":50538260,"url":"https://github.com/google-deepmind/formal-imo","last_synced_at":"2026-06-03T18:01:27.477Z","repository":{"id":353359000,"uuid":"1030481262","full_name":"google-deepmind/formal-imo","owner":"google-deepmind","description":"Lean formalizations of IMO problem statements","archived":false,"fork":false,"pushed_at":"2026-04-23T14:15:57.000Z","size":204,"stargazers_count":35,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-29T00:17:08.897Z","etag":null,"topics":["formal-mathematics","international-mathematics-olympiad","lean4"],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google-deepmind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-01T18:01:59.000Z","updated_at":"2026-05-10T20:10:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/google-deepmind/formal-imo","commit_stats":null,"previous_names":["google-deepmind/formal-imo"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/google-deepmind/formal-imo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-deepmind%2Fformal-imo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-deepmind%2Fformal-imo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-deepmind%2Fformal-imo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-deepmind%2Fformal-imo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google-deepmind","download_url":"https://codeload.github.com/google-deepmind/formal-imo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-deepmind%2Fformal-imo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33714094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formal-mathematics","international-mathematics-olympiad","lean4"],"created_at":"2026-06-03T18:01:26.527Z","updated_at":"2026-06-03T18:01:27.472Z","avatar_url":"https://github.com/google-deepmind.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The formal-imo benchmark\n\n[![.github/workflows/ci.yml](https://github.com/google-deepmind/formal-imo/actions/workflows/ci.yml/badge.svg)](https://github.com/google-deepmind/formal-imo/actions/workflows/ci.yml)\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/google-deepmind/formal-imo)\n\nThis repository contains Lean formalizations of the statements of problems from the [International Mathematical Olympiad](https://www.imo-official.org).\n\n## Origins\n\nThis package contains a mixture of formalizations written at Google, formalizations adapted from `miniF2F`, and formalizations adapted from `mathlib4/Archive`.\nFiles containing adaptations of existing published formalizations indicate this in a header comment.\n\nThe questions themselves originate from [the official IMO website](https://www.imo-official.org/problems.aspx),\nthough as these are distributed in only PDF form,\nthe english `/-- -/` docstrings attached to the Lean `theorem`s are often derived from some combination of the following downstream copies of the data:\n\n* [The AoPS Wiki](https://artofproblemsolving.com/wiki/index.php/IMO_Problems_and_Solutions)\n* [The AoPS Contest Collections](https://artofproblemsolving.com/community/c3222_imo)\n* [John Scholes' IMO problem archive](https://prase.cz/kalva/imo.html)\n\nFrequently these contradict each other!\n\n## Naming Conventions\n\nThe content for problem `N` for year `YYYY` should appear in `Imo/YYYY/PN.lean`.\nAt a minimum, this file should contain a `theorem imo_YYYY_pN`.\n\n### Problems with parts\n\nSome questions have multiple parts. In the interest of allowing partial credit on the benchmark, these can be split into separate theorems _in addition_ to the single `imo_YYYY_pN` with the full answer.\nFor instance, a question with parts i) and ii) would have two extra theorems `imo_YYYY_pN.parts.i` and `imo_YYYY_pN.parts.ii`.\n\nFor parts with no clear numbering, use `imo_YYYY_pN.parts.i`, `imo_YYYY_pN.parts.ii` etc.\n\nSometimes questions have implicit parts; for instance, showing `IsGreatest s x` involves showing both that `x ∈ s` and `x ∈ upperBounds s`, and showing `s = t` almost always proceeds by showing `s ⊆ t` and `s ⊇ t`.\nIn these cases, names like `imo_YYYY_pN.parts.superset` can be used.\n\n## Other formalization notes\n\n### Problems with answers\n\nMany IMO problems involve guessing some answer and then proving that it is correct.\nWhen formalising such problems, we include the answer that is to be guessed, annotated\nwith the `answer()` elaborator from the [formal-conjectures repository](https://github.com/google-deepmind/formal-conjectures/blob/main/FormalConjectures/Util/Answer.lean). See for example the file `IMO/2010/P1.lean`.\n\n### Problems involving geometry\n\nFor problems with a geometric component, we have various ways to write \"a 2D euclidean space\":\n\n1. `{V P} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] [Module.Oriented ℝ V (Fin 2)] [Fact (Module.finrank ℝ V = 2)]` (as demonstrated by [`EuclideanGeometry.oangle_add_oangle_add_oangle_eq_pi`](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Geometry/Euclidean/Triangle.html#EuclideanGeometry.oangle_add_oangle_add_oangle_eq_pi))\n2. `ℝ²` aka `EuclideanSpace ℝ (Fin 2)` (notation provided in the [formal-conjectures](https://github.com/google-deepmind/formal-conjectures/blob/main/FormalConjecturesForMathlib/Geometry/2d.lean) repository)\n3. `ℂ`.\n\n1 has the advantage that it doesn't impose a coordinate-based view; and generalizes to situations where the 2D space resides within a larger ambient nD space. It seems to be the preferred approach by some existing mathlib users.\n\nFor now we use a mixture of these styles.\n\n### Finite objects\n\nFor questions such as \"there are 12 users, each with a score, ...\", we have two reasonable approaches to formalize:\n\n1. `{User: Type*} [Fintype User] [DecidableEq User] (hU : Fintype.card User = 12) (score : User → ℕ)` (using some unspecified representation of a user)\n2. `(score : Fin 12 → ℕ)` (representing each user with a number `[0, 12)`)\n\nThese are of course equivalent.\nThe latter has the obvious advantage of being shorter, but the former makes the statement resemble the prose a little better.\n\nFor now we use a mixture of these styles too.\n\n### Local definitions\n\nFor questions such as \"we say a number is `Surprising` if `_`\", we have two reasonable approaches\n\n1.  ```lean\n    def Surprising (n : ℕ) : Prop := _\n\n    lemma the_theorem : Surprising 37 := sorry\n    ```\n2.  ```lean\n    lemma the_theorem (Surprising : ℕ → Prop) (surprising_iff : ∀ n, Surprising n ↔ _) : Surprising 37 := sorry\n    ```\n\nFor now we prefer style 2, as this is most similar to the approach used in miniF2F.\n\n### Imports\n\nPlease don't add local imports, if you need anything add it to `Imo.ProblemImports`.\n\n## Licensing\n\nCopyright 2025 Google LLC.\n\nAll software is licensed under the Apache License,\nVersion 2.0 (Apache 2.0); you may not use this file except in compliance with\nthe Apache 2.0 license. You may obtain a copy of the Apache 2.0 license at:\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nAll other materials are licensed under the Creative Commons Attribution 4.0\nInternational License (CC-BY). You may obtain a copy of the CC-BY license at:\nhttps://creativecommons.org/licenses/by/4.0/legalcode.\n\nUnless required by applicable law or agreed to in writing, all software and\nmaterials distributed here under the Apache 2.0 or CC-BY license are distributed\non an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\nexpress or implied. See the licenses for the specific language governing\npermissions and limitations under those licenses.\n\nThis is not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-deepmind%2Fformal-imo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle-deepmind%2Fformal-imo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-deepmind%2Fformal-imo/lists"}