Section Confluence_Beta.
Inductive beta_par_red1 : env -> term -> term -> Prop :=
| par_beta :
forall (e : env) (M M' T : term),
beta_par_red1 (Ax T :: e) M M' ->
forall N N' : term,
beta_par_red1 e N N' ->
beta_par_red1 e (App (Abs T M) N) (subst N' M')
| sort_par_red_b :
forall (e : env) (s : sort), beta_par_red1 e (Srt s) (Srt s)
| ref_par_red_b :
forall (e : env) (n : nat), beta_par_red1 e (Ref n) (Ref n)
| abs_par_red_b :
forall (e : env) (M M' T T' : term),
beta_par_red1 (Ax T' :: e) M M' ->
beta_par_red1 e T T' -> beta_par_red1 e (Abs T M) (Abs T' M')
| app_par_red_b :
forall (e : env) (M M' : term),
beta_par_red1 e M M' ->
forall N N' : term,
beta_par_red1 e N N' -> beta_par_red1 e (App M N) (App M' N')
| prod_par_red_b :
forall (e : env) (M M' : term),
beta_par_red1 e M M' ->
forall N N' : term,
beta_par_red1 (Ax M' :: e) N N' ->
beta_par_red1 e (Prod M N) (Prod M' N').
Hint Resolve par_beta sort_par_red_b ref_par_red_b abs_par_red_b
app_par_red_b prod_par_red_b: pts.
simple induction M; auto with arith pts.
Qed.
Hint Resolve refl_beta_par_red1: pts.
simple induction 1; auto with arith pts; intros.
elim H0; auto with arith pts.
Qed.
simple induction 1; intros; auto with arith pts.
red in |- *; red in |- *.
apply rt_trans with (App (Abs T M') N'); auto with arith pts.
change (red beta e0 (App (Abs T M0) N0) (App (Abs T M') N')) in |- *.
auto with arith pts.
Qed.
red in |- *.
simple induction 1; auto with arith pts.
Qed.
red in |- *.
simple induction 1; simpl in |- *; intros; auto with arith pts.
rewrite distr_lift_subst; auto with arith pts.
apply par_beta; auto with arith pts.
replace (Ax (lift_rec 1 T k)) with (lift_decl 1 (Ax T) k);
auto with arith pts.
apply abs_par_red_b; auto with arith pts.
replace (Ax (lift_rec 1 T' k)) with (lift_decl 1 (Ax T') k);
auto with arith pts.
apply prod_par_red_b; auto with arith pts.
replace (Ax (lift_rec 1 M' k)) with (lift_decl 1 (Ax M') k);
auto with arith pts.
Qed.
Hint Resolve beta_par_red1_lift: pts.

Lemma beta_par_red1_subst_l :
forall (t u : term) (g : env),
beta_par_red1 g t u ->
forall (v : term) (n : nat) (e : env),
trunc n e g -> beta_par_red1 e (subst_rec t v n) (subst_rec u v n).