(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
Set Asymmetric Patterns.
(* Contribution to the Coq Library   V6.3 (July 1999)                    *)
(****************************************************************************)
(*                 The Calculus of Inductive Constructions                  *)
(*                                                                          *)
(*                                Projet Coq                                *)
(*                                                                          *)
(*                     INRIA                        ENS-CNRS                *)
(*              Rocquencourt                        Lyon                    *)
(*                                                                          *)
(*                                Coq V5.10                                 *)
(*                              Nov 25th 1994                               *)
(*                                                                          *)
(****************************************************************************)
(*                                Sorting.v                                 *)
(****************************************************************************)
(* These sorting examples have first been compiled by P. Manoury using the  *)
(* ProPre tool to build recursive functions by cases                        *)
(* == Quelques fonctions utiles == *)
(* Inductive Set bool := true : bool | false : bool. *)
Definition si (X : Set) (b : bool) (x y : X) :=
match b with
| true => x
| _ => y
end.

Lemma si_eq2 : forall (X : Set) (x y : X), si X false x y = y.
Fixpoint egal_nat (n : nat) : nat -> bool :=
fun m : nat =>
match n, m with
| O, O => true
| S n, S m => egal_nat n m
| _, _ => false
end.