Test "bugs/nat-log2-not-native-bad"
Expected: ✋ reject · Size: 49.0 KB · Lines: 794 · lean4export: 3.1.0 · Lean: 4.35.0 · 📄 Declaration
Proof of False from a kernel that computes Nat.log2 on literals by its name.
The Lean kernel computes natively only Nat.succ and the fourteen binary
operations (Nat.add … Nat.pow); every other constant, Nat.log2
included, is an ordinary definition that reduces by unfolding its body.
This export brings its own small prelude in which
def Nat.log2 : Nat → Nat := fun n => n
is well-typed, so Nat.log2 8 is 8. The theorem
boom : Nat.log2 = L → Nat.log2 8 = 3 → L 8 = 8 → False
(with L := fun n => n) is valid, and T.final : False applies it to
rfl, rfl, rfl. A checker that evaluates Nat.log2 8 to 3 natively
accepts the middle rfl and with it False; the reference kernel unfolds
the definition and rejects it. See bugs/nat-log2-not-native for the
valid counterpart.
Gruszka accepted this export up to 0.2.2 (fixed in 7a88499). nano-lean accepts it as of v0.4.3 (issue).
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| nano-lean | ✋ | 1.40 ms | 30.0 MB | |||
| gruszka | ✋ | 2.74 ms | 108.2 MB | |||
| mathgraph | ✋ | 2.09 ms | 31.8 MB | |||
| sokonanoda | ✋ | 1.80 ms | 31.8 MB | |||
| pestka | ✋ | 3.52 ms | 20.8 MB | |||
| kefir | ✋ | 2.56 ms | 6.3 MB | |||
| kefir-wasm | ✋ | 233 ms | 109.5 MB | |||
| con-ron | ✋ | 30.1 ms | 43.8 MB | |||
| con-ron-stream | ✋ | 30.7 ms | 45.3 MB | |||
| con-agua | ✋ | 21.5 ms | 18.6 MB | |||
| nanobruijn | ✋ | 2.74 ms | 17.8 MB | |||
| nanoda | ✋ | 1.77 ms | 3.4 MB | |||
| con-leche | ✋ | 5.53 ms | 27.1 MB | |||
| pestka-wasm | ✋ | 538 ms | 323.2 MB | |||
| official-nightly | ✋ | 36.9 ms | 99.1 MB | |||
| eink0rn | ✋ | 4.33 ms | 16.3 MB | |||
| official | ✋ | 36.0 ms | 102.7 MB | |||
| ind-models | ✋ | 104 ms | 109.3 MB | |||
| kiota | ✋ | 2.64 ms | 11.4 MB | |||
| tenet | ✋ | 154 ms | 47.3 MB | |||
| tenet-hs | ✋ | 3.45 ms | 13.3 MB | |||
| logos-kernel | ✋ | 1.01 ms | 4.7 MB | |||
| evmlean | ✋ | 8.98 s | 296.4 MB | |||
| mini | ✋ | 47.4 ms | 73.7 MB | |||
| overfull | ⌛ | — | — | |||
| lean4lean | ✋ | 34.4 ms | 101.6 MB | |||
| lean4cobol | ✋ | 30.2 ms | 13.8 MB | |||
| tenet-jvm | 👍 | 161 ms | 80.1 MB | |||
| nanoclo | ✋ | 1.86 ms | 47.5 MB | |||
| vow-lean-kernel | 🚫 | 340 ms | 14.5 MB | |||
| canonical-min | ✋ | 390 ms | 1.1 GB | |||
| lazylean | ✋ | 3.21 ms | 21.6 MB | |||
| rpylean | ✋ | 1.63 ms | 12.5 MB | |||
| metalean-slow | 🚫 | 59.7 ms | 75.2 MB | |||
| metalean-fast | ✋ | 35.7 ms | 82.5 MB | |||
| nanoclo-fortran | ✋ | 2.89 ms | 4.7 MB |