(* Lemmas about ident lists *)

Fixpoint id_in_list (id: ident) (ids: list ident) : bool :=
 match ids with i::ids' => orb (Pos.eqb id i) (id_in_list id ids') | _ => false end.Fixpoint compute_list_norepet (ids: list ident) : bool :=
 match ids with
 | id :: ids' => if id_in_list id ids' then false else compute_list_norepet ids'
 | nil => true
 end.

(* Specifications: *)
Lemma id_in_list_true: forall i ids, id_in_list i ids = true -> In i ids.
Lemma id_in_list_false: forall i ids, id_in_list i ids = false -> ~In i ids.
Lemma compute_list_norepet_e: forall ids, compute_list_norepet ids = true -> list_norepet ids.
Lemma list_norepet_rev: forall A (l: list A), list_norepet (rev l) = list_norepet l.
Lemma block_eq_dec: forall b1 b2: block, {b1 = b2} + {b1 <> b2}.
Lemma rev_if_be_singleton: forall x, rev_if_be (x::nil) = (x::nil).
Lemma rev_if_be_1: forall i, rev_if_be (i::nil) = (i::nil).
Lemma decode_byte_val: forall m, decode_val Mint8unsigned (Byte m :: nil) = Vint (Int.zero_ext 8 (Int.repr (Byte.unsigned m))).
Lemma Vint_inj: forall x y, Vint x = Vint y -> x=y.