Omega builds illegal proof term containing pos_pow_of_pos
bollu opened this issue · comments
Siddharth commented
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
Consider the MWE (lean playground link here):
/-
application type mismatch
Int.pos_pow_of_pos
argument has type
Int
but function has type
∀ {n : Nat} (m : Nat), 0 < n → 0 < n ^ m
-/
theorem omega_fail
(n : Nat)
(i : Int)
(h2n : (2 : Int) ^ n = ↑((2 : Nat) ^ (n : Nat)))
(hlt : i % 2 ^ n < 2 ^ n) : 2 ^ n ≠ 0 :=
by omega /- No goals -/
Omega builds an incorrect proof term for this goal state.
Context
Occurred when proving bitblasting theorems.
Steps to Reproduce
Expected behavior: Omega should succeed without an illegal proof.
Actual behavior: Omega builds an illegal proof term.
Versions
Live lean version: "4.9.0-nightly-2024-05-11"
Additional Information
[Additional information, configuration or data that might be necessary to reproduce the issue]
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Kim Morrison commented
Thanks! Fixed in #4141.