Add builds (2026-11-10)
Browse files- README.md +10 -6
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/SHA256SUMS.txt +13 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0000.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0001.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0002.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0003.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0004.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0005.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0006.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0007.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0008.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0009.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0010.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0011.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.lean +66 -0
README.md
CHANGED
|
@@ -28,20 +28,24 @@ Every value below is read from the build folder's own reports; "not run" and "no
|
|
| 28 |
|
| 29 |
| commit | Lean | packed | modules | `sorry` warnings | other warnings | axiom audit | round trip |
|
| 30 |
|---|---|---|---|---|---|---|---|
|
| 31 |
-
| `b2a9e8d75cc7` | v4.28.0 | 2026-11-08 | 12 | 7 | 141 |
|
| 32 |
|
| 33 |
**Build `b2a9e8d75cc7-3bfc4336fa51bbad`** (source commit `b2a9e8d75cc76e5c432f15f668c18826a9abab80`)
|
| 34 |
|
| 35 |
-
- `sorry` warnings: 7, in `PartitionPolynomial/Conjecture10/problem.lean`, `PartitionPolynomial/Conjecture2/problem.lean`, `PartitionPolynomial/Conjecture5/problem.lean`, `PartitionPolynomial/Conjecture7/problem.lean`, `PartitionPolynomial/Conjecture8/problem.lean`, `PartitionPolynomial/Conjecture9/problem.lean`.
|
| 36 |
-
- Axiom audit: 1548 declarations
|
| 37 |
-
- Declarations that depend on them (first ones listed by the audit): `t_eq_three_mod` (sorryAx), `t_recurrence` (sorryAx), `main_theorem` (sorryAx), `conj5` (sorryAx), `Conj7.conjecture7` (sorryAx), `Conj8.conj8` (sorryAx), `Conj9.main_conjecture` (sorryAx).
|
| 38 |
- Round trip on a clean machine: passed. Restored on a clean machine; AxiomMath/PartitionPolynomial: Lake reported every target up to date (8038 jobs). (1 of 1 projects using it passed; checked 2026-11-09)
|
| 39 |
|
| 40 |
What the columns mean:
|
| 41 |
- **`sorry` warnings:** declarations the build reported as using `sorry`. Anything depending on them is not proved.
|
|
|
|
|
|
|
|
|
|
| 42 |
- **Axiom audit:** every declaration in the package's modules traced to the axioms it uses. "passed" means only
|
| 43 |
-
`propext`, `Classical.choice` and `Quot.sound`.
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
- **Round trip:** a separate user with empty Lean and Lake caches restored the build from the archive and Lake reported
|
| 46 |
every target up to date. It shows the archive is complete, not that the proofs are right.
|
| 47 |
|
|
|
|
| 28 |
|
| 29 |
| commit | Lean | packed | modules | `sorry` warnings | other warnings | axiom audit | round trip |
|
| 30 |
|---|---|---|---|---|---|---|---|
|
| 31 |
+
| `b2a9e8d75cc7` | v4.28.0 | 2026-11-08 | 12 | 7 (problem statements only) | 141 | passed outside problem statements | passed |
|
| 32 |
|
| 33 |
**Build `b2a9e8d75cc7-3bfc4336fa51bbad`** (source commit `b2a9e8d75cc76e5c432f15f668c18826a9abab80`)
|
| 34 |
|
| 35 |
+
- `sorry` warnings: 7, all in problem or challenge statement files: `PartitionPolynomial/Conjecture10/problem.lean`, `PartitionPolynomial/Conjecture2/problem.lean`, `PartitionPolynomial/Conjecture5/problem.lean`, `PartitionPolynomial/Conjecture7/problem.lean`, `PartitionPolynomial/Conjecture8/problem.lean`, `PartitionPolynomial/Conjecture9/problem.lean`. In this layout each statement file states the theorems with `sorry` and the matching solution file proves them; the axiom audit line below says whether the proofs themselves are clean.
|
| 36 |
+
- Axiom audit: 1548 declarations, audited module by module. The only non-standard axiom is `sorryAx`, and every declaration using it is in a problem or challenge statement module (6: `PartitionPolynomial.Conjecture10.problem`, `PartitionPolynomial.Conjecture2.problem`, `PartitionPolynomial.Conjecture5.problem`, `PartitionPolynomial.Conjecture7.problem`, `PartitionPolynomial.Conjecture8.problem`, `PartitionPolynomial.Conjecture9.problem`). The other 6 modules, including every solution, depend only on propext, Classical.choice, Quot.sound.
|
|
|
|
| 37 |
- Round trip on a clean machine: passed. Restored on a clean machine; AxiomMath/PartitionPolynomial: Lake reported every target up to date (8038 jobs). (1 of 1 projects using it passed; checked 2026-11-09)
|
| 38 |
|
| 39 |
What the columns mean:
|
| 40 |
- **`sorry` warnings:** declarations the build reported as using `sorry`. Anything depending on them is not proved.
|
| 41 |
+
"problem statements only" means every one is in a `problem.lean` or challenge file: in that layout the
|
| 42 |
+
statement file states the theorems with `sorry`, a matching solution file proves them, and a comparator checks
|
| 43 |
+
that the two match. The axiom audit then shows whether the solutions are clean.
|
| 44 |
- **Axiom audit:** every declaration in the package's modules traced to the axioms it uses. "passed" means only
|
| 45 |
+
`propext`, `Classical.choice` and `Quot.sound`. "passed outside problem statements" means a module-by-module audit
|
| 46 |
+
found `sorryAx` only in problem or challenge statement modules, and every other module, including every solution,
|
| 47 |
+
uses only those three. Neither says a statement is the intended one: a theorem that takes a hard fact as a
|
| 48 |
+
hypothesis passes.
|
| 49 |
- **Round trip:** a separate user with empty Lean and Lake caches restored the build from the archive and Lake reported
|
| 50 |
every target up to date. It shows the archive is complete, not that the proofs are right.
|
| 51 |
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/SHA256SUMS.txt
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
11c66fa646b4d62b7a8d2083486bb447ecd25d6088cfb19ed9d3c080a75b0239 lake-manifest.json
|
| 2 |
bbacfaa77846f5d80cacd9c973770243b5c9d7addc2dda03777f4b9bcc9d3c16 manifest.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
7b1a18f6f7ef373133058528b273b9bf8acefb08d355e2deb729f1439aed2072 reports/axiom_audit.txt
|
| 4 |
1be79bd3064edc9906df9fbf2ca62a038207ca31051524d8d03968f1d86249ff reports/axiom_audit_result.json
|
| 5 |
12b87f259ecfcb156f90a3b29c6f2f53657992880cb554bff4362136b1ba4041 reports/build.log
|
|
|
|
| 1 |
11c66fa646b4d62b7a8d2083486bb447ecd25d6088cfb19ed9d3c080a75b0239 lake-manifest.json
|
| 2 |
bbacfaa77846f5d80cacd9c973770243b5c9d7addc2dda03777f4b9bcc9d3c16 manifest.json
|
| 3 |
+
e3c0ac4f5271edd972954e4705526998daef823f53e241cd5e5f6f4373703ffb reports/axiom_audit.0000.lean
|
| 4 |
+
927877e4b28dc55c7bd835725077aacd71bd0eaa073ec432f0ef7f963fbd313e reports/axiom_audit.0001.lean
|
| 5 |
+
d7bff24c6b2ad34a623946f6baeee83ffc9d1ab2fb258e6d9d758591c45512d0 reports/axiom_audit.0002.lean
|
| 6 |
+
cac7257161cf703c7e401ee4771dc0c29698a1e1c09c35398352e134f4794509 reports/axiom_audit.0003.lean
|
| 7 |
+
a66dad38e635311142e801e682e1a5235ea7ffdc0ba5d42c02e32c47cbe0d5cb reports/axiom_audit.0004.lean
|
| 8 |
+
0668d4294c1402c59d06085077b2d5aff59e3c3710b81407be1e1344d97820ff reports/axiom_audit.0005.lean
|
| 9 |
+
04d7e9857e46874a14918a9117669f4fa83ed9b36ddc2e4d1a69e8fcadb4e0ad reports/axiom_audit.0006.lean
|
| 10 |
+
3249d71eb9a2a71918080b675364b1b2af7f0b3f4da58c50afa6a3f3b9522b5c reports/axiom_audit.0007.lean
|
| 11 |
+
81e42f58d52312034ba772106179c2b00960df1350eb3697c9a77967e8e50191 reports/axiom_audit.0008.lean
|
| 12 |
+
bd277db0d14d694394dc6d90758d08a146ff3e53a3f03748779fd344f088e390 reports/axiom_audit.0009.lean
|
| 13 |
+
8e52c95d35eb800edef444a2ffaeab39d28b2acc12ca76cb3c3de144f2f0a33a reports/axiom_audit.0010.lean
|
| 14 |
+
67e816670ea18c41a41e8f89fe17783a24f0a0537dc5d81de9dc4edf32ab9440 reports/axiom_audit.0011.lean
|
| 15 |
+
4a3b8b0b1710bc72da084034d3c091ef8f50fea492089eafa4779703482fe2eb reports/axiom_audit.lean
|
| 16 |
7b1a18f6f7ef373133058528b273b9bf8acefb08d355e2deb729f1439aed2072 reports/axiom_audit.txt
|
| 17 |
1be79bd3064edc9906df9fbf2ca62a038207ca31051524d8d03968f1d86249ff reports/axiom_audit_result.json
|
| 18 |
12b87f259ecfcb156f90a3b29c6f2f53657992880cb554bff4362136b1ba4041 reports/build.log
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0000.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture10.problem
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture10.problem] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0001.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture10.solution
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture10.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0002.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture2.problem
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture2.problem] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0003.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture2.solution
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture2.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0004.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture5.problem
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture5.problem] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0005.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture5.solution
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture5.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0006.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture7.problem
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture7.problem] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0007.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture7.solution
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture7.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0008.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture8.problem
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture8.problem] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0009.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture8.solution
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture8.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0010.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture9.problem
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture9.problem] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.0011.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture9.solution
|
| 3 |
+
|
| 4 |
+
open Lean Elab Command
|
| 5 |
+
|
| 6 |
+
namespace AxAudit
|
| 7 |
+
structure St where
|
| 8 |
+
seen : NameMap (Array Name) := {}
|
| 9 |
+
axioms : NameSet := {}
|
| 10 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 11 |
+
|
| 12 |
+
partial def collect (c : Name) : M Unit := do
|
| 13 |
+
let env ← read
|
| 14 |
+
let s ← get
|
| 15 |
+
if let some axs := s.seen.find? c then
|
| 16 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 17 |
+
return
|
| 18 |
+
let saved := s.axioms
|
| 19 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 20 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 21 |
+
match env.find? c with
|
| 22 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 23 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 24 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 25 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 26 |
+
| some (.quotInfo _) => pure ()
|
| 27 |
+
| some (.ctorInfo v) => ce v.type
|
| 28 |
+
| some (.recInfo v) => ce v.type
|
| 29 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 30 |
+
| none => pure ()
|
| 31 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 32 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 33 |
+
end AxAudit
|
| 34 |
+
|
| 35 |
+
run_cmd do
|
| 36 |
+
let env ← getEnv
|
| 37 |
+
let penv := env.setExporting false
|
| 38 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture9.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 39 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 40 |
+
let mut roots : Array Name := #[]
|
| 41 |
+
let mut declared : Array Name := #[]
|
| 42 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 43 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 44 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 45 |
+
roots := roots.push c
|
| 46 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 47 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 48 |
+
let mut used : NameSet := {}
|
| 49 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 50 |
+
for c in roots do
|
| 51 |
+
let axs := (st.seen.find? c).getD #[]
|
| 52 |
+
for a in axs do used := used.insert a
|
| 53 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 54 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 55 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|
builds/v4.28.0/x86_64-unknown-linux-gnu/b2a9e8d75cc7-3bfc4336fa51bbad/reports/axiom_audit.lean
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import PartitionPolynomial.Conjecture10.problem
|
| 3 |
+
import PartitionPolynomial.Conjecture10.solution
|
| 4 |
+
import PartitionPolynomial.Conjecture2.problem
|
| 5 |
+
import PartitionPolynomial.Conjecture2.solution
|
| 6 |
+
import PartitionPolynomial.Conjecture5.problem
|
| 7 |
+
import PartitionPolynomial.Conjecture5.solution
|
| 8 |
+
import PartitionPolynomial.Conjecture7.problem
|
| 9 |
+
import PartitionPolynomial.Conjecture7.solution
|
| 10 |
+
import PartitionPolynomial.Conjecture8.problem
|
| 11 |
+
import PartitionPolynomial.Conjecture8.solution
|
| 12 |
+
import PartitionPolynomial.Conjecture9.problem
|
| 13 |
+
import PartitionPolynomial.Conjecture9.solution
|
| 14 |
+
|
| 15 |
+
open Lean Elab Command
|
| 16 |
+
|
| 17 |
+
namespace AxAudit
|
| 18 |
+
structure St where
|
| 19 |
+
seen : NameMap (Array Name) := {}
|
| 20 |
+
axioms : NameSet := {}
|
| 21 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 22 |
+
|
| 23 |
+
partial def collect (c : Name) : M Unit := do
|
| 24 |
+
let env ← read
|
| 25 |
+
let s ← get
|
| 26 |
+
if let some axs := s.seen.find? c then
|
| 27 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 28 |
+
return
|
| 29 |
+
let saved := s.axioms
|
| 30 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 31 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 32 |
+
match env.find? c with
|
| 33 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 34 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 35 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 36 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 37 |
+
| some (.quotInfo _) => pure ()
|
| 38 |
+
| some (.ctorInfo v) => ce v.type
|
| 39 |
+
| some (.recInfo v) => ce v.type
|
| 40 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 41 |
+
| none => pure ()
|
| 42 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 43 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 44 |
+
end AxAudit
|
| 45 |
+
|
| 46 |
+
run_cmd do
|
| 47 |
+
let env ← getEnv
|
| 48 |
+
let penv := env.setExporting false
|
| 49 |
+
let mods : NameSet := (#[`PartitionPolynomial.Conjecture10.problem, `PartitionPolynomial.Conjecture10.solution, `PartitionPolynomial.Conjecture2.problem, `PartitionPolynomial.Conjecture2.solution, `PartitionPolynomial.Conjecture5.problem, `PartitionPolynomial.Conjecture5.solution, `PartitionPolynomial.Conjecture7.problem, `PartitionPolynomial.Conjecture7.solution, `PartitionPolynomial.Conjecture8.problem, `PartitionPolynomial.Conjecture8.solution, `PartitionPolynomial.Conjecture9.problem, `PartitionPolynomial.Conjecture9.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 50 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 51 |
+
let mut roots : Array Name := #[]
|
| 52 |
+
let mut declared : Array Name := #[]
|
| 53 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 54 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 55 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 56 |
+
roots := roots.push c
|
| 57 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 58 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 59 |
+
let mut used : NameSet := {}
|
| 60 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 61 |
+
for c in roots do
|
| 62 |
+
let axs := (st.seen.find? c).getD #[]
|
| 63 |
+
for a in axs do used := used.insert a
|
| 64 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 65 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 66 |
+
logInfo m!"AXIOM-AUDIT decls={roots.size} declared_axioms={declared.toList} axioms_used={used.toList} nonstandard_count={nonstd.size} nonstandard_first={nonstd.toList.take 10} constants_walked={st.seen.size} AXIOM-AUDIT-END"
|