Definition mul' (x y: Int.int) : int := repr (Int.unsigned x * Int.unsigned y).

(* Specifications: *)
Lemma mul'_mulhu:
forall x y, mul' x y = ofwords (Int.mulhu x y) (Int.mul x y).
Lemma decompose_mul:
forall xh xl yh yl,
mul (ofwords xh xl) (ofwords yh yl) =
ofwords (Int.add (Int.add (hiword (mul' xl yl)) (Int.mul xl yh)) (Int.mul xh yl))
(loword (mul' xl yl)).
Lemma decompose_mul_2:
forall xh xl yh yl,
mul (ofwords xh xl) (ofwords yh yl) =
ofwords (Int.add (Int.add (Int.mulhu xl yl) (Int.mul xl yh)) (Int.mul xh yl))
(Int.mul xl yl).
Lemma decompose_ltu:
forall xh xl yh yl,
ltu (ofwords xh xl) (ofwords yh yl) = if Int.eq xh yh then Int.ltu xl yl else Int.ltu xh yh.
Lemma decompose_leu:
forall xh xl yh yl,
negb (ltu (ofwords yh yl) (ofwords xh xl)) =
if Int.eq xh yh then negb (Int.ltu yl xl) else Int.ltu xh yh.
Lemma decompose_lt:
forall xh xl yh yl,
lt (ofwords xh xl) (ofwords yh yl) = if Int.eq xh yh then Int.ltu xl yl else Int.lt xh yh.
Lemma decompose_le:
forall xh xl yh yl,
negb (lt (ofwords yh yl) (ofwords xh xl)) =
if Int.eq xh yh then negb (Int.ltu yl xl) else Int.lt xh yh.
Lemma mul'_mulhu:
forall x y, mul' x y = ofwords (Int.mulhu x y) (Int.mul x y).
Lemma decompose_mul:
forall xh xl yh yl,
mul (ofwords xh xl) (ofwords yh yl) =
ofwords (Int.add (Int.add (hiword (mul' xl yl)) (Int.mul xl yh)) (Int.mul xh yl))
(loword (mul' xl yl)).
Lemma decompose_mul_2:
forall xh xl yh yl,
mul (ofwords xh xl) (ofwords yh yl) =
ofwords (Int.add (Int.add (Int.mulhu xl yl) (Int.mul xl yh)) (Int.mul xh yl))
(Int.mul xl yl).
Lemma decompose_ltu:
forall xh xl yh yl,
ltu (ofwords xh xl) (ofwords yh yl) = if Int.eq xh yh then Int.ltu xl yl else Int.ltu xh yh.
Lemma decompose_leu:
forall xh xl yh yl,
negb (ltu (ofwords yh yl) (ofwords xh xl)) =
if Int.eq xh yh then negb (Int.ltu yl xl) else Int.ltu xh yh.
Lemma decompose_lt:
forall xh xl yh yl,
lt (ofwords xh xl) (ofwords yh yl) = if Int.eq xh yh then Int.ltu xl yl else Int.lt xh yh.
Lemma decompose_le:
forall xh xl yh yl,
negb (lt (ofwords yh yl) (ofwords xh xl)) =
if Int.eq xh yh then negb (Int.ltu yl xl) else Int.lt xh yh.