lean-pkg 0.25.0__py3-none-any.whl

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 (103) hide show
  1. lean_pkg/__init__.py +3 -0
  2. lean_pkg/adapters/__init__.py +148 -0
  3. lean_pkg/adapters/github.py +65 -0
  4. lean_pkg/adapters/leansearch.py +68 -0
  5. lean_pkg/adapters/loogle.py +45 -0
  6. lean_pkg/adapters/palomar.py +170 -0
  7. lean_pkg/adapters/reservoir.py +127 -0
  8. lean_pkg/anchor.py +678 -0
  9. lean_pkg/audit.py +716 -0
  10. lean_pkg/binding_file.py +446 -0
  11. lean_pkg/blueprint.py +213 -0
  12. lean_pkg/build_scope.py +282 -0
  13. lean_pkg/ci_github.py +917 -0
  14. lean_pkg/claim_axioms.py +421 -0
  15. lean_pkg/claims.py +1155 -0
  16. lean_pkg/claims_mark.py +197 -0
  17. lean_pkg/cli.py +5208 -0
  18. lean_pkg/cli_parser.py +768 -0
  19. lean_pkg/command_tree.py +615 -0
  20. lean_pkg/comparator_config.py +990 -0
  21. lean_pkg/comparator_contracts.py +382 -0
  22. lean_pkg/comparator_receipt.py +2854 -0
  23. lean_pkg/comparator_stage.py +623 -0
  24. lean_pkg/comparator_types.py +830 -0
  25. lean_pkg/container.py +172 -0
  26. lean_pkg/core.py +1570 -0
  27. lean_pkg/coverage.py +1278 -0
  28. lean_pkg/data/stacks/lts-2026.10.yaml +73 -0
  29. lean_pkg/data/toolchain-advisories.yaml +77 -0
  30. lean_pkg/data/upgrade-breaking.yaml +20 -0
  31. lean_pkg/data/verify-workflow-pins.yaml +14 -0
  32. lean_pkg/deps_closure.py +512 -0
  33. lean_pkg/deps_fill.py +445 -0
  34. lean_pkg/dup_constants.py +448 -0
  35. lean_pkg/exercise.py +828 -0
  36. lean_pkg/exercise_forbid.py +288 -0
  37. lean_pkg/export_paths.py +77 -0
  38. lean_pkg/extract.py +1172 -0
  39. lean_pkg/extract_decls.py +501 -0
  40. lean_pkg/extract_ledger.py +1408 -0
  41. lean_pkg/extract_summary.py +132 -0
  42. lean_pkg/extract_types.py +502 -0
  43. lean_pkg/extract_write.py +138 -0
  44. lean_pkg/formalization.py +1078 -0
  45. lean_pkg/formalization_kept.py +182 -0
  46. lean_pkg/fresh_repo.py +709 -0
  47. lean_pkg/gate.py +2141 -0
  48. lean_pkg/headline.py +211 -0
  49. lean_pkg/help_topics.py +442 -0
  50. lean_pkg/holes.py +289 -0
  51. lean_pkg/host_routes.py +376 -0
  52. lean_pkg/hypotheses.py +788 -0
  53. lean_pkg/index.py +1749 -0
  54. lean_pkg/json_stdout.py +48 -0
  55. lean_pkg/lake_hygiene.py +289 -0
  56. lean_pkg/lean_diag.py +280 -0
  57. lean_pkg/lean_scan.py +1300 -0
  58. lean_pkg/ledger.py +582 -0
  59. lean_pkg/next_step.py +510 -0
  60. lean_pkg/page.py +1831 -0
  61. lean_pkg/page_html.py +153 -0
  62. lean_pkg/palomar.py +316 -0
  63. lean_pkg/palomar_check.py +1027 -0
  64. lean_pkg/port_modules.py +677 -0
  65. lean_pkg/prior_art.py +286 -0
  66. lean_pkg/producer.py +212 -0
  67. lean_pkg/producer_skew.py +208 -0
  68. lean_pkg/public_safety.py +1487 -0
  69. lean_pkg/publish.py +402 -0
  70. lean_pkg/rebase.py +984 -0
  71. lean_pkg/receipt.py +2385 -0
  72. lean_pkg/receipt_check.py +1064 -0
  73. lean_pkg/receipt_ci.py +660 -0
  74. lean_pkg/receipt_systemd.py +890 -0
  75. lean_pkg/recommended.py +232 -0
  76. lean_pkg/report.py +727 -0
  77. lean_pkg/reservoir.py +203 -0
  78. lean_pkg/scaffold.py +588 -0
  79. lean_pkg/schemas/formalization-0.4.schema.json +344 -0
  80. lean_pkg/schemas/formalization-0.4.schema.source.txt +15 -0
  81. lean_pkg/scripts/ClaimAxioms.lean +47 -0
  82. lean_pkg/scripts/ContractsOnly.lean +300 -0
  83. lean_pkg/scripts/DupConstants.lean +149 -0
  84. lean_pkg/scripts/HypProbe.lean +257 -0
  85. lean_pkg/scripts/comparator-check.sh +396 -0
  86. lean_pkg/scripts/verify-comparator.sh +135 -0
  87. lean_pkg/seal_bundle.py +647 -0
  88. lean_pkg/search.py +865 -0
  89. lean_pkg/site_profiles/easley.yaml +10 -0
  90. lean_pkg/site_profiles/github-actions.yaml +12 -0
  91. lean_pkg/sites.py +225 -0
  92. lean_pkg/stacks.py +373 -0
  93. lean_pkg/statements_module.py +217 -0
  94. lean_pkg/templates/Apache-2.0.txt +202 -0
  95. lean_pkg/toolchain_advisories.py +225 -0
  96. lean_pkg/upgrade.py +706 -0
  97. lean_pkg/verify.py +495 -0
  98. lean_pkg-0.25.0.dist-info/METADATA +93 -0
  99. lean_pkg-0.25.0.dist-info/RECORD +103 -0
  100. lean_pkg-0.25.0.dist-info/WHEEL +5 -0
  101. lean_pkg-0.25.0.dist-info/entry_points.txt +5 -0
  102. lean_pkg-0.25.0.dist-info/licenses/LICENSE +202 -0
  103. lean_pkg-0.25.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,73 @@
1
+ # A lean-pkg LTS stack (schema lean-pkg-stack/1; proposal 0004, docs/proposals/0004-math-lts-stack.md).
2
+ # The human page is lts-2026.10.md. Closed keys: tests/test_stacks.py refuses any key not listed there.
3
+ # Declared 2026-10-18 (proposal 0004, "Cadence and choice": a stack is declared after its matrix passes). The
4
+ # declaration covers the `tested` entries; `migration_cases` are packages outside the declared matrix.
5
+ schema: lean-pkg-stack/1
6
+ name: lts-2026.10
7
+ defined: 2026-10-17 # stage 0 approved by the maintainer; the pins below are fixed
8
+ published: 2026-10-18 # declared by the maintainer over the five matrix entries that reach receipts
9
+ lean_toolchain: leanprover/lean4:v4.35.0
10
+ lean_commit: eb6cafb7290e8bd5f2937522d8d804f58f02bafc # tag v4.35.0 of leanprover/lean4
11
+ mathlib:
12
+ rev: v4.35.0 # a Mathlib tag, never a branch
13
+ commit: 56a005855ea17e0b0958f73ec801ae140b0a1679 # what the tag resolves to; a moved tag is reported against this
14
+ lean_pkg: ">=0.12.0,<1.0" # the lean-pkg releases that promise to support the stack
15
+ palomar_floor:
16
+ minimum: v4.35.0-rc2 # palomar_check's pinned rules (the first toolchain with `lake comparator`)
17
+ satisfied: true # v4.35.0-rc2 <= v4.35.0
18
+ comparator_tools: # what the comparator receipt runs on this toolchain
19
+ mechanism: toolchain # `lake comparator` with the toolchain's bundled kernels (docs/comparator.md)
20
+ sources: # pinned in src/CMakeLists.txt of leanprover/lean4 at lean_commit
21
+ lake_comparator: in-tree # src/lake (Lake/CLI/Check.lean), built with the toolchain
22
+ leanexport: in-tree # src/LeanExport
23
+ leanchecker: in-tree
24
+ nanoda_lib: 3a2407216ee84a75f9e1aead6803d0578be06ae7 # github.com/ammkrn/nanoda_lib (nanoda_bin)
25
+ con_ron: dd8d8218892c871276b1e569d3decbb368bba1b6 # github.com/leanprover/con-ron
26
+ release_asset:
27
+ name: lean-4.35.0-linux.tar.zst
28
+ sha256: 7289597a44543246c9227b8cae501767e095ce17f6d448b95fc4a8dc97268f6d
29
+ binaries_sha256: # linux x86_64, from release_asset; the receipt keys of COMPARATOR_TOOLCHAIN_DIGESTS
30
+ lake: 8ba83c98f76562d03b8dbc33f1057151ba6cbb121679dde76b2260ccc90495e1
31
+ leanexport: f6a6483d518a11b323c28b9bac176d2220df0e9fc3230833815db9586669c074
32
+ leanchecker: 12c38901cdbfab178f1bf6145dd30012e9a3b2c11ca695292a5884fa3cbaddb6
33
+ nanoda_bin: cbf13950fc4a48f635a0beceeb5ed32dd82568b870cfd081b6391c1f2cf02ba5
34
+ con-ron: 60f4ca9fb9436c323789fa49aae33af6dcd1b9b54b43a66b461779ce79fd8eec
35
+ supported_until: 2028-04-30 # about 18 months (proposal 0004, open question 3, decided)
36
+ successor: null # lts-2027.04 once it exists
37
+ tested: # the stage 0 matrix, 2026-10-17, one host (proposal 0004, "How a stack is tested"); see the page
38
+ - package: new --kind paper (lean-pkg 0.12.0 scaffold)
39
+ commit: null
40
+ moved: pins only # lean-toolchain and the Mathlib require rev; coverage.yaml filled in as an author would
41
+ build: ok
42
+ result: verified # verify, page --write, receipt check PASS; publish --dry-run: only push and consent open
43
+ - package: new --kind library (lean-pkg 0.12.0 scaffold)
44
+ commit: null
45
+ moved: pins only
46
+ build: ok
47
+ result: verified
48
+ - package: pi-lambda tutorial (docs/tutorial-pi-lambda.md)
49
+ commit: null
50
+ moved: pins only
51
+ build: ok
52
+ result: verified
53
+ - package: markovprocess-pilot (index)
54
+ commit: 05d99d75df8235e79902220f0fe13e07e81867ca
55
+ moved: lakefile only # a direct Mathlib require at v4.35.0 over its dependency's rc2 pin; no Lean change
56
+ build: ok
57
+ result: migration # both receipts; receipt check fails one check that already fails at the pin (claims vs comparator names)
58
+ - package: total-coloring-lean (index)
59
+ commit: 533f9430cb4595faa9878bf2eecb8350ce57a068
60
+ moved: source changes # 33 one-line edits in 14 files (deprecations under warningAsError, two API changes)
61
+ build: ok
62
+ result: migration # both receipts; the same claims-vs-comparator-names check fails as for markovprocess-pilot
63
+ migration_cases: # outside the declared matrix: packages that do not reach receipts on the stack yet
64
+ - package: gromov-filling-lean (index)
65
+ commit: ba787a3eb26eaa88752d06d91f17763478233eab
66
+ reason: >-
67
+ Its JordanCurveTheorem dependency (third party, newest commit on Lean v4.29.0) does not build on
68
+ Mathlib v4.35.0; the package itself is six Lean releases behind.
69
+ to_move: >-
70
+ The dependency moved upstream to v4.35.0 or a patched copy chosen by the package's authors; then the
71
+ package's own migration: require mathlib after the dependency, remove the compatibility lemmas Mathlib
72
+ now has, and repair about twenty proofs on the first build frontier (more may follow).
73
+ advisories: [] # entries of the toolchain advisory list (#237) that apply
@@ -0,0 +1,77 @@
1
+ # Lean toolchains with a known kernel or runtime soundness bug (schema lean-pkg-toolchain-advisories/1).
2
+ # `gate`, `receipt check` and `palomar check` print a WARN line for each entry that names the toolchain a
3
+ # receipt (or the commit) was built with; they never refuse because of it. Each entry is one upstream
4
+ # point release and the soundness fixes it shipped. Every link is a primary source: the Lean release
5
+ # notes and the lean4 issues and pull requests they cite. How to add an entry: CONTRIBUTING.md,
6
+ # "Toolchain advisories". The format: lean_pkg/toolchain_advisories.py (validated when loaded).
7
+ #
8
+ # affected.below: every release and release candidate that sorts below this version (an rc sorts before
9
+ # its release: v4.33.0-rc1 < v4.33.0 < v4.33.1).
10
+ # affected.also: releases at or above `below` that lack the fix anyway (release candidates of the next
11
+ # line cut before the fix was backported), checked against the lean4 tags.
12
+ # affected.nightlies_through: nightly-YYYY-MM-DD toolchains dated on or before this day (the day the last
13
+ # fix merged into master; the nightly of that day may already carry it, so this errs towards warning).
14
+ schema: lean-pkg-toolchain-advisories/1
15
+ advisories:
16
+ - id: lean-v4.32.1-kernel-opaque-fvars
17
+ summary: >-
18
+ Kernel soundness bug: the kernel did not check an opaque declaration's value for free variables, so a
19
+ malicious metaprogram running in the same process could make it accept a proof of False. The
20
+ comparator route (lean4export) is not affected.
21
+ affected:
22
+ below: v4.32.1
23
+ also: [v4.33.0-rc1]
24
+ nightlies_through: 2026-07-22
25
+ fixed_in: v4.32.1
26
+ links:
27
+ - https://lean-lang.org/doc/reference/latest/releases/v4.32.1/
28
+ - https://github.com/leanprover/lean4/issues/14484
29
+ - https://github.com/leanprover/lean4/pull/14498
30
+ date_added: 2026-10-17
31
+ - id: lean-v4.32.2-kernel-nested-inductive
32
+ summary: >-
33
+ Kernel soundness bug: incomplete handling of nested inductive types with phantom type parameters let
34
+ a crafted proof of False through the kernel, also when checked with comparator.
35
+ affected:
36
+ below: v4.32.2
37
+ also: [v4.33.0-rc1]
38
+ nightlies_through: 2026-07-28
39
+ fixed_in: v4.32.2
40
+ links:
41
+ - https://lean-lang.org/doc/reference/latest/releases/v4.32.2/
42
+ - https://github.com/leanprover/lean4/issues/14576
43
+ - https://github.com/leanprover/lean4/pull/14577
44
+ date_added: 2026-10-17
45
+ - id: lean-v4.33.1-kernel-and-runtime
46
+ summary: >-
47
+ Kernel soundness bugs in is_def_eq caching and in is_prop (each used to derive False), a reference
48
+ count overflow in the runtime that could be extended into a proof of False on a machine with 18 GB
49
+ of free RAM, and portable Linux releases linked against a GMP with known unsound corner cases.
50
+ affected:
51
+ below: v4.33.1
52
+ also: [v4.34.0-rc1]
53
+ nightlies_through: 2026-08-20
54
+ fixed_in: v4.33.1
55
+ links:
56
+ - https://lean-lang.org/doc/reference/latest/releases/v4.33.1/
57
+ - https://github.com/leanprover/lean4/pull/14806
58
+ - https://github.com/leanprover/lean4/pull/14807
59
+ - https://github.com/leanprover/lean4/pull/14843
60
+ - https://github.com/leanprover/lean4/pull/14838
61
+ - https://github.com/leanprover/lean4/pull/14833
62
+ date_added: 2026-10-17
63
+ - id: lean-v4.34.1-runtime-refcounts
64
+ summary: >-
65
+ Runtime soundness bugs: reference count overflows in maximal sharing (inputs above 100 GB) and in
66
+ deletion cascades (18 GB of free RAM) could trigger undefined behaviour in the official kernel that
67
+ could be extended into a proof of False; kernels not built on the Lean runtime are not affected.
68
+ affected:
69
+ below: v4.34.1
70
+ also: [v4.35.0-rc1, v4.35.0-rc2]
71
+ nightlies_through: 2026-09-24
72
+ fixed_in: v4.34.1
73
+ links:
74
+ - https://lean-lang.org/doc/reference/latest/releases/v4.34.1/
75
+ - https://github.com/leanprover/lean4/pull/15289
76
+ - https://github.com/leanprover/lean4/pull/15241
77
+ date_added: 2026-10-17
@@ -0,0 +1,20 @@
1
+ # Generated by scripts/upgrade-breaking.py from docs/upgrades/*.yaml; do not edit (`make docs` rewrites it).
2
+ # Every upgrade-record entry with breaking: true, oldest release first. `lean-pkg status NAME` and
3
+ # `lean-pkg doctor --package NAME` read it to name the breaking changes between the lean-pkg that wrote a
4
+ # package's receipts (their `producer.lean_pkg`) and the running one (lean_pkg/producer_skew.py).
5
+ # The in-progress record (a provisional name) is included; the reader filters by version.
6
+ schema: lean-pkg-upgrade-breaking/1
7
+ entries:
8
+ - {version: "0.11.0", id: "bare-lean-pkg-newcomer-page", pr: 201, kind: "behavior", area: "cli"}
9
+ - {version: "0.11.0", id: "receipt-sealed-log-required", pr: 202, kind: "behavior", area: "receipts"}
10
+ - {version: "0.11.0", id: "slurm-claim-needs-sacct-seal", pr: 202, kind: "behavior", area: "comparator receipts, page"}
11
+ - {version: "0.11.0", id: "page-for-mathematicians", pr: 205, kind: "behavior", area: "page"}
12
+ - {version: "0.11.0", id: "receipt-producer-fingerprint", pr: 207, kind: "behavior", area: "receipts"}
13
+ - {version: "0.11.0", id: "comparator-host-label", pr: 208, kind: "format", area: "comparator receipts, public-safety"}
14
+ - {version: "0.11.0", id: "new-kind-paper-default", pr: 215, kind: "command", area: "new"}
15
+ - {version: "0.19.0", id: "fill-plan-donor-hidden-edits", pr: 285, kind: "behavior", area: "receipt slurm"}
16
+ - {version: "0.20.0", id: "ledger-judged-internal-claims", pr: 292, kind: "behavior", area: "claims ledger"}
17
+ - {version: "0.22.0", id: "repo-export-explicit-identity", pr: 344, kind: "behavior", area: "repo export"}
18
+ - {version: "0.22.0", id: "declarations-follow-lean-scopes", pr: 362, kind: "behavior", area: "search, claims ledger, coverage check, comparator config, claims mark, page"}
19
+ - {version: "0.22.0", id: "declarations-read-in-prefixed-commands", pr: 370, kind: "behavior", area: "search, claims ledger, coverage check, comparator config, claims mark, page, lean-exercise"}
20
+ - {version: "0.22.0", id: "search-unsearched-packages-incomplete", pr: 378, kind: "behavior", area: "search"}
@@ -0,0 +1,14 @@
1
+ # The content SHA-256 of lean-pkg's reusable .github/workflows/verify.yml at every release (proposal 0008,
2
+ # "The pinned reusable workflow"). Corroboration (level 2: receipt check --corroborate, page --corroborate)
3
+ # accepts a caller's `uses: lean-pkg/lean-pkg/.github/workflows/verify.yml@<40-hex>` only when the file at that
4
+ # commit hashes to an entry: a commit SHA alone is not enough, because GitHub serves a fork's commits through
5
+ # the parent repository's path. Append-only, oldest first; written by `make docs`
6
+ # (scripts/verify-workflow-pins.py), never by hand.
7
+ schema: lean-pkg-verify-workflow-pins/1
8
+ sha256:
9
+ - 2930a93ef13961d3897dfed17d4fac3b308f968e84b260f8817d2d7ace7dcc32
10
+ - 811fdacb35c441bb14283c97d980f6d3d52cc050d690109d06da121e94801554
11
+ - b69496d4f6773a69b64838d8f34f172ff02295c7b69302fc047389df282680d4
12
+ - 6cf465e8e42b2c93cf9f5806938e174811847940928f06da46290d550e3a666c
13
+ - 17e9f8015c5060d3127d9298c0de072cf7e9af029031c100a6addda6d0cf4784
14
+ - d24bdede043412ddf89be5678df11d2ec04361395f22fe5016f804ff7aa8c3fd