Fixpoint append (q : queue data) : queue data -> queue data :=
  fun q2 : queue data =>
  match q with
  | empty => q2
  | input d q' => input data d (append q' q2)
  end.

Lemma inqueue_append : forall (m : data) (q1 q2 : queue data), In_queue data m q1 \/ In_queue data m q2 -> In_queue data m (append data q1 q2).