Test "corner-cases/vanishing-occurrence"
Expected: 🤷 either · Size: 7.2 KB · Lines: 110 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source
Two inductive types whose constructor field mentions the type being declared only inside a beta-redex that weak head normalisation removes:
| node : (fun _ : Type => Nat) VanishPos → VanishPos
| node : (fun _ : Type => Nat) (VanishNeg → Nat) → VanishNeg
The official kernel puts a constructor field in weak head normal form
before looking for occurrences, finds Nat, and accepts both (the
tutorial's reduceCtorParam shows the same reduction keeping an
occurrence). It does not reduce below the head: when the vanishing
occurrence sits in the domain of an arrow inside the field, as in
corner-cases/positivity-whnf or the tutorial's indNegReducible, it
rejects. Its isRec flag, on the other hand, comes from a syntactic
search, so the export says isRec = true for both types although the
only occurrence is reduced away before the positivity check. A checker
that looks for occurrences before reducing, or recomputes isRec after
reducing, rejects these two; that is a reasonable reading of a rule the
official kernel does not apply uniformly (see the discussion at
https://github.com/leanprover/lean-kernel-arena/pull/181). The elaborator
never writes such a field.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| logos-kernel | 👍 | 0.430 ms | 3.1 MB | |||
| nano-lean | 👍 | 0.535 ms | 17.8 MB | |||
| sokonanoda | 👍 | 0.837 ms | 27.8 MB | |||
| pestka | 👍 | 0.857 ms | 10.6 MB | |||
| kefir | ✋ | 0.585 ms | 6.4 MB | |||
| nanoclo | 👍 | 0.734 ms | 45.6 MB | |||
| kefir-wasm | ✋ | 110 ms | 82.2 MB | |||
| con-ron | 👍 | 22.2 ms | 37.9 MB | |||
| con-agua | 👍 | 18.2 ms | 11.1 MB | |||
| nanoda | 👍 | 0.634 ms | 3.2 MB | |||
| lazylean | 👍 | 1.17 ms | 21.2 MB | |||
| con-leche | 👍 | 4.20 ms | 21.1 MB | |||
| pestka-wasm | 👍 | 80.5 ms | 92.3 MB | |||
| tenet-jvm | 👍 | 90.6 ms | 63.9 MB | |||
| eink0rn | ✋ | 1.46 ms | 11.7 MB | |||
| official | 👍 | 28.1 ms | 66.0 MB | |||
| ind-models | 👍 | 105 ms | 108.5 MB | |||
| lean4lean | 👍 | 28.0 ms | 98.4 MB | |||
| tenet | 👍 | 130 ms | 44.6 MB | |||
| tenet-hs | 👍 | 1.37 ms | 8.7 MB | |||
| ocaml4lean | 👍 | 13.5 ms | 23.7 MB | |||
| lean4cobol | 👍 | 4.20 ms | 13.5 MB | |||
| evmlean | 👍 | 1.39 s | 273.6 MB | |||
| overfull | 👍 | 14.5 s | 46.1 MB | |||
| vow-lean-kernel | 👍 | 165 ms | 14.3 MB | |||
| mini | 👍 | 34.3 ms | 73.7 MB | |||
| canonical-min | 🚫 | 387 ms | 1.1 GB | |||
| kiota | 👍 | 0.776 ms | 9.0 MB | |||
| metalean-slow | ✋ | 30.2 ms | 71.4 MB | |||
| nanobruijn | 👍 | 0.629 ms | 3.6 MB | |||
| metalean-fast | ✋ | 30.2 ms | 71.4 MB | |||
| nanoclo-fortran | 👍 | 0.947 ms | 4.5 MB | |||
| rpylean | 👍 | 0.531 ms | 4.1 MB | |||
| mathgraph | 👍 | 0.736 ms | 33.7 MB | |||
| parse-only | 👍 | 27.7 ms | 65.9 MB |