Skip to content

Unexpected simp_ifs behaviour #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ayhon opened this issue May 6, 2025 · 0 comments
Open

Unexpected simp_ifs behaviour #516

ayhon opened this issue May 6, 2025 · 0 comments

Comments

@ayhon
Copy link
Contributor

ayhon commented May 6, 2025

While using Aeneas I ran into the following situation where I expected simp_ifs to close the goal, yet it did nothing.

theorem extracted_3 (r i : Std.Usize) (dst : Std.Slice Bool)
  (i1 : Std.Usize) (i1_post : (↑i1 : ℕ) = (↑i : ℕ) + (↑r : ℕ)) (h : i1 < dst.len)
: (if h : i.val + r.val + dst.length - (i.val + r.val) ≤ Std.Usize.max then True else False)
:= by
  simp_ifs -- Does nothing.
  have: i.val + r.val + dst.length - (i.val + r.val) ≤ Std.Usize.max := by scalar_tac
  simp only [this, reduceDIte]

I'm still able to close the goal using simp with the explicit if condition discharged by scalar_tac.

Discussion on this issue has already happened privately on Zulip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant