I have the following Lemma but couldn't prove it:
Lemma my_comp2: forall i t:Z,
t<i -> Int.ltu (Int.repr i) (Int.repr t) = false.
Proof.
....
I found the tactic for equality (link) but can't find the one for lt/ltu or gt/gtu:
Theorem eq_false: forall x y, x <> y -> eq x y = false.
Any help will be appreciated!
Thanks,
This lemma cannot be proved because it is false. And here is a counterexample for the case where
wordsize = 8bits (I'll leave the generalization to you).Let's take
i = 256andt = 255. Clearly, the premise of the lemma is true (t < i). Then,(Int.repr i) = 0because of the integer wrap around.(Int.repr t) = 255, since there is no overflow in this case, butltuwill returntruefor the aforementioned values, notfalseas the lemma states.As for the theorem
eq_false, it differs significantly from your lemma, sincexandybelong toint, notZ:Hope this helps.