Section Confluence_Beta_Delta.
Inductive bd_par_red1 : env -> term -> term -> Prop :=
| par_betad :
forall (e : env) (M M' T : term),
bd_par_red1 (Ax T :: e) M M' ->
forall N N' : term,
bd_par_red1 e N N' -> bd_par_red1 e (App (Abs T M) N) (subst N' M')
| par_delta :
forall (e : env) (d T N : term) (n : nat),
bd_par_red1 e (lift (S n) d) N ->
item (Def d T) e n -> bd_par_red1 e (Ref n) N
| sort_par_red :
forall (e : env) (s : sort), bd_par_red1 e (Srt s) (Srt s)
| ref_par_red : forall (e : env) (n : nat), bd_par_red1 e (Ref n) (Ref n)
| abs_par_red :
forall (e : env) (M M' T T' : term),
bd_par_red1 (Ax T' :: e) M M' ->
bd_par_red1 e T T' -> bd_par_red1 e (Abs T M) (Abs T' M')
| app_par_red :
forall (e : env) (M M' : term),
bd_par_red1 e M M' ->
forall N N' : term,
bd_par_red1 e N N' -> bd_par_red1 e (App M N) (App M' N')
| prod_par_red :
forall (e : env) (M M' : term),
bd_par_red1 e M M' ->
forall N N' : term,
bd_par_red1 (Ax M' :: e) N N' ->
bd_par_red1 e (Prod M N) (Prod M' N').
Hint Resolve par_betad sort_par_red ref_par_red abs_par_red app_par_red
prod_par_red: pts.
simple induction M; auto with arith pts.
Qed.
Hint Resolve refl_bd_par_red1: pts.
simple induction 1; auto with arith pts; intros.
elim H0; intros; auto with arith pts.
elim H1; auto with arith pts.
elim H1; intros.
apply par_delta with d T; auto with arith pts.
Qed.
simple induction 1; intros; auto with arith pts.
apply red_trans with (App (Abs T M') N'); auto 10 with arith pts.
red in |- *; red in |- *.
apply rt_step.
apply ctx_rule.
left; auto with arith pts.
apply red_trans with (lift (S n) d); auto with arith pts.
red in |- *; red in |- *.
apply rt_step.
apply ctx_rule.
right.
apply delta_intro with T; auto with arith pts.
Qed.

Lemma bd_par_red1_stable_env : R_stable_env bd_par_red1.