End OCCUR.
Section APPEND.
Variable data : Set.
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 first_out_input :
forall (d0 d1 : data) (q : queue data),
first_out data (input data d0 (input data d1 q)) =
input data d0 (first_out data (input data d1 q)).