machinechecked 0.1.10__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.10 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/SOURCES.txt +7 -2
  5. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/assess.py +82 -33
  6. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/audit.py +1 -1
  7. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/cli.py +7 -9
  8. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/config.py +4 -1
  9. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/data/ProofLensProbe.lean +7 -5
  10. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/data/schema/inventory.schema.json +9 -0
  11. machinechecked-0.1.12/engine/python/prooflens/data/schema/manifest-claim.schema.json +319 -0
  12. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/data/schema/manifest-index.schema.json +47 -2
  13. machinechecked-0.1.12/engine/python/prooflens/data/statuses.json +439 -0
  14. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/export.py +4 -8
  15. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/manifest.py +46 -64
  16. machinechecked-0.1.12/engine/python/prooflens/paper.py +202 -0
  17. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/pdfclaims.py +87 -24
  18. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/pipeline.py +11 -18
  19. machinechecked-0.1.12/engine/python/prooflens/published.py +162 -0
  20. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/simple.py +28 -24
  21. machinechecked-0.1.12/engine/python/prooflens/source_regions.py +260 -0
  22. machinechecked-0.1.12/engine/python/prooflens/status.py +33 -0
  23. machinechecked-0.1.12/engine/python/prooflens/web/assets/cursor-editorTextHighlight-kG3uUOwL.svg +8 -0
  24. machinechecked-0.1.12/engine/python/prooflens/web/assets/index-C8DRs1uO.css +1 -0
  25. machinechecked-0.1.12/engine/python/prooflens/web/assets/index-DXica3gb.js +278 -0
  26. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/index.html +2 -2
  27. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/theme.css +10 -4
  28. {machinechecked-0.1.10 → machinechecked-0.1.12}/pyproject.toml +1 -1
  29. machinechecked-0.1.10/PKG-INFO +0 -110
  30. machinechecked-0.1.10/README.md +0 -86
  31. machinechecked-0.1.10/engine/python/machinechecked.egg-info/PKG-INFO +0 -110
  32. machinechecked-0.1.10/engine/python/prooflens/data/schema/manifest-claim.schema.json +0 -126
  33. machinechecked-0.1.10/engine/python/prooflens/paper.py +0 -103
  34. machinechecked-0.1.10/engine/python/prooflens/web/assets/index-B97yx2Rs.js +0 -286
  35. machinechecked-0.1.10/engine/python/prooflens/web/assets/index-Cm5G8Hy5.css +0 -1
  36. {machinechecked-0.1.10 → machinechecked-0.1.12}/LICENSE +0 -0
  37. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/dependency_links.txt +0 -0
  38. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/entry_points.txt +0 -0
  39. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/requires.txt +0 -0
  40. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/machinechecked.egg-info/top_level.txt +0 -0
  41. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/__init__.py +0 -0
  42. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/__main__.py +0 -0
  43. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/bundle.py +0 -0
  44. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/cache.py +0 -0
  45. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/data/prooflens.sty +0 -0
  46. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/data/schema/evidence.schema.json +0 -0
  47. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/deps.py +0 -0
  48. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/evidence.py +0 -0
  49. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/formalization.py +0 -0
  50. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/probe.py +0 -0
  51. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/promote.py +0 -0
  52. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/replay.py +0 -0
  53. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/review_cli.py +0 -0
  54. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/review_queue.py +0 -0
  55. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/reviews.py +0 -0
  56. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/schemas.py +0 -0
  57. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/server.py +0 -0
  58. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/sources.py +0 -0
  59. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/symbols.py +0 -0
  60. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/tex.py +0 -0
  61. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/util.py +0 -0
  62. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  63. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  64. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  65. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  66. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  67. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  68. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  69. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  70. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  71. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  72. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  73. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  74. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  75. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  76. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  77. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  78. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  79. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  80. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  81. {machinechecked-0.1.10 → machinechecked-0.1.12}/engine/python/prooflens/web/assets/pdf.worker.min-yatZIOMy.mjs +0 -0
  82. {machinechecked-0.1.10 → 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-B97yx2Rs.js
67
- engine/python/prooflens/web/assets/index-Cm5G8Hy5.css
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"
342
345
 
343
- def blockers(self, claim: dict, status: str, clauses: list[dict]) -> list[str]:
346
+ @staticmethod
347
+ def claim_status(claim: dict, clauses: list[dict]) -> str:
348
+ return fields(Assessor.claim_code(claim, clauses))["status"]
349
+
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", []):
@@ -442,7 +449,10 @@ class Assessor:
442
449
  consistency = [f["message"] for f in mine]
443
450
  reasons = []
444
451
  t = (self.tex or {}).get(pid, {})
445
- if t.get("mode") != "latex":
452
+ source = t.get("mode") or "none"
453
+ if source == "pdf":
454
+ reasons += self._pdf_source(pid, t)
455
+ elif source != "latex":
446
456
  reasons.append("sources: manuscript source not compiled, source hashes unchecked")
447
457
  if self.lean is None:
448
458
  reasons.append("lean: the Lean project was not checked")
@@ -456,10 +466,10 @@ class Assessor:
456
466
  if e["scope"] in OUT_OF_SCOPE:
457
467
  continue
458
468
  if e["scope"] == "definition":
459
- if r["status"] != "definition: reviewed":
469
+ if r["status_code"] != "definition.reviewed":
460
470
  reasons.append(f"{r['id']}: {r['status']}")
461
471
  continue
462
- if r["status"] != "formal: accepted":
472
+ if r["status_code"] != "formal.accepted":
463
473
  reasons.append(f"{r['id']}: {r['status']}")
464
474
  for c in r["clauses"]:
465
475
  if c.get("refute_ok"):
@@ -472,16 +482,50 @@ class Assessor:
472
482
  if not comparator:
473
483
  reasons.append("comparator: no successful kernel replay covering every proof "
474
484
  "of the paper")
475
- out[pid] = {"consistency": {"pass": not consistency, "failures": consistency},
485
+ out[pid] = {"source": source,
486
+ **({"source_note": "PDF source; statement positions are approximate. "
487
+ "Coverage is checked against detected headings, not guaranteed complete."} if source == "pdf" else {}),
488
+ "consistency": {"pass": not consistency, "failures": consistency},
476
489
  "release": {"pass": not reasons, "reasons": reasons},
477
490
  "comparator": comparator}
478
491
  return out
479
492
 
493
+ def _pdf_source(self, pid: str, t: dict) -> list[str]:
494
+ """Why a paper whose source is a PDF does not meet the gate's source condition: the PDF
495
+ is pinned by the configuration (`pdf_sha256`) and matches it, and every claim in scope
496
+ is found in it (by its heading, or placed by hand in `anchors.json`)."""
497
+ out = []
498
+ pinned, actual = t.get("pdf_pinned"), t.get("pdf_sha256")
499
+ if not pinned:
500
+ out.append("sources: the paper is a PDF and its hash is not pinned (pdf_sha256 in "
501
+ "machinechecked.toml), so it is not checked")
502
+ elif pinned != actual:
503
+ out.append(f"sources: the PDF differs from the one pinned (sha256 {str(actual)[:12]}, "
504
+ f"pinned {pinned[:12]})")
505
+ manual = t.get("manual_anchors") or {}
506
+ for c in self.inv["claims"]:
507
+ if c["paper"] != pid or c["scope"] in OUT_OF_SCOPE:
508
+ continue
509
+ if c["id"] not in manual and match_anchor(c, t.get("anchors", [])) is None:
510
+ out.append(f"sources: {c['id']} ({c.get('number') or 'unnumbered'}) is not found "
511
+ "in the PDF; place it by hand in anchors.json")
512
+ return out
513
+
480
514
  # -- inventory against the compiled paper ---------------------------------------------
481
515
 
482
516
  def inventory_checks(self):
483
- """Compare the inventory with the environments the compiled papers contain."""
517
+ """Check coverage against the detected paper statements, and LaTeX source pins."""
484
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
485
529
  if t.get("mode") != "latex":
486
530
  continue
487
531
  anchors = t["anchors"]
@@ -489,15 +533,20 @@ class Assessor:
489
533
  for c in [c for c in self.inv["claims"] if c["paper"] == pid]:
490
534
  line = line_location(c)
491
535
  if line is not None:
492
- # A claim recorded by file and line (an equation, a part, a prose claim): its
493
- # hash is the hash of that source line, as in `acceptance.py`.
494
- got = (t.get("lines") or {}).get(c["location"])
495
- 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")
496
547
  self.findings.append(_finding(
497
548
  "violation", "source-changed", c["id"],
498
- f"the source line {c['location']} of {c.get('number', c['id'])} "
499
- + ("is missing" if got is None else
500
- "differs from the frozen inventory")))
549
+ f"the source region at {c['location']} {detail}"))
501
550
  continue
502
551
  a = match_anchor(c, anchors)
503
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
 
@@ -38,6 +38,9 @@ class Paper:
38
38
  # a DOI or a URL), and how the revision differs from it. Descriptive only: no status uses it.
39
39
  published: str | None = None
40
40
  published_note: str | None = None
41
+ # A paper whose source is a PDF: the PDF's SHA-256, pinned by the configuration. The release
42
+ # gate accepts a PDF as source evidence only when it is pinned and matches (EVIDENCE_POLICY).
43
+ pdf_sha256: str | None = None
41
44
 
42
45
 
43
46
  @dataclass
@@ -117,7 +120,7 @@ def load(path: str | Path) -> Config:
117
120
  raise ConfigError(f"paper {p.get('id')}: source needs one of path, git, arxiv")
118
121
  papers.append(Paper(
119
122
  id=_req(p, "id", "paper"), title=p.get("title", p["id"]), source=src,
120
- root=p.get("root"), pdf=p.get("pdf"), commit=src.get("rev"), envs=p.get("envs"),
123
+ root=p.get("root"), pdf=p.get("pdf"), pdf_sha256=p.get("pdf_sha256"), commit=src.get("rev"), envs=p.get("envs"),
121
124
  publish=Publish(**p.get("publish", {})), published=p.get("published"),
122
125
  published_note=p.get("note")))
123
126
  return Config(