Add builds (2026-11-10)
Browse files- README.md +10 -6
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/SHA256SUMS.txt +9 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0000.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0001.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0002.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0003.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0004.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0005.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0006.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0007.lean +55 -0
- builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.lean +62 -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 |
-
| `fed112b469b5` | v4.28.0 | 2026-11-08 | 8 | 42 | 300 |
|
| 32 |
|
| 33 |
**Build `fed112b469b5-5817955c2a695abf`** (source commit `fed112b469b55bebb5bbcd1823110cd66bf8ee34`)
|
| 34 |
|
| 35 |
-
- `sorry` warnings: 42, in `Batch1/Output/problem.lean`, `Batch2/Output/problem.lean`, `Batch3/Output/problem.lean`, `Batch4/Output/problem.lean`.
|
| 36 |
-
- Axiom audit: 424 declarations
|
| 37 |
-
- Declarations that depend on them (first ones listed by the audit): `KF_boundary` (sorryAx), `rational_reduction_two` (sorryAx), `rational_reduction_one` (sorryAx), `KF_combi_iff` (sorryAx), `exponent_identity` (sorryAx), `KF_collapse` (sorryAx), `KF_functional` (sorryAx), `KF_combi_unique` (sorryAx), `KF_recurrence` (sorryAx), `Cx_torsion_ne` (sorryAx), `KF_kernelshift_torsion_ne` (sorryAx), `Tpoly_factor_torsion_ne` (sorryAx) ...
|
| 38 |
- Round trip on a clean machine: passed. Restored on a clean machine; AxiomMath/HigherDyson: Lake reported every target up to date (8034 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 |
+
| `fed112b469b5` | v4.28.0 | 2026-11-08 | 8 | 42 (problem statements only) | 300 | passed outside problem statements | passed |
|
| 32 |
|
| 33 |
**Build `fed112b469b5-5817955c2a695abf`** (source commit `fed112b469b55bebb5bbcd1823110cd66bf8ee34`)
|
| 34 |
|
| 35 |
+
- `sorry` warnings: 42, all in problem or challenge statement files: `Batch1/Output/problem.lean`, `Batch2/Output/problem.lean`, `Batch3/Output/problem.lean`, `Batch4/Output/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: 424 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 (4: `Batch1.Output.problem`, `Batch2.Output.problem`, `Batch3.Output.problem`, `Batch4.Output.problem`). The other 4 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/HigherDyson: Lake reported every target up to date (8034 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/fed112b469b5-5817955c2a695abf/SHA256SUMS.txt
CHANGED
|
@@ -1,5 +1,14 @@
|
|
| 1 |
7b1996b90b7f064bd17ccc0fd0f7c43e636a3436e8ff551b4372eba69ea90c25 lake-manifest.json
|
| 2 |
ad758444d43c1fb52a2516ecfaafef165cb76039d2c1e95b62559c4755172d11 manifest.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
2caa2e8bb5474cb88ad7e4a5481e05069fcdc3b9f3add6d0ba666e9a77c0de31 reports/axiom_audit.txt
|
| 4 |
c7008fe7734b936268110c3baab3e2811304b9b085a6bc771415ebeb9147309e reports/axiom_audit_result.json
|
| 5 |
4b23b4406121a445f01dc8d884bd11334b9249fc1d0c158454e3dc556702c148 reports/build.log
|
|
|
|
| 1 |
7b1996b90b7f064bd17ccc0fd0f7c43e636a3436e8ff551b4372eba69ea90c25 lake-manifest.json
|
| 2 |
ad758444d43c1fb52a2516ecfaafef165cb76039d2c1e95b62559c4755172d11 manifest.json
|
| 3 |
+
cbc7ddc59234ae7e2a6885ebcc198f636b8cf7c72d35da7768311eeeab3673f7 reports/axiom_audit.0000.lean
|
| 4 |
+
3ba9755d274d3ef3b4a00b48995dfe9308a7397cc8ed7bc90994d89c936013b8 reports/axiom_audit.0001.lean
|
| 5 |
+
9ace053b5839a44203d04eb9c0caecdd850c1b7b2c863345e3526b92b962557d reports/axiom_audit.0002.lean
|
| 6 |
+
7d6ec4835161c410c0ecf2e2a146771d28a046f7c7814aa7a9bc2279e745d978 reports/axiom_audit.0003.lean
|
| 7 |
+
c55c7e63acc354c201351347e4f07e7e92b7bd023ff4cda55c47cdda084acf4a reports/axiom_audit.0004.lean
|
| 8 |
+
ddf6dde9166ac13dfc348ecf8a9c30a6fb541092b36cca98ffe9b49e71070743 reports/axiom_audit.0005.lean
|
| 9 |
+
27a72c25dbccda27d8b3060ff83198a1a44afda6b2ba877aeee6755cc066270e reports/axiom_audit.0006.lean
|
| 10 |
+
6416f31e12c3d326024c9f07b38d28c3f206e30d536b29a70816d2a096b85242 reports/axiom_audit.0007.lean
|
| 11 |
+
2c0b8f143a47c698d6fb54f02dfd5d47a899256d98fceb62b6914d12e569769e reports/axiom_audit.lean
|
| 12 |
2caa2e8bb5474cb88ad7e4a5481e05069fcdc3b9f3add6d0ba666e9a77c0de31 reports/axiom_audit.txt
|
| 13 |
c7008fe7734b936268110c3baab3e2811304b9b085a6bc771415ebeb9147309e reports/axiom_audit_result.json
|
| 14 |
4b23b4406121a445f01dc8d884bd11334b9249fc1d0c158454e3dc556702c148 reports/build.log
|
builds/v4.28.0/x86_64-unknown-linux-gnu/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0000.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch1.Output.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 := (#[`Batch1.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0001.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch1.Output.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 := (#[`Batch1.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0002.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch2.Output.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 := (#[`Batch2.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0003.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch2.Output.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 := (#[`Batch2.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0004.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch3.Output.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 := (#[`Batch3.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0005.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch3.Output.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 := (#[`Batch3.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0006.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch4.Output.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 := (#[`Batch4.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.0007.lean
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch4.Output.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 := (#[`Batch4.Output.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/fed112b469b5-5817955c2a695abf/reports/axiom_audit.lean
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Lean
|
| 2 |
+
import Batch1.Output.problem
|
| 3 |
+
import Batch1.Output.solution
|
| 4 |
+
import Batch2.Output.problem
|
| 5 |
+
import Batch2.Output.solution
|
| 6 |
+
import Batch3.Output.problem
|
| 7 |
+
import Batch3.Output.solution
|
| 8 |
+
import Batch4.Output.problem
|
| 9 |
+
import Batch4.Output.solution
|
| 10 |
+
|
| 11 |
+
open Lean Elab Command
|
| 12 |
+
|
| 13 |
+
namespace AxAudit
|
| 14 |
+
structure St where
|
| 15 |
+
seen : NameMap (Array Name) := {}
|
| 16 |
+
axioms : NameSet := {}
|
| 17 |
+
abbrev M := ReaderT Environment (StateM St)
|
| 18 |
+
|
| 19 |
+
partial def collect (c : Name) : M Unit := do
|
| 20 |
+
let env ← read
|
| 21 |
+
let s ← get
|
| 22 |
+
if let some axs := s.seen.find? c then
|
| 23 |
+
modify fun s => { s with axioms := axs.foldl (fun a x => a.insert x) s.axioms }
|
| 24 |
+
return
|
| 25 |
+
let saved := s.axioms
|
| 26 |
+
modify fun s => { s with axioms := {}, seen := s.seen.insert c #[] }
|
| 27 |
+
let ce (e : Expr) : M Unit := e.getUsedConstants.forM collect
|
| 28 |
+
match env.find? c with
|
| 29 |
+
| some (.axiomInfo v) => modify (fun s => { s with axioms := s.axioms.insert c }); ce v.type
|
| 30 |
+
| some (.defnInfo v) => ce v.type *> ce v.value
|
| 31 |
+
| some (.thmInfo v) => ce v.type *> ce v.value
|
| 32 |
+
| some (.opaqueInfo v) => ce v.type *> ce v.value
|
| 33 |
+
| some (.quotInfo _) => pure ()
|
| 34 |
+
| some (.ctorInfo v) => ce v.type
|
| 35 |
+
| some (.recInfo v) => ce v.type
|
| 36 |
+
| some (.inductInfo v) => ce v.type *> v.ctors.forM collect
|
| 37 |
+
| none => pure ()
|
| 38 |
+
let res := (← get).axioms.toArray.qsort Name.lt
|
| 39 |
+
modify fun s => { s with seen := s.seen.insert c res, axioms := res.foldl (fun a x => a.insert x) saved }
|
| 40 |
+
end AxAudit
|
| 41 |
+
|
| 42 |
+
run_cmd do
|
| 43 |
+
let env ← getEnv
|
| 44 |
+
let penv := env.setExporting false
|
| 45 |
+
let mods : NameSet := (#[`Batch1.Output.problem, `Batch1.Output.solution, `Batch2.Output.problem, `Batch2.Output.solution, `Batch3.Output.problem, `Batch3.Output.solution, `Batch4.Output.problem, `Batch4.Output.solution] : Array Name).foldl (fun s n => s.insert n) {}
|
| 46 |
+
let std : NameSet := (#[``propext, ``Classical.choice, ``Quot.sound] : Array Name).foldl (fun s n => s.insert n) {}
|
| 47 |
+
let mut roots : Array Name := #[]
|
| 48 |
+
let mut declared : Array Name := #[]
|
| 49 |
+
for (c, ci) in env.constants.map₁.toList do
|
| 50 |
+
let some idx := env.getModuleIdxFor? c | continue
|
| 51 |
+
unless mods.contains env.header.moduleNames[idx.toNat]! do continue
|
| 52 |
+
roots := roots.push c
|
| 53 |
+
if let .axiomInfo _ := ci then declared := declared.push c
|
| 54 |
+
let (_, st) := ((roots.forM AxAudit.collect).run penv).run {}
|
| 55 |
+
let mut used : NameSet := {}
|
| 56 |
+
let mut nonstd : Array (Name × Array Name) := #[]
|
| 57 |
+
for c in roots do
|
| 58 |
+
let axs := (st.seen.find? c).getD #[]
|
| 59 |
+
for a in axs do used := used.insert a
|
| 60 |
+
let bad := axs.filter (fun a => !std.contains a)
|
| 61 |
+
unless bad.isEmpty do nonstd := nonstd.push (c, bad)
|
| 62 |
+
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"
|