Test "perf/proj-app-lazy-delta"
Expected: 👍 accept · Size: 122.9 KB · Lines: 2.2 k · lean4export: 3.2.0 · Lean: 4.38.0-nightly-2026-12-03 · Timeout: 60.0 s · 📄 Declaration · 🔗 Source
The declaration to check is fun a h => h at type
∀ a, a ∈ small → a ∈ big N
where PSet is a structure with one field Mem : α → Prop (like Mathlib's
Set), a ∈ s unfolds to the applied projection s.1 a, small unfolds
to big N in one delta step, and reducing big N to a constructor takes
Θ(N) steps.
The two sides are applied projections small.1 a and (big N).1 a.
Unfolding small makes them syntactically equal, for Θ(1). A checker
that instead reduces the projected structures to constructors before
comparing evaluates big N, for Θ(N).
When this test was added, official compared bare projections s.1 =?= t.1
lazily, but not applied ones: for those it reduced the structures with
whnf first (Lean issue #16613). The issue uses N = 2^(2^32), on which
official gave up; N=100000 in the Lean source, where it was merely slow.