(* QuickChick rev_involutive. *)

Inductive prod (X Y : Type) : Type :=
| pair : X -> Y -> prod X Y.(* QuickChick rev_involutive. *)

Inductive prod (X Y : Type) : Type :=
| pair : X -> Y -> prod X Y.Notation "X * Y" := (prod X Y) : type_scope.Instance dec_prod' {A} {B} (p q : prod A B) 
         (DA : forall (x y : A), Dec (x = y)) 
         (DB : forall (x y : B), Dec (x = y)) : Dec (p = q).Definition fst {X Y : Type} (p : X * Y) : X :=
  match p with
  | (x, y) => x
  end.Definition snd {X Y : Type} (p : X * Y) : Y :=
  match p with
  | (x, y) => y
  end.Fixpoint combine {X Y : Type} (lx : list X) (ly : list Y)
           : list (X*Y) :=
  match lx, ly with
  | [], _ => []
  | _, [] => []
  | x :: tx, y :: ty => (x, y) :: (combine tx ty)
  end.(*
Fixpoint split {X Y : Type} (l : list (X*Y))
               : (list X) * (list Y)
  (* REPLACE THIS LINE WITH ":= _your_definition_ ." *). Admitted.
*)

Inductive option (X:Type) : Type :=
  | Some : X -> option X
  | None : option X.(*
Fixpoint split {X Y : Type} (l : list (X*Y))
               : (list X) * (list Y)
  (* REPLACE THIS LINE WITH ":= _your_definition_ ." *). Admitted.
*)

Inductive option (X:Type) : Type :=
  | Some : X -> option X
  | None : option X.(*
Fixpoint split {X Y : Type} (l : list (X*Y))
               : (list X) * (list Y)
  (* REPLACE THIS LINE WITH ":= _your_definition_ ." *). Admitted.
*)

Inductive option (X:Type) : Type :=
  | Some : X -> option X
  | None : option X.Instance dec_option' {A} (p q : option A) 
         (D : forall (x y : A), Dec (x = y)) : Dec (p = q).Fixpoint nth_error {X : Type} (l : list X) (n : nat)
                   : option X :=
  match l with
  | [] => None
  | a :: l' => if beq_nat n O then Some a else nth_error l' (pred n)
  end.Fixpoint filter {X:Type} (test: X->bool) (l:list X)
                : (list X) :=
  match l with
  | []     => []
  | h :: t => if test h then h :: (filter test t)
                        else       filter test t
  end.Fixpoint map {X Y:Type} (f:X->Y) (l:list X) : (list Y) :=
  match l with
  | []     => []
  | h :: t => (f h) :: (map f t)
  end.

(* Specifications: *)
Theorem map_rev : forall (X Y : Type) (f : X -> Y) (l : list X), map f (rev l) = rev (map f l).