Lean Kernel Arena / con-agua

Checker "con-agua"

Version: 7166eda · 📄 Declaration · 🔗 Source

con-agua is con-leche reimplemented at the level of x86-64 assembly: a close clone of con-ron's checker, written in a small first-order language, compiled by a verified compiler, and shipped as one committed assembler file together with a C harness of about two hundred lines that reads the input and calls it.

A Lean theorem relates that assembler file, as an x86-64 program in Kraken's semantics, to con-ron's Lean twin, which con-ron proves to refine con-leche's pure checker: if the machine code reports accept, con-leche accepts the same bytes, so the accepted declarations have a model in set theory, and in particular no theorem of False is accepted. The code the CPU executes is the code the theorem is about, so neither a compiler nor a language runtime is trusted; what is trusted is Kraken's x86 semantics, the assembler and loader, and the C harness. The threaded mode used here has its own theorem, which takes the harness's thread scheduling as hypotheses.

So a proof accepted by con-leche, con-ron and con-agua is protected against a bug in the Lean compiler and runtime, in rustc and Aeneas, or in the x86 model, unless bugs in all three settings conspire.

It runs with four worker threads for the check phase, on raw lean4export NDJSON. It exits with 0 on accept, 1 on a rejection and 2 on a decline, each with the reason con-ron would give, and with 3 when a resource runs out or an abort has no specific reason (it then claims nothing). The theorem covers rejections and declines too: on exit 1 or 2, con-ron's twin fails on the same input with that kind of error (the message text is not part of the proof). Written by AI under supervision from Joachim Breitner at the Lean FRO.

Soundness (rightfully rejected tests)

77 ✅ 0 ❌ 3 🚫

Completeness (rightfully accepted tests)

132 ✅ 0 ❌ 6 🚫

Corner cases (no outcome prescribed)

30 ✅ 0 🚫

Test Expected Result ⏱️ 🧠
cedar 👍 🚫 17.5 s 1.6 GB
con-leche 👍 👍 75.7 s (-32%) 1.6 GB (+88%)
cslib 👍 👍 4.37 min (-49%) 4.7 GB (+39%)
init 👍 👍 46.9 s (-29%) 1008.3 MB (+78%)
init-prelude 👍 👍 255 ms (-30%) 42.6 MB (-42%)
mathlib 👍 👍 13.1 min (÷2.5) 10.3 GB (+3%)
navier-stokes-euler 👍 👍 4.67 min (÷2.4) 3.9 GB (+60%)
reachability 👍 👍 23.3 s (-1%) 2.5 GB (+53%)
std 👍 👍 73.0 s (-35%) 1.8 GB (+94%)
26 416 ms 25.6 MB
closure-level-subst ✋ ✋ 18.0 ms 10.6 MB
constlevels ✋ ✋ 18.3 ms 10.7 MB
ctor-num-fields ✋ ✋ 1.02 ms 3.1 MB
eta-ctor-alias ✋ ✋ 18.1 ms 10.8 MB
forged-quot-ind ✋ ✋ 17.5 ms 7.3 MB
k-rec-conv ✋ ✋ 18.3 ms 11.2 MB
large-elim-param ✋ ✋ 17.7 ms 8.7 MB
large-elim-prop-bool ✋ ✋ 18.1 ms 9.0 MB
level-imax-leq ✋ ✋ 0.804 ms 3.2 MB
level-imax-normalization ✋ ✋ 18.0 ms 10.6 MB
loose-bvar-value ✋ ✋ 17.6 ms 8.5 MB
nat-rec-k-lie ✋ ✋ 0.802 ms 3.1 MB
nat-rec-rules ✋ ✋ 0.830 ms 2.9 MB
nested-name-capture ✋ ✋ 19.2 ms 12.8 MB
nested-rec-rule-nfields ✋ ✋ 19.6 ms 12.3 MB
nested-unused-param ✋ ✋ 19.8 ms 11.6 MB
orphan-rec ✋ ✋ 0.755 ms 2.9 MB
pi-closure-context ✋ ✋ 17.9 ms 10.4 MB
proj-non-structure ✋ ✋ 18.1 ms 10.8 MB
proj-of-imax-prop ✋ ✋ 18.5 ms 11.2 MB
proj-of-stuck-prop ✋ ✋ 27.0 ms 14.6 MB
proj-of-subst-prop ✋ ✋ 31.2 ms 25.6 MB
rec-k-lie ✋ ✋ 0.776 ms 3.1 MB
rec-missing-ih ✋ ✋ 28.2 ms 15.5 MB
rec-of-subst-prop ✋ ✋ 31.7 ms 25.6 MB
unit-rec-rule ✋ ✋ 18.0 ms 10.9 MB
1 583 ms 16.5 MB
alg-conv-trans-acc 🤷 ✋ 21.7 ms 16.0 MB
alg-conv-trans-acc-left 🤷 👍 21.7 ms 15.9 MB
alg-conv-trans-acc-right 🤷 👍 21.8 ms 16.5 MB
alg-conv-trans-quot 🤷 ✋ 18.1 ms 12.5 MB
alg-conv-trans-quot-left 🤷 ✋ 18.1 ms 10.6 MB
alg-conv-trans-quot-left-def 🤷 👍 18.2 ms 10.6 MB
alg-conv-trans-quot-right 🤷 👍 18.1 ms 10.5 MB
eta-ctor 🤷 ✋ 18.2 ms 10.9 MB
eta-rec-struct 🤷 ✋ 18.2 ms 11.0 MB
eta-rule-k 🤷 ✋ 18.1 ms 10.6 MB
eta-struct-major-and 🤷 👍 18.1 ms 10.5 MB
eta-struct-major-and-no-whnf 🤷 👍 18.7 ms 12.0 MB
eta-struct-major-no-whnf 🤷 👍 19.4 ms 13.2 MB
eta-unit-like-nested 🤷 ✋ 18.4 ms 12.0 MB
eta-unit-like-pi 🤷 ✋ 18.1 ms 10.5 MB
eta-unit-like-proof-field 🤷 ✋ 18.1 ms 10.7 MB
eta-unit-like-struct 🤷 ✋ 18.2 ms 10.9 MB
imax-nested-absorption 🤷 👍 17.9 ms 12.5 MB
imax-right-successor 🤷 👍 17.9 ms 10.4 MB
large-elim-maybe-prop 🤷 👍 18.0 ms 10.9 MB
let-value-type-mismatch 🤷 ✋ 17.9 ms 10.4 MB
nested-nonuniform-param 🤷 ✋ 17.9 ms 9.1 MB
nested-redex-aux 🤷 👍 20.4 ms 13.8 MB
positivity-whnf 🤷 ✋ 17.7 ms 8.7 MB
proj-maybe-prop 🤷 👍 18.2 ms 11.1 MB
proj-maybe-prop-past 🤷 👍 18.2 ms 11.1 MB
proof-param-ok 👍 👍 18.0 ms 10.8 MB
proof-param-swap 🤷 ✋ 17.7 ms 8.7 MB
subject-reduction-redex 🤷 ✋ 21.8 ms 16.5 MB
subject-reduction-reduct 🤷 ✋ 21.7 ms 16.2 MB
vanishing-occurrence 🤷 👍 18.2 ms 11.1 MB
8 149 ms 14.6 MB
extra-rec ✋ ✋ 0.755 ms 3.0 MB
inductive-undeclared-universe ✋ ✋ 17.7 ms 8.6 MB
level-index-out-of-order 👍 🚫 17.6 ms 8.5 MB
nat-lit-add 👍 👍 19.0 ms 12.6 MB
nat-lit-add-bad ✋ ✋ 19.0 ms 14.6 MB
nat-lit-ble 👍 👍 19.1 ms 14.6 MB
nat-lit-sub 👍 👍 19.2 ms 12.9 MB
orphan-ctor ✋ ✋ 0.755 ms 2.9 MB
proj-of-prop ✋ ✋ 18.1 ms 10.6 MB
sparse-name-index 👍 🚫 17.6 ms 8.4 MB
31 92.2 s (+14%) 4.0 GB
app-lam 👍 👍 8.87 s (+83%) 1.9 GB (+34%)
args-before-unfold 👍 👍 23.7 ms (-34%) 13.5 MB (÷4.9)
beta-ladder 👍 👍 2.42 s (+45%) 589.4 MB (+18%)
church-numerals 👍 👍 39.1 ms (-17%) 22.7 MB (÷3.4)
discarded-argument 👍 👍 23.9 ms (÷7.0) 11.5 MB (÷5.7)
discarded-argument-match 👍 👍 41.6 ms (÷3.4) 15.0 MB (÷4.5)
folded-constant-first 👍 👍 28.0 ms (-31%) 12.8 MB (÷5.4)
folded-constant-last 👍 👍 28.0 ms (-31%) 13.8 MB (÷5.0)
fueled-chain 👍 👍 66.5 ms (-48%) 32.8 MB (÷2.3)
grind-ring-5 👍 👍 2.08 s (-3%) 179.9 MB (-21%)
identical-nesting 👍 👍 18.2 ms (-36%) 11.0 MB (÷6.0)
irrelevance-before-evaluation 👍 👍 18.6 ms (-36%) 11.4 MB (÷5.7)
irrelevance-refutes 👍 👍 18.3 ms (-36%) 11.1 MB (÷6.0)
let-fold 👍 👍 2.07 s (×36) 382.9 MB (×5.8)
let-ladder 👍 👍 1.27 s (+26%) 320.7 MB (0%)
magma-list-deep-n21 👍 👍 2.89 s (+7%) 262.1 MB (÷2.5)
magma-list-deep-n36 👍 👍 34.7 s (-2%) 2.3 GB (÷3.4)
magma-list-pair-n21 👍 👍 23.8 s (+29%) 4.0 GB (0%)
magma-list-pair-n7 👍 👍 2.15 s (+28%) 342.7 MB (-19%)
magma-string-n4 👍 👍 3.11 s (-12%) 126.5 MB (+4%)
magma-string-pair-n9 👍 👍 8.15 s (-1%) 661.4 MB (-34%)
proj-cheap-struct 👍 👍 22.6 ms (-35%) 14.7 MB (÷4.5)
proj-lazy-struct 👍 👍 20.0 ms (-36%) 15.6 MB (÷4.2)
proj-stuck-struct 👍 👍 20.3 ms (-36%) 13.5 MB (÷4.9)
prop-struct-projections 👍 👍 110 ms (+11%) 48.1 MB (-31%)
refute-cheap-first ✋ ✋ 18.6 ms (÷2.2) 11.7 MB (÷5.9)
refute-cheap-last ✋ ✋ 25.7 ms (÷7.0) 11.8 MB (÷5.9)
repeated-subproblem 👍 👍 18.5 ms (-35%) 11.5 MB (÷5.7)
shared-subterm 👍 👍 43.1 ms (-25%) 14.7 MB (÷5.0)
shift-cascade 👍 👍 26.5 ms (-42%) 12.2 MB (÷5.5)
unroll-versus-evaluate 👍 👍 19.6 ms (-37%) 11.5 MB (÷5.7)
135 2.30 s 14.0 MB
001_basicDef 👍 👍 17.9 ms 10.4 MB
002_badDef ✋ ✋ 17.9 ms 10.4 MB
003_arrowType 👍 👍 17.9 ms 10.3 MB
004_dependentType 👍 👍 17.9 ms 10.4 MB
005_constType 👍 👍 17.9 ms 10.4 MB
006_betaReduction 👍 👍 17.9 ms 10.5 MB
007_betaReduction2 👍 👍 17.9 ms 10.5 MB
008_forallSortWhnf 👍 👍 17.9 ms 10.4 MB
009_forallSortBad ✋ ✋ 17.9 ms 10.4 MB
010_nonTypeType ✋ ✋ 17.9 ms 10.4 MB
011_nonTypeAxiom ✋ ✋ 17.6 ms 8.4 MB
012_nonPropThm ✋ ✋ 17.9 ms 10.3 MB
013_thmProof 👍 👍 17.9 ms 10.4 MB
014_selfProof ✋ ✋ 17.9 ms 12.3 MB
015_levelComp1 👍 👍 17.9 ms 10.4 MB
016_levelComp2 👍 👍 17.9 ms 10.4 MB
017_levelComp3 👍 👍 17.9 ms 10.5 MB
018_levelParams 👍 👍 17.9 ms 10.5 MB
019_tut06_bad01 ✋ ✋ 17.6 ms 8.5 MB
020_levelComp4 👍 👍 17.9 ms 10.3 MB
021_levelComp5 👍 👍 17.9 ms 10.3 MB
022_imax1 👍 👍 17.9 ms 10.3 MB
023_imax2 👍 👍 17.9 ms 10.5 MB
024_levelMaxComm 👍 👍 17.9 ms 10.5 MB
025_levelMaxAssoc 👍 👍 17.9 ms 10.4 MB
026_levelMaxIdem 👍 👍 17.9 ms 10.5 MB
027_levelMaxAbsorb 👍 👍 17.9 ms 10.4 MB
028_inferVar 👍 👍 17.9 ms 10.5 MB
029_defEqLambda 👍 👍 17.9 ms 10.5 MB
030_peano1 👍 👍 18.0 ms 10.6 MB
031_peano2 👍 👍 18.0 ms 10.5 MB
032_peano3 👍 👍 18.1 ms 10.7 MB
033_letType 👍 👍 17.9 ms 10.4 MB
034_letTypeDep 👍 🚫 17.6 ms 8.4 MB
035_letRed 👍 🚫 17.6 ms 8.4 MB
036_empty 👍 👍 17.9 ms 10.4 MB
037_boolType 👍 👍 18.0 ms 10.4 MB
038_twoBool 👍 👍 18.0 ms 10.5 MB
039_andType 👍 👍 18.0 ms 10.4 MB
040_prodType 👍 👍 18.0 ms 10.9 MB
041_pprodType 👍 👍 18.0 ms 10.9 MB
042_pUnitType 👍 👍 18.0 ms 10.5 MB
043_eqType 👍 👍 18.0 ms 10.5 MB
044_natDef 👍 👍 18.1 ms 10.8 MB
045_rbTreeDef 👍 👍 19.1 ms 13.4 MB
046_inductBadNonSort ✋ ✋ 17.6 ms 8.4 MB
047_inductBadNonSort2 ✋ 🚫 17.6 ms 8.4 MB
048_inductLevelParam ✋ ✋ 17.7 ms 8.5 MB
049_inductTooFewParams ✋ ✋ 17.6 ms 8.4 MB
050_inductWrongCtorParams ✋ ✋ 0.754 ms 3.1 MB
051_inductWrongCtorResParams ✋ ✋ 0.756 ms 3.1 MB
052_inductWrongCtorResLevel ✋ ✋ 0.763 ms 3.1 MB
053_inductInIndex ✋ ✋ 0.753 ms 2.9 MB
054_indNeg ✋ ✋ 0.750 ms 3.0 MB
055_reduceCtorParam.mk 👍 👍 18.0 ms 13.2 MB
056_reduceCtorType.mk ✋ ✋ 0.762 ms 3.0 MB
057_indNegReducible ✋ ✋ 0.773 ms 3.0 MB
058_predWithTypeField 👍 👍 18.0 ms 10.6 MB
059_typeWithTypeField 👍 👍 18.0 ms 10.6 MB
060_typeWithTypeFieldPoly 👍 👍 18.0 ms 10.6 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 0.749 ms 2.9 MB
062_emptyRec 👍 👍 18.0 ms 10.4 MB
063_boolRec 👍 👍 17.9 ms 12.5 MB
064_twoBoolRec 👍 👍 18.0 ms 10.6 MB
065_andRec 👍 👍 18.0 ms 10.3 MB
066_prodRec 👍 👍 18.0 ms 10.9 MB
067_pprodRec 👍 👍 18.1 ms 10.9 MB
068_punitRec 👍 👍 18.0 ms 10.5 MB
069_eqRec 👍 👍 18.0 ms 12.5 MB
070_nRec 👍 👍 18.1 ms 10.8 MB
071_rbTreeRef 👍 👍 19.1 ms 13.3 MB
072_boolPropRec 👍 👍 18.0 ms 10.6 MB
073_BogusRecursor ✋ ✋ 0.765 ms 2.9 MB
074_existsRec 👍 👍 18.1 ms 11.2 MB
075_typeSingletonRecReduction 👍 👍 18.1 ms 10.4 MB
076_sortElimPropRec 👍 👍 18.1 ms 11.0 MB
077_sortElimProp2Rec 👍 👍 18.2 ms 11.1 MB
078_boolRecEqns 👍 👍 18.1 ms 10.6 MB
079_prodRecEqns 👍 👍 18.2 ms 11.2 MB
080_nRecReduction 👍 👍 18.3 ms 11.1 MB
081_listRecReduction 👍 👍 18.5 ms 11.6 MB
082_RBTree.id_spec 👍 👍 20.6 ms 13.3 MB
083_And.right 👍 👍 17.9 ms 10.3 MB
084_Prod.snd 👍 👍 18.1 ms 11.0 MB
085_PProd.snd 👍 👍 18.1 ms 11.0 MB
086_PSigma.snd 👍 👍 18.1 ms 11.2 MB
087_projOutOfRange ✋ ✋ 18.0 ms 10.4 MB
088_projNotStruct ✋ ✋ 18.0 ms 10.8 MB
089_projProp1 👍 👍 18.2 ms 11.4 MB
090_projProp2 ✋ ✋ 18.2 ms 11.4 MB
091_projProp3 👍 👍 18.2 ms 11.3 MB
092_projProp4 ✋ ✋ 18.2 ms 11.4 MB
093_projProp5 ✋ ✋ 18.2 ms 11.5 MB
094_projProp6 ✋ ✋ 18.2 ms 11.3 MB
095_projDataIndexRec 👍 👍 18.2 ms 11.1 MB
096_projIndexData ✋ ✋ 18.5 ms 13.9 MB
097_projIndexData2 ✋ ✋ 18.5 ms 11.8 MB
098_projRed 👍 👍 18.2 ms 13.0 MB
099_ruleK 👍 👍 18.0 ms 10.4 MB
100_ruleKbad ✋ ✋ 18.0 ms 10.3 MB
101_ruleKAcc ✋ ✋ 18.5 ms 12.0 MB
102_aNatLit 👍 👍 18.0 ms 10.4 MB
103_natLitEq 👍 👍 18.0 ms 10.4 MB
104_proofIrrelevance 👍 👍 18.0 ms 10.4 MB
105_proofIrrelevanceBad ✋ ✋ 18.0 ms 12.4 MB
106_proofIrrelevanceWhnf 👍 👍 18.0 ms 10.5 MB
107_proofIrrelevanceUnderBinder 👍 🚫 17.6 ms 8.5 MB
108_unitEta1 👍 👍 18.1 ms 10.6 MB
109_unitEta2 👍 👍 18.1 ms 10.6 MB
110_unitEta3 👍 👍 18.1 ms 10.6 MB
111_indexedUnitEta ✋ ✋ 18.1 ms 10.6 MB
112_structEta 👍 👍 18.3 ms 11.2 MB
113_indexedStructEta ✋ ✋ 18.2 ms 10.9 MB
114_funEta 👍 👍 18.0 ms 12.4 MB
115_funEtaDep 👍 👍 18.0 ms 10.5 MB
116_funEtaBad ✋ ✋ 18.0 ms 10.4 MB
117_reflOccLeft ✋ ✋ 0.807 ms 2.9 MB
118_reflOccInIndex ✋ ✋ 0.811 ms 3.1 MB
119_reduceCtorParamRefl.mk 👍 👍 18.1 ms 11.2 MB
120_reduceCtorParamRefl2.mk 👍 👍 18.1 ms 11.2 MB
121_rTreeRec 👍 👍 18.1 ms 10.9 MB
122_rtreeRecReduction 👍 👍 18.2 ms 11.0 MB
123_accRecType 👍 👍 18.3 ms 12.1 MB
124_accRecReduction 👍 👍 18.5 ms 12.1 MB
125_accRecNoEta ✋ ✋ 18.5 ms 14.0 MB
126_quotMkType 👍 👍 18.1 ms 12.3 MB
127_quotIndType 👍 👍 18.1 ms 10.5 MB
128_quotLiftType 👍 👍 18.0 ms 10.5 MB
129_quotSoundType 👍 👍 18.1 ms 10.5 MB
130_quotLiftReduction 👍 👍 18.0 ms 10.5 MB
131_quotIndReduction 👍 👍 18.1 ms 10.6 MB
132_dup_defs ✋ ✋ 17.6 ms 8.4 MB
133_dup_ind_def ✋ ✋ 17.6 ms 8.4 MB
134_dup_ctor_def ✋ ✋ 17.6 ms 8.5 MB
135_dup_rec_def ✋ ✋ 17.6 ms 8.4 MB
136_misnamed_rec_user ✋ ✋ 17.7 ms 8.5 MB
137_dup_rec_def2 ✋ ✋ 17.7 ms 8.5 MB
138_dup_ctor_rec ✋ ✋ 17.6 ms 8.4 MB
139_DupConCon ✋ ✋ 0.775 ms 2.9 MB
140_falseFromUnsafe ✋ 🚫 0.755 ms 3.1 MB
141_falseFromPartial ✋ 🚫 0.755 ms 3.0 MB