machinechecked 0.1.11__tar.gz → 0.1.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. machinechecked-0.1.12/PKG-INFO +111 -0
  2. machinechecked-0.1.12/README.md +87 -0
  3. machinechecked-0.1.12/engine/python/machinechecked.egg-info/PKG-INFO +111 -0
  4. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/SOURCES.txt +7 -2
  5. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/assess.py +55 -33
  6. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/audit.py +1 -1
  7. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/cli.py +7 -9
  8. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/data/ProofLensProbe.lean +7 -5
  9. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/data/schema/inventory.schema.json +9 -0
  10. machinechecked-0.1.12/engine/python/prooflens/data/schema/manifest-claim.schema.json +319 -0
  11. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/data/schema/manifest-index.schema.json +47 -2
  12. machinechecked-0.1.12/engine/python/prooflens/data/statuses.json +439 -0
  13. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/export.py +4 -8
  14. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/manifest.py +38 -62
  15. machinechecked-0.1.12/engine/python/prooflens/paper.py +202 -0
  16. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/pdfclaims.py +87 -24
  17. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/pipeline.py +3 -17
  18. machinechecked-0.1.12/engine/python/prooflens/published.py +162 -0
  19. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/simple.py +28 -24
  20. machinechecked-0.1.12/engine/python/prooflens/source_regions.py +260 -0
  21. machinechecked-0.1.12/engine/python/prooflens/status.py +33 -0
  22. machinechecked-0.1.12/engine/python/prooflens/web/assets/cursor-editorTextHighlight-kG3uUOwL.svg +8 -0
  23. machinechecked-0.1.12/engine/python/prooflens/web/assets/index-C8DRs1uO.css +1 -0
  24. machinechecked-0.1.12/engine/python/prooflens/web/assets/index-DXica3gb.js +278 -0
  25. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/index.html +2 -2
  26. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/theme.css +10 -4
  27. {machinechecked-0.1.11 → machinechecked-0.1.12}/pyproject.toml +1 -1
  28. machinechecked-0.1.11/PKG-INFO +0 -110
  29. machinechecked-0.1.11/README.md +0 -86
  30. machinechecked-0.1.11/engine/python/machinechecked.egg-info/PKG-INFO +0 -110
  31. machinechecked-0.1.11/engine/python/prooflens/data/schema/manifest-claim.schema.json +0 -126
  32. machinechecked-0.1.11/engine/python/prooflens/paper.py +0 -149
  33. machinechecked-0.1.11/engine/python/prooflens/web/assets/index-B7NQsymB.css +0 -1
  34. machinechecked-0.1.11/engine/python/prooflens/web/assets/index-BtJVnEBn.js +0 -286
  35. {machinechecked-0.1.11 → machinechecked-0.1.12}/LICENSE +0 -0
  36. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/dependency_links.txt +0 -0
  37. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/entry_points.txt +0 -0
  38. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/requires.txt +0 -0
  39. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/top_level.txt +0 -0
  40. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/__init__.py +0 -0
  41. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/__main__.py +0 -0
  42. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/bundle.py +0 -0
  43. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/cache.py +0 -0
  44. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/config.py +0 -0
  45. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/data/prooflens.sty +0 -0
  46. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/data/schema/evidence.schema.json +0 -0
  47. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/deps.py +0 -0
  48. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/evidence.py +0 -0
  49. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/formalization.py +0 -0
  50. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/probe.py +0 -0
  51. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/promote.py +0 -0
  52. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/replay.py +0 -0
  53. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/review_cli.py +0 -0
  54. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/review_queue.py +0 -0
  55. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/reviews.py +0 -0
  56. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/schemas.py +0 -0
  57. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/server.py +0 -0
  58. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/sources.py +0 -0
  59. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/symbols.py +0 -0
  60. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/tex.py +0 -0
  61. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/util.py +0 -0
  62. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  63. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  64. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  65. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  66. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  67. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  68. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  69. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  70. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  71. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  72. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  73. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  74. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  75. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  76. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  77. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  78. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  79. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  80. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  81. {machinechecked-0.1.11 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/pdf.worker.min-yatZIOMy.mjs +0 -0
  82. {machinechecked-0.1.11 → machinechecked-0.1.12}/setup.cfg +0 -0
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: machinechecked
3
+ Version: 0.1.12
4
+ Summary: Read a mathematical paper beside its Lean formalisation, and see claim by claim what Lean establishes.
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://machinechecked.org
7
+ Project-URL: Documentation, https://github.com/cgarryZA/MachineChecked/blob/main/docs/GETTING_STARTED.md
8
+ Project-URL: Source, https://github.com/cgarryZA/MachineChecked
9
+ Project-URL: Issues, https://github.com/cgarryZA/MachineChecked/issues
10
+ Keywords: lean,lean4,formal verification,formalization,mathematics,proof,theorem prover,mathlib,audit,latex
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: jsonschema>=4
20
+ Requires-Dist: pyyaml>=6
21
+ Provides-Extra: test
22
+ Requires-Dist: pytest>=7; extra == "test"
23
+ Dynamic: license-file
24
+
25
+ # MachineChecked
26
+
27
+ **Read a mathematical paper beside its Lean formalisation.**
28
+
29
+ Select a statement to inspect its Lean counterpart, proof results and correspondence reviews.
30
+ MachineChecked runs locally in your Lean project and saves the links you choose.
31
+
32
+ [Try the demo](https://machinechecked.org/demo/) · [Browse papers](https://machinechecked.org/papers/) · [Setup guide](docs/GETTING_STARTED.md)
33
+
34
+ ## Open your paper
35
+
36
+ From your Lean project's directory:
37
+
38
+ ```sh
39
+ lake build
40
+ uvx machinechecked view
41
+ ```
42
+
43
+ MachineChecked finds the paper and opens the reader. You can also name a LaTeX file, PDF or URL:
44
+
45
+ ```sh
46
+ uvx machinechecked view paper/main.tex
47
+ ```
48
+
49
+ Requires Python 3.11+, your project's Lean toolchain, and TeX Live for LaTeX or Poppler for PDFs.
50
+ The web reader is included. For a persistent command, run `uv tool install machinechecked`;
51
+ then use `machinechecked` directly.
52
+
53
+ Select a claim from the contents or paper margin. **Expand comparison** shows the paper,
54
+ complete readable statement and exact Lean together. Follow existing `\lean{...}` tags, confirm a
55
+ suggestion, or choose a declaration. The reader saves your choices in `machinechecked.links.json`.
56
+ Projects with a `formalization.yaml` supply their paper sources and declared links automatically.
57
+
58
+ ## Read the evidence
59
+
60
+ A Lean proof establishes a formal proposition. A correspondence review compares that proposition
61
+ and its definitions with the paper. Source checks identify the audited text; independent kernel
62
+ replay checks the proof again. The reader shows each result and its provenance in **Audit details**.
63
+
64
+ The optional **Review** view guides you through three steps:
65
+
66
+ 1. Read the paper and record your interpretation.
67
+ 2. Compare the Lean statement's assumptions and conclusion; record a verdict.
68
+ 3. Read the author's review, save your report in the browser, and export it.
69
+
70
+ The maintainer evaluates reports and promotes reviews into the project's acceptance records.
71
+ [Review guide →](docs/REVIEWING.md)
72
+
73
+ ## Share the reader
74
+
75
+ ```sh
76
+ uvx machinechecked build # .machinechecked/MachineChecked.html
77
+ uvx machinechecked build --site public/ # a static site with audit.json
78
+ uvx machinechecked check # check linked declarations for automation
79
+ ```
80
+
81
+ The HTML file opens directly in a browser. It includes the paper, Lean statements and audit data;
82
+ review those contents before publishing. Host the site directory on GitHub Pages or another static
83
+ host. Published audits carry their author's name, project commit and paper revision.
84
+
85
+ **Copy link** shares a claim. **Report issue** opens a draft in the audit's GitHub repository,
86
+ with the claim identifier, declarations and commits filled in. Set that repository with
87
+ `--issues owner/repo`.
88
+
89
+ ## With a coding agent
90
+
91
+ `machinechecked check --json` prints structured results for scripts and agents. The
92
+ [MachineChecked skill](skills/machinechecked/SKILL.md) covers commands, status codes and evidence.
93
+ [Agent guide →](docs/AGENTS.md)
94
+
95
+ ## Full assessment
96
+
97
+ Projects with locked specifications, a claim inventory and review records can configure
98
+ `machinechecked.toml`. Full assessment adds exact-type checks, definition-dependent reviews,
99
+ witnesses, refutations and independent kernel replay.
100
+ [Configuration guide →](docs/ASSURANCE.md)
101
+
102
+ ## Documentation
103
+
104
+ - [Get started](docs/GETTING_STARTED.md) — install, open, link, share and troubleshoot
105
+ - [Reviewing](docs/REVIEWING.md) — record mathematical judgements
106
+ - [Full assessment](docs/ASSURANCE.md) — configuration and acceptance
107
+ - [Evidence policy](docs/EVIDENCE_POLICY.md) — what each check establishes
108
+ - [Data model](docs/DATA_MODEL.md) · [Publication policy](docs/PUBLICATION_POLICY.md) · [Threat model](docs/THREAT_MODEL.md)
109
+ - [Development](docs/DEVELOPMENT.md) · [Plan](PLAN.md)
110
+
111
+ Apache-2.0 licensed.
@@ -0,0 +1,87 @@
1
+ # MachineChecked
2
+
3
+ **Read a mathematical paper beside its Lean formalisation.**
4
+
5
+ Select a statement to inspect its Lean counterpart, proof results and correspondence reviews.
6
+ MachineChecked runs locally in your Lean project and saves the links you choose.
7
+
8
+ [Try the demo](https://machinechecked.org/demo/) · [Browse papers](https://machinechecked.org/papers/) · [Setup guide](docs/GETTING_STARTED.md)
9
+
10
+ ## Open your paper
11
+
12
+ From your Lean project's directory:
13
+
14
+ ```sh
15
+ lake build
16
+ uvx machinechecked view
17
+ ```
18
+
19
+ MachineChecked finds the paper and opens the reader. You can also name a LaTeX file, PDF or URL:
20
+
21
+ ```sh
22
+ uvx machinechecked view paper/main.tex
23
+ ```
24
+
25
+ Requires Python 3.11+, your project's Lean toolchain, and TeX Live for LaTeX or Poppler for PDFs.
26
+ The web reader is included. For a persistent command, run `uv tool install machinechecked`;
27
+ then use `machinechecked` directly.
28
+
29
+ Select a claim from the contents or paper margin. **Expand comparison** shows the paper,
30
+ complete readable statement and exact Lean together. Follow existing `\lean{...}` tags, confirm a
31
+ suggestion, or choose a declaration. The reader saves your choices in `machinechecked.links.json`.
32
+ Projects with a `formalization.yaml` supply their paper sources and declared links automatically.
33
+
34
+ ## Read the evidence
35
+
36
+ A Lean proof establishes a formal proposition. A correspondence review compares that proposition
37
+ and its definitions with the paper. Source checks identify the audited text; independent kernel
38
+ replay checks the proof again. The reader shows each result and its provenance in **Audit details**.
39
+
40
+ The optional **Review** view guides you through three steps:
41
+
42
+ 1. Read the paper and record your interpretation.
43
+ 2. Compare the Lean statement's assumptions and conclusion; record a verdict.
44
+ 3. Read the author's review, save your report in the browser, and export it.
45
+
46
+ The maintainer evaluates reports and promotes reviews into the project's acceptance records.
47
+ [Review guide →](docs/REVIEWING.md)
48
+
49
+ ## Share the reader
50
+
51
+ ```sh
52
+ uvx machinechecked build # .machinechecked/MachineChecked.html
53
+ uvx machinechecked build --site public/ # a static site with audit.json
54
+ uvx machinechecked check # check linked declarations for automation
55
+ ```
56
+
57
+ The HTML file opens directly in a browser. It includes the paper, Lean statements and audit data;
58
+ review those contents before publishing. Host the site directory on GitHub Pages or another static
59
+ host. Published audits carry their author's name, project commit and paper revision.
60
+
61
+ **Copy link** shares a claim. **Report issue** opens a draft in the audit's GitHub repository,
62
+ with the claim identifier, declarations and commits filled in. Set that repository with
63
+ `--issues owner/repo`.
64
+
65
+ ## With a coding agent
66
+
67
+ `machinechecked check --json` prints structured results for scripts and agents. The
68
+ [MachineChecked skill](skills/machinechecked/SKILL.md) covers commands, status codes and evidence.
69
+ [Agent guide →](docs/AGENTS.md)
70
+
71
+ ## Full assessment
72
+
73
+ Projects with locked specifications, a claim inventory and review records can configure
74
+ `machinechecked.toml`. Full assessment adds exact-type checks, definition-dependent reviews,
75
+ witnesses, refutations and independent kernel replay.
76
+ [Configuration guide →](docs/ASSURANCE.md)
77
+
78
+ ## Documentation
79
+
80
+ - [Get started](docs/GETTING_STARTED.md) — install, open, link, share and troubleshoot
81
+ - [Reviewing](docs/REVIEWING.md) — record mathematical judgements
82
+ - [Full assessment](docs/ASSURANCE.md) — configuration and acceptance
83
+ - [Evidence policy](docs/EVIDENCE_POLICY.md) — what each check establishes
84
+ - [Data model](docs/DATA_MODEL.md) · [Publication policy](docs/PUBLICATION_POLICY.md) · [Threat model](docs/THREAT_MODEL.md)
85
+ - [Development](docs/DEVELOPMENT.md) · [Plan](PLAN.md)
86
+
87
+ Apache-2.0 licensed.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: machinechecked
3
+ Version: 0.1.12
4
+ Summary: Read a mathematical paper beside its Lean formalisation, and see claim by claim what Lean establishes.
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://machinechecked.org
7
+ Project-URL: Documentation, https://github.com/cgarryZA/MachineChecked/blob/main/docs/GETTING_STARTED.md
8
+ Project-URL: Source, https://github.com/cgarryZA/MachineChecked
9
+ Project-URL: Issues, https://github.com/cgarryZA/MachineChecked/issues
10
+ Keywords: lean,lean4,formal verification,formalization,mathematics,proof,theorem prover,mathlib,audit,latex
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: jsonschema>=4
20
+ Requires-Dist: pyyaml>=6
21
+ Provides-Extra: test
22
+ Requires-Dist: pytest>=7; extra == "test"
23
+ Dynamic: license-file
24
+
25
+ # MachineChecked
26
+
27
+ **Read a mathematical paper beside its Lean formalisation.**
28
+
29
+ Select a statement to inspect its Lean counterpart, proof results and correspondence reviews.
30
+ MachineChecked runs locally in your Lean project and saves the links you choose.
31
+
32
+ [Try the demo](https://machinechecked.org/demo/) · [Browse papers](https://machinechecked.org/papers/) · [Setup guide](docs/GETTING_STARTED.md)
33
+
34
+ ## Open your paper
35
+
36
+ From your Lean project's directory:
37
+
38
+ ```sh
39
+ lake build
40
+ uvx machinechecked view
41
+ ```
42
+
43
+ MachineChecked finds the paper and opens the reader. You can also name a LaTeX file, PDF or URL:
44
+
45
+ ```sh
46
+ uvx machinechecked view paper/main.tex
47
+ ```
48
+
49
+ Requires Python 3.11+, your project's Lean toolchain, and TeX Live for LaTeX or Poppler for PDFs.
50
+ The web reader is included. For a persistent command, run `uv tool install machinechecked`;
51
+ then use `machinechecked` directly.
52
+
53
+ Select a claim from the contents or paper margin. **Expand comparison** shows the paper,
54
+ complete readable statement and exact Lean together. Follow existing `\lean{...}` tags, confirm a
55
+ suggestion, or choose a declaration. The reader saves your choices in `machinechecked.links.json`.
56
+ Projects with a `formalization.yaml` supply their paper sources and declared links automatically.
57
+
58
+ ## Read the evidence
59
+
60
+ A Lean proof establishes a formal proposition. A correspondence review compares that proposition
61
+ and its definitions with the paper. Source checks identify the audited text; independent kernel
62
+ replay checks the proof again. The reader shows each result and its provenance in **Audit details**.
63
+
64
+ The optional **Review** view guides you through three steps:
65
+
66
+ 1. Read the paper and record your interpretation.
67
+ 2. Compare the Lean statement's assumptions and conclusion; record a verdict.
68
+ 3. Read the author's review, save your report in the browser, and export it.
69
+
70
+ The maintainer evaluates reports and promotes reviews into the project's acceptance records.
71
+ [Review guide →](docs/REVIEWING.md)
72
+
73
+ ## Share the reader
74
+
75
+ ```sh
76
+ uvx machinechecked build # .machinechecked/MachineChecked.html
77
+ uvx machinechecked build --site public/ # a static site with audit.json
78
+ uvx machinechecked check # check linked declarations for automation
79
+ ```
80
+
81
+ The HTML file opens directly in a browser. It includes the paper, Lean statements and audit data;
82
+ review those contents before publishing. Host the site directory on GitHub Pages or another static
83
+ host. Published audits carry their author's name, project commit and paper revision.
84
+
85
+ **Copy link** shares a claim. **Report issue** opens a draft in the audit's GitHub repository,
86
+ with the claim identifier, declarations and commits filled in. Set that repository with
87
+ `--issues owner/repo`.
88
+
89
+ ## With a coding agent
90
+
91
+ `machinechecked check --json` prints structured results for scripts and agents. The
92
+ [MachineChecked skill](skills/machinechecked/SKILL.md) covers commands, status codes and evidence.
93
+ [Agent guide →](docs/AGENTS.md)
94
+
95
+ ## Full assessment
96
+
97
+ Projects with locked specifications, a claim inventory and review records can configure
98
+ `machinechecked.toml`. Full assessment adds exact-type checks, definition-dependent reviews,
99
+ witnesses, refutations and independent kernel replay.
100
+ [Configuration guide →](docs/ASSURANCE.md)
101
+
102
+ ## Documentation
103
+
104
+ - [Get started](docs/GETTING_STARTED.md) — install, open, link, share and troubleshoot
105
+ - [Reviewing](docs/REVIEWING.md) — record mathematical judgements
106
+ - [Full assessment](docs/ASSURANCE.md) — configuration and acceptance
107
+ - [Evidence policy](docs/EVIDENCE_POLICY.md) — what each check establishes
108
+ - [Data model](docs/DATA_MODEL.md) · [Publication policy](docs/PUBLICATION_POLICY.md) · [Threat model](docs/THREAT_MODEL.md)
109
+ - [Development](docs/DEVELOPMENT.md) · [Plan](PLAN.md)
110
+
111
+ Apache-2.0 licensed.
@@ -25,6 +25,7 @@ engine/python/prooflens/pdfclaims.py
25
25
  engine/python/prooflens/pipeline.py
26
26
  engine/python/prooflens/probe.py
27
27
  engine/python/prooflens/promote.py
28
+ engine/python/prooflens/published.py
28
29
  engine/python/prooflens/replay.py
29
30
  engine/python/prooflens/review_cli.py
30
31
  engine/python/prooflens/review_queue.py
@@ -32,12 +33,15 @@ engine/python/prooflens/reviews.py
32
33
  engine/python/prooflens/schemas.py
33
34
  engine/python/prooflens/server.py
34
35
  engine/python/prooflens/simple.py
36
+ engine/python/prooflens/source_regions.py
35
37
  engine/python/prooflens/sources.py
38
+ engine/python/prooflens/status.py
36
39
  engine/python/prooflens/symbols.py
37
40
  engine/python/prooflens/tex.py
38
41
  engine/python/prooflens/util.py
39
42
  engine/python/prooflens/data/ProofLensProbe.lean
40
43
  engine/python/prooflens/data/prooflens.sty
44
+ engine/python/prooflens/data/statuses.json
41
45
  engine/python/prooflens/data/schema/evidence.schema.json
42
46
  engine/python/prooflens/data/schema/inventory.schema.json
43
47
  engine/python/prooflens/data/schema/manifest-claim.schema.json
@@ -63,6 +67,7 @@ engine/python/prooflens/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2
63
67
  engine/python/prooflens/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2
64
68
  engine/python/prooflens/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2
65
69
  engine/python/prooflens/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2
66
- engine/python/prooflens/web/assets/index-B7NQsymB.css
67
- engine/python/prooflens/web/assets/index-BtJVnEBn.js
70
+ engine/python/prooflens/web/assets/cursor-editorTextHighlight-kG3uUOwL.svg
71
+ engine/python/prooflens/web/assets/index-C8DRs1uO.css
72
+ engine/python/prooflens/web/assets/index-DXica3gb.js
68
73
  engine/python/prooflens/web/assets/pdf.worker.min-yatZIOMy.mjs
@@ -22,7 +22,10 @@ valid, and a Comparator replay of every proof).
22
22
 
23
23
  from __future__ import annotations
24
24
 
25
+ from .status import fields
26
+
25
27
  from .reviews import Review, history
28
+ from .source_regions import SCHEME as SOURCE_SCHEME, matches as source_matches
26
29
 
27
30
  OUT_OF_SCOPE = {"expository", "literature", "empirical", "proof-step", "part-of", "duplicate"}
28
31
 
@@ -303,44 +306,48 @@ class Assessor:
303
306
  # -- claims ---------------------------------------------------------------------------
304
307
 
305
308
  @staticmethod
306
- def claim_status(claim: dict, clauses: list[dict]) -> str:
309
+ def claim_code(claim: dict, clauses: list[dict]) -> str:
307
310
  """The status of a claim from its clauses: a refuted original clause never hides another
308
311
  original clause."""
309
312
  scope = claim["scope"]
310
313
  if scope in OUT_OF_SCOPE:
311
- return "out of scope: " + scope
314
+ return "scope." + scope
312
315
  if any(c["state"] == "unchecked" for c in clauses):
313
- return ("definition" if scope == "definition" else "formal") + ": unchecked"
316
+ return ("definition" if scope == "definition" else "formal") + ".unchecked"
314
317
  if scope == "definition":
315
318
  if not clauses:
316
- return "definition: not yet stated"
319
+ return "definition.unstated"
317
320
  if not all(c["review"] in ("reviewed", "author-reviewed") for c in clauses):
318
- return "definition: review pending"
319
- return ("definition: author-reviewed"
321
+ return "definition.review-pending"
322
+ return ("definition.author-reviewed"
320
323
  if any(c["review"] == "author-reviewed" for c in clauses)
321
- else "definition: reviewed")
324
+ else "definition.reviewed")
322
325
  if not clauses:
323
- return "formal: unspecified"
326
+ return "formal.unspecified"
324
327
  originals = [c for c in clauses if not c.get("corrects")]
325
328
  if not originals:
326
- return "formal: malformed"
329
+ return "formal.malformed"
327
330
  refuted = [c for c in originals if c.get("refute_ok")]
328
331
  rest = [c for c in originals if not c.get("refute_ok")]
329
332
  rest_proved = all(c.get("accept_ok") for c in rest)
330
333
  if refuted:
331
334
  fixed = all(any(k.get("accept_ok") for k in clauses if k.get("corrects") == c["name"])
332
335
  for c in refuted)
333
- return ("refuted as printed" + ("; corrected statement proved" if fixed else "")
334
- + ("" if rest_proved else "; other clauses open"))
336
+ return ("formal.refuted" + (".corrected" if fixed else "")
337
+ + ("" if rest_proved else ".open"))
335
338
  if rest_proved:
336
339
  if not all(c["review"] in ("reviewed", "author-reviewed") for c in rest):
337
- return "formal: proved, review pending"
338
- return ("formal: proved, author-reviewed"
340
+ return "formal.review-pending"
341
+ return ("formal.author-reviewed"
339
342
  if any(c["review"] == "author-reviewed" for c in rest)
340
- else "formal: accepted")
341
- return "formal: open"
343
+ else "formal.accepted")
344
+ return "formal.open"
345
+
346
+ @staticmethod
347
+ def claim_status(claim: dict, clauses: list[dict]) -> str:
348
+ return fields(Assessor.claim_code(claim, clauses))["status"]
342
349
 
343
- def blockers(self, claim: dict, status: str, clauses: list[dict]) -> list[str]:
350
+ def blockers(self, claim: dict, clauses: list[dict]) -> list[str]:
344
351
  """Why the claim is not accepted, in plain words, most basic first: one line per reason,
345
352
  saying which clauses it affects. Empty for an accepted claim whose proofs were replayed,
346
353
  and for a claim out of scope."""
@@ -388,7 +395,7 @@ class Assessor:
388
395
  add("a regime the paper intends is not shown to be covered", c)
389
396
  rp = c["checks"].get("replay")
390
397
  if rp and rp["state"] != "pass" and st in ("proved", "refuted"):
391
- add("no independent kernel replay: " + rp["detail"], c)
398
+ add("Independent replay: not recorded (" + rp["detail"] + ")", c)
392
399
  for reason, names in reasons.items():
393
400
  if n == 1:
394
401
  out.append(reason)
@@ -407,7 +414,7 @@ class Assessor:
407
414
  if counts.get(state):
408
415
  out.append(f"{counts[state]} definition{'s' if counts[state] > 1 else ''} its "
409
416
  f"meaning depends on {words}")
410
- if status.startswith("definition") and status != "definition: reviewed" and not out:
417
+ if claim["scope"] == "definition" and self.claim_code(claim, clauses) != "definition.reviewed" and not out:
411
418
  out.append("its definitions are not independently reviewed")
412
419
  return list(dict.fromkeys(out))
413
420
 
@@ -415,9 +422,9 @@ class Assessor:
415
422
  claims = []
416
423
  for c in self.inv["claims"]:
417
424
  clauses = [self.clause(c, cl, k) for k, cl in enumerate(c.get("clauses", []))]
418
- status = self.claim_status(c, clauses)
419
- claims.append({"id": c["id"], "status": status, "clauses": clauses,
420
- "blockers": self.blockers(c, status, clauses)})
425
+ state = fields(self.claim_code(c, clauses))
426
+ claims.append({"id": c["id"], **state, "clauses": clauses,
427
+ "blockers": self.blockers(c, clauses)})
421
428
  self.inventory_checks()
422
429
  if self.lean:
423
430
  for v in self.lean.get("layering", []):
@@ -459,10 +466,10 @@ class Assessor:
459
466
  if e["scope"] in OUT_OF_SCOPE:
460
467
  continue
461
468
  if e["scope"] == "definition":
462
- if r["status"] != "definition: reviewed":
469
+ if r["status_code"] != "definition.reviewed":
463
470
  reasons.append(f"{r['id']}: {r['status']}")
464
471
  continue
465
- if r["status"] != "formal: accepted":
472
+ if r["status_code"] != "formal.accepted":
466
473
  reasons.append(f"{r['id']}: {r['status']}")
467
474
  for c in r["clauses"]:
468
475
  if c.get("refute_ok"):
@@ -476,8 +483,8 @@ class Assessor:
476
483
  reasons.append("comparator: no successful kernel replay covering every proof "
477
484
  "of the paper")
478
485
  out[pid] = {"source": source,
479
- **({"source_note": "the source is a PDF: its hash is pinned and checked, "
480
- "and claim positions are approximate"} if source == "pdf" else {}),
486
+ **({"source_note": "PDF source; statement positions are approximate. "
487
+ "Coverage is checked against detected headings, not guaranteed complete."} if source == "pdf" else {}),
481
488
  "consistency": {"pass": not consistency, "failures": consistency},
482
489
  "release": {"pass": not reasons, "reasons": reasons},
483
490
  "comparator": comparator}
@@ -507,8 +514,18 @@ class Assessor:
507
514
  # -- inventory against the compiled paper ---------------------------------------------
508
515
 
509
516
  def inventory_checks(self):
510
- """Compare the inventory with the environments the compiled papers contain."""
517
+ """Check coverage against the detected paper statements, and LaTeX source pins."""
511
518
  for pid, t in (self.tex or {}).items():
519
+ if t.get("mode") == "pdf":
520
+ claims = [c for c in self.inv["claims"] if c["paper"] == pid]
521
+ for anchor in t.get("anchors", []):
522
+ if not any(match_anchor(c, [anchor]) is not None for c in claims):
523
+ label = f"{anchor['env'].capitalize()} {anchor.get('number', '')}"
524
+ self.findings.append(_finding(
525
+ "violation", "inventory-gap",
526
+ f"{pid}:{anchor['env']}:{anchor.get('number', '')}:{anchor['id']}",
527
+ f"{label} is detected in the PDF but not in the inventory"))
528
+ continue
512
529
  if t.get("mode") != "latex":
513
530
  continue
514
531
  anchors = t["anchors"]
@@ -516,15 +533,20 @@ class Assessor:
516
533
  for c in [c for c in self.inv["claims"] if c["paper"] == pid]:
517
534
  line = line_location(c)
518
535
  if line is not None:
519
- # A claim recorded by file and line (an equation, a part, a prose claim): its
520
- # hash is the hash of that source line, as in `acceptance.py`.
521
- got = (t.get("lines") or {}).get(c["location"])
522
- if c.get("source_sha256") and got != c["source_sha256"]:
536
+ region = (t.get("regions") or {}).get(c["id"], {})
537
+ if c.get("source_hash_scheme") != SOURCE_SCHEME:
538
+ self.findings.append(_finding(
539
+ "violation", "source-hash-scheme", c["id"],
540
+ f"{c['location']}: source regions must be pinned at the original "
541
+ "revision (python -m prooflens.source_regions --config FILE "
542
+ f"--paper {pid}); then rebuild"))
543
+ elif not source_matches(c, t):
544
+ detail = region.get("error") or (
545
+ "is missing; rebuild the source evidence" if not region else
546
+ "differs from the frozen source region")
523
547
  self.findings.append(_finding(
524
548
  "violation", "source-changed", c["id"],
525
- f"the source line {c['location']} of {c.get('number', c['id'])} "
526
- + ("is missing" if got is None else
527
- "differs from the frozen inventory")))
549
+ f"the source region at {c['location']} {detail}"))
528
550
  continue
529
551
  a = match_anchor(c, anchors)
530
552
  if a is None:
@@ -67,7 +67,7 @@ def descriptor(index: dict, lean_root: Path | None, author: str | None = None,
67
67
  papers = []
68
68
  for p in index.get("papers", []):
69
69
  ax = arxiv_id(paper_url) if len(index.get("papers", [])) == 1 else None
70
- entry = {"title": p.get("title"), "id": ax[0] if ax else None,
70
+ entry = {"key": p["id"], "title": p.get("title"), "id": ax[0] if ax else None,
71
71
  "version": ax[1] if ax else None, "url": paper_url,
72
72
  # A pinned revision, else the commit of the folder the paper was read from.
73
73
  "revision": p.get("revision") or p.get("source_commit")}
@@ -305,12 +305,10 @@ def cmd_check(a):
305
305
  if not n:
306
306
  print("no claim is linked yet: confirm links in `machinechecked view`")
307
307
  return
308
- print(f"all {n} linked declaration(s) are checked by Lean (whether each says what the paper "
309
- "says is not reviewed by this check)")
308
+ print(f"Lean checked all {n} linked declaration(s)")
310
309
 
311
310
 
312
- CHECK_NOTE = ("Statuses say what Lean establishes about the linked declarations. Whether a Lean "
313
- "statement says what the paper says is not checked here; that takes a reviewer.")
311
+ CHECK_NOTE = "Results describe the linked Lean declarations; correspondence reviews compare them with the paper."
314
312
 
315
313
 
316
314
  FINDING_KEYS = ("id", "tier", "code", "subject", "message", "trigger", "dismissed")
@@ -338,7 +336,7 @@ def _check_json(a):
338
336
  res = build(cfg, web_dist=_web_dist(a.web))
339
337
  idx = res["index"]
340
338
  claims = [{"id": c["id"], "paper": c["paper"], "number": c.get("number"),
341
- "title": c.get("title"), "status": c["status"], "class": c["class"]}
339
+ "title": c.get("title"), "status": c["status"], "status_code": c["status_code"], "class": c["class"]}
342
340
  for c in idx["claims"]]
343
341
  out = {"mode": "full", "release": idx["release"],
344
342
  "project": idx.get("project", {}).get("commit"),
@@ -351,8 +349,8 @@ def _check_json(a):
351
349
  view = _simple_view(root, paper)
352
350
  body = view["body"]
353
351
  claims = [{"id": c["id"], "number": c["number"], "title": c["title"],
354
- "status": c["status"], "class": c["class"],
355
- "links": [{"name": l["name"], "status": l["status"], "class": l["class"],
352
+ "status": c["status"], "status_code": c["status_code"], "class": c["class"],
353
+ "links": [{"name": l["name"], "status": l["status"], "status_code": l["status_code"], "class": l["class"],
356
354
  "source": l.get("source")} for l in c["links"]],
357
355
  "suggestions": [{"name": x["name"], "why": x.get("why")}
358
356
  for x in c.get("suggestions", [])]}
@@ -924,14 +922,14 @@ def _could_not_run(a, kind: str, message: str, **extra):
924
922
  import json
925
923
  print(json.dumps({"schema": "machinechecked/check@1", "ok": False,
926
924
  "error": {"kind": kind, "message": message, **extra},
927
- "note": "The check did not run; nothing is known about the claims."},
925
+ "note": "Check unavailable; resolve the execution error and retry."},
928
926
  indent=1))
929
927
  elif getattr(a, "func", None) is cmd_inspect and getattr(a, "json", False):
930
928
  import json
931
929
  print(json.dumps({"schema": "machinechecked/inspect@1", "ok": False,
932
930
  "name": getattr(a, "name", None),
933
931
  "error": {"kind": kind, "message": message, **extra},
934
- "note": "Lean was not asked; nothing is known about the declaration."},
932
+ "note": "Inspection unavailable; resolve the execution error and retry."},
935
933
  indent=1))
936
934
  raise SystemExit(COULD_NOT_RUN)
937
935
 
@@ -295,9 +295,7 @@ def declRecord (roots : Array Name) (n : Name) (ci : ConstantInfo) : MetaM (Json
295
295
  let value ← match ci with
296
296
  | .defnInfo d =>
297
297
  if (← isProp ci.type) then pure Json.null
298
- else do
299
- let v ← ppJson d.value
300
- pure (if v.compress.length > 20000 then Json.null else v)
298
+ else ppJson d.value
301
299
  | _ => pure Json.null
302
300
  let doc ← findDocString? env n
303
301
  let j := Json.mkObj [
@@ -349,6 +347,9 @@ def specRecord (h : IO.FS.Handle) (q : Query) (roots : Array Name) (seen : IO.Re
349
347
  let (binders, concl) ← match ci with
350
348
  | .defnInfo d => telescope d.value #[]
351
349
  | _ => pure (#[], Json.null)
350
+ let exact ← match ci with
351
+ | .defnInfo d => ppJson d.value
352
+ | _ => pure Json.null
352
353
  let closure ← emitClosure h roots spec used seen
353
354
  let direct ← match ci with
354
355
  | .defnInfo d => projectConsts roots d.value
@@ -358,7 +359,7 @@ def specRecord (h : IO.FS.Handle) (q : Query) (roots : Array Name) (seen : IO.Re
358
359
  | _ => #[]
359
360
  emit h (Json.mkObj [("record", "spec"), ("name", spec.toString), ("errors", toJson errs),
360
361
  ("axioms", toJson (axs.map toString)), ("decl", j),
361
- ("binders", Json.arr binders), ("conclusion", concl),
362
+ ("binders", Json.arr binders), ("conclusion", concl), ("exact", exact),
362
363
  ("direct", toJson direct), ("consts", toJson consts), ("closure", toJson closure)])
363
364
 
364
365
  def levelsMatch (ls : List Level) (params : List Name) : Bool :=
@@ -443,6 +444,7 @@ def linkRecord (h : IO.FS.Handle) (q : Query) (roots : Array Name) (seen : IO.Re
443
444
  | _ => pure ci.type
444
445
  | _ => pure ci.type
445
446
  let (binders, concl) ← telescope stmt #[]
447
+ let exact ← ppJson stmt
446
448
  let axs ← collectAxioms n
447
449
  let bad := disallowed (q.allowed_axioms.map (·.toName)) axs
448
450
  let (j, used) ← declRecord roots n ci
@@ -450,7 +452,7 @@ def linkRecord (h : IO.FS.Handle) (q : Query) (roots : Array Name) (seen : IO.Re
450
452
  emit h (Json.mkObj [("record", "link"), ("name", n.toString), ("kind", kindOf ci),
451
453
  ("errors", toJson (if bad.isEmpty then #[] else #[s!"axioms={bad.toList}"])),
452
454
  ("axioms", toJson (axs.map toString)), ("sorry", toJson (axs.contains ``sorryAx)),
453
- ("decl", j), ("binders", Json.arr binders), ("conclusion", concl),
455
+ ("decl", j), ("binders", Json.arr binders), ("conclusion", concl), ("exact", exact),
454
456
  ("closure", toJson closure)])
455
457
 
456
458
  /-! ## Dependencies, proofs included
@@ -26,6 +26,15 @@
26
26
  "label": {"type": ["string", "null"]},
27
27
  "location": {"type": ["string", "null"]},
28
28
  "source_sha256": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
29
+ "source_hash_scheme": {"const": "tex-region-v1"},
30
+ "source_region": {
31
+ "type": "object", "required": ["end_line"], "additionalProperties": false,
32
+ "properties": {
33
+ "end_line": {"type": "integer", "minimum": 1},
34
+ "start_column": {"type": "integer", "minimum": 1},
35
+ "end_column": {"type": "integer", "minimum": 1}
36
+ }
37
+ },
29
38
  "scope": {"$ref": "#/$defs/scope"},
30
39
  "scope_note": {"type": "string"},
31
40
  "scope_reviewed": {"type": "boolean"},