Lean Kernel Arena / corner-cases/eta-unit-like-struct

Test "corner-cases/eta-unit-like-struct"

Expected: 🤷 either · Size: 6.7 KB · Lines: 115 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit-like eta for a structure whose only field is of type Unit.

The official kernel applies eta for unit-like types (any two inhabitants are convertible) only to structures without fields. With that criterion, conversion is not transitive: both p and q are convertible to the same canonical inhabitant (e.g. fun _ => () or ⟨()⟩), but not to each other. Extending the criterion to Pi types whose codomain is unit-like and to structures whose fields are all proofs or unit-like fixes that. The official kernel may adopt this, see https://github.com/leanprover/lean4/pull/15372, https://github.com/leanprover/lean4/issues/2258 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Checker Result ⏱️ 🧠
sokonanoda ✋ 1 ms 42.3 MB
mathgraph ✋ 1 ms 34.0 MB
nanoclo ✋ 1 ms 41.9 MB
con-ron ✋ 23 ms 58.9 MB
nanobruijn ✋ 1 ms 9.9 MB
nanoda ✋ 1 ms 3.4 MB
lazylean ✋ 1 ms 21.7 MB
con-leche ✋ 4 ms 22.5 MB
eink0rn ✋ 2 ms 12.6 MB
official ✋ 28 ms 67.4 MB
ind-models ✋ 100 ms 103.7 MB
lean4lean ✋ 78 ms 105.2 MB
tenet ✋ 136 ms 45.1 MB
tenet-hs ✋ 1 ms 9.2 MB
lean4cobol ✋ 4 ms 13.6 MB
evmlean ✋ 1.6 s 276.2 MB
mini ✋ 34 ms 74.0 MB
overfull ✋ 14.7 s 46.6 MB
metalean-slow ✋ 30 ms 71.6 MB
tenet-jvm ✋ 117 ms 65.8 MB
nanoclo-fortran ✋ 1 ms 4.5 MB
kiota ✋ 1 ms 7.2 MB
metalean-fast ✋ 30 ms 72.4 MB
canonical-min 🚫 387 ms 1.1 GB
rpylean ✋ 1 ms 4.4 MB
vow-lean-kernel ✋ 84 ms 8.6 MB
parse-only 👍 28 ms 66.2 MB