This lemma cannot be proved because it is false. And here is a counterexample for the case where wordsize = 8
bits (I'll leave the generalization to you).
Let's take i = 256
and t = 255
. Clearly, the premise of the lemma is true (t < i
). Then, (Int.repr i) = 0
because of the integer wrap around. (Int.repr t) = 255
, since there is no overflow in this case, but ltu
will return true
for the aforementioned values, not false
as the lemma states.
Definition i := 256.
Definition t := 255.
Eval compute in ltu (repr i) (repr t). (* returns true *)
As for the theorem eq_false
, it differs significantly from your lemma, since x
and y
belong to int
, not Z
:
Check eq_false
: forall x y : int, x <> y -> eq x y = false
Hope this helps.