Section FORALL2.
Variable A: Type.
Variable B: Type.
Variable P: A -> B -> Prop.
Inductive list_forall2: list A -> list B -> Prop :=
| list_forall2_nil:
list_forall2 nil nil
| list_forall2_cons:
forall a1 al b1 bl,
P a1 b1 ->
list_forall2 al bl ->
list_forall2 (a1 :: al) (b1 :: bl).
End FORALL2.
(** Dropping the first N elements of a list. *)
Fixpoint list_drop (A: Type) (n: nat) (x: list A) {struct n} : list A :=
match n with
| O => x
| S n' => match x with nil => nil | hd :: tl => list_drop n' tl end
end.
(** A list of [n] elements, all equal to [x]. *)
Fixpoint list_repeat {A: Type} (n: nat) (x: A) {struct n} :=
match n with
| O => nil
| S m => x :: list_repeat m x
end.
(** * Definitions and theorems over boolean types *)
Definition proj_sumbool {P Q: Prop} (a: {P} + {Q}) : bool :=
if a then true else false.
Coercion proj_sumbool: sumbool >-> bool.

Lemma proj_sumbool_true:
forall (P Q: Prop) (a: {P}+{Q}), proj_sumbool a = true -> P.