(* 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                                                     *)
(* 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                               *)
(*                                                                          *)
(****************************************************************************)
(****************************************************************************)
(*                               Reduction.v                                *)
(*                                                                          *)
(*                                Gerard Huet                               *)
(*                                                                          *)
(* Developed in V5.8  January 1993                                          *)
(* Ported    to V5.10 January 1995                                          *)
(****************************************************************************)
(* Beta reduction *)
Inductive red1 : lambda -> lambda -> Prop :=
| beta : forall M N : lambda, red1 (App (Abs M) N) (subst N M)
| abs_red : forall M N : lambda, red1 M N -> red1 (Abs M) (Abs N)
| app_red_l :
forall M1 N1 : lambda,
red1 M1 N1 -> forall M2 : lambda, red1 (App M1 M2) (App N1 M2)
| app_red_r :
forall M2 N2 : lambda,
red1 M2 N2 -> forall M1 : lambda, red1 (App M1 M2) (App M1 N2).
(* Transitive closure of red1 *)
Inductive red : lambda -> lambda -> Prop :=
| one_step_red : forall M N : lambda, red1 M N -> red M N
| refl_red : forall M : lambda, red M M
| trans_red : forall M N P : lambda, red M N -> red N P -> red M P.

Lemma red_app :
forall M M' N N' : lambda, red M M' -> red N N' -> red (App M N) (App M' N').