# Definition of PTS with Judgmental Equality (PTSe)

Here we will define what is a judgmental equality and some basic results. The main difference between PTS and PTSe is that we do not rely here on bare beta-conversion, but we also check that every step of the conversion is welltyped.
Require Import base.

Require Import ut_term.

Require Import ut_red.

Require Import ut_env.

Require Import List.

Require Import Peano_dec.

Require Import Compare_dec.

Require Import Lt Le Gt.

Require Import Plus Minus.

Require Import ut_typ.

Require Import ut_sr.

Module Type ut_typ_eq_mod (X:term_sig) (Y:pts_sig X) (TM:ut_term_mod X) (EM:ut_env_mod X TM) (RM: ut_red_mod X TM)
(SRM: ut_sr_mod X Y TM EM RM).
```Interactive Module Type ut_typ_eq_mod started

```

Import X Y TM EM RM SRM.
```Warning: Notation _ →' _ was already used in scope UT_scope

```

Typing Rules.
Reserved Notation "Γ ⊢e t : T" (at level 80, t, T at level 30, no associativity) .

Reserved Notation "Γ ⊢e M = N : T" (at level 80, M, N , T at level 30, no associativity).

Reserved Notation "Γ ⊣e " (at level 80, no associativity).

Inductive wf : Env -> Prop :=
| wfe_nil : nil e
| wfe_cons : forall Γ A s, Γ e A : !s -> A::Γ e
where "Γ ⊣e" := (wf Γ) : UT_scope
with typ : Env -> Term -> Term -> Prop :=
| cSort : forall Γ s t, Ax s t -> Γ e -> Γ e !s : !t
| cVar : forall Γ A v, Γ e -> A v Γ -> Γ e #v : A
| cPi : forall Γ A B s t u,
Rel s t u -> Γ e A : !s -> A::Γ e B : !t -> Γ e Π(A), B : !u
| cLa : forall Γ A b B s1 s2 s3, Rel s1 s2 s3 -> Γ e A : !s1 -> A::Γ e B : !s2 ->
A::Γ e b : B -> Γ e λ[A], b: Π(A), B
| cApp : forall Γ a b A B , Γ e a : Π(A), B -> Γ e b : A -> Γ e a·b : B[←b]
| Cnv : forall Γ a A B s,
Γ e A = B : !s -> Γ e a : A -> Γ e a : B
where "Γ ⊢e t : T" := (typ Γ t T) : UT_scope
with typ_eq : Env -> Term -> Term -> Term -> Prop :=
| cSort_eq : forall Γ s t, Ax s t -> Γ e -> Γ e !s = !s : !t
| cVar_eq : forall Γ v A, Γ e -> A v Γ -> Γ e #v = #v : A
| cPi_eq : forall Γ A A' B B' s t u, Rel s t u -> Γ e A = A' : !s -> (A::Γ)⊢e B = B' : !t ->
Γ e Π(A),B = Π(A'),B' : !u
| cLa_eq : forall Γ A A' B M M' s t u, Rel s t u -> Γ e A = A' : !s -> (A::Γ) e M = M' : B ->
(A::Γ) e B : !t -> Γ e λ[A],M = λ[A'],M' : Π(A),B
| cApp_eq : forall Γ M M' N N' A B, Γ e M = M' : Π(A),B -> Γe N = N' : A ->
Γ e M·N = M'·N' : B [← N]
| cSym : forall Γ M N A , Γ e M = N : A -> Γ e N = M : A
| cTrans : forall Γ M N P A, Γ e M = N : A -> Γ e N = P : A -> Γ e M = P : A
| Cnv_eq : forall Γ M N A B s, Γ e A = B : !s -> Γ e M = N : A -> Γ e M = N : B
| cBeta : forall Γ A B M N s t u, Rel s t u -> Γ e A : !s -> (A::Γ) e B : !t ->
(A::Γ) e M : B -> Γ e N : A -> Γ e (λ[A],MN = M[← N] : B[← N]
where "Γ ⊢e M = N : T":= (typ_eq Γ M N T) : UT_scope.
```wf, typ, typ_eq are defined
wf_ind is defined
typ_ind is defined
typ_eq_ind is defined

```

Hint Constructors wf typ typ_eq.
```Warning: the hint: eapply wfe_cons will only be used by eauto
Warning: the hint: eapply cPi will only be used by eauto
Warning: the hint: eapply cLa will only be used by eauto
Warning: the hint: eapply cApp will only be used by eauto
Warning: the hint: eapply Cnv will only be used by eauto
Warning: the hint: eapply cPi_eq will only be used by eauto
Warning: the hint: eapply cLa_eq will only be used by eauto
Warning: the hint: eapply cApp_eq will only be used by eauto
Warning: the hint: eapply cTrans will only be used by eauto
Warning: the hint: eapply Cnv_eq will only be used by eauto
Warning: the hint: eapply cBeta will only be used by eauto

```

Open Scope UT_scope.

Scheme typ_ind' := Induction for typ Sort Prop
with typ_eq_ind' := Induction for typ_eq Sort Prop
with wf_ind' := Induction for wf Sort Prop.
```wf_ind' is defined
typ_eq_ind' is defined
typ_ind' is defined
typ_ind', typ_eq_ind', wf_ind' are recursively defined

```

Combined Scheme typ_induc from typ_ind', typ_eq_ind', wf_ind'.
```typ_induc is defined
typ_induc is recursively defined

```

Lemma cRefl : forall Γ M T, Γ e M : T -> Γ e M = M : T.
```1 subgoals, subgoal 1 (ID 99)

============================
forall (Γ : Env) (M T : Term), Γ ⊢e M : T -> Γ ⊢e M = M : T

(dependent evars:)

```

Proof.
```1 subgoals, subgoal 1 (ID 99)

============================
forall (Γ : Env) (M T : Term), Γ ⊢e M : T -> Γ ⊢e M = M : T

(dependent evars:)

```

induction 1; intros; try now constructor.
```4 subgoals, subgoal 1 (ID 155)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
H : Rel s t u
H0 : Γ ⊢e A : !s
H1 : A :: Γ ⊢e B : !t
IHtyp1 : Γ ⊢e A = A : !s
IHtyp2 : A :: Γ ⊢e B = B : !t
============================
Γ ⊢e Π (A), B = Π (A), B : !u

subgoal 2 (ID 171) is:
Γ ⊢e λ [A], b = λ [A], b : Π (A), B
subgoal 3 (ID 181) is:
Γ ⊢e a · b = a · b : B [ ← b]
subgoal 4 (ID 189) is:
Γ ⊢e a = a : B
(dependent evars:)

```

now apply cPi_eq with (s:=s) (t:=t).
```3 subgoals, subgoal 1 (ID 171)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
H : Rel s1 s2 s3
H0 : Γ ⊢e A : !s1
H1 : A :: Γ ⊢e B : !s2
H2 : A :: Γ ⊢e b : B
IHtyp1 : Γ ⊢e A = A : !s1
IHtyp2 : A :: Γ ⊢e B = B : !s2
IHtyp3 : A :: Γ ⊢e b = b : B
============================
Γ ⊢e λ [A], b = λ [A], b : Π (A), B

subgoal 2 (ID 181) is:
Γ ⊢e a · b = a · b : B [ ← b]
subgoal 3 (ID 189) is:
Γ ⊢e a = a : B
(dependent evars:)

```

now apply cLa_eq with (s:=s1) (t:=s2) (u:=s3).
```2 subgoals, subgoal 1 (ID 181)

Γ : Env
a : Term
b : Term
A : Term
B : Term
H : Γ ⊢e a : Π (A), B
H0 : Γ ⊢e b : A
IHtyp1 : Γ ⊢e a = a : Π (A), B
IHtyp2 : Γ ⊢e b = b : A
============================
Γ ⊢e a · b = a · b : B [ ← b]

subgoal 2 (ID 189) is:
Γ ⊢e a = a : B
(dependent evars:)

```

now apply cApp_eq with (A:=A).
```1 subgoals, subgoal 1 (ID 189)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
H : Γ ⊢e A = B : !s
H0 : Γ ⊢e a : A
IHtyp : Γ ⊢e a = a : A
============================
Γ ⊢e a = a : B

(dependent evars:)

```

now apply Cnv_eq with (A:=A) (s:=s).
```No more subgoals.
(dependent evars:)

```

Qed.
```cRefl is defined

```

These lemmas are almost the same as for declarative PTS:
• well formation of contexts
• weakening
• substitution
• type correctness
• ...
Lemma wf_typ : forall Γ t T, Γ e t : T -> Γ e.
```1 subgoals, subgoal 1 (ID 23895)

============================
forall (Γ : Env) (t T : Term), Γ ⊢e t : T -> Γ ⊣e

(dependent evars:)

```

induction 1; intros; intuition.
```No more subgoals.
(dependent evars:)

```

Qed.
```wf_typ is defined

```

Lemma wf_typ_eq : forall Γ M N T, Γ e M = N : T -> Γ e.
```1 subgoals, subgoal 1 (ID 23990)

============================
forall (Γ : Env) (M N T : Term), Γ ⊢e M = N : T -> Γ ⊣e

(dependent evars:)

```

induction 1; intuition.
```1 subgoals, subgoal 1 (ID 24142)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
H : Rel s t u
H0 : Γ ⊢e A : !s
H1 : A :: Γ ⊢e B : !t
H2 : A :: Γ ⊢e M : B
H3 : Γ ⊢e N : A
============================
Γ ⊣e

(dependent evars:)

```

apply wf_typ in H0; trivial.
```No more subgoals.
(dependent evars:)

```

Qed.
```wf_typ_eq is defined

```

Hint Resolve wf_typ wf_typ_eq.
```Warning: the hint: eapply wf_typ will only be used by eauto
Warning: the hint: eapply wf_typ_eq will only be used by eauto

```

Theorem weakening: (forall Δ M T, Δ e M : T -> forall Γ A s n Δ', ins_in_env Γ A n Δ Δ' -> Γ e A :!s ->
Δ' e M 1 # n : T 1 # n ) /\
(forall Δ M N T, Δ e M = N : T -> forall Γ A s n Δ', ins_in_env Γ A n Δ Δ' -> Γ e A :!s ->
Δ' e M 1 # n = N 1 # n : T 1 # n ) /\
(forall Γ, Γ e -> forall Δ Γ' n A , ins_in_env Δ A n Γ Γ' -> forall s, Δ e A : !s -> Γ' e).
```1 subgoals, subgoal 1 (ID 24182)

============================
(forall (Δ : Env) (M T : Term),
Δ ⊢e M : T ->
forall (Γ : Env) (A : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ A n Δ Δ' -> Γ ⊢e A : !s -> Δ' ⊢e M ↑ 1 # n : T ↑ 1 # n) /\
(forall (Δ : Env) (M N T : Term),
Δ ⊢e M = N : T ->
forall (Γ : Env) (A : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ A n Δ Δ' ->
Γ ⊢e A : !s -> Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : T ↑ 1 # n) /\
(forall Γ : Env,
Γ ⊣e ->
forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e)

(dependent evars:)

```

apply typ_induc; simpl in *; intros.
```17 subgoals, subgoal 1 (ID 24229)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
Γ0 : Env
A : Term
s0 : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A n Γ Δ'
H1 : Γ0 ⊢e A : !s0
============================
Δ' ⊢e !s : !t

subgoal 2 (ID 24242) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars:)

```

eauto.
```16 subgoals, subgoal 1 (ID 24242)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n

subgoal 2 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 3 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using ,)

```

destruct le_gt_dec.
```17 subgoals, subgoal 1 (ID 24890)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
Δ' ⊢e #(S v) : A ↑ 1 # n

subgoal 2 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using ,)

```

constructor.
```18 subgoals, subgoal 1 (ID 24894)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
Δ' ⊣e

subgoal 2 (ID 24895) is:
A ↑ 1 # n ↓ S v ⊂ Δ'
subgoal 3 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using ,)

```
eapply H; eauto.
```17 subgoals, subgoal 1 (ID 24895)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
A ↑ 1 # n ↓ S v ⊂ Δ'

subgoal 2 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
destruct i as (AA & ?& ?).
```17 subgoals, subgoal 1 (ID 24916)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
A ↑ 1 # n ↓ S v ⊂ Δ'

subgoal 2 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
exists AA; split.
```18 subgoals, subgoal 1 (ID 24920)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
A ↑ 1 # n = AA ↑ (S (S v))

subgoal 2 (ID 24921) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
rewrite H2.
```18 subgoals, subgoal 1 (ID 24922)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↑ (S v) ↑ 1 # n = AA ↑ (S (S v))

subgoal 2 (ID 24921) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```

change (S (S v)) with (1+ S v).
```18 subgoals, subgoal 1 (ID 24924)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↑ (S v) ↑ 1 # n = AA ↑ (1 + S v)

subgoal 2 (ID 24921) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
rewrite liftP3; trivial.
```19 subgoals, subgoal 1 (ID 24926)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
0 <= n

subgoal 2 (ID 24927) is:
n <= 0 + S v
subgoal 3 (ID 24921) is:
AA ↓ S v ∈ Δ'
subgoal 4 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 5 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 6 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 8 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 10 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 11 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 12 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 13 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 14 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 16 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 17 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 18 (ID 24477) is:
Γ' ⊣e
subgoal 19 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
intuition.
```18 subgoals, subgoal 1 (ID 24927)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
n <= 0 + S v

subgoal 2 (ID 24921) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
simpl; constructor; trivial.
```17 subgoals, subgoal 1 (ID 24921)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↓ S v ∈ Δ'

subgoal 2 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using ,)

```
eapply ins_item_ge.
```19 subgoals, subgoal 1 (ID 24953)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
ins_in_env ?24951 ?24949 ?24950 ?24952 Δ'

subgoal 2 (ID 24954) is:
?24950 <= v
subgoal 3 (ID 24955) is:
AA ↓ v ∈ ?24952
subgoal 4 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 5 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 6 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 8 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 10 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 11 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 12 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 13 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 14 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 16 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 17 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 18 (ID 24477) is:
Γ' ⊣e
subgoal 19 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 open, ?24950 open, ?24951 open, ?24952 open,)

```

apply H0.
```18 subgoals, subgoal 1 (ID 24954)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
n <= v

subgoal 2 (ID 24955) is:
AA ↓ v ∈ Γ
subgoal 3 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using ,)

```
trivial.
```17 subgoals, subgoal 1 (ID 24955)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↓ v ∈ Γ

subgoal 2 (ID 24891) is:
Δ' ⊢e #v : A ↑ 1 # n
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using ,)

```
trivial.
```16 subgoals, subgoal 1 (ID 24891)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
Δ' ⊢e #v : A ↑ 1 # n

subgoal 2 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 3 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using ,)

```
constructor.
```17 subgoals, subgoal 1 (ID 24958)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
Δ' ⊣e

subgoal 2 (ID 24959) is:
A ↑ 1 # n ↓ v ⊂ Δ'
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using ,)

```
eapply H; eauto.
```16 subgoals, subgoal 1 (ID 24959)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
A ↑ 1 # n ↓ v ⊂ Δ'

subgoal 2 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 3 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using ,)

```
eapply ins_item_lift_lt.
```18 subgoals, subgoal 1 (ID 24973)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
ins_in_env ?24971 ?24970 n ?24972 Δ'

subgoal 2 (ID 24974) is:
n > v
subgoal 3 (ID 24975) is:
A ↓ v ⊂ ?24972
subgoal 4 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 5 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 7 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 9 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 10 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 11 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 12 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 15 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 16 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 17 (ID 24477) is:
Γ' ⊣e
subgoal 18 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 open, ?24971 open, ?24972 open,)

```
apply H0.
```17 subgoals, subgoal 1 (ID 24974)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
n > v

subgoal 2 (ID 24975) is:
A ↓ v ⊂ Γ
subgoal 3 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using ,)

```
trivial.
```16 subgoals, subgoal 1 (ID 24975)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
A ↓ v ⊂ Γ

subgoal 2 (ID 24260) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u
subgoal 3 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using ,)

```
trivial.
```15 subgoals, subgoal 1 (ID 24260)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) : !u

subgoal 2 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 3 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 4 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 6 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 7 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 8 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 9 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 13 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 14 (ID 24477) is:
Γ' ⊣e
subgoal 15 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using ,)

```

econstructor.
```17 subgoals, subgoal 1 (ID 24981)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Rel ?24979 ?24980 u

subgoal 2 (ID 24982) is:
Δ' ⊢e A ↑ 1 # n : !?24979
subgoal 3 (ID 24983) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !?24980
subgoal 4 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 open, ?24980 open,)

```
apply r.
```16 subgoals, subgoal 1 (ID 24982)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e A ↑ 1 # n : !s

subgoal 2 (ID 24983) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !t
subgoal 3 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using ,)

```
eapply H; eauto.
```15 subgoals, subgoal 1 (ID 24983)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !t

subgoal 2 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 3 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 4 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 6 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 7 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 8 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 9 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 13 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 14 (ID 24477) is:
Γ' ⊣e
subgoal 15 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using ,)

```
eapply H0.
```16 subgoals, subgoal 1 (ID 24996)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
ins_in_env ?24993 ?24994 (S n) (A :: Γ) (A ↑ 1 # n :: Δ')

subgoal 2 (ID 24997) is:
?24993 ⊢e ?24994 : !?24995
subgoal 3 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 open, ?24994 open, ?24995 open,)

```
constructor; apply H1.
```15 subgoals, subgoal 1 (ID 24997)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Γ0 ⊢e A0 : !?24995

subgoal 2 (ID 24281) is:
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 3 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 4 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 6 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 7 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 8 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 9 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 13 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 14 (ID 24477) is:
Γ' ⊣e
subgoal 15 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 open,)

```
apply H2.
```14 subgoals, subgoal 1 (ID 24281)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s -> Δ' ⊢e A ↑ 1 # n : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : B ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e λ [A ↑ 1 # n], b ↑ 1 # (S n) : Π (A ↑ 1 # n), B ↑ 1 # (S n)

subgoal 2 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 3 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 4 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 5 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 6 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 7 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 8 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 12 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24477) is:
Γ' ⊣e
subgoal 14 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using ,)

```

econstructor.
```17 subgoals, subgoal 1 (ID 25008)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s -> Δ' ⊢e A ↑ 1 # n : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : B ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s
============================
Rel ?25005 ?25006 ?25007

subgoal 2 (ID 25009) is:
Δ' ⊢e A ↑ 1 # n : !?25005
subgoal 3 (ID 25010) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !?25006
subgoal 4 (ID 25011) is:
A ↑ 1 # n :: Δ' ⊢e b ↑ 1 # (S n) : B ↑ 1 # (S n)
subgoal 5 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 6 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 8 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 9 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 10 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 11 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 14 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 15 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 16 (ID 24477) is:
Γ' ⊣e
subgoal 17 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 open, ?25006 open, ?25007 open,)

```
apply r.
```16 subgoals, subgoal 1 (ID 25009)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s -> Δ' ⊢e A ↑ 1 # n : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : B ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e A ↑ 1 # n : !s1

subgoal 2 (ID 25010) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !s2
subgoal 3 (ID 25011) is:
A ↑ 1 # n :: Δ' ⊢e b ↑ 1 # (S n) : B ↑ 1 # (S n)
subgoal 4 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 5 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 7 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 8 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 9 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 10 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 13 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 14 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 15 (ID 24477) is:
Γ' ⊣e
subgoal 16 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using ,)

```
eapply H; eauto.
```15 subgoals, subgoal 1 (ID 25010)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s -> Δ' ⊢e A ↑ 1 # n : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : B ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s
============================
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !s2

subgoal 2 (ID 25011) is:
A ↑ 1 # n :: Δ' ⊢e b ↑ 1 # (S n) : B ↑ 1 # (S n)
subgoal 3 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 4 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 6 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 7 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 8 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 9 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 12 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 13 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 14 (ID 24477) is:
Γ' ⊣e
subgoal 15 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using ,)

```
eapply H0; eauto.
```14 subgoals, subgoal 1 (ID 25011)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s -> Δ' ⊢e A ↑ 1 # n : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : B ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s
============================
A ↑ 1 # n :: Δ' ⊢e b ↑ 1 # (S n) : B ↑ 1 # (S n)

subgoal 2 (ID 24297) is:
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n
subgoal 3 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 4 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 5 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 6 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 7 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 8 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 12 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24477) is:
Γ' ⊣e
subgoal 14 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using ,)

```
eapply H1; eauto.
```13 subgoals, subgoal 1 (ID 24297)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e b : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : B [ ← b] ↑ 1 # n

subgoal 2 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 3 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 4 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using ,)

```

change n with (0+n).
```13 subgoals, subgoal 1 (ID 25042)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e b : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e a ↑ 1 # (0 + n) · b ↑ 1 # (0 + n) : B [ ← b] ↑ 1 # (0 + n)

subgoal 2 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 3 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 4 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using ,)

```
rewrite substP1.
```13 subgoals, subgoal 1 (ID 25043)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e b : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e a ↑ 1 # (0 + n) · b ↑ 1 # (0 + n)
: (B ↑ 1 # (S (0 + n))) [ ← b ↑ 1 # n]

subgoal 2 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 3 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 4 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using ,)

```
simpl.
```13 subgoals, subgoal 1 (ID 25044)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e b : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e a ↑ 1 # n · b ↑ 1 # n : (B ↑ 1 # (S n)) [ ← b ↑ 1 # n]

subgoal 2 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 3 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 4 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using ,)

```

econstructor.
```14 subgoals, subgoal 1 (ID 25051)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e b : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e a ↑ 1 # n : Π (?25050), B ↑ 1 # (S n)

subgoal 2 (ID 25052) is:
Δ' ⊢e b ↑ 1 # n : ?25050
subgoal 3 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 4 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 5 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 6 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 7 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 8 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 11 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 12 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 13 (ID 24477) is:
Γ' ⊣e
subgoal 14 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 open,)

```
eapply H; eauto.
```13 subgoals, subgoal 1 (ID 25052)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e b : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e b ↑ 1 # n : A ↑ 1 # n

subgoal 2 (ID 24313) is:
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n
subgoal 3 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 4 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using ,)

```
eapply H0; eauto.
```12 subgoals, subgoal 1 (ID 24313)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = B ↑ 1 # n : !s
t0 : Γ ⊢e a : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e a ↑ 1 # n : B ↑ 1 # n

subgoal 2 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 3 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using ,)

```

apply Cnv with (A 1 # n) s; intuition.
```13 subgoals, subgoal 1 (ID 25071)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = B ↑ 1 # n : !s
t0 : Γ ⊢e a : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e A ↑ 1 # n = B ↑ 1 # n : !s

subgoal 2 (ID 25072) is:
Δ' ⊢e a ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 4 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using ,)

```

eapply H; eauto.
```12 subgoals, subgoal 1 (ID 25072)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = B ↑ 1 # n : !s
t0 : Γ ⊢e a : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e a ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e a ↑ 1 # n : A ↑ 1 # n

subgoal 2 (ID 24326) is:
Δ' ⊢e !s = !s : !t
subgoal 3 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using ,)

```
eapply H0; eauto.
```11 subgoals, subgoal 1 (ID 24326)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
Γ0 : Env
A : Term
s0 : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A n Γ Δ'
H1 : Γ0 ⊢e A : !s0
============================
Δ' ⊢e !s = !s : !t

subgoal 2 (ID 24339) is:
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using ,)

```

eauto.
```10 subgoals, subgoal 1 (ID 24339)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e (if le_gt_dec n v then #(S v) else #v) =
(if le_gt_dec n v then #(S v) else #v) : A ↑ 1 # n

subgoal 2 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 3 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24477) is:
Γ' ⊣e
subgoal 10 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using ,)

```

destruct le_gt_dec.
```11 subgoals, subgoal 1 (ID 25387)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
Δ' ⊢e #(S v) = #(S v) : A ↑ 1 # n

subgoal 2 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using ,)

```

constructor.
```12 subgoals, subgoal 1 (ID 25391)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
Δ' ⊣e

subgoal 2 (ID 25392) is:
A ↑ 1 # n ↓ S v ⊂ Δ'
subgoal 3 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using ,)

```
eapply H; eauto.
```11 subgoals, subgoal 1 (ID 25392)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
A ↑ 1 # n ↓ S v ⊂ Δ'

subgoal 2 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```
destruct i as (AA & ?& ?).
```11 subgoals, subgoal 1 (ID 25413)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
A ↑ 1 # n ↓ S v ⊂ Δ'

subgoal 2 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```

exists AA; split.
```12 subgoals, subgoal 1 (ID 25417)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
A ↑ 1 # n = AA ↑ (S (S v))

subgoal 2 (ID 25418) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```
rewrite H2.
```12 subgoals, subgoal 1 (ID 25419)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↑ (S v) ↑ 1 # n = AA ↑ (S (S v))

subgoal 2 (ID 25418) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```

change (S (S v)) with (1+ S v).
```12 subgoals, subgoal 1 (ID 25421)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↑ (S v) ↑ 1 # n = AA ↑ (1 + S v)

subgoal 2 (ID 25418) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```
rewrite liftP3; trivial.
```13 subgoals, subgoal 1 (ID 25423)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
0 <= n

subgoal 2 (ID 25424) is:
n <= 0 + S v
subgoal 3 (ID 25418) is:
AA ↓ S v ∈ Δ'
subgoal 4 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```

intuition.
```12 subgoals, subgoal 1 (ID 25424)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
n <= 0 + S v

subgoal 2 (ID 25418) is:
AA ↓ S v ∈ Δ'
subgoal 3 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```
simpl; constructor; trivial.
```11 subgoals, subgoal 1 (ID 25418)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↓ S v ∈ Δ'

subgoal 2 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using ,)

```
eapply ins_item_ge.
```13 subgoals, subgoal 1 (ID 25450)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
ins_in_env ?25448 ?25446 ?25447 ?25449 Δ'

subgoal 2 (ID 25451) is:
?25447 <= v
subgoal 3 (ID 25452) is:
AA ↓ v ∈ ?25449
subgoal 4 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 5 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 6 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 7 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 10 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 11 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 12 (ID 24477) is:
Γ' ⊣e
subgoal 13 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 open, ?25447 open, ?25448 open, ?25449 open,)

```

apply H0.
```12 subgoals, subgoal 1 (ID 25451)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
n <= v

subgoal 2 (ID 25452) is:
AA ↓ v ∈ Γ
subgoal 3 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 25452)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
l : n <= v
============================
AA ↓ v ∈ Γ

subgoal 2 (ID 25388) is:
Δ' ⊢e #v = #v : A ↑ 1 # n
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using ,)

```
trivial.
```10 subgoals, subgoal 1 (ID 25388)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
Δ' ⊢e #v = #v : A ↑ 1 # n

subgoal 2 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 3 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24477) is:
Γ' ⊣e
subgoal 10 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using ,)

```
constructor.
```11 subgoals, subgoal 1 (ID 25455)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
Δ' ⊣e

subgoal 2 (ID 25456) is:
A ↑ 1 # n ↓ v ⊂ Δ'
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using ,)

```
eapply H; eauto.
```10 subgoals, subgoal 1 (ID 25456)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
A ↑ 1 # n ↓ v ⊂ Δ'

subgoal 2 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 3 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24477) is:
Γ' ⊣e
subgoal 10 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using ,)

```

eapply ins_item_lift_lt.
```12 subgoals, subgoal 1 (ID 25470)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
ins_in_env ?25468 ?25467 n ?25469 Δ'

subgoal 2 (ID 25471) is:
n > v
subgoal 3 (ID 25472) is:
A ↓ v ⊂ ?25469
subgoal 4 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 5 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 6 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 9 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 10 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 11 (ID 24477) is:
Γ' ⊣e
subgoal 12 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 open, ?25468 open, ?25469 open,)

```
apply H0.
```11 subgoals, subgoal 1 (ID 25471)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
n > v

subgoal 2 (ID 25472) is:
A ↓ v ⊂ Γ
subgoal 3 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using ,)

```
trivial.
```10 subgoals, subgoal 1 (ID 25472)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ Γ' : Env) (n : nat) (A : Term),
ins_in_env Δ A n Γ Γ' -> forall s : Sorts, Δ ⊢e A : !s -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
g : n > v
============================
A ↓ v ⊂ Γ

subgoal 2 (ID 24359) is:
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u
subgoal 3 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24477) is:
Γ' ⊣e
subgoal 10 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using ,)

```
trivial.
```9 subgoals, subgoal 1 (ID 24359)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n = B' ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e Π (A ↑ 1 # n), B ↑ 1 # (S n) = Π (A' ↑ 1 # n), B' ↑ 1 # (S n) : !u

subgoal 2 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 3 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 4 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 5 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24477) is:
Γ' ⊣e
subgoal 9 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using ,)

```

apply cPi_eq with s t.
```11 subgoals, subgoal 1 (ID 25473)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n = B' ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Rel s t u

subgoal 2 (ID 25474) is:
Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
subgoal 3 (ID 25475) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) = B' ↑ 1 # (S n) : !t
subgoal 4 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 5 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 8 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 9 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 10 (ID 24477) is:
Γ' ⊣e
subgoal 11 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using ,)

```
trivial.
```10 subgoals, subgoal 1 (ID 25474)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n = B' ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s

subgoal 2 (ID 25475) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) = B' ↑ 1 # (S n) : !t
subgoal 3 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 4 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24477) is:
Γ' ⊣e
subgoal 10 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using ,)

```
eapply H; eauto.
```9 subgoals, subgoal 1 (ID 25475)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n = B' ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) = B' ↑ 1 # (S n) : !t

subgoal 2 (ID 24382) is:
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)
subgoal 3 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 4 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 5 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24477) is:
Γ' ⊣e
subgoal 9 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using ,)

```
eapply H0; eauto.
```8 subgoals, subgoal 1 (ID 24382)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : B ↑ 1 # n
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e λ [A ↑ 1 # n], M ↑ 1 # (S n) = λ [A' ↑ 1 # n], M' ↑ 1 # (S n)
: Π (A ↑ 1 # n), B ↑ 1 # (S n)

subgoal 2 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 3 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 5 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24477) is:
Γ' ⊣e
subgoal 8 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using ,)

```

apply cLa_eq with s t u; trivial.
```10 subgoals, subgoal 1 (ID 25496)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : B ↑ 1 # n
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s

subgoal 2 (ID 25497) is:
A ↑ 1 # n :: Δ' ⊢e M ↑ 1 # (S n) = M' ↑ 1 # (S n) : B ↑ 1 # (S n)
subgoal 3 (ID 25498) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !t
subgoal 4 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 7 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 8 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 9 (ID 24477) is:
Γ' ⊣e
subgoal 10 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using ,)

```
eapply H; eauto.
```9 subgoals, subgoal 1 (ID 25497)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : B ↑ 1 # n
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s0
============================
A ↑ 1 # n :: Δ' ⊢e M ↑ 1 # (S n) = M' ↑ 1 # (S n) : B ↑ 1 # (S n)

subgoal 2 (ID 25498) is:
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !t
subgoal 3 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 4 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 5 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 6 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 7 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 8 (ID 24477) is:
Γ' ⊣e
subgoal 9 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using ,)

```
eapply H0; eauto.
```8 subgoals, subgoal 1 (ID 25498)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = A' ↑ 1 # n : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : B ↑ 1 # n
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H2 : ins_in_env Γ0 A0 n Γ Δ'
H3 : Γ0 ⊢e A0 : !s0
============================
A ↑ 1 # n :: Δ' ⊢e B ↑ 1 # (S n) : !t

subgoal 2 (ID 24400) is:
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 3 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 5 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24477) is:
Γ' ⊣e
subgoal 8 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using ,)

```
eapply H1; eauto.
```7 subgoals, subgoal 1 (ID 24400)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s ->
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n : B [ ← N] ↑ 1 # n

subgoal 2 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24477) is:
Γ' ⊣e
subgoal 7 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using ,)

```

change n with (0+n).
```7 subgoals, subgoal 1 (ID 25529)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s ->
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e M ↑ 1 # (0 + n) · N ↑ 1 # (0 + n) =
M' ↑ 1 # (0 + n) · N' ↑ 1 # (0 + n) : B [ ← N] ↑ 1 # (0 + n)

subgoal 2 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24477) is:
Γ' ⊣e
subgoal 7 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using ,)

```
rewrite substP1.
```7 subgoals, subgoal 1 (ID 25530)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s ->
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e M ↑ 1 # (0 + n) · N ↑ 1 # (0 + n) =
M' ↑ 1 # (0 + n) · N' ↑ 1 # (0 + n) : (B ↑ 1 # (S (0 + n))) [ ← N ↑ 1 # n]

subgoal 2 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24477) is:
Γ' ⊣e
subgoal 7 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using ,)

```
simpl.
```7 subgoals, subgoal 1 (ID 25531)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s ->
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e M ↑ 1 # n · N ↑ 1 # n = M' ↑ 1 # n · N' ↑ 1 # n
: (B ↑ 1 # (S n)) [ ← N ↑ 1 # n]

subgoal 2 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24477) is:
Γ' ⊣e
subgoal 7 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using ,)

```

apply cApp_eq with (A 1 # n).
```8 subgoals, subgoal 1 (ID 25532)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s ->
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)

subgoal 2 (ID 25533) is:
Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 5 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 6 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 7 (ID 24477) is:
Γ' ⊣e
subgoal 8 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using ,)

```
eapply H; eauto.
```7 subgoals, subgoal 1 (ID 25533)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s ->
Δ' ⊢e M ↑ 1 # n = M' ↑ 1 # n : Π (A ↑ 1 # n), B ↑ 1 # (S n)
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e N ↑ 1 # n = N' ↑ 1 # n : A ↑ 1 # n

subgoal 2 (ID 24413) is:
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 4 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 5 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 6 (ID 24477) is:
Γ' ⊣e
subgoal 7 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using ,)

```
eapply H0; eauto.
```6 subgoals, subgoal 1 (ID 24413)

Γ : Env
M : Term
N : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H0 : ins_in_env Γ0 A0 n Γ Δ'
H1 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e N ↑ 1 # n = M ↑ 1 # n : A ↑ 1 # n

subgoal 2 (ID 24429) is:
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
subgoal 3 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 4 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 5 (ID 24477) is:
Γ' ⊣e
subgoal 6 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using ,)

```

econstructor; eauto.
```5 subgoals, subgoal 1 (ID 24429)

Γ : Env
M : Term
N : Term
P : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : A ↑ 1 # n
t0 : Γ ⊢e N = P : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s
============================
Δ' ⊢e M ↑ 1 # n = P ↑ 1 # n : A ↑ 1 # n

subgoal 2 (ID 24446) is:
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n
subgoal 3 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 4 (ID 24477) is:
Γ' ⊣e
subgoal 5 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using ,)

```

econstructor; eauto.
```4 subgoals, subgoal 1 (ID 24446)

Γ : Env
M : Term
N : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n = B ↑ 1 # n : !s
t0 : Γ ⊢e M = N : A
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H1 : ins_in_env Γ0 A0 n Γ Δ'
H2 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e M ↑ 1 # n = N ↑ 1 # n : B ↑ 1 # n

subgoal 2 (ID 24470) is:
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n
subgoal 3 (ID 24477) is:
Γ' ⊣e
subgoal 4 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using ,)

```
econstructor; eauto.
```3 subgoals, subgoal 1 (ID 24470)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n : B ↑ 1 # n
t3 : Γ ⊢e N : A
H2 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H3 : ins_in_env Γ0 A0 n Γ Δ'
H4 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
M [ ← N] ↑ 1 # n : B [ ← N] ↑ 1 # n

subgoal 2 (ID 24477) is:
Γ' ⊣e
subgoal 3 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using ,)

```

change n with (0+n).
```3 subgoals, subgoal 1 (ID 26319)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n : B ↑ 1 # n
t3 : Γ ⊢e N : A
H2 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H3 : ins_in_env Γ0 A0 n Γ Δ'
H4 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e (λ [A ↑ 1 # (0 + n)], M ↑ 1 # (S (0 + n))) · N ↑ 1 # (0 + n) =
M [ ← N] ↑ 1 # (0 + n) : B [ ← N] ↑ 1 # (0 + n)

subgoal 2 (ID 24477) is:
Γ' ⊣e
subgoal 3 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using ,)

```
rewrite 2! substP1.
```3 subgoals, subgoal 1 (ID 26321)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n : B ↑ 1 # n
t3 : Γ ⊢e N : A
H2 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H3 : ins_in_env Γ0 A0 n Γ Δ'
H4 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e (λ [A ↑ 1 # (0 + n)], M ↑ 1 # (S (0 + n))) · N ↑ 1 # (0 + n) =
(M ↑ 1 # (S (0 + n))) [ ← N ↑ 1 # n]
: (B ↑ 1 # (S (0 + n))) [ ← N ↑ 1 # n]

subgoal 2 (ID 24477) is:
Γ' ⊣e
subgoal 3 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using ,)

```
simpl.
```3 subgoals, subgoal 1 (ID 26322)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e B ↑ 1 # n : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n (A :: Γ) Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e M ↑ 1 # n : B ↑ 1 # n
t3 : Γ ⊢e N : A
H2 : forall (Γ0 : Env) (A0 : Term) (s : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' ->
Γ0 ⊢e A0 : !s -> Δ' ⊢e N ↑ 1 # n : A ↑ 1 # n
Γ0 : Env
A0 : Term
s0 : Sorts
n : nat
Δ' : Env
H3 : ins_in_env Γ0 A0 n Γ Δ'
H4 : Γ0 ⊢e A0 : !s0
============================
Δ' ⊢e (λ [A ↑ 1 # n], M ↑ 1 # (S n)) · N ↑ 1 # n =
(M ↑ 1 # (S n)) [ ← N ↑ 1 # n] : (B ↑ 1 # (S n)) [ ← N ↑ 1 # n]

subgoal 2 (ID 24477) is:
Γ' ⊣e
subgoal 3 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using ,)

```

apply cBeta with s t u; eauto.
```2 subgoals, subgoal 1 (ID 24477)

Δ : Env
Γ' : Env
n : nat
A : Term
H : ins_in_env Δ A n nil Γ'
s : Sorts
H0 : Δ ⊢e A : !s
============================
Γ' ⊣e

subgoal 2 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using ,)

```

inversion H; subst; clear H.
```2 subgoals, subgoal 1 (ID 26442)

A : Term
s : Sorts
H0 : nil ⊢e A : !s
============================
A :: nil ⊣e

subgoal 2 (ID 24489) is:
Γ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using ,)

```
eauto.
```1 subgoals, subgoal 1 (ID 24489)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
Δ : Env
Γ' : Env
n : nat
A0 : Term
H0 : ins_in_env Δ A0 n (A :: Γ) Γ'
s0 : Sorts
H1 : Δ ⊢e A0 : !s0
============================
Γ' ⊣e

(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using ,)

```

inversion H0; subst; clear H0.
```2 subgoals, subgoal 1 (ID 26548)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
A0 : Term
s0 : Sorts
H1 : A :: Γ ⊢e A0 : !s0
============================
A0 :: A :: Γ ⊣e

subgoal 2 (ID 26549) is:
A ↑ 1 # n0 :: Δ' ⊣e
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using ,)

```

eauto.
```1 subgoals, subgoal 1 (ID 26549)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
Δ : Env
A0 : Term
s0 : Sorts
H1 : Δ ⊢e A0 : !s0
n0 : nat
Δ' : Env
H6 : ins_in_env Δ A0 n0 Γ Δ'
============================
A ↑ 1 # n0 :: Δ' ⊣e

(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using , ?26550 using ,)

```

apply wfe_cons with s; trivial.
```1 subgoals, subgoal 1 (ID 26563)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
Δ : Env
A0 : Term
s0 : Sorts
H1 : Δ ⊢e A0 : !s0
n0 : nat
Δ' : Env
H6 : ins_in_env Δ A0 n0 Γ Δ'
============================
Δ' ⊢e A ↑ 1 # n0 : !s

(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using , ?26550 using ,)

```
change !s with !s 1 # n0.
```1 subgoals, subgoal 1 (ID 26565)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
Δ : Env
A0 : Term
s0 : Sorts
H1 : Δ ⊢e A0 : !s0
n0 : nat
Δ' : Env
H6 : ins_in_env Δ A0 n0 Γ Δ'
============================
Δ' ⊢e A ↑ 1 # n0 : !s ↑ 1 # n0

(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using , ?26550 using ,)

```

eapply H.
```2 subgoals, subgoal 1 (ID 26569)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
Δ : Env
A0 : Term
s0 : Sorts
H1 : Δ ⊢e A0 : !s0
n0 : nat
Δ' : Env
H6 : ins_in_env Δ A0 n0 Γ Δ'
============================
ins_in_env ?26566 ?26567 n0 Γ Δ'

subgoal 2 (ID 26570) is:
?26566 ⊢e ?26567 : !?26568
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using , ?26550 using , ?26566 open, ?26567 open, ?26568 open,)

```
apply H6.
```1 subgoals, subgoal 1 (ID 26570)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ0 : Env) (A0 : Term) (s0 : Sorts) (n : nat) (Δ' : Env),
ins_in_env Γ0 A0 n Γ Δ' -> Γ0 ⊢e A0 : !s0 -> Δ' ⊢e A ↑ 1 # n : !s
Δ : Env
A0 : Term
s0 : Sorts
H1 : Δ ⊢e A0 : !s0
n0 : nat
Δ' : Env
H6 : ins_in_env Δ A0 n0 Γ Δ'
============================
Δ ⊢e A0 : !?26568

(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using , ?26550 using , ?26566 using , ?26567 using , ?26568 open,)

```
apply H1.
```No more subgoals.
(dependent evars: ?24502 using ?24513 , ?24503 using ?24512 , ?24512 using , ?24513 using , ?24721 using , ?24722 using , ?24723 using , ?24724 using , ?24896 using , ?24897 using , ?24898 using , ?24899 using , ?24949 using , ?24950 using , ?24951 using , ?24952 using , ?24960 using , ?24961 using , ?24962 using , ?24963 using , ?24970 using , ?24971 using , ?24972 using , ?24979 using , ?24980 using , ?24984 using , ?24985 using , ?24986 using , ?24993 using , ?24994 using , ?24995 using , ?25005 using , ?25006 using , ?25007 using , ?25012 using , ?25013 using , ?25014 using , ?25021 using , ?25022 using , ?25023 using , ?25031 using , ?25032 using , ?25033 using , ?25050 using , ?25053 using , ?25054 using , ?25055 using , ?25062 using , ?25063 using , ?25064 using , ?25117 using , ?25118 using , ?25119 using , ?25126 using , ?25127 using , ?25128 using , ?25218 using , ?25219 using , ?25220 using , ?25221 using , ?25393 using , ?25394 using , ?25395 using , ?25396 using , ?25446 using , ?25447 using , ?25448 using , ?25449 using , ?25457 using , ?25458 using , ?25459 using , ?25460 using , ?25467 using , ?25468 using , ?25469 using , ?25476 using , ?25477 using , ?25478 using , ?25485 using , ?25486 using , ?25487 using , ?25499 using , ?25500 using , ?25501 using , ?25508 using , ?25509 using , ?25510 using , ?25518 using , ?25519 using , ?25520 using , ?25534 using , ?25535 using , ?25536 using , ?25543 using , ?25544 using , ?25545 using , ?25580 using , ?25581 using , ?25582 using , ?25650 using , ?25792 using , ?25793 using , ?25794 using , ?25859 using , ?25860 using , ?25861 using , ?25903 using , ?25904 using , ?26237 using , ?26238 using , ?26239 using , ?26293 using , ?26294 using , ?26295 using , ?26328 using , ?26329 using , ?26330 using , ?26341 using , ?26342 using , ?26343 using , ?26355 using , ?26356 using , ?26357 using , ?26369 using , ?26370 using , ?26371 using , ?26443 using , ?26550 using , ?26566 using , ?26567 using , ?26568 using ,)

```

Qed.
```weakening is defined

```

Theorem thinning :
forall Γ M T A s,
Γ e M : T ->
Γ e A : !s ->
A::Γ e M 1 : T 1.
```1 subgoals, subgoal 1 (ID 26577)

============================
forall (Γ : Env) (M T A : Term) (s : Sorts),
Γ ⊢e M : T -> Γ ⊢e A : !s -> A :: Γ ⊢e M ↑ 1 : T ↑ 1

(dependent evars:)

```

intros.
```1 subgoals, subgoal 1 (ID 26584)

Γ : Env
M : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M : T
H0 : Γ ⊢e A : !s
============================
A :: Γ ⊢e M ↑ 1 : T ↑ 1

(dependent evars:)

```

eapply weakening.
```3 subgoals, subgoal 1 (ID 26601)

Γ : Env
M : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M : T
H0 : Γ ⊢e A : !s
============================
?26600 ⊢e M : T

subgoal 2 (ID 26604) is:
ins_in_env ?26602 ?26603 0 ?26600 (A :: Γ)
subgoal 3 (ID 26606) is:
?26602 ⊢e ?26603 : !?26605
(dependent evars: ?26593 using ?26600 , ?26594 using ?26602 , ?26595 using ?26603 , ?26596 using ?26605 , ?26600 open, ?26602 open, ?26603 open, ?26605 open,)

```
apply H.
```2 subgoals, subgoal 1 (ID 26604)

Γ : Env
M : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M : T
H0 : Γ ⊢e A : !s
============================
ins_in_env ?26602 ?26603 0 Γ (A :: Γ)

subgoal 2 (ID 26606) is:
?26602 ⊢e ?26603 : !?26605
(dependent evars: ?26593 using ?26600 , ?26594 using ?26602 , ?26595 using ?26603 , ?26596 using ?26605 , ?26600 using , ?26602 open, ?26603 open, ?26605 open,)

```
constructor.
```1 subgoals, subgoal 1 (ID 26606)

Γ : Env
M : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M : T
H0 : Γ ⊢e A : !s
============================
Γ ⊢e A : !?26605

(dependent evars: ?26593 using ?26600 , ?26594 using ?26602 , ?26595 using ?26603 , ?26596 using ?26605 , ?26600 using , ?26602 using , ?26603 using , ?26605 open,)

```
apply H0.
```No more subgoals.
(dependent evars: ?26593 using ?26600 , ?26594 using ?26602 , ?26595 using ?26603 , ?26596 using ?26605 , ?26600 using , ?26602 using , ?26603 using , ?26605 using ,)

```

Qed.
```thinning is defined

```

Theorem thinning_n : forall n Δ Δ',
trunc n Δ Δ' ->
forall M T , Δ' e M : T -> Δ e ->
Δ e M n : T n.
```1 subgoals, subgoal 1 (ID 26615)

============================
forall (n : nat) (Δ Δ' : list Term),
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n

(dependent evars:)

```

intro n; induction n; intros.
```2 subgoals, subgoal 1 (ID 26629)

Δ : list Term
Δ' : list Term
H : trunc 0 Δ Δ'
M : Term
T : Term
H0 : Δ' ⊢e M : T
H1 : Δ ⊣e
============================
Δ ⊢e M ↑ 0 : T ↑ 0

subgoal 2 (ID 26636) is:
Δ ⊢e M ↑ (S n) : T ↑ (S n)
(dependent evars:)

```

inversion H; subst; clear H.
```2 subgoals, subgoal 1 (ID 26696)

Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
H1 : Δ' ⊣e
============================
Δ' ⊢e M ↑ 0 : T ↑ 0

subgoal 2 (ID 26636) is:
Δ ⊢e M ↑ (S n) : T ↑ (S n)
(dependent evars:)

```

rewrite ! lift0; trivial.
```1 subgoals, subgoal 1 (ID 26636)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ : list Term
Δ' : list Term
H : trunc (S n) Δ Δ'
M : Term
T : Term
H0 : Δ' ⊢e M : T
H1 : Δ ⊣e
============================
Δ ⊢e M ↑ (S n) : T ↑ (S n)

(dependent evars:)

```

inversion H; subst; clear H.
```1 subgoals, subgoal 1 (ID 26763)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ (S n) : T ↑ (S n)

(dependent evars:)

```

change (S n) with (1+n).
```1 subgoals, subgoal 1 (ID 26765)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ (1 + n) : T ↑ (1 + n)

(dependent evars:)

```

replace (M (1+n)) with ((M n )↑ 1) by (apply lift_lift).
```1 subgoals, subgoal 1 (ID 26769)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ n ↑ 1 : T ↑ (1 + n)

(dependent evars:)

```

replace (T (1+n)) with ((T n) 1) by (apply lift_lift).
```1 subgoals, subgoal 1 (ID 26774)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ n ↑ 1 : T ↑ n ↑ 1

(dependent evars:)

```

inversion H1; subst; clear H1.
```1 subgoals, subgoal 1 (ID 26824)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
x :: Γ ⊢e M ↑ n ↑ 1 : T ↑ n ↑ 1

(dependent evars:)

```

apply thinning with s; trivial.
```1 subgoals, subgoal 1 (ID 26825)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
Γ ⊢e M ↑ n : T ↑ n

(dependent evars:)

```

eapply IHn.
```3 subgoals, subgoal 1 (ID 26828)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
trunc n Γ ?26827

subgoal 2 (ID 26829) is:
?26827 ⊢e M : T
subgoal 3 (ID 26830) is:
Γ ⊣e
(dependent evars: ?26827 open,)

```
apply H3.
```2 subgoals, subgoal 1 (ID 26829)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
Δ' ⊢e M : T

subgoal 2 (ID 26830) is:
Γ ⊣e
(dependent evars: ?26827 using ,)

```
trivial.
```1 subgoals, subgoal 1 (ID 26830)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M T : Term, Δ' ⊢e M : T -> Δ ⊣e -> Δ ⊢e M ↑ n : T ↑ n
Δ' : list Term
M : Term
T : Term
H0 : Δ' ⊢e M : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
Γ ⊣e

(dependent evars: ?26827 using ,)

```
apply wf_typ in H2; trivial.
```No more subgoals.
(dependent evars: ?26827 using ,)

```

Qed.
```thinning_n is defined

```

Theorem thinning_eq :
forall Γ M N T A s,
Γ e M = N : T ->
Γ e A : !s ->
A::Γ e M 1 = N 1 : T 1.
```1 subgoals, subgoal 1 (ID 26840)

============================
forall (Γ : Env) (M N T A : Term) (s : Sorts),
Γ ⊢e M = N : T -> Γ ⊢e A : !s -> A :: Γ ⊢e M ↑ 1 = N ↑ 1 : T ↑ 1

(dependent evars:)

```

intros.
```1 subgoals, subgoal 1 (ID 26848)

Γ : Env
M : Term
N : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M = N : T
H0 : Γ ⊢e A : !s
============================
A :: Γ ⊢e M ↑ 1 = N ↑ 1 : T ↑ 1

(dependent evars:)

```

eapply weakening.
```3 subgoals, subgoal 1 (ID 26870)

Γ : Env
M : Term
N : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M = N : T
H0 : Γ ⊢e A : !s
============================
?26869 ⊢e M = N : T

subgoal 2 (ID 26873) is:
ins_in_env ?26871 ?26872 0 ?26869 (A :: Γ)
subgoal 3 (ID 26875) is:
?26871 ⊢e ?26872 : !?26874
(dependent evars: ?26855 using ?26862 , ?26856 using ?26864 , ?26857 using ?26865 , ?26858 using ?26867 , ?26862 using ?26869 , ?26864 using ?26871 , ?26865 using ?26872 , ?26867 using ?26874 , ?26869 open, ?26871 open, ?26872 open, ?26874 open,)

```
apply H.
```2 subgoals, subgoal 1 (ID 26873)

Γ : Env
M : Term
N : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M = N : T
H0 : Γ ⊢e A : !s
============================
ins_in_env ?26871 ?26872 0 Γ (A :: Γ)

subgoal 2 (ID 26875) is:
?26871 ⊢e ?26872 : !?26874
(dependent evars: ?26855 using ?26862 , ?26856 using ?26864 , ?26857 using ?26865 , ?26858 using ?26867 , ?26862 using ?26869 , ?26864 using ?26871 , ?26865 using ?26872 , ?26867 using ?26874 , ?26869 using , ?26871 open, ?26872 open, ?26874 open,)

```
constructor.
```1 subgoals, subgoal 1 (ID 26875)

Γ : Env
M : Term
N : Term
T : Term
A : Term
s : Sorts
H : Γ ⊢e M = N : T
H0 : Γ ⊢e A : !s
============================
Γ ⊢e A : !?26874

(dependent evars: ?26855 using ?26862 , ?26856 using ?26864 , ?26857 using ?26865 , ?26858 using ?26867 , ?26862 using ?26869 , ?26864 using ?26871 , ?26865 using ?26872 , ?26867 using ?26874 , ?26869 using , ?26871 using , ?26872 using , ?26874 open,)

```
apply H0.
```No more subgoals.
(dependent evars: ?26855 using ?26862 , ?26856 using ?26864 , ?26857 using ?26865 , ?26858 using ?26867 , ?26862 using ?26869 , ?26864 using ?26871 , ?26865 using ?26872 , ?26867 using ?26874 , ?26869 using , ?26871 using , ?26872 using , ?26874 using ,)

```

Qed.
```thinning_eq is defined

```

Theorem thinning_eq_n : forall n Δ Δ',
trunc n Δ Δ' ->
forall M N T , Δ' e M = N : T -> Δ e ->
Δ e M n = N n: T n.
```1 subgoals, subgoal 1 (ID 26885)

============================
forall (n : nat) (Δ Δ' : list Term),
trunc n Δ Δ' ->
forall M N T : Term, Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n

(dependent evars:)

```

intro n; induction n; intros.
```2 subgoals, subgoal 1 (ID 26900)

Δ : list Term
Δ' : list Term
H : trunc 0 Δ Δ'
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
H1 : Δ ⊣e
============================
Δ ⊢e M ↑ 0 = N ↑ 0 : T ↑ 0

subgoal 2 (ID 26908) is:
Δ ⊢e M ↑ (S n) = N ↑ (S n) : T ↑ (S n)
(dependent evars:)

```

inversion H; subst; clear H.
```2 subgoals, subgoal 1 (ID 26968)

Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
H1 : Δ' ⊣e
============================
Δ' ⊢e M ↑ 0 = N ↑ 0 : T ↑ 0

subgoal 2 (ID 26908) is:
Δ ⊢e M ↑ (S n) = N ↑ (S n) : T ↑ (S n)
(dependent evars:)

```

rewrite 3! lift0; trivial.
```1 subgoals, subgoal 1 (ID 26908)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ : list Term
Δ' : list Term
H : trunc (S n) Δ Δ'
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
H1 : Δ ⊣e
============================
Δ ⊢e M ↑ (S n) = N ↑ (S n) : T ↑ (S n)

(dependent evars:)

```

inversion H; subst; clear H.
```1 subgoals, subgoal 1 (ID 27036)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ (S n) = N ↑ (S n) : T ↑ (S n)

(dependent evars:)

```

change (S n) with (1+n).
```1 subgoals, subgoal 1 (ID 27038)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ (1 + n) = N ↑ (1 + n) : T ↑ (1 + n)

(dependent evars:)

```

replace (M (1+n)) with ((M n )↑ 1) by (apply lift_lift).
```1 subgoals, subgoal 1 (ID 27042)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ n ↑ 1 = N ↑ (1 + n) : T ↑ (1 + n)

(dependent evars:)

```

replace (N (1+n)) with ((N n )↑ 1) by (apply lift_lift).
```1 subgoals, subgoal 1 (ID 27047)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ n ↑ 1 = N ↑ n ↑ 1 : T ↑ (1 + n)

(dependent evars:)

```

replace (T (1+n)) with ((T n) 1) by (apply lift_lift).
```1 subgoals, subgoal 1 (ID 27052)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
H1 : x :: Γ ⊣e
============================
x :: Γ ⊢e M ↑ n ↑ 1 = N ↑ n ↑ 1 : T ↑ n ↑ 1

(dependent evars:)

```

inversion H1; subst; clear H1.
```1 subgoals, subgoal 1 (ID 27102)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
x :: Γ ⊢e M ↑ n ↑ 1 = N ↑ n ↑ 1 : T ↑ n ↑ 1

(dependent evars:)

```

apply thinning_eq with s; trivial.
```1 subgoals, subgoal 1 (ID 27103)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
Γ ⊢e M ↑ n = N ↑ n : T ↑ n

(dependent evars:)

```

eapply IHn.
```3 subgoals, subgoal 1 (ID 27106)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
trunc n Γ ?27105

subgoal 2 (ID 27107) is:
?27105 ⊢e M = N : T
subgoal 3 (ID 27108) is:
Γ ⊣e
(dependent evars: ?27105 open,)

```
apply H3.
```2 subgoals, subgoal 1 (ID 27107)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
Δ' ⊢e M = N : T

subgoal 2 (ID 27108) is:
Γ ⊣e
(dependent evars: ?27105 using ,)

```
trivial.
```1 subgoals, subgoal 1 (ID 27108)

n : nat
IHn : forall Δ Δ' : list Term,
trunc n Δ Δ' ->
forall M N T : Term,
Δ' ⊢e M = N : T -> Δ ⊣e -> Δ ⊢e M ↑ n = N ↑ n : T ↑ n
Δ' : list Term
M : Term
N : Term
T : Term
H0 : Δ' ⊢e M = N : T
Γ : list Term
x : Term
H3 : trunc n Γ Δ'
s : Sorts
H2 : Γ ⊢e x : !s
============================
Γ ⊣e

(dependent evars: ?27105 using ,)

```
apply wf_typ in H2; trivial.
```No more subgoals.
(dependent evars: ?27105 using ,)

```

Qed.
```thinning_eq_n is defined

```

Lemma conv_in_env_var : forall C n Γ, C n Γ ->
forall Γ1 Γ2 A B s, Γ = Γ2++(A::Γ1) -> Γ1 e A = B : !s -> n < List.length Γ2 ->
C n Γ2++(B::Γ1).
```1 subgoals, subgoal 1 (ID 27131)

============================
forall (C : Term) (n : nat) (Γ : list Term),
C ↓ n ∈ Γ ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> n < length Γ2 -> C ↓ n ∈ Γ2 ++ B :: Γ1

(dependent evars:)

```

induction 1; intros.
```2 subgoals, subgoal 1 (ID 27157)

C : Term
Γ : list Term
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H : C :: Γ = Γ2 ++ A :: Γ1
H0 : Γ1 ⊢e A = B : !s
H1 : 0 < length Γ2
============================
C ↓ 0 ∈ Γ2 ++ B :: Γ1

subgoal 2 (ID 27165) is:
C ↓ S n ∈ Γ2 ++ B :: Γ1
(dependent evars:)

```

destruct Γ2; simpl in *.
```3 subgoals, subgoal 1 (ID 27191)

C : Term
Γ : list Term
Γ1 : list Term
A : Term
B : Term
s : Sorts
H : C :: Γ = A :: Γ1
H0 : Γ1 ⊢e A = B : !s
H1 : 0 < 0
============================
C ↓ 0 ∈ B :: Γ1

subgoal 2 (ID 27203) is:
C ↓ 0 ∈ t :: Γ2 ++ B :: Γ1
subgoal 3 (ID 27165) is:
C ↓ S n ∈ Γ2 ++ B :: Γ1
(dependent evars:)

```
apply lt_n_O in H1; elim H1.
```2 subgoals, subgoal 1 (ID 27203)

C : Term
Γ : list Term
Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H : C :: Γ = t :: Γ2 ++ A :: Γ1
H0 : Γ1 ⊢e A = B : !s
H1 : 0 < S (length Γ2)
============================
C ↓ 0 ∈ t :: Γ2 ++ B :: Γ1

subgoal 2 (ID 27165) is:
C ↓ S n ∈ Γ2 ++ B :: Γ1
(dependent evars:)

```

injection H; intros; subst; clear H.
```2 subgoals, subgoal 1 (ID 27226)

Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : Γ1 ⊢e A = B : !s
H1 : 0 < S (length Γ2)
============================
t ↓ 0 ∈ t :: Γ2 ++ B :: Γ1

subgoal 2 (ID 27165) is:
C ↓ S n ∈ Γ2 ++ B :: Γ1
(dependent evars:)

```

constructor.
```1 subgoals, subgoal 1 (ID 27165)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> n < length Γ2 -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : S n < length Γ2
============================
C ↓ S n ∈ Γ2 ++ B :: Γ1

(dependent evars:)

```

destruct Γ2; simpl in *.
```2 subgoals, subgoal 1 (ID 27257)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> n < length Γ2 -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : S n < 0
============================
C ↓ S n ∈ B :: Γ1

subgoal 2 (ID 27273) is:
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1
(dependent evars:)

```
apply lt_n_O in H2; elim H2.
```1 subgoals, subgoal 1 (ID 27273)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> n < length Γ2 -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = t :: Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : S n < S (length Γ2)
============================
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1

(dependent evars:)

```

injection H0; intros; subst; clear H0.
```1 subgoals, subgoal 1 (ID 27298)

C : Term
n : nat
Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S n < S (length Γ2)
H : C ↓ n ∈ Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> n < length Γ4 -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1

(dependent evars:)

```

constructor.
```1 subgoals, subgoal 1 (ID 27301)

C : Term
n : nat
Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S n < S (length Γ2)
H : C ↓ n ∈ Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> n < length Γ4 -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
C ↓ n ∈ Γ2 ++ B :: Γ1

(dependent evars:)

```
apply IHitem with A s; trivial.
```1 subgoals, subgoal 1 (ID 27304)

C : Term
n : nat
Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S n < S (length Γ2)
H : C ↓ n ∈ Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> n < length Γ4 -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
n < length Γ2

(dependent evars:)

```

intuition.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_var is defined

```

Lemma conv_in_env_var2 : forall C n Γ, C n Γ ->
forall Γ1 Γ2 A B s , Γ = Γ2++(A::Γ1) -> Γ1 e A = B : !s ->
List.length Γ2 < n ->
C n Γ2++(B::Γ1).
```1 subgoals, subgoal 1 (ID 27340)

============================
forall (C : Term) (n : nat) (Γ : list Term),
C ↓ n ∈ Γ ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1

(dependent evars:)

```

induction 1; intros.
```2 subgoals, subgoal 1 (ID 27366)

C : Term
Γ : list Term
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H : C :: Γ = Γ2 ++ A :: Γ1
H0 : Γ1 ⊢e A = B : !s
H1 : length Γ2 < 0
============================
C ↓ 0 ∈ Γ2 ++ B :: Γ1

subgoal 2 (ID 27374) is:
C ↓ S n ∈ Γ2 ++ B :: Γ1
(dependent evars:)

```

apply lt_n_O in H1; elim H1.
```1 subgoals, subgoal 1 (ID 27374)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : length Γ2 < S n
============================
C ↓ S n ∈ Γ2 ++ B :: Γ1

(dependent evars:)

```

destruct Γ2; simpl in *.
```2 subgoals, subgoal 1 (ID 27406)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : 0 < S n
============================
C ↓ S n ∈ B :: Γ1

subgoal 2 (ID 27422) is:
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1
(dependent evars:)

```

injection H0; intros; subst; clear H0.
```2 subgoals, subgoal 1 (ID 27445)

C : Term
n : nat
Γ1 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : 0 < S n
H : C ↓ n ∈ Γ1
IHitem : forall (Γ2 Γ3 : list Term) (A B : Term) (s : Sorts),
Γ1 = Γ3 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> length Γ3 < n -> C ↓ n ∈ Γ3 ++ B :: Γ2
============================
C ↓ S n ∈ B :: Γ1

subgoal 2 (ID 27422) is:
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1
(dependent evars:)

```

constructor.
```2 subgoals, subgoal 1 (ID 27448)

C : Term
n : nat
Γ1 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : 0 < S n
H : C ↓ n ∈ Γ1
IHitem : forall (Γ2 Γ3 : list Term) (A B : Term) (s : Sorts),
Γ1 = Γ3 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> length Γ3 < n -> C ↓ n ∈ Γ3 ++ B :: Γ2
============================
C ↓ n ∈ Γ1

subgoal 2 (ID 27422) is:
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1
(dependent evars:)

```
trivial.
```1 subgoals, subgoal 1 (ID 27422)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
t : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = t :: Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : S (length Γ2) < S n
============================
C ↓ S n ∈ t :: Γ2 ++ B :: Γ1

(dependent evars:)

```

destruct Γ2; simpl in *.
```2 subgoals, subgoal 1 (ID 27479)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
t : Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = t :: A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : 1 < S n
============================
C ↓ S n ∈ t :: B :: Γ1

subgoal 2 (ID 27496) is:
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1
(dependent evars:)

```

constructor.
```2 subgoals, subgoal 1 (ID 27499)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
t : Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = t :: A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : 1 < S n
============================
C ↓ n ∈ B :: Γ1

subgoal 2 (ID 27496) is:
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1
(dependent evars:)

```
injection H0; intros; subst; clear H0.
```2 subgoals, subgoal 1 (ID 27522)

C : Term
n : nat
Γ1 : list Term
t : Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : 1 < S n
H : C ↓ n ∈ A :: Γ1
IHitem : forall (Γ2 Γ3 : list Term) (A0 B : Term) (s : Sorts),
A :: Γ1 = Γ3 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> length Γ3 < n -> C ↓ n ∈ Γ3 ++ B :: Γ2
============================
C ↓ n ∈ B :: Γ1

subgoal 2 (ID 27496) is:
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1
(dependent evars:)

```

inversion H; subst; clear H.
```3 subgoals, subgoal 1 (ID 27611)

Γ1 : list Term
t : Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : 1 < 1
IHitem : forall (Γ2 Γ3 : list Term) (A0 B : Term) (s : Sorts),
A :: Γ1 = Γ3 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> length Γ3 < 0 -> A ↓ 0 ∈ Γ3 ++ B :: Γ2
============================
A ↓ 0 ∈ B :: Γ1

subgoal 2 (ID 27612) is:
C ↓ S n0 ∈ B :: Γ1
subgoal 3 (ID 27496) is:
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1
(dependent evars:)

```
apply lt_irrefl in H2; elim H2.
```2 subgoals, subgoal 1 (ID 27612)

C : Term
Γ1 : list Term
t : Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
n0 : nat
H5 : C ↓ n0 ∈ Γ1
H2 : 1 < S (S n0)
IHitem : forall (Γ2 Γ3 : list Term) (A0 B : Term) (s : Sorts),
A :: Γ1 = Γ3 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> length Γ3 < S n0 -> C ↓ S n0 ∈ Γ3 ++ B :: Γ2
============================
C ↓ S n0 ∈ B :: Γ1

subgoal 2 (ID 27496) is:
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1
(dependent evars:)

```

constructor.
```2 subgoals, subgoal 1 (ID 27617)

C : Term
Γ1 : list Term
t : Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
n0 : nat
H5 : C ↓ n0 ∈ Γ1
H2 : 1 < S (S n0)
IHitem : forall (Γ2 Γ3 : list Term) (A0 B : Term) (s : Sorts),
A :: Γ1 = Γ3 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> length Γ3 < S n0 -> C ↓ S n0 ∈ Γ3 ++ B :: Γ2
============================
C ↓ n0 ∈ Γ1

subgoal 2 (ID 27496) is:
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1
(dependent evars:)

```
trivial.
```1 subgoals, subgoal 1 (ID 27496)

C : Term
Γ : list Term
n : nat
y : Term
H : C ↓ n ∈ Γ
IHitem : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ∈ Γ2 ++ B :: Γ1
Γ1 : list Term
t : Term
t0 : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : y :: Γ = t :: t0 :: Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : S (S (length Γ2)) < S n
============================
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1

(dependent evars:)

```

injection H0; intros; subst; clear H0.
```1 subgoals, subgoal 1 (ID 27640)

C : Term
n : nat
Γ1 : list Term
t : Term
t0 : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S (S (length Γ2)) < S n
H : C ↓ n ∈ t0 :: Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
t0 :: Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> length Γ4 < n -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
C ↓ S n ∈ t :: t0 :: Γ2 ++ B :: Γ1

(dependent evars:)

```

constructor.
```1 subgoals, subgoal 1 (ID 27643)

C : Term
n : nat
Γ1 : list Term
t : Term
t0 : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S (S (length Γ2)) < S n
H : C ↓ n ∈ t0 :: Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
t0 :: Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> length Γ4 < n -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
C ↓ n ∈ t0 :: Γ2 ++ B :: Γ1

(dependent evars:)

```
rewrite app_comm_cons.
```1 subgoals, subgoal 1 (ID 27644)

C : Term
n : nat
Γ1 : list Term
t : Term
t0 : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S (S (length Γ2)) < S n
H : C ↓ n ∈ t0 :: Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
t0 :: Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> length Γ4 < n -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
C ↓ n ∈ (t0 :: Γ2) ++ B :: Γ1

(dependent evars:)

```
apply IHitem with A s; trivial.
```1 subgoals, subgoal 1 (ID 27647)

C : Term
n : nat
Γ1 : list Term
t : Term
t0 : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S (S (length Γ2)) < S n
H : C ↓ n ∈ t0 :: Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
t0 :: Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> length Γ4 < n -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
length (t0 :: Γ2) < n

(dependent evars:)

```

simpl.
```1 subgoals, subgoal 1 (ID 27648)

C : Term
n : nat
Γ1 : list Term
t : Term
t0 : Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H1 : Γ1 ⊢e A = B : !s
H2 : S (S (length Γ2)) < S n
H : C ↓ n ∈ t0 :: Γ2 ++ A :: Γ1
IHitem : forall (Γ3 Γ4 : list Term) (A0 B : Term) (s : Sorts),
t0 :: Γ2 ++ A :: Γ1 = Γ4 ++ A0 :: Γ3 ->
Γ3 ⊢e A0 = B : !s -> length Γ4 < n -> C ↓ n ∈ Γ4 ++ B :: Γ3
============================
S (length Γ2) < n

(dependent evars:)

```
intuition.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_var2 is defined

```

Lemma conv_in_env_var3 : forall Γ1 (B:Term) Γ2 , B (List.length Γ1) Γ1++(B::Γ2).
```1 subgoals, subgoal 1 (ID 27672)

============================
forall (Γ1 : list Term) (B : Term) (Γ2 : list Term),
B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2

(dependent evars:)

```

induction Γ1; intros.
```2 subgoals, subgoal 1 (ID 27682)

B : Term
Γ2 : list Term
============================
B ↓ length nil ∈ nil ++ B :: Γ2

subgoal 2 (ID 27684) is:
B ↓ length (a :: Γ1) ∈ (a :: Γ1) ++ B :: Γ2
(dependent evars:)

```

simpl.
```2 subgoals, subgoal 1 (ID 27685)

B : Term
Γ2 : list Term
============================
B ↓ 0 ∈ B :: Γ2

subgoal 2 (ID 27684) is:
B ↓ length (a :: Γ1) ∈ (a :: Γ1) ++ B :: Γ2
(dependent evars:)

```
constructor.
```1 subgoals, subgoal 1 (ID 27684)

a : Term
Γ1 : list Term
IHΓ1 : forall (B : Term) (Γ2 : list Term), B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2
B : Term
Γ2 : list Term
============================
B ↓ length (a :: Γ1) ∈ (a :: Γ1) ++ B :: Γ2

(dependent evars:)

```

simpl.
```1 subgoals, subgoal 1 (ID 27687)

a : Term
Γ1 : list Term
IHΓ1 : forall (B : Term) (Γ2 : list Term), B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2
B : Term
Γ2 : list Term
============================
B ↓ S (length Γ1) ∈ a :: Γ1 ++ B :: Γ2

(dependent evars:)

```
constructor.
```1 subgoals, subgoal 1 (ID 27690)

a : Term
Γ1 : list Term
IHΓ1 : forall (B : Term) (Γ2 : list Term), B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2
B : Term
Γ2 : list Term
============================
B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2

(dependent evars:)

```
apply IHΓ1.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_var3 is defined

```

Lemma conv_in_env_var_lift : forall C n Γ, C n Γ ->
forall Γ1 Γ2 A B s, Γ = Γ2 ++(A::Γ1) -> Γ1 e A = B : !s -> n < List.length Γ2 ->
C n Γ2++(B::Γ1).
```1 subgoals, subgoal 1 (ID 27707)

============================
forall (C : Term) (n : nat) (Γ : Env),
C ↓ n ⊂ Γ ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> n < length Γ2 -> C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

intros.
```1 subgoals, subgoal 1 (ID 27719)

C : Term
n : nat
Γ : Env
H : C ↓ n ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : n < length Γ2
============================
C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

destruct H as (u & h1 & h2).
```1 subgoals, subgoal 1 (ID 27730)

C : Term
n : nat
Γ : Env
u : Term
h1 : C = u ↑ (S n)
h2 : u ↓ n ∈ Γ
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : n < length Γ2
============================
C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

apply (conv_in_env_var u n Γ) with Γ1 Γ2 A B s in h2; trivial.
```1 subgoals, subgoal 1 (ID 27732)

C : Term
n : nat
Γ : Env
u : Term
h1 : C = u ↑ (S n)
Γ1 : list Term
Γ2 : list Term
B : Term
h2 : u ↓ n ∈ Γ2 ++ B :: Γ1
A : Term
s : Sorts
H0 : Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : n < length Γ2
============================
C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

exists u; intuition.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_var_lift is defined

```

Lemma conv_in_env_var_lift2 : forall C n Γ, C n Γ ->
forall Γ1 Γ2 A B s, Γ = Γ2++(A::Γ1) -> Γ1 e A = B : !s ->
List.length Γ2 < n -> C n Γ2++(B::Γ1).
```1 subgoals, subgoal 1 (ID 27758)

============================
forall (C : Term) (n : nat) (Γ : Env),
C ↓ n ⊂ Γ ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ2 ++ A :: Γ1 ->
Γ1 ⊢e A = B : !s -> length Γ2 < n -> C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

intros.
```1 subgoals, subgoal 1 (ID 27770)

C : Term
n : nat
Γ : Env
H : C ↓ n ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : length Γ2 < n
============================
C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

destruct H as (u & h1 & h2).
```1 subgoals, subgoal 1 (ID 27781)

C : Term
n : nat
Γ : Env
u : Term
h1 : C = u ↑ (S n)
h2 : u ↓ n ∈ Γ
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H0 : Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : length Γ2 < n
============================
C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

apply (conv_in_env_var2 u n Γ) with Γ1 Γ2 A B s in h2; trivial.
```1 subgoals, subgoal 1 (ID 27783)

C : Term
n : nat
Γ : Env
u : Term
h1 : C = u ↑ (S n)
Γ1 : list Term
Γ2 : list Term
B : Term
h2 : u ↓ n ∈ Γ2 ++ B :: Γ1
A : Term
s : Sorts
H0 : Γ = Γ2 ++ A :: Γ1
H1 : Γ1 ⊢e A = B : !s
H2 : length Γ2 < n
============================
C ↓ n ⊂ Γ2 ++ B :: Γ1

(dependent evars:)

```

exists u; intuition.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_var_lift2 is defined

```

Lemma conv_in_env_var_lift3 : forall Γ1 (A:Term) Γ2 ,
(A (S (List.length Γ1))) (List.length Γ1) Γ1++(A::Γ2).
```1 subgoals, subgoal 1 (ID 27800)

============================
forall (Γ1 : list Term) (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2

(dependent evars:)

```

induction Γ1; intros.
```2 subgoals, subgoal 1 (ID 27810)

A : Term
Γ2 : list Term
============================
A ↑ (S (length nil)) ↓ length nil ⊂ nil ++ A :: Γ2

subgoal 2 (ID 27812) is:
A ↑ (S (length (a :: Γ1))) ↓ length (a :: Γ1) ⊂ (a :: Γ1) ++ A :: Γ2
(dependent evars:)

```

simpl.
```2 subgoals, subgoal 1 (ID 27813)

A : Term
Γ2 : list Term
============================
A ↑ 1 ↓ 0 ⊂ A :: Γ2

subgoal 2 (ID 27812) is:
A ↑ (S (length (a :: Γ1))) ↓ length (a :: Γ1) ⊂ (a :: Γ1) ++ A :: Γ2
(dependent evars:)

```
exists A; intuition.
```1 subgoals, subgoal 1 (ID 27812)

a : Term
Γ1 : list Term
IHΓ1 : forall (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
A : Term
Γ2 : list Term
============================
A ↑ (S (length (a :: Γ1))) ↓ length (a :: Γ1) ⊂ (a :: Γ1) ++ A :: Γ2

(dependent evars:)

```

simpl.
```1 subgoals, subgoal 1 (ID 27823)

a : Term
Γ1 : list Term
IHΓ1 : forall (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
A : Term
Γ2 : list Term
============================
A ↑ (S (S (length Γ1))) ↓ S (length Γ1) ⊂ a :: Γ1 ++ A :: Γ2

(dependent evars:)

```

assert( H := IHΓ1 A Γ2).
```1 subgoals, subgoal 1 (ID 27825)

a : Term
Γ1 : list Term
IHΓ1 : forall (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
A : Term
Γ2 : list Term
H : A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
============================
A ↑ (S (S (length Γ1))) ↓ S (length Γ1) ⊂ a :: Γ1 ++ A :: Γ2

(dependent evars:)

```

destruct H as ( ?& ?& ?).
```1 subgoals, subgoal 1 (ID 27833)

a : Term
Γ1 : list Term
IHΓ1 : forall (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
A : Term
Γ2 : list Term
x : Term
H : A ↑ (S (length Γ1)) = x ↑ (S (length Γ1))
H0 : x ↓ length Γ1 ∈ Γ1 ++ A :: Γ2
============================
A ↑ (S (S (length Γ1))) ↓ S (length Γ1) ⊂ a :: Γ1 ++ A :: Γ2

(dependent evars:)

```

apply inv_lift in H.
```1 subgoals, subgoal 1 (ID 27835)

a : Term
Γ1 : list Term
IHΓ1 : forall (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
A : Term
Γ2 : list Term
x : Term
H : A = x
H0 : x ↓ length Γ1 ∈ Γ1 ++ A :: Γ2
============================
A ↑ (S (S (length Γ1))) ↓ S (length Γ1) ⊂ a :: Γ1 ++ A :: Γ2

(dependent evars:)

```
subst.
```1 subgoals, subgoal 1 (ID 27840)

a : Term
Γ1 : list Term
IHΓ1 : forall (A : Term) (Γ2 : list Term),
A ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ A :: Γ2
Γ2 : list Term
x : Term
H0 : x ↓ length Γ1 ∈ Γ1 ++ x :: Γ2
============================
x ↑ (S (S (length Γ1))) ↓ S (length Γ1) ⊂ a :: Γ1 ++ x :: Γ2

(dependent evars:)

```

exists x; intuition.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_var_lift3 is defined

```

Lemma conv_in_env_aux_trunc : forall A (Γ1 Γ2:list A) B ,
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2.
```1 subgoals, subgoal 1 (ID 27861)

============================
forall (A : Type) (Γ1 Γ2 : list A) (B : A),
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2

(dependent evars:)

```

induction Γ1; simpl; intros.
```2 subgoals, subgoal 1 (ID 27874)

A : Type
Γ2 : list A
B : A
============================
trunc 1 (B :: Γ2) Γ2

subgoal 2 (ID 27876) is:
trunc (S (S (length Γ1))) (a :: Γ1 ++ B :: Γ2) Γ2
(dependent evars:)

```

constructor; constructor.
```1 subgoals, subgoal 1 (ID 27876)

A : Type
a : A
Γ1 : list A
IHΓ1 : forall (Γ2 : list A) (B : A),
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2
Γ2 : list A
B : A
============================
trunc (S (S (length Γ1))) (a :: Γ1 ++ B :: Γ2) Γ2

(dependent evars:)

```

constructor.
```1 subgoals, subgoal 1 (ID 27883)

A : Type
a : A
Γ1 : list A
IHΓ1 : forall (Γ2 : list A) (B : A),
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2
Γ2 : list A
B : A
============================
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2

(dependent evars:)

```

apply IHΓ1.
```No more subgoals.
(dependent evars:)

```

Qed.
```conv_in_env_aux_trunc is defined

```

Conversion is the context is here provable without SR since every reduction step is checked valid.
Theorem conv_in_env : (forall Γ M T, Γ e M : T-> forall Γ1 Γ2 A B s, Γ = Γ1++(A::Γ2) -> Γ2 e A = B : !s ->
Γ2 e B : !s -> (Γ1++(B::Γ2)) e M : T) /\
(forall Γ M N T, Γ e M = N : T-> forall Γ1 Γ2 A B s, Γ = Γ1++(A::Γ2) -> Γ2 e A = B : !s ->
Γ2 e B : !s -> (Γ1++(B::Γ2)) e M = N : T ) /\
(forall Γ, Γ e -> forall Γ1 Γ2 A B s, Γ = Γ1++(A::Γ2) -> Γ2 e A = B : !s -> Γ2 e B : !s -> Γ1++(B::Γ2) e).
```1 subgoals, subgoal 1 (ID 27931)

============================
(forall (Γ : Env) (M T : Term),
Γ ⊢e M : T ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M : T) /\
(forall (Γ : Env) (M N T : Term),
Γ ⊢e M = N : T ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : T) /\
(forall Γ : Env,
Γ ⊣e ->
forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 -> Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e)

(dependent evars:)

```

apply typ_induc; intros; simpl in *.
```17 subgoals, subgoal 1 (ID 28253)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s0 : Sorts
H0 : Γ = Γ1 ++ A :: Γ2
H1 : Γ2 ⊢e A = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Γ1 ++ B :: Γ2 ⊢e !s : !t

subgoal 2 (ID 28268) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```

constructor.
```18 subgoals, subgoal 1 (ID 28547)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s0 : Sorts
H0 : Γ = Γ1 ++ A :: Γ2
H1 : Γ2 ⊢e A = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Ax s t

subgoal 2 (ID 28548) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 3 (ID 28268) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```
trivial.
```17 subgoals, subgoal 1 (ID 28548)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s0 : Sorts
H0 : Γ = Γ1 ++ A :: Γ2
H1 : Γ2 ⊢e A = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28268) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```
apply H with A s0; trivial.
```16 subgoals, subgoal 1 (ID 28268)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e #v : A

subgoal 2 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 3 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```

destruct (lt_eq_lt_dec v (List.length Γ1)) as [ [] | ].
```18 subgoals, subgoal 1 (ID 28566)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ1 ++ B :: Γ2 ⊢e #v : A

subgoal 2 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```

econstructor.
```19 subgoals, subgoal 1 (ID 28571)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28572) is:
A ↓ v ⊂ Γ1 ++ B :: Γ2
subgoal 3 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```
apply H with A0 s; trivial.
```18 subgoals, subgoal 1 (ID 28572)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
A ↓ v ⊂ Γ1 ++ B :: Γ2

subgoal 2 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars:)

```
eapply conv_in_env_var_lift.
```21 subgoals, subgoal 1 (ID 28579)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
A ↓ v ⊂ ?28576

subgoal 2 (ID 28580) is:
?28576 = Γ1 ++ ?28577 :: Γ2
subgoal 3 (ID 28581) is:
Γ2 ⊢e ?28577 = B : !?28578
subgoal 4 (ID 28582) is:
v < length Γ1
subgoal 5 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 6 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 7 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 8 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 9 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 10 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 11 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 12 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 13 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 14 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 15 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 16 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 17 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 18 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 19 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 20 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 21 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 open, ?28577 open, ?28578 open,)

```
apply i.
```20 subgoals, subgoal 1 (ID 28580)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ = Γ1 ++ ?28577 :: Γ2

subgoal 2 (ID 28581) is:
Γ2 ⊢e ?28577 = B : !?28578
subgoal 3 (ID 28582) is:
v < length Γ1
subgoal 4 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 6 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 7 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 8 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 9 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 10 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 11 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 12 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 13 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 14 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 15 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 16 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 17 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 18 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 19 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 20 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 open, ?28578 open,)

```
apply H0.
```19 subgoals, subgoal 1 (ID 28581)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ2 ⊢e A0 = B : !?28578

subgoal 2 (ID 28582) is:
v < length Γ1
subgoal 3 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 open,)

```
apply H1.
```18 subgoals, subgoal 1 (ID 28582)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
v < length Γ1

subgoal 2 (ID 28567) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
trivial.
```17 subgoals, subgoal 1 (ID 28567)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
e : v = length Γ1
============================
Γ1 ++ B :: Γ2 ⊢e #v : A

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```

subst.
```17 subgoals, subgoal 1 (ID 28594)

A : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
i : A ↓ length Γ1 ⊂ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : A

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
destruct i as (a & ?& ?).
```17 subgoals, subgoal 1 (ID 28602)

A : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H0 : A = a ↑ (S (length Γ1))
H3 : a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : A

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
subst.
```17 subgoals, subgoal 1 (ID 28605)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : a ↑ (S (length Γ1))

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
replace a with A0 in *.
```18 subgoals, subgoal 1 (ID 28611)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : A0 ↑ (S (length Γ1))

subgoal 2 (ID 28606) is:
A0 = a
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
apply Cnv with (B (S (length Γ1))) s.
```19 subgoals, subgoal 1 (ID 28614)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e B ↑ (S (length Γ1)) = A0 ↑ (S (length Γ1)) : !s

subgoal 2 (ID 28615) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : B ↑ (S (length Γ1))
subgoal 3 (ID 28606) is:
A0 = a
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```

change !s with (!s (S (length Γ1))).
```19 subgoals, subgoal 1 (ID 28618)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e B ↑ (S (length Γ1)) = A0 ↑ (S (length Γ1))
: !s ↑ (S (length Γ1))

subgoal 2 (ID 28615) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : B ↑ (S (length Γ1))
subgoal 3 (ID 28606) is:
A0 = a
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
apply thinning_eq_n with Γ2.
```21 subgoals, subgoal 1 (ID 28619)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2

subgoal 2 (ID 28620) is:
Γ2 ⊢e B = A0 : !s
subgoal 3 (ID 28621) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 28615) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : B ↑ (S (length Γ1))
subgoal 5 (ID 28606) is:
A0 = a
subgoal 6 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 7 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 8 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 9 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 10 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 11 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 12 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 13 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 14 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 15 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 16 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 17 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 18 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 19 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 20 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 21 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
apply conv_in_env_aux_trunc.
```20 subgoals, subgoal 1 (ID 28620)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ2 ⊢e B = A0 : !s

subgoal 2 (ID 28621) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 3 (ID 28615) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : B ↑ (S (length Γ1))
subgoal 4 (ID 28606) is:
A0 = a
subgoal 5 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 6 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 7 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 8 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 9 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 10 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 11 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 12 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 13 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 14 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 15 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 16 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 17 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 18 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 19 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 20 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
intuition.
```19 subgoals, subgoal 1 (ID 28621)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28615) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : B ↑ (S (length Γ1))
subgoal 3 (ID 28606) is:
A0 = a
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```

apply H with A0 s; trivial.
```18 subgoals, subgoal 1 (ID 28615)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) : B ↑ (S (length Γ1))

subgoal 2 (ID 28606) is:
A0 = a
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
constructor.
```19 subgoals, subgoal 1 (ID 28640)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28641) is:
B ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ B :: Γ2
subgoal 3 (ID 28606) is:
A0 = a
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
apply H with A0 s; trivial.
```18 subgoals, subgoal 1 (ID 28641)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
B ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ B :: Γ2

subgoal 2 (ID 28606) is:
A0 = a
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
exists B; intuition.
```18 subgoals, subgoal 1 (ID 28649)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2

subgoal 2 (ID 28606) is:
A0 = a
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```

clear.
```18 subgoals, subgoal 1 (ID 28663)

Γ1 : list Term
Γ2 : list Term
B : Term
============================
B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2

subgoal 2 (ID 28606) is:
A0 = a
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
induction Γ1; simpl in *.
```19 subgoals, subgoal 1 (ID 28675)

Γ2 : list Term
B : Term
============================
B ↓ 0 ∈ B :: Γ2

subgoal 2 (ID 28681) is:
B ↓ S (length Γ1) ∈ a :: Γ1 ++ B :: Γ2
subgoal 3 (ID 28606) is:
A0 = a
subgoal 4 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
constructor.
```18 subgoals, subgoal 1 (ID 28681)

a : Term
Γ1 : list Term
Γ2 : list Term
B : Term
IHΓ1 : B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2
============================
B ↓ S (length Γ1) ∈ a :: Γ1 ++ B :: Γ2

subgoal 2 (ID 28606) is:
A0 = a
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
constructor; intuition.
```17 subgoals, subgoal 1 (ID 28606)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
A0 = a

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```

generalize H3; clear.
```17 subgoals, subgoal 1 (ID 28687)

Γ1 : list Term
Γ2 : list Term
A0 : Term
a : Term
============================
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
revert Γ2 A0 a.
```17 subgoals, subgoal 1 (ID 28689)

Γ1 : list Term
============================
forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
induction Γ1; intros; simpl in *.
```18 subgoals, subgoal 1 (ID 28709)

Γ2 : list Term
A0 : Term
a : Term
H3 : a ↓ 0 ∈ A0 :: Γ2
============================
A0 = a

subgoal 2 (ID 28717) is:
A0 = a0
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
inversion H3;subst; clear H3.
```18 subgoals, subgoal 1 (ID 28787)

Γ2 : list Term
A0 : Term
============================
A0 = A0

subgoal 2 (ID 28717) is:
A0 = a0
subgoal 3 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
trivial.
```17 subgoals, subgoal 1 (ID 28717)

a : Term
Γ1 : list Term
IHΓ1 : forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a
Γ2 : list Term
A0 : Term
a0 : Term
H3 : a0 ↓ S (length Γ1) ∈ a :: Γ1 ++ A0 :: Γ2
============================
A0 = a0

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```

inversion H3; subst; clear H3.
```17 subgoals, subgoal 1 (ID 28865)

a : Term
Γ1 : list Term
IHΓ1 : forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a
Γ2 : list Term
A0 : Term
a0 : Term
H0 : a0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
A0 = a0

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using ,)

```
eapply IHΓ1.
```17 subgoals, subgoal 1 (ID 28867)

a : Term
Γ1 : list Term
IHΓ1 : forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a
Γ2 : list Term
A0 : Term
a0 : Term
H0 : a0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
a0 ↓ length Γ1 ∈ Γ1 ++ A0 :: ?28866

subgoal 2 (ID 28568) is:
Γ1 ++ B :: Γ2 ⊢e #v : A
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 open,)

```
apply H0.
```16 subgoals, subgoal 1 (ID 28568)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ1 ++ B :: Γ2 ⊢e #v : A

subgoal 2 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 3 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using ,)

```

econstructor.
```17 subgoals, subgoal 1 (ID 28870)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28871) is:
A ↓ v ⊂ Γ1 ++ B :: Γ2
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using ,)

```
apply H with A0 s; trivial.
```16 subgoals, subgoal 1 (ID 28871)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
A ↓ v ⊂ Γ1 ++ B :: Γ2

subgoal 2 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 3 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using ,)

```
eapply conv_in_env_var_lift2.
```19 subgoals, subgoal 1 (ID 28878)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
A ↓ v ⊂ ?28875

subgoal 2 (ID 28879) is:
?28875 = Γ1 ++ ?28876 :: Γ2
subgoal 3 (ID 28880) is:
Γ2 ⊢e ?28876 = B : !?28877
subgoal 4 (ID 28881) is:
length Γ1 < v
subgoal 5 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 6 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 7 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 8 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 9 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 10 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 11 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 12 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 13 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 14 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 15 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 16 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 17 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 18 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 19 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 open, ?28876 open, ?28877 open,)

```
apply i.
```18 subgoals, subgoal 1 (ID 28879)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ = Γ1 ++ ?28876 :: Γ2

subgoal 2 (ID 28880) is:
Γ2 ⊢e ?28876 = B : !?28877
subgoal 3 (ID 28881) is:
length Γ1 < v
subgoal 4 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 5 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 6 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 7 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 8 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 9 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 10 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 11 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 12 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 13 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 14 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 15 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 16 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 17 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 18 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 open, ?28877 open,)

```
apply H0.
```17 subgoals, subgoal 1 (ID 28880)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ2 ⊢e A0 = B : !?28877

subgoal 2 (ID 28881) is:
length Γ1 < v
subgoal 3 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 open,)

```
apply H1.
```16 subgoals, subgoal 1 (ID 28881)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
length Γ1 < v

subgoal 2 (ID 28288) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u
subgoal 3 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using ,)

```
trivial.
```15 subgoals, subgoal 1 (ID 28288)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B : !u

subgoal 2 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using ,)

```

apply cPi with s t;trivial.
```16 subgoals, subgoal 1 (ID 28883)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e A : !s

subgoal 2 (ID 28884) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 3 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using ,)

```
apply H with A0 s0; trivial.
```15 subgoals, subgoal 1 (ID 28884)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t

subgoal 2 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using ,)

```

rewrite app_comm_cons.
```15 subgoals, subgoal 1 (ID 28888)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e B : !t

subgoal 2 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using ,)

```
eapply H0.
```17 subgoals, subgoal 1 (ID 28891)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
A :: Γ = (A :: Γ1) ++ ?28889 :: Γ2

subgoal 2 (ID 28892) is:
Γ2 ⊢e ?28889 = B0 : !?28890
subgoal 3 (ID 28893) is:
Γ2 ⊢e B0 : !?28890
subgoal 4 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 open, ?28890 open,)

```
rewrite H1; simpl; reflexivity.
```16 subgoals, subgoal 1 (ID 28892)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e A0 = B0 : !?28890

subgoal 2 (ID 28893) is:
Γ2 ⊢e B0 : !?28890
subgoal 3 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 open,)

```
apply H2.
```15 subgoals, subgoal 1 (ID 28893)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e B0 : !s0

subgoal 2 (ID 28311) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using ,)

```
trivial.
```14 subgoals, subgoal 1 (ID 28311)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e λ [A], b : Π (A), B

subgoal 2 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 3 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 4 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 5 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using ,)

```

apply cLa with s1 s2 s3;trivial.
```16 subgoals, subgoal 1 (ID 28898)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e A : !s1

subgoal 2 (ID 28899) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !s2
subgoal 3 (ID 28900) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using ,)

```
apply H with A0 s; trivial.
```15 subgoals, subgoal 1 (ID 28899)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !s2

subgoal 2 (ID 28900) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using ,)

```

rewrite app_comm_cons.
```15 subgoals, subgoal 1 (ID 28904)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e B : !s2

subgoal 2 (ID 28900) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using ,)

```
eapply H0.
```17 subgoals, subgoal 1 (ID 28907)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
A :: Γ = (A :: Γ1) ++ ?28905 :: Γ2

subgoal 2 (ID 28908) is:
Γ2 ⊢e ?28905 = B0 : !?28906
subgoal 3 (ID 28909) is:
Γ2 ⊢e B0 : !?28906
subgoal 4 (ID 28900) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B
subgoal 5 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 6 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 7 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 8 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 9 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 10 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 11 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 12 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 13 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 14 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 15 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 16 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 17 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 open, ?28906 open,)

```
rewrite H2; simpl; reflexivity.
```16 subgoals, subgoal 1 (ID 28908)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
Γ2 ⊢e A0 = B0 : !?28906

subgoal 2 (ID 28909) is:
Γ2 ⊢e B0 : !?28906
subgoal 3 (ID 28900) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 open,)

```
apply H3.
```15 subgoals, subgoal 1 (ID 28909)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
Γ2 ⊢e B0 : !s

subgoal 2 (ID 28900) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using ,)

```
trivial.
```14 subgoals, subgoal 1 (ID 28900)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e b : B

subgoal 2 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 3 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 4 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 5 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using ,)

```

rewrite app_comm_cons.
```14 subgoals, subgoal 1 (ID 28913)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e b : B

subgoal 2 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 3 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 4 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 5 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using ,)

```
eapply H1.
```16 subgoals, subgoal 1 (ID 28916)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
A :: Γ = (A :: Γ1) ++ ?28914 :: Γ2

subgoal 2 (ID 28917) is:
Γ2 ⊢e ?28914 = B0 : !?28915
subgoal 3 (ID 28918) is:
Γ2 ⊢e B0 : !?28915
subgoal 4 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 5 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 6 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 7 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 8 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 9 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 10 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 11 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 12 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 13 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 14 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 15 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 16 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 open, ?28915 open,)

```
rewrite H2; simpl; reflexivity.
```15 subgoals, subgoal 1 (ID 28917)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
Γ2 ⊢e A0 = B0 : !?28915

subgoal 2 (ID 28918) is:
Γ2 ⊢e B0 : !?28915
subgoal 3 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 4 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 5 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 6 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 open,)

```
apply H3.
```14 subgoals, subgoal 1 (ID 28918)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e A : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e b : B
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s
H4 : Γ2 ⊢e B0 : !s
============================
Γ2 ⊢e B0 : !s

subgoal 2 (ID 28329) is:
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]
subgoal 3 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 4 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 5 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
trivial.
```13 subgoals, subgoal 1 (ID 28329)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e a : Π (A), B
t0 : Γ ⊢e b : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e b : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s
H3 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e a · b : B [ ← b]

subgoal 2 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 3 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 4 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```

apply cApp with A.
```14 subgoals, subgoal 1 (ID 28922)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e a : Π (A), B
t0 : Γ ⊢e b : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e b : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s
H3 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e a : Π (A), B

subgoal 2 (ID 28923) is:
Γ1 ++ B0 :: Γ2 ⊢e b : A
subgoal 3 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 4 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 5 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
apply H with A0 s; trivial.
```13 subgoals, subgoal 1 (ID 28923)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e a : Π (A), B
t0 : Γ ⊢e b : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e b : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s
H3 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e b : A

subgoal 2 (ID 28347) is:
Γ1 ++ B0 :: Γ2 ⊢e a : B
subgoal 3 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 4 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
apply H0 with A0 s; trivial.
```12 subgoals, subgoal 1 (ID 28347)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s0 -> Γ2 ⊢e B0 : !s0 -> Γ1 ++ B0 :: Γ2 ⊢e A = B : !s
t0 : Γ ⊢e a : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e a : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e a : B

subgoal 2 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 3 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```

apply Cnv with A s; trivial.
```13 subgoals, subgoal 1 (ID 28930)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s0 -> Γ2 ⊢e B0 : !s0 -> Γ1 ++ B0 :: Γ2 ⊢e A = B : !s
t0 : Γ ⊢e a : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e a : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e A = B : !s

subgoal 2 (ID 28931) is:
Γ1 ++ B0 :: Γ2 ⊢e a : A
subgoal 3 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 4 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
apply H with A0 s0; trivial.
```12 subgoals, subgoal 1 (ID 28931)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s0 -> Γ2 ⊢e B0 : !s0 -> Γ1 ++ B0 :: Γ2 ⊢e A = B : !s
t0 : Γ ⊢e a : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e a : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e a : A

subgoal 2 (ID 28362) is:
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t
subgoal 3 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
apply H0 with A0 s0; trivial.
```11 subgoals, subgoal 1 (ID 28362)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s0 : Sorts
H0 : Γ = Γ1 ++ A :: Γ2
H1 : Γ2 ⊢e A = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Γ1 ++ B :: Γ2 ⊢e !s = !s : !t

subgoal 2 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```

constructor.
```12 subgoals, subgoal 1 (ID 28939)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s0 : Sorts
H0 : Γ = Γ1 ++ A :: Γ2
H1 : Γ2 ⊢e A = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Ax s t

subgoal 2 (ID 28940) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 3 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 28940)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s0 : Sorts
H0 : Γ = Γ1 ++ A :: Γ2
H1 : Γ2 ⊢e A = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28377) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
apply H with A s0; trivial.
```10 subgoals, subgoal 1 (ID 28377)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e #v = #v : A

subgoal 2 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 3 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```

destruct (lt_eq_lt_dec v (List.length Γ1)) as [ [] | ].
```12 subgoals, subgoal 1 (ID 28958)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ1 ++ B :: Γ2 ⊢e #v = #v : A

subgoal 2 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```

econstructor.
```13 subgoals, subgoal 1 (ID 28963)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28964) is:
A ↓ v ⊂ Γ1 ++ B :: Γ2
subgoal 3 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
apply H with A0 s; trivial.
```12 subgoals, subgoal 1 (ID 28964)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
A ↓ v ⊂ Γ1 ++ B :: Γ2

subgoal 2 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using ,)

```
eapply conv_in_env_var_lift.
```15 subgoals, subgoal 1 (ID 28971)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
A ↓ v ⊂ ?28968

subgoal 2 (ID 28972) is:
?28968 = Γ1 ++ ?28969 :: Γ2
subgoal 3 (ID 28973) is:
Γ2 ⊢e ?28969 = B : !?28970
subgoal 4 (ID 28974) is:
v < length Γ1
subgoal 5 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 open, ?28969 open, ?28970 open,)

```

apply i.
```14 subgoals, subgoal 1 (ID 28972)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ = Γ1 ++ ?28969 :: Γ2

subgoal 2 (ID 28973) is:
Γ2 ⊢e ?28969 = B : !?28970
subgoal 3 (ID 28974) is:
v < length Γ1
subgoal 4 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 open, ?28970 open,)

```
apply H0.
```13 subgoals, subgoal 1 (ID 28973)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
Γ2 ⊢e A0 = B : !?28970

subgoal 2 (ID 28974) is:
v < length Γ1
subgoal 3 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 open,)

```
apply H1.
```12 subgoals, subgoal 1 (ID 28974)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : v < length Γ1
============================
v < length Γ1

subgoal 2 (ID 28959) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 28959)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
e : v = length Γ1
============================
Γ1 ++ B :: Γ2 ⊢e #v = #v : A

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

subst.
```11 subgoals, subgoal 1 (ID 28986)

A : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
i : A ↓ length Γ1 ⊂ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : A

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
destruct i as (a & ?& ?).
```11 subgoals, subgoal 1 (ID 28994)

A : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H0 : A = a ↑ (S (length Γ1))
H3 : a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : A

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
subst.
```11 subgoals, subgoal 1 (ID 28997)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : a ↑ (S (length Γ1))

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

replace a with A0 in *.
```12 subgoals, subgoal 1 (ID 29003)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : A0 ↑ (S (length Γ1))

subgoal 2 (ID 28998) is:
A0 = a
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
apply Cnv_eq with (B (S (length Γ1))) s.
```13 subgoals, subgoal 1 (ID 29006)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e B ↑ (S (length Γ1)) = A0 ↑ (S (length Γ1)) : !s

subgoal 2 (ID 29007) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : B ↑ (S (length Γ1))
subgoal 3 (ID 28998) is:
A0 = a
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

change !s with (!s (S (length Γ1))).
```13 subgoals, subgoal 1 (ID 29010)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e B ↑ (S (length Γ1)) = A0 ↑ (S (length Γ1))
: !s ↑ (S (length Γ1))

subgoal 2 (ID 29007) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : B ↑ (S (length Γ1))
subgoal 3 (ID 28998) is:
A0 = a
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
apply thinning_eq_n with Γ2.
```15 subgoals, subgoal 1 (ID 29011)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
trunc (S (length Γ1)) (Γ1 ++ B :: Γ2) Γ2

subgoal 2 (ID 29012) is:
Γ2 ⊢e B = A0 : !s
subgoal 3 (ID 29013) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 29007) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : B ↑ (S (length Γ1))
subgoal 5 (ID 28998) is:
A0 = a
subgoal 6 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 7 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 8 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 9 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 10 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 11 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 12 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 13 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 14 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 15 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

apply conv_in_env_aux_trunc.
```14 subgoals, subgoal 1 (ID 29012)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ2 ⊢e B = A0 : !s

subgoal 2 (ID 29013) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 3 (ID 29007) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : B ↑ (S (length Γ1))
subgoal 4 (ID 28998) is:
A0 = a
subgoal 5 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 6 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 7 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 8 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 9 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 10 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 11 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 12 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 13 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 14 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
intuition.
```13 subgoals, subgoal 1 (ID 29013)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 29007) is:
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : B ↑ (S (length Γ1))
subgoal 3 (ID 28998) is:
A0 = a
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

apply H with A0 s; trivial.
```12 subgoals, subgoal 1 (ID 29007)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊢e #(length Γ1) = #(length Γ1) : B ↑ (S (length Γ1))

subgoal 2 (ID 28998) is:
A0 = a
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
constructor.
```13 subgoals, subgoal 1 (ID 29032)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 29033) is:
B ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ B :: Γ2
subgoal 3 (ID 28998) is:
A0 = a
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
apply H with A0 s; trivial.
```12 subgoals, subgoal 1 (ID 29033)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
B ↑ (S (length Γ1)) ↓ length Γ1 ⊂ Γ1 ++ B :: Γ2

subgoal 2 (ID 28998) is:
A0 = a
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

exists B; intuition.
```12 subgoals, subgoal 1 (ID 29041)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : A0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2

subgoal 2 (ID 28998) is:
A0 = a
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

clear.
```12 subgoals, subgoal 1 (ID 29055)

Γ1 : list Term
Γ2 : list Term
B : Term
============================
B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2

subgoal 2 (ID 28998) is:
A0 = a
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
induction Γ1; simpl in *.
```13 subgoals, subgoal 1 (ID 29067)

Γ2 : list Term
B : Term
============================
B ↓ 0 ∈ B :: Γ2

subgoal 2 (ID 29073) is:
B ↓ S (length Γ1) ∈ a :: Γ1 ++ B :: Γ2
subgoal 3 (ID 28998) is:
A0 = a
subgoal 4 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
constructor.
```12 subgoals, subgoal 1 (ID 29073)

a : Term
Γ1 : list Term
Γ2 : list Term
B : Term
IHΓ1 : B ↓ length Γ1 ∈ Γ1 ++ B :: Γ2
============================
B ↓ S (length Γ1) ∈ a :: Γ1 ++ B :: Γ2

subgoal 2 (ID 28998) is:
A0 = a
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
constructor; intuition.
```11 subgoals, subgoal 1 (ID 28998)

Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
w : Γ1 ++ A0 :: Γ2 ⊣e
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s -> Γ4 ⊢e B : !s -> Γ3 ++ B :: Γ4 ⊣e
a : Term
H3 : a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
A0 = a

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

generalize H3; clear.
```11 subgoals, subgoal 1 (ID 29079)

Γ1 : list Term
Γ2 : list Term
A0 : Term
a : Term
============================
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
revert Γ2 A0 a.
```11 subgoals, subgoal 1 (ID 29081)

Γ1 : list Term
============================
forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
induction Γ1; intros; simpl in *.
```12 subgoals, subgoal 1 (ID 29101)

Γ2 : list Term
A0 : Term
a : Term
H3 : a ↓ 0 ∈ A0 :: Γ2
============================
A0 = a

subgoal 2 (ID 29109) is:
A0 = a0
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

inversion H3;subst; clear H3.
```12 subgoals, subgoal 1 (ID 29179)

Γ2 : list Term
A0 : Term
============================
A0 = A0

subgoal 2 (ID 29109) is:
A0 = a0
subgoal 3 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 29109)

a : Term
Γ1 : list Term
IHΓ1 : forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a
Γ2 : list Term
A0 : Term
a0 : Term
H3 : a0 ↓ S (length Γ1) ∈ a :: Γ1 ++ A0 :: Γ2
============================
A0 = a0

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```

inversion H3; subst; clear H3.
```11 subgoals, subgoal 1 (ID 29257)

a : Term
Γ1 : list Term
IHΓ1 : forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a
Γ2 : list Term
A0 : Term
a0 : Term
H0 : a0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
A0 = a0

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using ,)

```
eapply IHΓ1.
```11 subgoals, subgoal 1 (ID 29259)

a : Term
Γ1 : list Term
IHΓ1 : forall (Γ2 : list Term) (A0 a : Term),
a ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2 -> A0 = a
Γ2 : list Term
A0 : Term
a0 : Term
H0 : a0 ↓ length Γ1 ∈ Γ1 ++ A0 :: Γ2
============================
a0 ↓ length Γ1 ∈ Γ1 ++ A0 :: ?29258

subgoal 2 (ID 28960) is:
Γ1 ++ B :: Γ2 ⊢e #v = #v : A
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 open,)

```
apply H0.
```10 subgoals, subgoal 1 (ID 28960)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ1 ++ B :: Γ2 ⊢e #v = #v : A

subgoal 2 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 3 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using ,)

```

econstructor.
```11 subgoals, subgoal 1 (ID 29262)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 29263) is:
A ↓ v ⊂ Γ1 ++ B :: Γ2
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using ,)

```
apply H with A0 s; trivial.
```10 subgoals, subgoal 1 (ID 29263)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
A ↓ v ⊂ Γ1 ++ B :: Γ2

subgoal 2 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 3 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using ,)

```
eapply conv_in_env_var_lift2.
```13 subgoals, subgoal 1 (ID 29270)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
A ↓ v ⊂ ?29267

subgoal 2 (ID 29271) is:
?29267 = Γ1 ++ ?29268 :: Γ2
subgoal 3 (ID 29272) is:
Γ2 ⊢e ?29268 = B : !?29269
subgoal 4 (ID 29273) is:
length Γ1 < v
subgoal 5 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 6 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 7 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 8 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 9 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 10 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 11 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 12 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 13 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 open, ?29268 open, ?29269 open,)

```

apply i.
```12 subgoals, subgoal 1 (ID 29271)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ = Γ1 ++ ?29268 :: Γ2

subgoal 2 (ID 29272) is:
Γ2 ⊢e ?29268 = B : !?29269
subgoal 3 (ID 29273) is:
length Γ1 < v
subgoal 4 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 5 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 6 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 7 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 8 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 9 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 10 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 11 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 12 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 open, ?29269 open,)

```
apply H0.
```11 subgoals, subgoal 1 (ID 29272)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
Γ2 ⊢e A0 = B : !?29269

subgoal 2 (ID 29273) is:
length Γ1 < v
subgoal 3 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 open,)

```
apply H1.
```10 subgoals, subgoal 1 (ID 29273)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Γ1 Γ2 : list Term) (A B : Term) (s : Sorts),
Γ = Γ1 ++ A :: Γ2 ->
Γ2 ⊢e A = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊣e
i : A ↓ v ⊂ Γ
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
l : length Γ1 < v
============================
length Γ1 < v

subgoal 2 (ID 28399) is:
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u
subgoal 3 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using ,)

```
trivial.
```9 subgoals, subgoal 1 (ID 28399)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e Π (A), B = Π (A'), B' : !u

subgoal 2 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using ,)

```

apply cPi_eq with s t;trivial.
```10 subgoals, subgoal 1 (ID 29275)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e A = A' : !s

subgoal 2 (ID 29276) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
subgoal 3 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using ,)

```
apply H with A0 s0; trivial.
```9 subgoals, subgoal 1 (ID 29276)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t

subgoal 2 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using ,)

```

rewrite app_comm_cons.
```9 subgoals, subgoal 1 (ID 29280)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e B = B' : !t

subgoal 2 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using ,)

```
eapply H0.
```11 subgoals, subgoal 1 (ID 29283)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
A :: Γ = (A :: Γ1) ++ ?29281 :: Γ2

subgoal 2 (ID 29284) is:
Γ2 ⊢e ?29281 = B0 : !?29282
subgoal 3 (ID 29285) is:
Γ2 ⊢e B0 : !?29282
subgoal 4 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 open, ?29282 open,)

```
rewrite H1; simpl; reflexivity.
```10 subgoals, subgoal 1 (ID 29284)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e A0 = B0 : !?29282

subgoal 2 (ID 29285) is:
Γ2 ⊢e B0 : !?29282
subgoal 3 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 open,)

```
apply H2.
```9 subgoals, subgoal 1 (ID 29285)

Γ : Env
A : Term
A' : Term
B : Term
B' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e B = B' : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B = B' : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e B0 : !s0

subgoal 2 (ID 28424) is:
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using ,)

```
trivial.
```8 subgoals, subgoal 1 (ID 28424)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e λ [A], M = λ [A'], M' : Π (A), B

subgoal 2 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 3 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 4 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 5 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 6 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 7 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 8 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using ,)

```

apply cLa_eq with s t u;trivial.
```10 subgoals, subgoal 1 (ID 29290)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e A = A' : !s

subgoal 2 (ID 29291) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
subgoal 3 (ID 29292) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using ,)

```
apply H with A0 s0; trivial.
```9 subgoals, subgoal 1 (ID 29291)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e M = M' : B

subgoal 2 (ID 29292) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using ,)

```

rewrite app_comm_cons.
```9 subgoals, subgoal 1 (ID 29296)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e M = M' : B

subgoal 2 (ID 29292) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using ,)

```
eapply H0.
```11 subgoals, subgoal 1 (ID 29299)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
A :: Γ = (A :: Γ1) ++ ?29297 :: Γ2

subgoal 2 (ID 29300) is:
Γ2 ⊢e ?29297 = B0 : !?29298
subgoal 3 (ID 29301) is:
Γ2 ⊢e B0 : !?29298
subgoal 4 (ID 29292) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 5 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 6 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 7 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 8 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 9 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 10 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 11 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 open, ?29298 open,)

```
rewrite H2; simpl; reflexivity.
```10 subgoals, subgoal 1 (ID 29300)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e A0 = B0 : !?29298

subgoal 2 (ID 29301) is:
Γ2 ⊢e B0 : !?29298
subgoal 3 (ID 29292) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 open,)

```
apply H3.
```9 subgoals, subgoal 1 (ID 29301)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e B0 : !s0

subgoal 2 (ID 29292) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using ,)

```
trivial.
```8 subgoals, subgoal 1 (ID 29292)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t

subgoal 2 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 3 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 4 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 5 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 6 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 7 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 8 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using ,)

```

rewrite app_comm_cons.
```8 subgoals, subgoal 1 (ID 29305)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e B : !t

subgoal 2 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 3 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 4 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 5 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 6 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 7 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 8 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using ,)

```
eapply H1.
```10 subgoals, subgoal 1 (ID 29308)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
A :: Γ = (A :: Γ1) ++ ?29306 :: Γ2

subgoal 2 (ID 29309) is:
Γ2 ⊢e ?29306 = B0 : !?29307
subgoal 3 (ID 29310) is:
Γ2 ⊢e B0 : !?29307
subgoal 4 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 5 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 6 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 7 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 8 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 9 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 10 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 open, ?29307 open,)

```
rewrite H2; simpl; reflexivity.
```9 subgoals, subgoal 1 (ID 29309)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e A0 = B0 : !?29307

subgoal 2 (ID 29310) is:
Γ2 ⊢e B0 : !?29307
subgoal 3 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 4 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 5 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 6 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 7 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 8 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 9 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 open,)

```
apply H3.
```8 subgoals, subgoal 1 (ID 29310)

Γ : Env
A : Term
A' : Term
B : Term
M : Term
M' : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A = A' : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A = A' : !s
t1 : A :: Γ ⊢e M = M' : B
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : B
t2 : A :: Γ ⊢e B : !t
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H2 : Γ = Γ1 ++ A0 :: Γ2
H3 : Γ2 ⊢e A0 = B0 : !s0
H4 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e B0 : !s0

subgoal 2 (ID 28444) is:
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]
subgoal 3 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 4 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 5 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 6 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 7 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 8 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
trivial.
```7 subgoals, subgoal 1 (ID 28444)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s ->
Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : Π (A), B
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N = N' : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s
H3 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e M · N = M' · N' : B [ ← N]

subgoal 2 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 3 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 4 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 5 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 6 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 7 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```

apply cApp_eq with A.
```8 subgoals, subgoal 1 (ID 29314)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s ->
Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : Π (A), B
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N = N' : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s
H3 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e M = M' : Π (A), B

subgoal 2 (ID 29315) is:
Γ1 ++ B0 :: Γ2 ⊢e N = N' : A
subgoal 3 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 4 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 5 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 6 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 7 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 8 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H with A0 s; trivial.
```7 subgoals, subgoal 1 (ID 29315)

Γ : Env
M : Term
M' : Term
N : Term
N' : Term
A : Term
B : Term
t : Γ ⊢e M = M' : Π (A), B
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s ->
Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M = M' : Π (A), B
t0 : Γ ⊢e N = N' : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N = N' : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s
H3 : Γ2 ⊢e B0 : !s
============================
Γ1 ++ B0 :: Γ2 ⊢e N = N' : A

subgoal 2 (ID 28459) is:
Γ1 ++ B :: Γ2 ⊢e N = M : A
subgoal 3 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 4 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 5 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 6 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 7 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H0 with A0 s; trivial.
```6 subgoals, subgoal 1 (ID 28459)

Γ : Env
M : Term
N : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e N = M : A

subgoal 2 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 3 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 4 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 5 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 6 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```

apply cSym.
```6 subgoals, subgoal 1 (ID 29322)

Γ : Env
M : Term
N : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H0 : Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s
H2 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e M = N : A

subgoal 2 (ID 28477) is:
Γ1 ++ B :: Γ2 ⊢e M = P : A
subgoal 3 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 4 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 5 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 6 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H with A0 s; trivial.
```5 subgoals, subgoal 1 (ID 28477)

Γ : Env
M : Term
N : Term
P : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
t0 : Γ ⊢e N = P : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N = P : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B : !s
H3 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e M = P : A

subgoal 2 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 3 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```

apply cTrans with N.
```6 subgoals, subgoal 1 (ID 29326)

Γ : Env
M : Term
N : Term
P : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
t0 : Γ ⊢e N = P : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N = P : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B : !s
H3 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e M = N : A

subgoal 2 (ID 29327) is:
Γ1 ++ B :: Γ2 ⊢e N = P : A
subgoal 3 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 4 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 5 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 6 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H with A0 s; trivial.
```5 subgoals, subgoal 1 (ID 29327)

Γ : Env
M : Term
N : Term
P : Term
A : Term
t : Γ ⊢e M = N : A
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
t0 : Γ ⊢e N = P : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N = P : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B : !s
H3 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊢e N = P : A

subgoal 2 (ID 28496) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : B
subgoal 3 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H0 with A0 s; trivial.
```4 subgoals, subgoal 1 (ID 28496)

Γ : Env
M : Term
N : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s0 -> Γ2 ⊢e B0 : !s0 -> Γ1 ++ B0 :: Γ2 ⊢e A = B : !s
t0 : Γ ⊢e M = N : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e M = N : B

subgoal 2 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 3 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```

apply Cnv_eq with A s; trivial.
```5 subgoals, subgoal 1 (ID 29334)

Γ : Env
M : Term
N : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s0 -> Γ2 ⊢e B0 : !s0 -> Γ1 ++ B0 :: Γ2 ⊢e A = B : !s
t0 : Γ ⊢e M = N : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e A = B : !s

subgoal 2 (ID 29335) is:
Γ1 ++ B0 :: Γ2 ⊢e M = N : A
subgoal 3 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H with A0 s0; trivial.
```4 subgoals, subgoal 1 (ID 29335)

Γ : Env
M : Term
N : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s0 -> Γ2 ⊢e B0 : !s0 -> Γ1 ++ B0 :: Γ2 ⊢e A = B : !s
t0 : Γ ⊢e M = N : A
H0 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e M = N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H1 : Γ = Γ1 ++ A0 :: Γ2
H2 : Γ2 ⊢e A0 = B0 : !s0
H3 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e M = N : A

subgoal 2 (ID 28522) is:
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]
subgoal 3 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H0 with A0 s0; trivial.
```3 subgoals, subgoal 1 (ID 28522)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e (λ [A], M) · N = M [ ← N] : B [ ← N]

subgoal 2 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 3 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```

apply cBeta with s t u; trivial.
```6 subgoals, subgoal 1 (ID 29343)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e A : !s

subgoal 2 (ID 29344) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t
subgoal 3 (ID 29345) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B
subgoal 4 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 5 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 6 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
apply H with A0 s0; trivial.
```5 subgoals, subgoal 1 (ID 29344)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e B : !t

subgoal 2 (ID 29345) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B
subgoal 3 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```

rewrite app_comm_cons.
```5 subgoals, subgoal 1 (ID 29350)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e B : !t

subgoal 2 (ID 29345) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B
subgoal 3 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using ,)

```
eapply H0.
```7 subgoals, subgoal 1 (ID 29353)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
A :: Γ = (A :: Γ1) ++ ?29351 :: Γ2

subgoal 2 (ID 29354) is:
Γ2 ⊢e ?29351 = B0 : !?29352
subgoal 3 (ID 29355) is:
Γ2 ⊢e B0 : !?29352
subgoal 4 (ID 29345) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B
subgoal 5 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 6 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 7 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 open, ?29352 open,)

```
rewrite H3; simpl; reflexivity.
```6 subgoals, subgoal 1 (ID 29354)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e A0 = B0 : !?29352

subgoal 2 (ID 29355) is:
Γ2 ⊢e B0 : !?29352
subgoal 3 (ID 29345) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B
subgoal 4 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 5 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 6 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 open,)

```
apply H4.
```5 subgoals, subgoal 1 (ID 29355)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e B0 : !s0

subgoal 2 (ID 29345) is:
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B
subgoal 3 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using ,)

```
trivial.
```4 subgoals, subgoal 1 (ID 29345)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
A :: Γ1 ++ B0 :: Γ2 ⊢e M : B

subgoal 2 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 3 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using ,)

```

rewrite app_comm_cons.
```4 subgoals, subgoal 1 (ID 29359)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
(A :: Γ1) ++ B0 :: Γ2 ⊢e M : B

subgoal 2 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 3 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using ,)

```
eapply H1.
```6 subgoals, subgoal 1 (ID 29362)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
A :: Γ = (A :: Γ1) ++ ?29360 :: Γ2

subgoal 2 (ID 29363) is:
Γ2 ⊢e ?29360 = B0 : !?29361
subgoal 3 (ID 29364) is:
Γ2 ⊢e B0 : !?29361
subgoal 4 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 5 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 6 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 open, ?29361 open,)

```
rewrite H3; simpl; reflexivity.
```5 subgoals, subgoal 1 (ID 29363)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e A0 = B0 : !?29361

subgoal 2 (ID 29364) is:
Γ2 ⊢e B0 : !?29361
subgoal 3 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 4 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 5 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 open,)

```
apply H4.
```4 subgoals, subgoal 1 (ID 29364)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ2 ⊢e B0 : !s0

subgoal 2 (ID 29346) is:
Γ1 ++ B0 :: Γ2 ⊢e N : A
subgoal 3 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 4 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using ,)

```
trivial.
```3 subgoals, subgoal 1 (ID 29346)

Γ : Env
A : Term
B : Term
M : Term
N : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e B : !t
t2 : A :: Γ ⊢e M : B
H1 : forall (Γ1 Γ2 : list Term) (A0 B0 : Term) (s : Sorts),
A :: Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B0 : !s -> Γ2 ⊢e B0 : !s -> Γ1 ++ B0 :: Γ2 ⊢e M : B
t3 : Γ ⊢e N : A
H2 : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s -> Γ2 ⊢e B : !s -> Γ1 ++ B :: Γ2 ⊢e N : A
Γ1 : list Term
Γ2 : list Term
A0 : Term
B0 : Term
s0 : Sorts
H3 : Γ = Γ1 ++ A0 :: Γ2
H4 : Γ2 ⊢e A0 = B0 : !s0
H5 : Γ2 ⊢e B0 : !s0
============================
Γ1 ++ B0 :: Γ2 ⊢e N : A

subgoal 2 (ID 28531) is:
Γ1 ++ B :: Γ2 ⊣e
subgoal 3 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using ,)

```

apply H2 with A0 s0; trivial.
```2 subgoals, subgoal 1 (ID 28531)

Γ1 : list Term
Γ2 : list Term
A : Term
B : Term
s : Sorts
H : nil = Γ1 ++ A :: Γ2
H0 : Γ2 ⊢e A = B : !s
H1 : Γ2 ⊢e B : !s
============================
Γ1 ++ B :: Γ2 ⊣e

subgoal 2 (ID 28545) is:
Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using ,)

```

destruct Γ1; simpl in *; discriminate.
```1 subgoals, subgoal 1 (ID 28545)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s0 : Sorts
H0 : A :: Γ = Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
Γ1 ++ B :: Γ2 ⊣e

(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using ,)

```

destruct Γ1; simpl in *.
```2 subgoals, subgoal 1 (ID 29439)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
Γ2 : list Term
A0 : Term
B : Term
s0 : Sorts
H0 : A :: Γ = A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
B :: Γ2 ⊣e

subgoal 2 (ID 29454) is:
t0 :: Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using ,)

```
injection H0;intros; subst; clear H0.
```2 subgoals, subgoal 1 (ID 29479)

s : Sorts
Γ2 : list Term
A0 : Term
B : Term
s0 : Sorts
H1 : Γ2 ⊢e A0 = B : !s0
H2 : Γ2 ⊢e B : !s0
t : Γ2 ⊢e A0 : !s
H : forall (Γ1 Γ3 : list Term) (A B : Term) (s0 : Sorts),
Γ2 = Γ1 ++ A :: Γ3 ->
Γ3 ⊢e A = B : !s0 -> Γ3 ⊢e B : !s0 -> Γ1 ++ B :: Γ3 ⊢e A0 : !s
============================
B :: Γ2 ⊣e

subgoal 2 (ID 29454) is:
t0 :: Γ1 ++ B :: Γ2 ⊣e
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using ,)

```
eauto.
```1 subgoals, subgoal 1 (ID 29454)

Γ : Env
A : Term
s : Sorts
t : Γ ⊢e A : !s
H : forall (Γ1 Γ2 : list Term) (A0 B : Term) (s0 : Sorts),
Γ = Γ1 ++ A0 :: Γ2 ->
Γ2 ⊢e A0 = B : !s0 -> Γ2 ⊢e B : !s0 -> Γ1 ++ B :: Γ2 ⊢e A : !s
t0 : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s0 : Sorts
H0 : A :: Γ = t0 :: Γ1 ++ A0 :: Γ2
H1 : Γ2 ⊢e A0 = B : !s0
H2 : Γ2 ⊢e B : !s0
============================
t0 :: Γ1 ++ B :: Γ2 ⊣e

(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using , ?29480 using ,)

```

injection H0; intros; subst; clear H0.
```1 subgoals, subgoal 1 (ID 29517)

s : Sorts
t0 : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s0 : Sorts
H1 : Γ2 ⊢e A0 = B : !s0
H2 : Γ2 ⊢e B : !s0
t : Γ1 ++ A0 :: Γ2 ⊢e t0 : !s
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s0 : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s0 -> Γ4 ⊢e B : !s0 -> Γ3 ++ B :: Γ4 ⊢e t0 : !s
============================
t0 :: Γ1 ++ B :: Γ2 ⊣e

(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using , ?29480 using ,)

```

econstructor.
```1 subgoals, subgoal 1 (ID 29521)

s : Sorts
t0 : Term
Γ1 : list Term
Γ2 : list Term
A0 : Term
B : Term
s0 : Sorts
H1 : Γ2 ⊢e A0 = B : !s0
H2 : Γ2 ⊢e B : !s0
t : Γ1 ++ A0 :: Γ2 ⊢e t0 : !s
H : forall (Γ3 Γ4 : list Term) (A B : Term) (s0 : Sorts),
Γ1 ++ A0 :: Γ2 = Γ3 ++ A :: Γ4 ->
Γ4 ⊢e A = B : !s0 -> Γ4 ⊢e B : !s0 -> Γ3 ++ B :: Γ4 ⊢e t0 : !s
============================
Γ1 ++ B :: Γ2 ⊢e t0 : !?29520

(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using , ?29480 using , ?29520 open,)

```
apply H with A0 s0; trivial.
```No more subgoals.
(dependent evars: ?28576 using , ?28577 using , ?28578 using , ?28866 using , ?28875 using , ?28876 using , ?28877 using , ?28889 using , ?28890 using , ?28905 using , ?28906 using , ?28914 using , ?28915 using , ?28968 using , ?28969 using , ?28970 using , ?29258 using , ?29267 using , ?29268 using , ?29269 using , ?29281 using , ?29282 using , ?29297 using , ?29298 using , ?29306 using , ?29307 using , ?29351 using , ?29352 using , ?29360 using , ?29361 using , ?29480 using , ?29520 using ,)

```

Qed.
```conv_in_env is defined

```

Lemma substitution : (forall Γ t T , Γ e t : T -> forall Δ P A, Δ e P : A ->
forall Γ' n , sub_in_env Δ P A n Γ Γ' -> Γ' e t [ n P ] : T [ n P ]) /\
(forall Γ M N T , Γ e M = N : T -> forall Δ P A, Δ e P : A ->
forall Γ' n , sub_in_env Δ P A n Γ Γ' -> Γ' e M [ n P ] = N [ n P ] : T [ n P ]) /\
(forall Γ , Γ e -> forall Δ P A n Γ' , Δ e P : A ->
sub_in_env Δ P A n Γ Γ' -> Γ' e) .
```1 subgoals, subgoal 1 (ID 29548)

============================
(forall (Γ : Env) (t T : Term),
Γ ⊢e t : T ->
forall (Δ : Env) (P A : Term),
Δ ⊢e P : A ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A n Γ Γ' -> Γ' ⊢e t [n ← P] : T [n ← P]) /\
(forall (Γ : Env) (M N T : Term),
Γ ⊢e M = N : T ->
forall (Δ : Env) (P A : Term),
Δ ⊢e P : A ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A n Γ Γ' -> Γ' ⊢e M [n ← P] = N [n ← P] : T [n ← P]) /\
(forall Γ : Env,
Γ ⊣e ->
forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e)

(dependent evars:)

```

apply typ_induc; simpl; intros.
```17 subgoals, subgoal 1 (ID 29595)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
Γ' ⊢e !s : !t

subgoal 2 (ID 29608) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars:)

```

constructor.
```18 subgoals, subgoal 1 (ID 29857)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
Ax s t

subgoal 2 (ID 29858) is:
Γ' ⊣e
subgoal 3 (ID 29608) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars:)

```
trivial.
```17 subgoals, subgoal 1 (ID 29858)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
Γ' ⊣e

subgoal 2 (ID 29608) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars:)

```
eapply H.
```18 subgoals, subgoal 1 (ID 29863)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
?29859 ⊢e ?29860 : ?29861

subgoal 2 (ID 29864) is:
sub_in_env ?29859 ?29860 ?29861 ?29862 Γ Γ'
subgoal 3 (ID 29608) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 open, ?29860 open, ?29861 open, ?29862 open,)

```
apply H0.
```17 subgoals, subgoal 1 (ID 29864)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
sub_in_env Δ P A ?29862 Γ Γ'

subgoal 2 (ID 29608) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 open,)

```
apply H1.
```16 subgoals, subgoal 1 (ID 29608)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]

subgoal 2 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using ,)

```

destruct lt_eq_lt_dec as [ [] | ].
```18 subgoals, subgoal 1 (ID 29878)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
Γ' ⊢e #v : A [n ← P]

subgoal 2 (ID 29879) is:
Γ' ⊢e P ↑ n : A [n ← P]
subgoal 3 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using ,)

```

constructor.
```19 subgoals, subgoal 1 (ID 29883)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
Γ' ⊣e

subgoal 2 (ID 29884) is:
A [n ← P] ↓ v ⊂ Γ'
subgoal 3 (ID 29879) is:
Γ' ⊢e P ↑ n : A [n ← P]
subgoal 4 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using ,)

```
eapply H; eauto.
```18 subgoals, subgoal 1 (ID 29884)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
A [n ← P] ↓ v ⊂ Γ'

subgoal 2 (ID 29879) is:
Γ' ⊢e P ↑ n : A [n ← P]
subgoal 3 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using ,)

```
eapply nth_sub_item_inf.
```20 subgoals, subgoal 1 (ID 29944)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
sub_in_env ?29942 P ?29941 n ?29943 Γ'

subgoal 2 (ID 29945) is:
n > v
subgoal 3 (ID 29946) is:
A ↓ v ⊂ ?29943
subgoal 4 (ID 29879) is:
Γ' ⊢e P ↑ n : A [n ← P]
subgoal 5 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 open, ?29942 open, ?29943 open,)

```
apply H1.
```19 subgoals, subgoal 1 (ID 29945)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
n > v

subgoal 2 (ID 29946) is:
A ↓ v ⊂ Γ
subgoal 3 (ID 29879) is:
Γ' ⊢e P ↑ n : A [n ← P]
subgoal 4 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```
intuition.
```18 subgoals, subgoal 1 (ID 29946)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
A ↓ v ⊂ Γ

subgoal 2 (ID 29879) is:
Γ' ⊢e P ↑ n : A [n ← P]
subgoal 3 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```
trivial.
```17 subgoals, subgoal 1 (ID 29879)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
e : v = n
============================
Γ' ⊢e P ↑ n : A [n ← P]

subgoal 2 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```

destruct i as (AA & ?& ?).
```17 subgoals, subgoal 1 (ID 29957)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
e : v = n
============================
Γ' ⊢e P ↑ n : A [n ← P]

subgoal 2 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```
subst.
```17 subgoals, subgoal 1 (ID 29966)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊢e P ↑ n : AA ↑ (S n) [n ← P]

subgoal 2 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```
rewrite substP3; trivial.
```18 subgoals, subgoal 1 (ID 29967)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊢e P ↑ n : AA ↑ n

subgoal 2 (ID 29968) is:
0 <= n
subgoal 3 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```

rewrite <- (nth_sub_eq H1 H3).
```18 subgoals, subgoal 1 (ID 29977)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊢e P ↑ n : A0 ↑ n

subgoal 2 (ID 29968) is:
0 <= n
subgoal 3 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using ,)

```

eapply thinning_n.
```20 subgoals, subgoal 1 (ID 29979)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
trunc n Γ' ?29978

subgoal 2 (ID 29980) is:
?29978 ⊢e P : A0
subgoal 3 (ID 29981) is:
Γ' ⊣e
subgoal 4 (ID 29968) is:
0 <= n
subgoal 5 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 open,)

```
eapply sub_trunc.
```20 subgoals, subgoal 1 (ID 29985)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
sub_in_env ?29978 ?29982 ?29983 n ?29984 Γ'

subgoal 2 (ID 29980) is:
?29978 ⊢e P : A0
subgoal 3 (ID 29981) is:
Γ' ⊣e
subgoal 4 (ID 29968) is:
0 <= n
subgoal 5 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 open, ?29982 open, ?29983 open, ?29984 open,)

```
apply H1.
```19 subgoals, subgoal 1 (ID 29980)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Δ ⊢e P : A0

subgoal 2 (ID 29981) is:
Γ' ⊣e
subgoal 3 (ID 29968) is:
0 <= n
subgoal 4 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using ,)

```
trivial.
```18 subgoals, subgoal 1 (ID 29981)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊣e

subgoal 2 (ID 29968) is:
0 <= n
subgoal 3 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using ,)

```
eapply H; eauto.
```17 subgoals, subgoal 1 (ID 29968)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
0 <= n

subgoal 2 (ID 29880) is:
Γ' ⊢e #(v - 1) : A [n ← P]
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using ,)

```
intuition.
```16 subgoals, subgoal 1 (ID 29880)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
Γ' ⊢e #(v - 1) : A [n ← P]

subgoal 2 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using ,)

```

constructor.
```17 subgoals, subgoal 1 (ID 30057)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
Γ' ⊣e

subgoal 2 (ID 30058) is:
A [n ← P] ↓ v - 1 ⊂ Γ'
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using ,)

```
eapply H; eauto.
```16 subgoals, subgoal 1 (ID 30058)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
A [n ← P] ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
destruct i as (AA & ? &?).
```16 subgoals, subgoal 1 (ID 30125)

Γ : Env
A : Term
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
A [n ← P] ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
subst.
```16 subgoals, subgoal 1 (ID 30128)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ (S v) [n ← P] ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
rewrite substP3; trivial.
```18 subgoals, subgoal 1 (ID 30129)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ v ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 30130) is:
0 <= n
subgoal 3 (ID 30131) is:
n <= 0 + v
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```

exists AA; split.
```19 subgoals, subgoal 1 (ID 30135)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ v = AA ↑ (S (v - 1))

subgoal 2 (ID 30136) is:
AA ↓ v - 1 ∈ Γ'
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
replace (S (v-1)) with v.
```20 subgoals, subgoal 1 (ID 30140)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ v = AA ↑ v

subgoal 2 (ID 30137) is:
v = S (v - 1)
subgoal 3 (ID 30136) is:
AA ↓ v - 1 ∈ Γ'
subgoal 4 (ID 30130) is:
0 <= n
subgoal 5 (ID 30131) is:
n <= 0 + v
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
trivial.
```19 subgoals, subgoal 1 (ID 30137)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
v = S (v - 1)

subgoal 2 (ID 30136) is:
AA ↓ v - 1 ∈ Γ'
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
rewrite <- pred_of_minus.
```19 subgoals, subgoal 1 (ID 30142)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
v = S (pred v)

subgoal 2 (ID 30136) is:
AA ↓ v - 1 ∈ Γ'
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```
rewrite <- (S_pred v n l); trivial.
```18 subgoals, subgoal 1 (ID 30136)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↓ v - 1 ∈ Γ'

subgoal 2 (ID 30130) is:
0 <= n
subgoal 3 (ID 30131) is:
n <= 0 + v
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using ,)

```

eapply nth_sub_sup.
```20 subgoals, subgoal 1 (ID 30149)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
sub_in_env ?30145 ?30147 ?30148 ?30144 ?30146 Γ'

subgoal 2 (ID 30150) is:
?30144 <= v - 1
subgoal 3 (ID 30151) is:
AA ↓ S (v - 1) ∈ ?30146
subgoal 4 (ID 30130) is:
0 <= n
subgoal 5 (ID 30131) is:
n <= 0 + v
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 open, ?30145 open, ?30146 open, ?30147 open, ?30148 open,)

```
apply H1.
```19 subgoals, subgoal 1 (ID 30150)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
n <= v - 1

subgoal 2 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
destruct v.
```20 subgoals, subgoal 1 (ID 30160)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ 0 ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < 0
============================
n <= 0 - 1

subgoal 2 (ID 30165) is:
n <= S v - 1
subgoal 3 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 4 (ID 30130) is:
0 <= n
subgoal 5 (ID 30131) is:
n <= 0 + v
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
apply lt_n_O in l; elim l.
```19 subgoals, subgoal 1 (ID 30165)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ S v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < S v
============================
n <= S v - 1

subgoal 2 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
replace (S v - 1 ) with v.
```20 subgoals, subgoal 1 (ID 30171)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ S v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < S v
============================
n <= v

subgoal 2 (ID 30168) is:
v = S v - 1
subgoal 3 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 4 (ID 30130) is:
0 <= n
subgoal 5 (ID 30131) is:
n <= 0 + v
subgoal 6 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 7 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 9 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 10 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 11 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 12 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 13 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 14 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 16 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 17 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 18 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 19 (ID 29843) is:
Γ' ⊣e
subgoal 20 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
intuition.
```19 subgoals, subgoal 1 (ID 30168)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ S v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < S v
============================
v = S v - 1

subgoal 2 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```

rewrite <- pred_of_minus.
```19 subgoals, subgoal 1 (ID 30189)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ S v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < S v
============================
v = pred (S v)

subgoal 2 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
simpl.
```19 subgoals, subgoal 1 (ID 30190)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ S v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < S v
============================
v = v

subgoal 2 (ID 30151) is:
AA ↓ S (v - 1) ∈ Γ
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
trivial.
```18 subgoals, subgoal 1 (ID 30151)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↓ S (v - 1) ∈ Γ

subgoal 2 (ID 30130) is:
0 <= n
subgoal 3 (ID 30131) is:
n <= 0 + v
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
replace (S (v-1)) with v.
```19 subgoals, subgoal 1 (ID 30194)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↓ v ∈ Γ

subgoal 2 (ID 30191) is:
v = S (v - 1)
subgoal 3 (ID 30130) is:
0 <= n
subgoal 4 (ID 30131) is:
n <= 0 + v
subgoal 5 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 6 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 8 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 9 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 10 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 11 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 12 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 13 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 15 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 16 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 17 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 18 (ID 29843) is:
Γ' ⊣e
subgoal 19 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
trivial.
```18 subgoals, subgoal 1 (ID 30191)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
v = S (v - 1)

subgoal 2 (ID 30130) is:
0 <= n
subgoal 3 (ID 30131) is:
n <= 0 + v
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
rewrite <- pred_of_minus.
```18 subgoals, subgoal 1 (ID 30196)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
v = S (pred v)

subgoal 2 (ID 30130) is:
0 <= n
subgoal 3 (ID 30131) is:
n <= 0 + v
subgoal 4 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 5 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 7 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 8 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 9 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 10 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 11 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 12 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 14 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 15 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 16 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 17 (ID 29843) is:
Γ' ⊣e
subgoal 18 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
rewrite <- (S_pred v n l); trivial.
```17 subgoals, subgoal 1 (ID 30130)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
0 <= n

subgoal 2 (ID 30131) is:
n <= 0 + v
subgoal 3 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```

intuition.
```16 subgoals, subgoal 1 (ID 30131)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
n <= 0 + v

subgoal 2 (ID 29626) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```
simpl; intuition.
```15 subgoals, subgoal 1 (ID 29626)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !t
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] : !u

subgoal 2 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 3 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 4 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 5 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 6 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 7 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 8 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 9 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 11 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 12 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 13 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29843) is:
Γ' ⊣e
subgoal 15 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using ,)

```

econstructor.
```17 subgoals, subgoal 1 (ID 30236)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !t
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Rel ?30234 ?30235 u

subgoal 2 (ID 30237) is:
Γ' ⊢e A [n ← P] : !?30234
subgoal 3 (ID 30238) is:
A [n ← P] :: Γ' ⊢e B [(S n) ← P] : !?30235
subgoal 4 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 open, ?30235 open,)

```
apply r.
```16 subgoals, subgoal 1 (ID 30237)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !t
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e A [n ← P] : !s

subgoal 2 (ID 30238) is:
A [n ← P] :: Γ' ⊢e B [(S n) ← P] : !t
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using ,)

```
eapply H; eauto.
```15 subgoals, subgoal 1 (ID 30238)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !t
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
A [n ← P] :: Γ' ⊢e B [(S n) ← P] : !t

subgoal 2 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 3 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 4 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 5 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 6 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 7 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 8 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 9 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 11 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 12 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 13 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29843) is:
Γ' ⊣e
subgoal 15 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using ,)

```
eapply H0.
```16 subgoals, subgoal 1 (ID 30249)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !t
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
?30247 ⊢e P : ?30248

subgoal 2 (ID 30250) is:
sub_in_env ?30247 P ?30248 (S n) (A :: Γ) (A [n ← P] :: Γ')
subgoal 3 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 open, ?30248 open,)

```
apply H1.
```15 subgoals, subgoal 1 (ID 30250)

Γ : Env
A : Term
B : Term
s : Sorts
t : Sorts
u : Sorts
r : Rel s t u
t0 : Γ ⊢e A : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s
t1 : A :: Γ ⊢e B : !t
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !t
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
sub_in_env Δ P A0 (S n) (A :: Γ) (A [n ← P] :: Γ')

subgoal 2 (ID 29647) is:
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]
subgoal 3 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 4 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 5 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 6 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 7 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 8 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 9 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 11 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 12 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 13 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29843) is:
Γ' ⊣e
subgoal 15 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using ,)

```
constructor; apply H2.
```14 subgoals, subgoal 1 (ID 29647)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e b [n ← P] : B [n ← P]
Δ : Env
P : Term
A0 : Term
H2 : Δ ⊢e P : A0
Γ' : Env
n : nat
H3 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]

subgoal 2 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 3 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 4 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 5 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using ,)

```
eauto.
```14 subgoals, subgoal 1 (ID 29647)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e b [n ← P] : B [n ← P]
Δ : Env
P : Term
A0 : Term
H2 : Δ ⊢e P : A0
Γ' : Env
n : nat
H3 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e λ [A [n ← P]], b [(S n) ← P] : Π (A [n ← P]), B [(S n) ← P]

subgoal 2 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 3 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 4 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 5 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using ,)

```

econstructor.
```17 subgoals, subgoal 1 (ID 32062)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e b [n ← P] : B [n ← P]
Δ : Env
P : Term
A0 : Term
H2 : Δ ⊢e P : A0
Γ' : Env
n : nat
H3 : sub_in_env Δ P A0 n Γ Γ'
============================
Rel ?32059 ?32060 ?32061

subgoal 2 (ID 32063) is:
Γ' ⊢e A [n ← P] : !?32059
subgoal 3 (ID 32064) is:
A [n ← P] :: Γ' ⊢e B [(S n) ← P] : !?32060
subgoal 4 (ID 32065) is:
A [n ← P] :: Γ' ⊢e b [(S n) ← P] : B [(S n) ← P]
subgoal 5 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 6 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 7 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 8 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 9 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 10 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 11 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 13 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 14 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 15 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 16 (ID 29843) is:
Γ' ⊣e
subgoal 17 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 open, ?32060 open, ?32061 open,)

```
apply r.
```16 subgoals, subgoal 1 (ID 32063)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e b [n ← P] : B [n ← P]
Δ : Env
P : Term
A0 : Term
H2 : Δ ⊢e P : A0
Γ' : Env
n : nat
H3 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e A [n ← P] : !s1

subgoal 2 (ID 32064) is:
A [n ← P] :: Γ' ⊢e B [(S n) ← P] : !s2
subgoal 3 (ID 32065) is:
A [n ← P] :: Γ' ⊢e b [(S n) ← P] : B [(S n) ← P]
subgoal 4 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 5 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 6 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 7 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 8 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 9 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 10 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 12 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 13 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 14 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 15 (ID 29843) is:
Γ' ⊣e
subgoal 16 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using ,)

```
eapply H; eauto.
```15 subgoals, subgoal 1 (ID 32064)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e b [n ← P] : B [n ← P]
Δ : Env
P : Term
A0 : Term
H2 : Δ ⊢e P : A0
Γ' : Env
n : nat
H3 : sub_in_env Δ P A0 n Γ Γ'
============================
A [n ← P] :: Γ' ⊢e B [(S n) ← P] : !s2

subgoal 2 (ID 32065) is:
A [n ← P] :: Γ' ⊢e b [(S n) ← P] : B [(S n) ← P]
subgoal 3 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 4 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 5 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 6 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 7 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 8 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 9 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 11 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 12 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 13 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 14 (ID 29843) is:
Γ' ⊣e
subgoal 15 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using ,)

```
eapply H0; eauto.
```14 subgoals, subgoal 1 (ID 32065)

Γ : Env
A : Term
b : Term
B : Term
s1 : Sorts
s2 : Sorts
s3 : Sorts
r : Rel s1 s2 s3
t : Γ ⊢e A : !s1
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] : !s1
t0 : A :: Γ ⊢e B : !s2
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e B [n ← P] : !s2
t1 : A :: Γ ⊢e b : B
H1 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n (A :: Γ) Γ' -> Γ' ⊢e b [n ← P] : B [n ← P]
Δ : Env
P : Term
A0 : Term
H2 : Δ ⊢e P : A0
Γ' : Env
n : nat
H3 : sub_in_env Δ P A0 n Γ Γ'
============================
A [n ← P] :: Γ' ⊢e b [(S n) ← P] : B [(S n) ← P]

subgoal 2 (ID 29663) is:
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]
subgoal 3 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 4 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 5 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using ,)

```
eapply H1; eauto.
```13 subgoals, subgoal 1 (ID 29663)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' ->
Γ' ⊢e a [n ← P] : Π (A [n ← P]), B [(S n) ← P]
t0 : Γ ⊢e b : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e b [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e a [n ← P] · b [n ← P] : B [ ← b] [n ← P]

subgoal 2 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using ,)

```

rewrite subst_travers.
```13 subgoals, subgoal 1 (ID 32092)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' ->
Γ' ⊢e a [n ← P] : Π (A [n ← P]), B [(S n) ← P]
t0 : Γ ⊢e b : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e b [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e a [n ← P] · b [n ← P] : (B [(n + 1) ← P]) [ ← b [n ← P]]

subgoal 2 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using ,)

```
econstructor.
```14 subgoals, subgoal 1 (ID 32099)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' ->
Γ' ⊢e a [n ← P] : Π (A [n ← P]), B [(S n) ← P]
t0 : Γ ⊢e b : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e b [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e a [n ← P] : Π (?32098), B [(n + 1) ← P]

subgoal 2 (ID 32100) is:
Γ' ⊢e b [n ← P] : ?32098
subgoal 3 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 4 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 5 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 open,)

```

replace (n+1) with (S n) by (rewrite plus_comm; trivial).
```14 subgoals, subgoal 1 (ID 32104)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' ->
Γ' ⊢e a [n ← P] : Π (A [n ← P]), B [(S n) ← P]
t0 : Γ ⊢e b : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e b [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e a [n ← P] : Π (?32098), B [(S n) ← P]

subgoal 2 (ID 32100) is:
Γ' ⊢e b [n ← P] : ?32098
subgoal 3 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 4 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 5 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 open,)

```
eapply H; eauto.
```13 subgoals, subgoal 1 (ID 32100)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' ->
Γ' ⊢e a [n ← P] : Π (A [n ← P]), B [(S n) ← P]
t0 : Γ ⊢e b : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e b [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e b [n ← P] : A [n ← P]

subgoal 2 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using ,)

```

replace (n+1) with (S n) by (rewrite plus_comm; trivial).
```13 subgoals, subgoal 1 (ID 32117)

Γ : Env
a : Term
b : Term
A : Term
B : Term
t : Γ ⊢e a : Π (A), B
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' ->
Γ' ⊢e a [n ← P] : Π (A [n ← P]), B [(S n) ← P]
t0 : Γ ⊢e b : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e b [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e b [n ← P] : A [n ← P]

subgoal 2 (ID 29679) is:
Γ' ⊢e a [n ← P] : B [n ← P]
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using ,)

```
eapply H0; eauto.
```12 subgoals, subgoal 1 (ID 29679)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e a [n ← P] : B [n ← P]

subgoal 2 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 3 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using ,)

```

econstructor.
```13 subgoals, subgoal 1 (ID 32136)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e ?32134 = B [n ← P] : !?32135

subgoal 2 (ID 32137) is:
Γ' ⊢e a [n ← P] : ?32134
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 open, ?32135 open,)

```
eapply H.
```14 subgoals, subgoal 1 (ID 32140)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
?32138 ⊢e P : ?32139

subgoal 2 (ID 32141) is:
sub_in_env ?32138 P ?32139 n Γ Γ'
subgoal 3 (ID 32137) is:
Γ' ⊢e a [n ← P] : A [n ← P]
subgoal 4 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 5 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 open, ?32139 open,)

```
apply H1.
```13 subgoals, subgoal 1 (ID 32141)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
sub_in_env Δ P A0 n Γ Γ'

subgoal 2 (ID 32137) is:
Γ' ⊢e a [n ← P] : A [n ← P]
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using ,)

```
trivial.
```12 subgoals, subgoal 1 (ID 32137)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ' ⊢e a [n ← P] : A [n ← P]

subgoal 2 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 3 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using ,)

```
eapply H0.
```13 subgoals, subgoal 1 (ID 32144)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
?32142 ⊢e P : ?32143

subgoal 2 (ID 32145) is:
sub_in_env ?32142 P ?32143 n Γ Γ'
subgoal 3 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 4 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 open, ?32143 open,)

```
apply H1.
```12 subgoals, subgoal 1 (ID 32145)

Γ : Env
a : Term
A : Term
B : Term
s : Sorts
t : Γ ⊢e A = B : !s
H : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e A [n ← P] = B [n ← P] : !s
t0 : Γ ⊢e a : A
H0 : forall (Δ : Env) (P A0 : Term),
Δ ⊢e P : A0 ->
forall (Γ' : Env) (n : nat),
sub_in_env Δ P A0 n Γ Γ' -> Γ' ⊢e a [n ← P] : A [n ← P]
Δ : Env
P : Term
A0 : Term
H1 : Δ ⊢e P : A0
Γ' : Env
n : nat
H2 : sub_in_env Δ P A0 n Γ Γ'
============================
sub_in_env Δ P A0 n Γ Γ'

subgoal 2 (ID 29692) is:
Γ' ⊢e !s = !s : !t
subgoal 3 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 29692)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
Γ' ⊢e !s = !s : !t

subgoal 2 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using ,)

```

constructor.
```12 subgoals, subgoal 1 (ID 32147)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
Ax s t

subgoal 2 (ID 32148) is:
Γ' ⊣e
subgoal 3 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 32148)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
Γ' ⊣e

subgoal 2 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using ,)

```
eapply H.
```12 subgoals, subgoal 1 (ID 32153)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
?32149 ⊢e ?32150 : ?32151

subgoal 2 (ID 32154) is:
sub_in_env ?32149 ?32150 ?32151 ?32152 Γ Γ'
subgoal 3 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 open, ?32150 open, ?32151 open, ?32152 open,)

```
apply H0.
```11 subgoals, subgoal 1 (ID 32154)

Γ : Env
s : Sorts
t : Sorts
a : Ax s t
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
Δ : Env
P : Term
A : Term
H0 : Δ ⊢e P : A
Γ' : Env
n : nat
H1 : sub_in_env Δ P A n Γ Γ'
============================
sub_in_env Δ P A ?32152 Γ Γ'

subgoal 2 (ID 29705) is:
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 open,)

```
apply H1.
```10 subgoals, subgoal 1 (ID 29705)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
============================
Γ'
⊢e match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end =
match lt_eq_lt_dec v n with
| inleft (left _) => #v
| inleft (right _) => P ↑ n
| inright _ => #(v - 1)
end : A [n ← P]

subgoal 2 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 3 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 5 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 6 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 7 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 8 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29843) is:
Γ' ⊣e
subgoal 10 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using ,)

```

destruct lt_eq_lt_dec as [ [] | ].
```12 subgoals, subgoal 1 (ID 32168)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
Γ' ⊢e #v = #v : A [n ← P]

subgoal 2 (ID 32169) is:
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]
subgoal 3 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using ,)

```

constructor.
```13 subgoals, subgoal 1 (ID 32173)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
Γ' ⊣e

subgoal 2 (ID 32174) is:
A [n ← P] ↓ v ⊂ Γ'
subgoal 3 (ID 32169) is:
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]
subgoal 4 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using ,)

```
eapply H; eauto.
```12 subgoals, subgoal 1 (ID 32174)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
A [n ← P] ↓ v ⊂ Γ'

subgoal 2 (ID 32169) is:
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]
subgoal 3 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using ,)

```
eapply nth_sub_item_inf.
```14 subgoals, subgoal 1 (ID 32234)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
sub_in_env ?32232 P ?32231 n ?32233 Γ'

subgoal 2 (ID 32235) is:
n > v
subgoal 3 (ID 32236) is:
A ↓ v ⊂ ?32233
subgoal 4 (ID 32169) is:
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]
subgoal 5 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 open, ?32232 open, ?32233 open,)

```
apply H1.
```13 subgoals, subgoal 1 (ID 32235)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
n > v

subgoal 2 (ID 32236) is:
A ↓ v ⊂ Γ
subgoal 3 (ID 32169) is:
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]
subgoal 4 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```

intuition.
```12 subgoals, subgoal 1 (ID 32236)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : v < n
============================
A ↓ v ⊂ Γ

subgoal 2 (ID 32169) is:
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]
subgoal 3 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```
trivial.
```11 subgoals, subgoal 1 (ID 32169)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
e : v = n
============================
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]

subgoal 2 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```

destruct i as (AA & ?& ?).
```11 subgoals, subgoal 1 (ID 32247)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
e : v = n
============================
Γ' ⊢e P ↑ n = P ↑ n : A [n ← P]

subgoal 2 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```
subst.
```11 subgoals, subgoal 1 (ID 32256)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊢e P ↑ n = P ↑ n : AA ↑ (S n) [n ← P]

subgoal 2 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```
rewrite substP3; trivial.
```12 subgoals, subgoal 1 (ID 32257)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊢e P ↑ n = P ↑ n : AA ↑ n

subgoal 2 (ID 32258) is:
0 <= n
subgoal 3 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```

rewrite <- (nth_sub_eq H1 H3).
```12 subgoals, subgoal 1 (ID 32267)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊢e P ↑ n = P ↑ n : A0 ↑ n

subgoal 2 (ID 32258) is:
0 <= n
subgoal 3 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using ,)

```

eapply thinning_eq_n.
```14 subgoals, subgoal 1 (ID 32269)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
trunc n Γ' ?32268

subgoal 2 (ID 32270) is:
?32268 ⊢e P = P : A0
subgoal 3 (ID 32271) is:
Γ' ⊣e
subgoal 4 (ID 32258) is:
0 <= n
subgoal 5 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 open,)

```
eapply sub_trunc.
```14 subgoals, subgoal 1 (ID 32275)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
sub_in_env ?32268 ?32272 ?32273 n ?32274 Γ'

subgoal 2 (ID 32270) is:
?32268 ⊢e P = P : A0
subgoal 3 (ID 32271) is:
Γ' ⊣e
subgoal 4 (ID 32258) is:
0 <= n
subgoal 5 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 10 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 11 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 12 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 13 (ID 29843) is:
Γ' ⊣e
subgoal 14 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 open, ?32272 open, ?32273 open, ?32274 open,)

```
apply H1.
```13 subgoals, subgoal 1 (ID 32270)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Δ ⊢e P = P : A0

subgoal 2 (ID 32271) is:
Γ' ⊣e
subgoal 3 (ID 32258) is:
0 <= n
subgoal 4 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using ,)

```
apply cRefl; trivial.
```12 subgoals, subgoal 1 (ID 32271)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
Γ' ⊣e

subgoal 2 (ID 32258) is:
0 <= n
subgoal 3 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using ,)

```

eapply H; eauto.
```11 subgoals, subgoal 1 (ID 32258)

Γ : Env
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
H3 : AA ↓ n ∈ Γ
============================
0 <= n

subgoal 2 (ID 32170) is:
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using ,)

```
intuition.
```10 subgoals, subgoal 1 (ID 32170)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
Γ' ⊢e #(v - 1) = #(v - 1) : A [n ← P]

subgoal 2 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 3 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 5 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 6 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 7 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 8 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29843) is:
Γ' ⊣e
subgoal 10 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using ,)

```

constructor.
```11 subgoals, subgoal 1 (ID 32348)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
Γ' ⊣e

subgoal 2 (ID 32349) is:
A [n ← P] ↓ v - 1 ⊂ Γ'
subgoal 3 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 4 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 5 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 6 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 7 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 8 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 9 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 10 (ID 29843) is:
Γ' ⊣e
subgoal 11 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using ,)

```
eapply H; eauto.
```10 subgoals, subgoal 1 (ID 32349)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
i : A ↓ v ⊂ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
A [n ← P] ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 3 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 5 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 6 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 7 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 8 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29843) is:
Γ' ⊣e
subgoal 10 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using , ?32350 using , ?32351 using , ?32352 using , ?32353 using ,)

```
destruct i as (AA & ? &?).
```10 subgoals, subgoal 1 (ID 32416)

Γ : Env
v : nat
A : Term
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H2 : A = AA ↑ (S v)
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
A [n ← P] ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 3 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 5 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 6 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 7 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 8 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29843) is:
Γ' ⊣e
subgoal 10 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using , ?32350 using , ?32351 using , ?32352 using , ?32353 using ,)

```
subst.
```10 subgoals, subgoal 1 (ID 32419)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ (S v) [n ← P] ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 3 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 4 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 5 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 6 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 7 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 8 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 29843) is:
Γ' ⊣e
subgoal 10 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using , ?32350 using , ?32351 using , ?32352 using , ?32353 using ,)

```

rewrite substP3; trivial.
```12 subgoals, subgoal 1 (ID 32420)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ v ↓ v - 1 ⊂ Γ'

subgoal 2 (ID 32421) is:
0 <= n
subgoal 3 (ID 32422) is:
n <= 0 + v
subgoal 4 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 5 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 6 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 7 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 8 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 9 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 10 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 11 (ID 29843) is:
Γ' ⊣e
subgoal 12 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using , ?32350 using , ?32351 using , ?32352 using , ?32353 using ,)

```

exists AA; split.
```13 subgoals, subgoal 1 (ID 32426)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ v = AA ↑ (S (v - 1))

subgoal 2 (ID 32427) is:
AA ↓ v - 1 ∈ Γ'
subgoal 3 (ID 32421) is:
0 <= n
subgoal 4 (ID 32422) is:
n <= 0 + v
subgoal 5 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 6 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 7 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 8 (ID 29779) is:
Γ' ⊢e N [n ← P] = M [n ← P] : A [n ← P]
subgoal 9 (ID 29795) is:
Γ' ⊢e M [n ← P0] = P [n ← P0] : A [n ← P0]
subgoal 10 (ID 29812) is:
Γ' ⊢e M [n ← P] = N [n ← P] : B [n ← P]
subgoal 11 (ID 29836) is:
Γ' ⊢e (λ [A [n ← P]], M [(S n) ← P]) · N [n ← P] =
M [ ← N] [n ← P] : B [ ← N] [n ← P]
subgoal 12 (ID 29843) is:
Γ' ⊣e
subgoal 13 (ID 29855) is:
Γ' ⊣e
(dependent evars: ?29859 using , ?29860 using , ?29861 using , ?29862 using , ?29885 using , ?29886 using , ?29887 using , ?29888 using , ?29941 using , ?29942 using , ?29943 using , ?29978 using , ?29982 using , ?29983 using , ?29984 using , ?29986 using , ?29987 using , ?29988 using , ?29989 using , ?30059 using , ?30060 using , ?30061 using , ?30062 using , ?30144 using , ?30145 using , ?30146 using , ?30147 using , ?30148 using , ?30234 using , ?30235 using , ?30239 using , ?30240 using , ?30247 using , ?30248 using , ?32059 using , ?32060 using , ?32061 using , ?32066 using , ?32067 using , ?32074 using , ?32075 using , ?32083 using , ?32084 using , ?32098 using , ?32107 using , ?32108 using , ?32120 using , ?32121 using , ?32134 using , ?32135 using , ?32138 using , ?32139 using , ?32142 using , ?32143 using , ?32149 using , ?32150 using , ?32151 using , ?32152 using , ?32175 using , ?32176 using , ?32177 using , ?32178 using , ?32231 using , ?32232 using , ?32233 using , ?32268 using , ?32272 using , ?32273 using , ?32274 using , ?32277 using , ?32278 using , ?32279 using , ?32280 using , ?32350 using , ?32351 using , ?32352 using , ?32353 using ,)

```
replace (S (v-1)) with v.
```14 subgoals, subgoal 1 (ID 32431)

Γ : Env
v : nat
w : Γ ⊣e
H : forall (Δ : Env) (P A : Term) (n : nat) (Γ' : Env),
Δ ⊢e P : A -> sub_in_env Δ P A n Γ Γ' -> Γ' ⊣e
AA : Term
H3 : AA ↓ v ∈ Γ
Δ : Env
P : Term
A0 : Term
H0 : Δ ⊢e P : A0
Γ' : Env
n : nat
H1 : sub_in_env Δ P A0 n Γ Γ'
l : n < v
============================
AA ↑ v = AA ↑ v

subgoal 2 (ID 32428) is:
v = S (v - 1)
subgoal 3 (ID 32427) is:
AA ↓ v - 1 ∈ Γ'
subgoal 4 (ID 32421) is:
0 <= n
subgoal 5 (ID 32422) is:
n <= 0 + v
subgoal 6 (ID 29725) is:
Γ' ⊢e Π (A [n ← P]), B [(S n) ← P] = Π (A' [n ← P]), B' [(S n) ← P] : !u
subgoal 7 (ID 29748) is:
Γ' ⊢e λ [A [n ← P]], M [(S n) ← P] = λ [A' [n ← P]], M' [(S n) ← P]
: Π (A [n ← P]), B [(S n) ← P]
subgoal 8 (ID 29766) is:
Γ' ⊢e M [n ← P] · N [n ← P] = M' [n ← P] · N' [n ← P] : B [ ← N] [n ← P]
subgoal 9 (ID 2```