input-output-hk / input-output-hk/Lean-blaster
[Suggestion] Rewrite rule: `List.any` with equality lambda to `List.elem`
Open
- Dominant language
- Lean
- Stars
- 57
- Forks
- 11
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 10
Description
`List.any l (fun x => x == k)` is currently passed as-is to Z3, which struggles to reason about bound variables in lambda expressions and runs indefinitely on theorems involving this pattern.
A rewrite rule transforming this into `List.elem k l` before SMT translation would eliminate the bound variable. As a side effect, some theorems involving this pattern become provable in the optimization phase alone, without requiring Z3 at all.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.