Repository navigation
Share Lean-derived problem metadata across consumers - #5375
williamjblair wants to merge 17 commits into
Conversation
danielchin
left a comment
There was a problem hiding this comment.
This is just a first pass for minor fixes, I still have to look at this more deeply
| @@ -0,0 +1,46 @@ | |||
| /- | |||
| Copyright 2025 The Formal Conjectures Authors. | |||
There was a problem hiding this comment.
| Copyright 2025 The Formal Conjectures Authors. | |
| Copyright 2026 The Formal Conjectures Authors. |
Same with all other new files
There was a problem hiding this comment.
Fixed in 3646b7949. All three new Lean files now use 2026; existing files retain their original copyright year. The changed metadata modules and fixtures pass lake --wfail build.
| def categoryToString : Category → String | ||
| | .textbook => "textbook" | ||
| | .research .open => "research open" | ||
| | .research .solved => "research solved" | ||
| | .test => "test" | ||
| | .API => "API" |
There was a problem hiding this comment.
Don't we have more categories than this?
I think undergrad and high school are a few others. You may want to search for the rest of the list.
There was a problem hiding this comment.
I checked the current Category definition and parser: textbook covers high-school, undergraduate and graduate problems. The other cases are research open, research solved, test and API. This match is exhaustive over that Lean type; no category is omitted.
| Arxiv: { name: 'arXiv', url: 'https://arxiv.org/archive/math' }, | ||
| Paper: { name: 'Papers', url: null }, | ||
| Books: { name: 'Books', url: null }, | ||
| WrittenOnTheWallII: { name: 'Written on the Wall II', url: null }, |
There was a problem hiding this comment.
I believe this is the original website but it's not loading for me right now: https://cms.dt.uh.edu/faculty/delavinae/research/wowII/
There was a problem hiding this comment.
Added this URL to the collection metadata in 3646b7949. The problem modules already cite the same source path. The HTTPS endpoint also timed out in my check, so this records the cited source rather than asserting reachability.
| const CATEGORY_META = { | ||
| 'research open': { label: 'Open', css: 'cat-open' }, | ||
| 'research solved': { label: 'Solved', css: 'cat-solved' }, | ||
| 'textbook': { label: 'Textbook', css: 'cat-textbook' }, | ||
| 'test': { label: 'Test', css: 'cat-test' }, | ||
| 'API': { label: 'API', css: 'cat-api' }, | ||
| }; |
There was a problem hiding this comment.
Similar to my other comment, I believe there's more categories.
There was a problem hiding this comment.
The JavaScript table covers the same five serialized categories as the current Lean type. High-school, undergraduate and graduate problems share textbook; there are no separate current keys for those levels.
| ``` | ||
| data/ | ||
| conjectures.json # JSON produced by lake exe extract_names (created by CI) | ||
| conjectures.json # Complete native catalog with exact provenance |
There was a problem hiding this comment.
nit: fix comment indent to match the rest of the lines
There was a problem hiding this comment.
Fixed the alignment in 3646b7949.
…metadata # Conflicts: # site/build.js
|
@danielchin I merged |
bocowgill
left a comment
There was a problem hiding this comment.
The generated catalog drops unresolved proposition answers despite declaring answer_mode: "postpone". Please fix this before merging; the inline comment documents the mismatch in the current CI artifact.
I independently checked @danielchin's category question and agree with the reply: the five serialized categories exhaust Category, with textbook covering high-school, undergraduate, and graduate problems.
| mkdir -p site/data | ||
| lake exe extract_names --exclude=statement,docstring,moduleDocstrings,fileFirstAdded,fileLastModified \ | ||
| > site/data/conjectures.json | ||
| lake exe extract_names --exclude=fileFirstAdded,fileLastModified \ |
There was a problem hiding this comment.
[P1] Preserve postponed answers until catalog extraction
Please extract the catalog immediately after FormalConjecturesAnswerPostpone, or rebuild that target immediately before this command. The intervening FormalConjectures:literate build recompiles the same problem modules in the default answer mode. In the current run's native-catalog artifact, Erdos196.erdos_196 has answerKinds: [] and a statement starting True ↔, although its source uses answer(sorry) and the manifest declares answer_mode: "postpone". Consumers therefore lose the distinction between an unresolved question and a supplied positive answer. Add an end-to-end assertion that an unresolved proposition answer still yields ["Prop"] after the full documentation/extraction pipeline.
|
+awaiting-author |
Publish full Lean statements in the existing
data/conjectures.json, so the website and tools can read the same data.Measured payloads — upstream baseline 10 September; fork deployment 11 September 2026
conjectures.json, uncompressedFor example, Erdős 92's rendering JSON is 153,826 bytes. Catalog + manifest + that rendering total 3.26 MB, versus the old 8.77 MB combined catalog. This counts those JSON files only, not JavaScript, optional evidence feeds or HTTP overhead.
Sizes are decoded UTF-8 file sizes, not compressed transfer sizes or load-time measurements. The measured snapshots differ by five declarations. The fork is at integration revision
eee8f2ec; its catalog digest is recorded in the published manifest.Before — website display data · View full conjectures.json
{ "conjectures": [ { "theorem": "Erdos196.erdos_196", "module": "FormalConjectures.ErdosProblems.«196»", "categoryLabel": "Open", "categoryCss": "cat-open", "subjects": [ { "code": "5", "name": "Combinatorics" }, { "code": "11", "name": "Number theory" } ] } ] }After — native Lean data, including the statement · View full conjectures.json on the fork
{ "schemaVersion": 2, "problems": [ { "theorem": "Erdos196.erdos_196", "module": "FormalConjectures.ErdosProblems.«196»", "category": "research open", "subjects": ["5", "11"], "statement": "True ↔ ∀ (f : ℕ ≃ ℕ), HasMonotoneAP (⇑f) 4", "docstring": "Must every permutation of $\\mathbb{N}$, contain a monotone 4-term arithmetic progression?" } ] }These are shortened Erdős 196 records from the upstream catalog and fork catalog. Other records and fields are omitted.
The website now derives display labels and loads Verso HTML, hovers, and contributors per module. The full catalog also contains module docstrings and exact source/toolchain provenance; a manifest records its digest. The existing Lake/Verso build and static hosting remain in place.
Compatibility: the filename stays the same;
conjecturesbecomesproblems. Website readers migrate in this PR.extract_namesoptions and field meanings are unchanged. Full JSON schema.Live preview: Fork website · Erdős 92 example. This is the qualified integration deployment (
eee8f2ec), including follow-up toolkit work. It demonstrates the combined site; the later copyright/source-link review edits are covered by PR CI below.Checked: Full PR CI passed at
3646b794, including the maintainer review fixes. Focused checks cover 37 script tests, 8 post-processing tests and 9 Node/browser tests; changed Lean modules pass--wfail. Artifact replay preserves all 1,467 module links and produces byte-identical data after the refactor. The final fork qualification passed deployed statements, hovers, source links, fresh desktop/mobile containment, CLI browsing and website-only snapshot reuse. Upstream deployment awaits acceptance.CLI: #5386 consumes this same catalog for
conjectures findandshow.No prerequisite PR. Unblocks #4828 (including the consolidated proof-link checker) and #5386; the first production deployment must run the full build.
Fixes #5152. Roadmap: #4394.