End Exploration1.
(* ################################################################# *)
(** * Summary: Comparisons and Permutations *)
(** To prove correctness of algorithms for sorting and searching, we'll reason about comparisons and permutations using the tools developed in this chapter.  The [maybe_swap] program is a tiny little example of a sorting program.  The proof style in [maybe_swap_correct] will be applied (at a larger scale) in the next few chapters. *)
(** **** Exercise: 2 stars (Forall_perm)  *)
(** To close, a useful utility lemma.  Prove this by induction; but is it induction on [al], or on [bl], or on [Permutation al bl], or on [Forall f al]  ? *)

(* Specifications: *)
Theorem Forall_perm: forall {A} (f: A -> Prop) al bl,
Permutation al bl ->
Forall f al -> Forall f bl.