input-output-hk / input-output-hk/Lean-blaster

[soundness] Constructor proof fields allow false Valid results

Open
#225 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lean
Stars
57
Forks
11
Avg merge
1d 5h
Merged PRs (30d)
10

Description

On `beta-lambda-cache-optimization` at `bafdd4f7976037cd7bd8e443df04af096dc5b96e`, constructor comparison treats different proof constructors as evidence of unequal enclosing data. This proves a false statement.

Minimal reproducer (Lean 4.24.0):
```lean
import Blaster
structure ProofBox where
proof : True ∨ True

-- Accepted by Lean's kernel without Blaster: proofs are irrelevant.
example : ProofBox.mk (.inl .intro) = ProofBox.mk (.inr .intro) := rfl

-- Should be Falsified; currently reports Unexpected Valid.
#blaster (only-optimize: 1) (gen-cex: 0) (solve-result: 1)
[ProofBox.mk (.inl .intro) ≠ ProofBox.mk (.inr .intro)]
```

`structEq?` compares `Or.inl` and `Or.inr` as disjoint data constructors when traversing proof fields. The same issue occurs inside lists of structures. Proof fields must be ignored for constructor equality, while ordinary data fields must still distinguish values.

A fixing PR has already been opened as #223; its regression file will be renamed to this issue's number.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the structEq? comparison described in the issue and inspect fixing PR #223, including its regression file after it is renamed. Verify that proof fields are ignored for constructor equality while ordinary data fields and structures inside lists still distinguish unequal values, using the supplied Lean reproducer.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.